/*
 * Demo-Version Redaktionsplaner Sparkasse Heidelberg
 * Gestaltung nach dem CI der Sparkasse Heidelberg (Schnittplatz-Vorlage ci-sparkasse-heidelberg):
 * Rot #EE0000, Text #1E1E1E, Leise #6E6E6E, Fläche #F2F2F2, Linie #DDDDDD, Hausschrift Sparkasse Rg.
 * Der rote Balken links (Bauchbinde aus dem Video Toolkit) ist das wiederkehrende Gestaltungselement.
 */
@font-face { font-family: 'Sparkasse Rg'; src: url('/schrift/Sparkasse_Rg.ttf') format('truetype'); font-display: swap; }

:root {
  --rot: #EE0000;
  --rot-dunkel: #C40000;
  --rot-hell: #FDEDED;
  --text: #1E1E1E;
  --leise: #6E6E6E;
  --gedaempft: #9A9A9A;
  --flaeche: #F2F2F2;
  --flaeche-2: #FAFAFA;
  --linie: #DDDDDD;
  --weiss: #FFFFFF;
  --gruen: #1F7A3A;
  --gruen-hell: #E8F4EC;
  --gelb: #A86500;
  --gelb-hell: #FFF4E0;
  --blau: #1F5FA8;
  --blau-hell: #EAF1FA;
  --schatten: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
  --schatten-hoch: 0 8px 30px rgba(0,0,0,.16);
  --radius: 6px;
  --kopf: 60px;
  --seite: 248px;
  /* Bedienoberfläche in klarer Systemschrift; die Hausschrift gilt für Inhalte der Sparkasse (Ralph, 23.10.2026) */
  --schrift: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --marke: 'Sparkasse Rg', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--flaeche); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
a { color: var(--rot); }
strong, b { font-weight: 700; }
img { max-width: 100%; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.versteckt { display: none !important; }
.leise { color: var(--leise); }
.klein { font-size: 13px; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reihe.zwischen { justify-content: space-between; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.raster-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .raster-2, .raster-3 { grid-template-columns: 1fr; } }

/* ---------- Kopf ---------- */
.kopfleiste { position: fixed; inset: 0 0 auto 0; height: var(--kopf); background: var(--rot); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; z-index: 50; }
.kopfleiste .logo { height: 34px; display: block; }
.kopfleiste .titel { font-size: 15px; line-height: 1.15; opacity: .95; border-left: 1px solid rgba(255,255,255,.45); padding-left: 16px; }
.kopfleiste .titel small { display: block; font-size: 12px; opacity: .85; }
.kopfleiste .raum { flex: 1; }
.kopfleiste .k { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.kopfleiste .k:hover { background: rgba(255,255,255,.14); }
.nutzer { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nutzer .rolle { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 10px; }
.kopfleiste .menue-k { display: none; }
@media (max-width: 900px) {
  .kopfleiste .titel { display: none; }
  .nutzer .name { display: none; }
}

/* ---------- Seitennavigation ---------- */
.seitenleiste { position: fixed; top: var(--kopf); bottom: 0; left: 0; width: var(--seite); background: var(--weiss); border-right: 1px solid var(--linie); overflow-y: auto; padding: 12px 0 24px; z-index: 40; }
.nav-gruppe { padding: 12px 20px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gedaempft); display: flex; align-items: center; gap: 8px; }
.nav-gruppe .schritt { width: 18px; height: 18px; border-radius: 50%; background: var(--flaeche); color: var(--leise); display: inline-grid; place-items: center; font-size: 11px; }
.nav-punkt { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 20px; color: var(--text); text-decoration: none; font-size: 15px; }
.nav-punkt:hover { background: var(--flaeche-2); }
.nav-punkt .icon { color: var(--leise); }
.nav-punkt.aktiv { background: var(--rot-hell); color: var(--rot-dunkel); }
.nav-punkt.aktiv::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--rot); }
.nav-punkt.aktiv .icon { color: var(--rot); }
.nav-punkt .zahl { margin-left: auto; background: var(--rot); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.seitenleiste .fuss { padding: 16px 20px 0; font-size: 12px; color: var(--gedaempft); }

.inhalt { margin-left: var(--seite); padding: calc(var(--kopf) + 24px) 32px 96px; min-height: 100vh; max-width: calc(1440px + var(--seite)); }

/* Unten auf dem Handy */
.unterleiste { display: none; }
@media (max-width: 900px) {
  .seitenleiste { transform: translateX(-100%); transition: transform .2s; width: 82vw; max-width: 320px; visibility: hidden; }
  body.menue-offen .seitenleiste { transform: none; visibility: visible; box-shadow: var(--schatten-hoch); }
  body.menue-offen::after { content: ''; position: fixed; inset: var(--kopf) 0 0 0; background: rgba(0,0,0,.35); z-index: 30; }
  .kopfleiste .menue-k { display: inline-flex; }
  .inhalt { margin-left: 0; padding: calc(var(--kopf) + 16px) 16px calc(88px + env(safe-area-inset-bottom)); }
  .unterleiste { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--weiss); border-top: 1px solid var(--linie); z-index: 45; padding-bottom: env(safe-area-inset-bottom); }
  .unterleiste a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; font-size: 11px; color: var(--leise); text-decoration: none; }
  .unterleiste a.aktiv { color: var(--rot); }
  h1 { font-size: 24px; }
}

/* ---------- Ansichtskopf ---------- */
.ansicht-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ansicht-kopf h1 { margin-bottom: 4px; }
.erklaerung { color: var(--leise); max-width: 760px; margin: 0; }
.ansicht-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.brotkrumen { font-size: 14px; color: var(--leise); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.brotkrumen a { color: var(--leise); text-decoration: none; }
.brotkrumen a:hover { color: var(--rot); }

/* ---------- Knöpfe ---------- */
.k { font-family: var(--schrift); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--linie); background: var(--weiss); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.k:hover { border-color: var(--leise); }
.k:focus-visible, .eingabe:focus-visible, .nav-punkt:focus-visible, a:focus-visible { outline: 3px solid rgba(238,0,0,.35); outline-offset: 2px; }
.k:disabled { opacity: .55; cursor: not-allowed; }
.k-haupt { background: var(--rot); border-color: var(--rot); color: #fff; }
.k-haupt:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.k-ki { background: var(--text); border-color: var(--text); color: #fff; }
.k-ki:hover { background: #000; }
.k-ki .icon { color: #FF6B6B; }
.k-leise { border-color: transparent; background: transparent; color: var(--leise); }
.k-leise:hover { background: var(--flaeche); color: var(--text); border-color: transparent; }
.k-gefahr { color: var(--rot-dunkel); border-color: #F3B4B4; }
.k-gefahr:hover { background: var(--rot-hell); border-color: var(--rot); }
.k-ja { color: var(--gruen); border-color: #B7DCC3; }
.k-ja.an, .k-ja:hover { background: var(--gruen-hell); border-color: var(--gruen); }
.k-nein.an { background: var(--flaeche); border-color: var(--leise); color: var(--leise); }
.k-blind { border-style: dashed; color: var(--leise); }
.k-klein { min-height: 32px; padding: 4px 10px; font-size: 14px; }
.k.arbeitet { cursor: progress; }
.k.nimmt-auf { background: var(--rot); color: #fff; animation: puls 1.2s infinite; }
@keyframes puls { 50% { box-shadow: 0 0 0 6px rgba(238,0,0,.18); } }
.kreisel { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: drehen .8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Karten ---------- */
.karte { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px; position: relative; }
.karte.balken { padding-left: 28px; }
.karte.balken::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--rot); border-radius: var(--radius) 0 0 var(--radius); }
.karte h2, .karte h3 { margin-top: 0; }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.karte-kopf h2, .karte-kopf h3 { margin: 0; }
.abschnitt { margin-bottom: 24px; }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.feld label { font-size: 14px; color: var(--leise); }
.feld-hilfe { font-size: 13px; color: var(--gedaempft); }
.eingabe { font-family: var(--schrift); font-size: 16px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss); color: var(--text); width: 100%; }
.eingabe:focus { border-color: var(--leise); outline: none; }
textarea.eingabe { resize: vertical; line-height: 1.5; }
.mit-diktat { position: relative; }
.mit-diktat > .k { position: absolute; right: 6px; top: 6px; }
.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.schalter input { width: 40px; height: 22px; appearance: none; background: var(--linie); border-radius: 11px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.schalter input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .15s; }
.schalter input:checked { background: var(--rot); }
.schalter input:checked::after { left: 21px; }
.regler { width: 100%; accent-color: var(--rot); }

/* ---------- Chips und Marken ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 10px; border-radius: 12px; background: var(--flaeche); color: var(--leise); white-space: nowrap; }
.chip.rot { background: var(--rot-hell); color: var(--rot-dunkel); }
.chip.gruen { background: var(--gruen-hell); color: var(--gruen); }
.chip.gelb { background: var(--gelb-hell); color: var(--gelb); }
.chip.blau { background: var(--blau-hell); color: var(--blau); }
.kanal { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 8px 2px 6px; border-radius: 4px; background: var(--flaeche); color: var(--text); }
.kanal::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--k); }
.wert { display: inline-grid; place-items: center; min-width: 44px; height: 44px; border-radius: 50%; font-size: 17px; color: #fff; background: var(--leise); flex: none; }
.wert.hoch { background: var(--rot); }
.wert.mittel { background: #E36A6A; }
.wert.niedrig { background: #BDBDBD; }

/* ---------- Reiter ---------- */
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--linie); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter-k { font-family: var(--schrift); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; background: none; color: var(--leise); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter-k:hover { color: var(--text); }
.reiter-k[aria-selected="true"] { color: var(--text); border-bottom-color: var(--rot); }
.reiter-k .zahl { background: var(--flaeche); border-radius: 10px; font-size: 12px; padding: 0 7px; }

/* ---------- Tooltip, Meldungen, Dialog ---------- */
.tipp { position: fixed; z-index: 1000; max-width: 300px; background: var(--text); color: #fff; font-size: 13px; line-height: 1.4; padding: 7px 10px; border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity .12s; }
.tipp.sichtbar { opacity: 1; transition-delay: .35s; }
@media (hover: none) { .tipp { display: none; } }
.meldungen { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 900px) { .meldungen { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.meldung { display: flex; gap: 10px; align-items: flex-start; background: var(--text); color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--schatten-hoch); font-size: 15px; animation: rein .2s; }
.meldung.m-fehler { background: var(--rot-dunkel); }
.meldung.m-ok .icon { color: #8FD9A8; }
.meldung.weg { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } }
.dialog-hinter { position: fixed; inset: 0; background: rgba(30,30,30,.45); z-index: 500; display: grid; place-items: center; padding: 16px; animation: rein .15s; }
.dialog { background: var(--weiss); border-radius: 8px; box-shadow: var(--schatten-hoch); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-top: 6px solid var(--rot); }
.dialog.breit { width: min(960px, 100%); }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.dialog-kopf h2 { margin: 0; font-size: 21px; }
.dialog-inhalt { padding: 8px 20px 16px; overflow-y: auto; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--linie); flex-wrap: wrap; }

/* ---------- Leere Zustände, Hinweise ---------- */
.leer { text-align: center; padding: 40px 20px; color: var(--leise); background: var(--weiss); border-radius: var(--radius); border: 1px dashed var(--linie); }
.leer .reihe { justify-content: center; margin-top: 12px; }
.hinweis { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--blau-hell); color: #20456E; font-size: 15px; margin-bottom: 16px; align-items: flex-start; }
.hinweis.gelb { background: var(--gelb-hell); color: #6B4300; }
.hinweis.rot { background: var(--rot-hell); color: var(--rot-dunkel); }
.hinweis .icon { margin-top: 2px; }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--weiss); }
.anmeldung .buehne { background: var(--rot); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.anmeldung .buehne img { width: 260px; }
.anmeldung .buehne h1 { font-size: 42px; max-width: 560px; }
.anmeldung .buehne p { font-size: 18px; max-width: 520px; opacity: .92; }
.anmeldung .formular { display: grid; place-items: center; padding: 32px; }
.anmeldung form { width: min(380px, 100%); }
.anmeldung .demo-band { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.18); display: inline-block; padding: 4px 12px; border-radius: 12px; }
@media (max-width: 900px) {
  .anmeldung { grid-template-columns: 1fr; }
  .anmeldung .buehne { padding: 28px 20px; gap: 24px; }
  .anmeldung .buehne h1 { font-size: 28px; }
  .anmeldung .buehne img { width: 180px; }
}

/* ---------- Start ---------- */
.ablauf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-bottom: 24px; background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.ablauf a { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; text-decoration: none; color: var(--text); border-right: 1px solid var(--linie); position: relative; }
.ablauf a:last-child { border-right: 0; }
.ablauf a:hover { background: var(--flaeche-2); }
.ablauf .nr { width: 30px; height: 30px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-size: 15px; }
.ablauf .t { font-size: 17px; }
.ablauf .z { font-size: 13px; color: var(--leise); }
@media (max-width: 900px) { .ablauf { grid-template-columns: 1fr; } .ablauf a { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--linie); } .ablauf .z { margin-left: auto; text-align: right; } }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kennzahl { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; }
.kennzahl .z { font-size: 32px; line-height: 1; }
.kennzahl .b { font-size: 14px; color: var(--leise); margin-top: 6px; }

/* ---------- Listen ---------- */
.liste { display: flex; flex-direction: column; background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); }
.zeile { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--flaeche); }
.zeile:last-child { border-bottom: 0; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .titel { font-size: 17px; line-height: 1.3; }
.zeile .titel a { color: var(--text); text-decoration: none; }
.zeile .titel a:hover { color: var(--rot); }
.zeile .unter { font-size: 13px; color: var(--leise); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zeile .knoepfe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .zeile { flex-wrap: wrap; } .zeile .knoepfe { width: 100%; justify-content: flex-start; } }

/* Themenschnüffler */
.fund .winkel { margin-top: 8px; font-size: 15px; color: var(--text); background: var(--flaeche-2); border-left: 3px solid var(--rot); padding: 6px 10px; }
.fund details { margin-top: 6px; font-size: 13px; color: var(--leise); }
.fund summary { cursor: pointer; }
.teilwerte { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin-top: 8px; }
.teilwert { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.teilwert .balken-h { height: 5px; background: var(--flaeche); border-radius: 3px; overflow: hidden; }
.teilwert .balken-h span { display: block; height: 100%; background: var(--rot); }
.filterleiste { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filterleiste .eingabe { width: auto; min-width: 200px; }

/* Arbeitsmappe (Kanban) */
.mappe { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.spalte { background: #E9E9E9; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.spalte.ziel { outline: 2px dashed var(--rot); }
.spalte-kopf { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; font-size: 15px; }
.spalte-kopf .zahl { background: var(--weiss); border-radius: 10px; padding: 0 8px; font-size: 13px; }
.themenkarte { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); padding: 12px 12px 10px 16px; margin-bottom: 10px; cursor: pointer; position: relative; border-left: 4px solid var(--linie); }
.themenkarte:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.themenkarte.p1 { border-left-color: var(--rot); }
.themenkarte .t { font-size: 16px; line-height: 1.3; margin-bottom: 8px; }
.themenkarte .m { display: flex; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--leise); }
.themenkarte .unten { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--leise); }
.themenkarte.zieht { opacity: .5; }
@media (max-width: 900px) { .mappe { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; } .spalte { scroll-snap-align: start; } }

/* Thema: Arbeitsoberfläche */
.thema-kopf { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 20px 14px 28px; margin-bottom: 16px; position: relative; }
.thema-kopf::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--rot); border-radius: var(--radius) 0 0 var(--radius); }
.thema-kopf h1 { font-size: 26px; margin-bottom: 8px; }
.statusleiste { display: flex; gap: 0; margin-top: 12px; overflow-x: auto; }
.statusleiste button { font-family: var(--schrift); font-size: 13px; border: 1px solid var(--linie); background: var(--weiss); padding: 6px 14px; cursor: pointer; color: var(--leise); white-space: nowrap; margin-left: -1px; }
.statusleiste button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.statusleiste button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.statusleiste button.an { background: var(--rot); color: #fff; border-color: var(--rot); position: relative; z-index: 1; }
.statusleiste button.vorbei { color: var(--text); background: var(--rot-hell); }
.arbeitsflaeche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .arbeitsflaeche { grid-template-columns: 1fr; } }
.seitenspalte { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--kopf) + 16px); }
@media (max-width: 1200px) { .seitenspalte { position: static; } }

.material { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mat { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.mat.aus { opacity: .5; }
.mat .vorschau { height: 120px; background: var(--flaeche) center / cover no-repeat; display: grid; place-items: center; color: var(--gedaempft); }
.mat .info { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mat .info .t { font-size: 14px; line-height: 1.3; word-break: break-word; }
.mat .info .a { font-size: 12px; color: var(--leise); }
.mat .aktionen { display: flex; justify-content: space-between; padding: 4px 6px; border-top: 1px solid var(--flaeche); }
.ablage { border: 2px dashed var(--linie); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--leise); background: var(--flaeche-2); cursor: pointer; transition: border-color .15s, background .15s; }
.ablage.drueber, .ablage:hover { border-color: var(--rot); background: var(--rot-hell); color: var(--rot-dunkel); }

/* Wissensbasis-Vorschläge mit Ja/Nein */
.kb-vorschlag { border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; background: var(--weiss); }
.kb-vorschlag.ja { border-color: var(--gruen); background: var(--gruen-hell); }
.kb-vorschlag.nein { opacity: .55; }
.kb-vorschlag .bild { width: 72px; height: 72px; border-radius: 4px; background: var(--flaeche) center / cover; flex: none; }
.kb-vorschlag .auszug { font-size: 13px; color: var(--leise); margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kb-vorschlag .frage { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Editor ---------- */
.editor { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.editor.fokus { position: fixed; inset: 0; z-index: 400; border-radius: 0; display: flex; flex-direction: column; }
.editor.fokus .editor-flaeche { flex: 1; max-width: 780px; margin: 0 auto; width: 100%; font-size: 19px; }
.werkzeugleiste { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--linie); background: var(--flaeche-2); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: var(--kopf); z-index: 5; }
.editor.fokus .werkzeugleiste { top: 0; }
.werkzeugleiste .k { min-height: 34px; padding: 4px 9px; font-size: 14px; }
.werkzeugleiste .trenner { width: 1px; background: var(--linie); margin: 4px 4px; }
.editor-flaeche { padding: 20px 24px; min-height: 320px; outline: none; font-size: 17px; line-height: 1.65; overflow-y: auto; }
.editor-flaeche h2 { font-size: 23px; margin: 1.2em 0 .4em; }
.editor-flaeche h3 { font-size: 19px; margin: 1em 0 .3em; }
.editor-flaeche blockquote { border-left: 4px solid var(--rot); margin: 1em 0; padding: 2px 0 2px 16px; color: #444; }
.editor-flaeche:empty::before { content: attr(data-platzhalter); color: var(--gedaempft); }
.editor-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--leise); flex-wrap: wrap; }
.luecke { background: #FFF1B8; padding: 0 2px; border-radius: 2px; }
.lernhinweis { display: inline-flex; gap: 6px; align-items: center; color: var(--gruen); }

/* Folien-Editor und Karussell */
.folien-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
@media (max-width: 900px) { .folien-editor { grid-template-columns: 1fr; } }
.folie-zeile { display: grid; grid-template-columns: 32px 140px 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--flaeche); }
@media (max-width: 700px) { .folie-zeile { grid-template-columns: 28px 1fr; } .folie-zeile > :nth-child(n+3) { grid-column: 1 / -1; } }
.folie-zeile .nr { width: 28px; height: 28px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-size: 13px; }
.folie-klein { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; position: relative; border-radius: 4px; box-shadow: var(--schatten); background: #fff; }
.folie-klein > .spk-folie { transform-origin: top left; position: absolute; top: 0; left: 0; }
.karussell { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; }
.karussell-band { display: flex; transition: transform .3s ease; }
.karussell-band > * { flex: 0 0 100%; }
.karussell .pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; display: grid; place-items: center; z-index: 2; }
.karussell .pfeil.l { left: 8px; } .karussell .pfeil.r { right: 8px; }
.karussell .punkte { display: flex; gap: 4px; justify-content: center; padding: 8px 0 2px; }
.karussell .punkte span { width: 6px; height: 6px; border-radius: 50%; background: #C7C7C7; }
.karussell .punkte span.an { background: #0095F6; }
.karussell .zaehler { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; z-index: 2; font-family: -apple-system, sans-serif; }

/* Hashtags */
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss); }
.tags .tag { display: inline-flex; align-items: center; gap: 4px; background: var(--blau-hell); color: var(--blau); border-radius: 12px; padding: 2px 4px 2px 10px; font-size: 14px; }
.tags .tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; font-size: 16px; line-height: 1; }
.tags input { border: 0; outline: none; font-family: var(--schrift); font-size: 15px; flex: 1; min-width: 120px; padding: 4px; }
.zeichen { font-size: 13px; color: var(--leise); }
.zeichen.zuviel { color: var(--rot); }

/* ---------- Kalender ---------- */
.kal-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.kal-kopf .zeitraum { font-size: 20px; min-width: 220px; }
.kalender { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); overflow-x: auto; }
.kal-raster { display: grid; min-width: 900px; }
.kal-zelle { border-right: 1px solid var(--flaeche); border-bottom: 1px solid var(--flaeche); min-height: 92px; padding: 6px; position: relative; }
.kal-zelle.kopfzelle { min-height: 0; background: var(--flaeche-2); font-size: 13px; color: var(--leise); text-align: center; padding: 8px 4px; position: sticky; top: 0; z-index: 1; }
.kal-zelle.kopfzelle.heute { color: var(--rot); }
.kal-zelle.kanalzelle { min-height: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; background: var(--flaeche-2); position: sticky; left: 0; z-index: 1; }
.kal-zelle.heute { background: #FFF9F9; }
.kal-zelle.ziel { background: var(--rot-hell); outline: 2px dashed var(--rot); outline-offset: -2px; }
.kal-zelle.vergangen { background: repeating-linear-gradient(135deg, #fff, #fff 6px, #FAFAFA 6px, #FAFAFA 12px); }
.kal-eintrag { display: block; font-size: 12px; line-height: 1.3; padding: 5px 7px; border-radius: 4px; background: var(--weiss); border: 1px solid var(--linie); border-left: 4px solid var(--k); margin-bottom: 4px; cursor: grab; text-align: left; width: 100%; font-family: var(--schrift); color: var(--text); }
.kal-eintrag:hover { box-shadow: var(--schatten); }
.kal-eintrag .u { color: var(--leise); }
.kal-eintrag.simuliert { background: var(--gruen-hell); }
.kal-eintrag.zieht { opacity: .4; }
.kal-monat .kal-zelle { min-height: 110px; }
.kal-monat .tag-nr { font-size: 12px; color: var(--leise); margin-bottom: 4px; }
.kal-liste .tag { margin-bottom: 14px; }
.kal-liste .tag h3 { font-size: 15px; color: var(--leise); margin: 0 0 6px; }

/* ---------- Vorschau (Simulation) ---------- */
.sim-buehne { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; align-items: start; }
.sim-rahmen { background: var(--weiss); border-radius: 12px; box-shadow: var(--schatten); overflow: hidden; }
.sim-titel { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--leise); margin-bottom: 8px; }
.telefon { width: 375px; max-width: 100%; margin: 0 auto; border: 10px solid #111; border-radius: 40px; overflow: hidden; background: #fff; box-shadow: var(--schatten-hoch); }
.telefon .statusbar { height: 28px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; font: 600 13px -apple-system, sans-serif; }

/* ---------- Schnittplatz ---------- */
.schnitt { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .schnitt { grid-template-columns: 1fr; } }
.player { position: relative; background: #000; border-radius: 8px; overflow: hidden; margin: 0 auto; }
.player.hoch { aspect-ratio: 9 / 16; width: 100%; max-width: 380px; }
.player.quer { aspect-ratio: 16 / 9; width: 100%; }
.player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.player .ut { position: absolute; left: 6%; right: 6%; text-align: center; transform: translateY(-100%); cursor: ns-resize; touch-action: none; }
.player .ut span { display: inline; background: var(--rot); color: #fff; font-family: var(--schrift); line-height: 1.5; padding: .12em .35em; box-decoration-break: clone; -webkit-box-decoration-break: clone; white-space: pre-line; }
.player .ut.ohne-kasten span { background: none; text-shadow: 0 2px 4px rgba(0,0,0,.8), 0 0 2px #000; }
.player .ut.ziehen { outline: 1px dashed rgba(255,255,255,.7); }
.zeitleiste { display: flex; height: 44px; background: var(--flaeche); border-radius: 4px; overflow: hidden; position: relative; margin: 10px 0; }
.zeitleiste .seg { height: 100%; border-right: 2px solid #fff; display: flex; align-items: center; padding: 0 6px; font-size: 11px; color: #fff; overflow: hidden; white-space: nowrap; cursor: pointer; }
.zeitleiste .kopfpos { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); pointer-events: none; }
.woerter { line-height: 2; font-size: 15px; max-height: 280px; overflow-y: auto; padding: 8px; background: var(--flaeche-2); border-radius: 4px; }
.woerter span { padding: 2px 3px; border-radius: 3px; cursor: pointer; }
.woerter span.drin { background: var(--gruen-hell); }
.woerter span.raus { color: var(--gedaempft); text-decoration: line-through; }
.woerter span:hover { outline: 1px solid var(--leise); }
.ut-liste .ut-zeile { display: grid; grid-template-columns: 80px 80px 1fr auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--flaeche); }
.ut-liste .ut-zeile.aktiv { background: var(--rot-hell); }
.ut-liste input { padding: 6px 8px; font-size: 14px; }
@media (max-width: 700px) { .ut-liste .ut-zeile { grid-template-columns: 1fr 1fr; } .ut-liste .ut-zeile > :nth-child(3) { grid-column: 1 / -1; } }

/* ---------- Reporter (Handy) ---------- */
.reporter { max-width: 560px; margin: 0 auto; }
.aufnahme-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.aufnahme { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px 10px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; font-family: var(--schrift); font-size: 16px; color: var(--text); cursor: pointer; box-shadow: var(--schatten); min-height: 120px; }
.aufnahme .icon { width: 34px; height: 34px; color: var(--rot); }
.aufnahme:hover { border-color: var(--rot); }
.aufnahme.nimmt-auf { background: var(--rot); color: #fff; }
.aufnahme.nimmt-auf .icon { color: #fff; }
.sammel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sammel .stueck { aspect-ratio: 1; border-radius: 6px; background: var(--flaeche) center / cover; position: relative; display: grid; place-items: center; color: var(--leise); font-size: 12px; text-align: center; overflow: hidden; }
.sammel .stueck button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.balken-fortschritt { height: 6px; background: var(--flaeche); border-radius: 3px; overflow: hidden; }
.balken-fortschritt span { display: block; height: 100%; background: var(--rot); width: 0; transition: width .2s; }

/* ---------- Stilregister ---------- */
.regel { padding: 12px 16px; border-bottom: 1px solid var(--flaeche); display: flex; gap: 12px; align-items: flex-start; }
.regel:last-child { border-bottom: 0; }
.regel .haupt { flex: 1; min-width: 0; }
.regel .t { font-size: 16px; }
.regel .kern { font-size: 14px; color: var(--leise); margin-top: 2px; }
.regel .beispiel { font-size: 13px; margin-top: 6px; }
.regel.aus { opacity: .5; }
.diff del { background: #FBE3E3; color: #9B1C1C; text-decoration: line-through; }
.diff ins { background: #DDF2E3; color: #145A2A; text-decoration: none; }
.diff { font-size: 15px; line-height: 1.7; white-space: pre-wrap; background: var(--flaeche-2); padding: 12px; border-radius: 4px; max-height: 360px; overflow-y: auto; }

/* ---------- Tabellen ---------- */
.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); font-size: 15px; }
.tabelle th { text-align: left; font-weight: 400; color: var(--leise); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--linie); background: var(--flaeche-2); }
.tabelle td { padding: 10px 12px; border-bottom: 1px solid var(--flaeche); vertical-align: top; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-huelle { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--schatten); }
.balkendiagramm { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0; }
.balkendiagramm .b { flex: 1; background: var(--rot); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.balkendiagramm .b:hover { background: var(--rot-dunkel); }

/* ---------- Hilfe, Erklärseite ---------- */
.prosa { max-width: 820px; font-size: 17px; line-height: 1.65; }
.prosa h2 { margin-top: 1.6em; padding-left: 14px; border-left: 5px solid var(--rot); }
.prosa h3 { margin-top: 1.3em; }
.prosa ul, .prosa ol { padding-left: 22px; }
.prosa li { margin-bottom: 6px; }
.prosa code { background: var(--flaeche); padding: 1px 5px; border-radius: 3px; font-size: 14px; }
.prosa table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
.prosa th, .prosa td { border-bottom: 1px solid var(--linie); padding: 8px; text-align: left; vertical-align: top; }
.prosa blockquote { margin: 0; padding: 8px 16px; background: var(--flaeche-2); border-left: 4px solid var(--rot); }
.inhaltsverzeichnis { position: sticky; top: calc(var(--kopf) + 16px); font-size: 14px; }
.inhaltsverzeichnis a { display: block; padding: 4px 0 4px 10px; color: var(--leise); text-decoration: none; border-left: 2px solid var(--linie); }
.inhaltsverzeichnis a:hover { color: var(--rot); border-left-color: var(--rot); }

/* Schwebende Knöpfe: Hilfe-Chat und Fehler melden */
.schwebend { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
@media (max-width: 900px) { .schwebend { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; } }
.rund { width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: var(--schatten-hoch); }
.rund.hilfe { background: var(--text); color: #fff; }
.rund.fehler { background: var(--weiss); color: var(--rot); width: 44px; height: 44px; }
.chatfenster { position: fixed; right: 20px; bottom: 84px; width: min(400px, calc(100vw - 24px)); height: min(560px, calc(100vh - 140px)); background: var(--weiss); border-radius: 12px; box-shadow: var(--schatten-hoch); z-index: 310; display: flex; flex-direction: column; overflow: hidden; border-top: 6px solid var(--rot); }
@media (max-width: 900px) { .chatfenster { right: 12px; bottom: calc(140px + env(safe-area-inset-bottom)); height: min(520px, calc(100vh - 220px)); } }
.chat-kopf { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--linie); }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--flaeche-2); }
.blase { max-width: 88%; padding: 9px 13px; border-radius: 12px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.blase.nutzer { align-self: flex-end; background: var(--rot); color: #fff; border-bottom-right-radius: 3px; }
.blase.hilfe { align-self: flex-start; background: var(--weiss); border: 1px solid var(--linie); border-bottom-left-radius: 3px; }
.chat-eingabe { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--linie); }
.chat-eingabe .eingabe { flex: 1; }
.vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; }
.vorschlaege button { font-family: var(--schrift); font-size: 13px; border: 1px solid var(--linie); background: var(--weiss); border-radius: 14px; padding: 4px 10px; cursor: pointer; }

/* Ladeanzeige */
.laedt { display: flex; align-items: center; gap: 10px; color: var(--leise); padding: 24px 0; }
.skelett { background: linear-gradient(90deg, #eee, #f7f7f7, #eee); background-size: 200% 100%; animation: schimmer 1.2s infinite; border-radius: 4px; height: 16px; margin: 8px 0; }
@keyframes schimmer { to { background-position: -200% 0; } }

@media print { .kopfleiste, .seitenleiste, .unterleiste, .schwebend { display: none; } .inhalt { margin: 0; padding: 0; } }

/* ---------- Chat ---------- */
.chat-huelle { display: grid; grid-template-columns: 300px minmax(0, 1fr); background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); height: calc(100vh - var(--kopf) - 230px); min-height: 460px; overflow: hidden; }
.chat-liste { border-right: 1px solid var(--linie); overflow-y: auto; }
.chat-eintrag { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; font-family: var(--schrift); border-bottom: 1px solid var(--flaeche); position: relative; }
.chat-eintrag:hover { background: var(--flaeche-2); }
.chat-eintrag.aktiv { background: var(--rot-hell); }
.chat-eintrag.aktiv::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rot); }
.chat-eintrag-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-eintrag-text .n { font-size: 15px; display: flex; justify-content: space-between; gap: 6px; color: var(--text); }
.chat-eintrag-text .n .zahl { background: var(--rot); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; }
.chat-eintrag-text .l { font-size: 13px; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; text-transform: uppercase; }
.chat-fenster { display: flex; flex-direction: column; min-height: 0; }
.chat-kopf-gross { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--linie); }
.chat-verlauf-gross { flex: 1; overflow-y: auto; padding: 16px; background: var(--flaeche-2); display: flex; flex-direction: column; gap: 8px; }
.chat-zeile { display: flex; }
.chat-zeile.meins { justify-content: flex-end; }
.chat-blase { max-width: min(78%, 620px); background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px 12px 12px 3px; padding: 8px 12px; font-size: 15px; line-height: 1.45; }
.chat-blase.meins { background: var(--rot); border-color: var(--rot); color: #fff; border-radius: 12px 12px 3px 12px; }
.chat-blase.meins a { color: #fff; }
.chat-blase.kim { background: #F4F4F4; border-left: 4px solid var(--text); }
.chat-von { font-size: 12px; color: var(--leise); margin-bottom: 2px; }
.chat-blase.kim .chat-von { color: var(--text); }
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-fuss { font-size: 11px; opacity: .7; margin-top: 4px; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.chat-mini { border: 0; background: none; font-family: var(--schrift); font-size: 11px; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }
.chat-system { align-self: center; font-size: 13px; color: var(--leise); background: var(--weiss); border: 1px dashed var(--linie); border-radius: 12px; padding: 4px 12px; max-width: 90%; text-align: center; white-space: pre-wrap; }
.chat-denkt { display: flex; gap: 8px; align-items: center; padding: 6px 16px; font-size: 13px; color: var(--leise); background: var(--flaeche-2); }
.chat-eingabe-gross { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--linie); }
.chat-eingabe-gross textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; }
.nur-handy { display: none; }
@media (max-width: 900px) {
  .chat-huelle { grid-template-columns: 1fr; height: calc(100vh - var(--kopf) - 200px - env(safe-area-inset-bottom)); }
  .chat-huelle .chat-fenster { display: none; }
  .chat-huelle.raum-offen .chat-liste { display: none; }
  .chat-huelle.raum-offen .chat-fenster { display: flex; }
  .nur-handy { display: inline-flex; }
  .chat-blase { max-width: 88%; }
}

/* ---------- Aufgaben ---------- */
.aufgabe.erledigt .titel { text-decoration: line-through; color: var(--leise); }
.aufgabe .haken { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--linie); background: var(--weiss); cursor: pointer; display: grid; place-items: center; flex: none; color: transparent; }
.aufgabe .haken:hover { border-color: var(--gruen); color: var(--gruen); }
.aufgabe.erledigt .haken { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.faellig-ueber { color: var(--rot-dunkel); }
.unterleiste a { position: relative; }
.unterleiste .zahl { position: absolute; top: 3px; left: 56%; background: var(--rot); color: #fff; font-size: 10px; line-height: 16px; min-width: 16px; text-align: center; border-radius: 8px; padding: 0 4px; }

/* ---------- Chat-Hinweise oben rechts, schwebendes Chatfenster, Lesehaken ---------- */
.chat-hinweise { position: fixed; top: calc(var(--kopf) + 12px); right: 16px; z-index: 450; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 24px)); }
.chat-hinweis { display: flex; gap: 10px; align-items: flex-start; background: var(--weiss); border-radius: 8px; box-shadow: var(--schatten-hoch); padding: 12px 34px 12px 14px; border-left: 5px solid var(--rot); position: relative; animation: hinweisRein .25s ease-out; }
.chat-hinweis.weg { opacity: 0; transform: translateX(20px); transition: all .25s; }
@keyframes hinweisRein { from { opacity: 0; transform: translateX(30px); } }
.chat-hinweis-inhalt { min-width: 0; flex: 1; font-size: 14px; }
.chat-hinweis-inhalt strong { display: block; font-size: 15px; font-weight: 400; }
.chat-hinweis-text { color: var(--leise); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.chat-hinweis-zu { position: absolute; top: 6px; right: 6px; border: 0; background: none; cursor: pointer; color: var(--leise); padding: 4px; border-radius: 4px; }
.chat-hinweis-zu:hover { background: var(--flaeche); }
.chat-schwebend { position: fixed; right: 84px; bottom: 20px; width: 380px; height: min(560px, calc(100vh - var(--kopf) - 40px)); z-index: 420; background: var(--weiss); border-radius: 10px; box-shadow: var(--schatten-hoch); border-top: 5px solid var(--rot); overflow: hidden; display: flex; flex-direction: column; }
.chat-schwebend.zieht { opacity: .92; user-select: none; }
.chat-schwebend-inhalt { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-schwebend .chat-verlauf-gross { padding: 10px; }
.chat-schwebend .chat-blase { max-width: 88%; font-size: 14px; }
.chat-schwebend .chat-eingabe-gross { flex-wrap: wrap; }
.chat-schwebend .chat-eingabe-gross > .reihe { width: 100%; }
.chat-kopf-gross.griff { cursor: grab; touch-action: none; }
.chat-schwebend.zieht .chat-kopf-gross.griff { cursor: grabbing; }
.einzeilig { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.haken-lesen { font-size: 12px; letter-spacing: -2px; opacity: .85; }
.haken-lesen.gelesen { color: #1A73E8; background: #fff; border-radius: 8px; padding: 0 5px 0 3px; opacity: 1; font-weight: 700; }
.chat-blase:not(.meins) .haken-lesen.gelesen { color: #1F8FE5; }
.bearbeitet { font-style: italic; }
@media (max-width: 700px) {
  .chat-hinweise { top: calc(var(--kopf) + 8px); right: 12px; }
  .chat-schwebend { left: 8px !important; right: 8px !important; top: calc(var(--kopf) + 8px) !important; bottom: calc(76px + env(safe-area-inset-bottom)) !important; width: auto; height: auto; }
}
.chat-blase.meins .chat-fuss { opacity: 1; color: rgba(255,255,255,.82); }
.chat-blase.meins .chat-fuss .chat-mini { color: rgba(255,255,255,.9); }

/* Facebook-Formate in der Arbeitsfläche */
.fb-formate { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fb-format { font-family: var(--schrift); font-size: 14px; border: 1px solid var(--linie); background: var(--weiss); border-radius: var(--radius); padding: 8px 14px; cursor: pointer; }
.fb-format strong { font-weight: 400; }
.fb-format.an { border-color: #0866FF; background: #EBF3FF; color: #0846B5; box-shadow: inset 0 0 0 1px #0866FF; }
.fb-bildwahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.fb-bild { aspect-ratio: 1; border: 2px solid transparent; border-radius: 6px; background: var(--flaeche) center / cover; cursor: pointer; position: relative; }
.fb-bild.an { border-color: #0866FF; }
.fb-bild-nr { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #0866FF; color: #fff; font-size: 13px; display: grid; place-items: center; }

/* Auf der Chatseite liegen Senden und Mikrofon unten rechts: Hilfe und Fehler melden rücken nach oben rechts */
body[data-seite="chat"] .schwebend { top: calc(var(--kopf) + 16px); bottom: auto; flex-direction: row-reverse; align-items: center; }
body[data-seite="chat"] .rund.hilfe { width: 44px; height: 44px; }
@media (max-width: 900px) { body[data-seite="chat"] .schwebend { top: calc(var(--kopf) + 10px); right: 12px; } }

/* Hausschrift dort, wo Inhalte der Sparkasse entstehen oder erscheinen */
.editor-flaeche, .anmeldung .buehne, .player .ut span, .kopfleiste .titel, .ablauf .t { font-family: var(--marke); }
h1, h2 { letter-spacing: -.01em; }

/* Kontakte und Markierungen */
.konten { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.konto { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 2px 9px 2px 8px; border-radius: 12px; background: var(--flaeche); color: var(--text); text-decoration: none; }
.konto::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--k); flex: none; }
.konto .icon { color: var(--gruen); }
.konto.fehlt { color: var(--gedaempft); background: var(--flaeche-2); }
a.konto:hover { background: var(--rot-hell); }
.konto-zeile { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .konto-zeile { grid-template-columns: 1fr; } }
.mark-zeile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mark-kanaele { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chat-mini.liest { font-weight: 700; text-decoration: none; background: var(--text); color: #fff; border-radius: 8px; padding: 1px 7px; }

/* Erwähnungen im Chat */
.chat-feld { flex: 1; min-width: 0; display: flex; position: relative; }
.chat-feld textarea { flex: 1; }
.erwaehn-liste { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px; box-shadow: var(--schatten-hoch); z-index: 20; overflow: hidden; }
.erwaehn-eintrag { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; border: 0; background: none; font-family: var(--schrift); text-align: left; cursor: pointer; }
.erwaehn-eintrag span:last-child { display: flex; flex-direction: column; }
.erwaehn-eintrag strong { font-weight: 500; font-size: 15px; }
.erwaehn-eintrag small { color: var(--leise); font-size: 12px; }
.erwaehn-eintrag.an, .erwaehn-eintrag:hover { background: var(--rot-hell); }
.erwaehn-eintrag .chat-avatar { width: 30px; height: 30px; font-size: 12px; }
.erwaehnung { font-weight: 600; color: #0B57D0; }
.chat-blase.meins .erwaehnung { color: #fff; text-decoration: underline; }
.erwaehnung.ich { background: #FFF1B8; color: #5C4300; border-radius: 4px; padding: 0 3px; }
.chat-blase.erwaehnt-mich { box-shadow: 0 0 0 2px #F5C400; }
.chat-eintrag-text .n .zahl.erwaehnt { background: #F5C400; color: #1E1E1E; font-weight: 700; }
.chat-hinweis.erwaehnung { border-left-color: #F5C400; background: #FFFBEA; }
.erwaehn-symbol { width: 38px; height: 38px; border-radius: 50%; background: #F5C400; color: #1E1E1E; font-size: 20px; font-weight: 700; display: grid; place-items: center; flex: none; }

/* Gezielte Recherche im Themenschnüffler */
.recherche-karte { margin-bottom: 16px; }
.recherche-karte h3 { margin: 0 0 4px; }
.recherche-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.recherche-form input[type=search] { flex: 1 1 300px; width: auto; min-width: 0; }
.recherche-form select { flex: 0 0 auto; width: auto; }
.recherche-verlauf { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.recherche-verlauf:empty { display: none; }
.chip-knopf { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--linie); background: var(--weiss); color: var(--text); border-radius: 999px; padding: 4px 11px; font-family: var(--schrift); font-size: 13px; cursor: pointer; }
.chip-knopf:hover, .chip-knopf.an { border-color: var(--rot); color: var(--rot); }
.chip-knopf .kreisel { width: 12px; height: 12px; border-width: 2px; }
.recherche-panel { margin-bottom: 20px; border-top: 3px solid var(--rot); }
.recherche-panel h2 { margin: 0; }
.dossier { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 14px; }
.dossier h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); }
.dossier p { margin: 0; }
.dossier ul { margin: 0 0 14px; padding-left: 18px; }
.dossier li { margin-bottom: 4px; }
.dossier .winkel { margin-top: 10px; background: var(--flaeche-2); border-left: 3px solid var(--rot); padding: 6px 10px; }
.vorschlag { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
