* { margin: 0; padding: 0; box-sizing: border-box; }
/* WICHTIG: `hidden`-Attribut gewinnt IMMER – auch gegen display:flex/grid.
   (Ohne diese Regel blieben „versteckte“ Elemente wie das Neu-Menü sichtbar,
   weil ihre display-Eigenschaft das Browser-Standard-Verstecken übermalt.) */
[hidden] { display: none !important; }
:root {
  /* KI-Werkstatt-Farbwelt (contec-Look): dunkles Tintenblau, Petrol,
     contec-Blau im Verlauf und Limette als Akzent. */
  --navy: #0d1f31; --teal: #118b89; --teal-subtle: #d7eae9; --teal-faint: #edf6f5;
  --steel: #003b87; --cyan: #7cc4c2; --ink: #1c1c1c; --gray: #5f5f5f; --gray-mid: #bebebe;
  --lime: #d3d800; --lime-soft: #f5f6d8;
  --line: #e4e9ec; --grad: linear-gradient(60deg, #003b87 0%, #118b89 58%, #9bb022 100%);
}
html, body { height: 100%; }
body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  background: #f6f9fa; color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }
.brandline { height: 4px; background: var(--grad); }
.app { display: flex; height: calc(100vh - 4px); }

/* ============ SEITENLEISTE (links) ============ */
.panel {
  width: 300px; flex: none; background: #fff; border-right: 1px solid #e8edef;
  display: flex; flex-direction: column;
}
.panel.collapsed { display: none; }
.panel-brand { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px 18px; }
.panel-brand svg.logo { height: 30px; width: auto; display: block; }
.panel-brand .sep { width: 1px; height: 24px; background: var(--line); }
.panel-brand .app-name {
  font-family: "Roboto Slab", serif; font-weight: 600; font-size: 15px; color: var(--navy);
}
.panel-top { padding: 4px 16px 0 16px; }
.new-chat {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; border-radius: 12px; background: linear-gradient(60deg, #0d1f31 0%, #118b89 100%);
  color: #fff; font-weight: 500; font-size: 13.5px; box-shadow: 0 3px 10px rgba(13, 31, 49, .22);
  border: none; cursor: pointer; width: 100%;
}
.new-chat:hover { filter: brightness(1.05); }
.search {
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
  height: 36px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px;
  color: #9aa4ad; font-size: 13px; background: #fafcfc;
}
.search input {
  flex: 1; border: none; outline: none; background: transparent; font: inherit;
  font-size: 13px; color: var(--ink); min-width: 0;
}
.search input::placeholder { color: #9aa4ad; }
.tabs { margin-top: 12px; display: flex; background: #f0f4f6; border-radius: 12px; padding: 3px; }
.tab {
  flex: 1; text-align: center; font-size: 12.5px; padding: 7px 0; border-radius: 9px;
  color: #68737d; font-weight: 500; cursor: pointer; border: none; background: none;
}
.tab.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(13, 31, 49, .12); }
/* ★-Reiter (Favoriten): schmal, damit die drei Text-Reiter Platz behalten. */
.tab[data-tab="favs"] { flex: 0 0 34px; font-size: 15px; padding: 5px 0; }
.tab[data-tab="favs"].active { color: #d99a1b; }

.chat-list { flex: 1; overflow-y: auto; padding: 6px 8px 0 8px; margin-top: 6px; }
.group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #a8b0b8;
  padding: 10px 10px 5px 10px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
/* Erklärungen stecken hinter diesem kleinen Fragezeichen statt dauerhaft
   in der Leiste zu stehen – das hielt die Seitenleiste unruhig. */
/* ?-Knöpfe: dezent, aber in hellem Türkis statt Grau (Runde 36) */
.hinweis-knopf {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 1px solid #bcdfe2; background: var(--teal-faint); color: var(--teal);
  font-size: 9.5px; font-weight: 700; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.hinweis-knopf:hover { border-color: var(--teal); color: #fff; background: var(--teal); }
.gruppen-hinweis {
  font-size: 11.5px; line-height: 1.45; color: #7c868f;
  background: #f7fafb; border-left: 2px solid var(--teal-subtle);
  margin: 0 10px 6px 10px; padding: 8px 10px; border-radius: 0 6px 6px 0;
}
.chat-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px;
  color: #3d4650; font-size: 13px; cursor: pointer; position: relative;
}
.chat-item svg { flex: none; color: #8fb9bd; }
.chat-item .t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.active { background: var(--teal-subtle); color: #17335c; font-weight: 500; }
.chat-item.active svg { color: var(--navy); }
.chat-item:hover:not(.active) { background: #f3f7f8; }
.chat-item .row-del, .chat-item .row-star {
  display: none; border: none; background: none; cursor: pointer; color: #a8b0b8;
  padding: 2px; border-radius: 6px; flex: none;
}
.chat-item:hover .row-del, .chat-item:hover .row-star { display: grid; place-items: center; }
.chat-item .row-star.on { display: grid; place-items: center; color: #d99a1b; }
.chat-item .row-star:hover { color: #d99a1b; background: #fdf4e3; }
.chat-item .row-del:hover { color: #b23b2e; background: #fbecea; }
.retention-note { font-size: 11px; color: #a8b0b8; padding: 12px 12px 14px; line-height: 1.4; }

.tab-count {
  display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 2px;
  font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
  color: #68737d; background: #e4ebee; border-radius: 99px;
}
.tab.active .tab-count { color: var(--navy); background: var(--teal-subtle); }
.list-note { font-size: 12.5px; color: #9aa4ad; padding: 14px 12px; }
.list-add {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 4px); margin: 6px 2px;
  padding: 8px 10px; border: 1px dashed #c6d6da; border-radius: 10px; background: none;
  color: #4d8f94; font-size: 12.5px; cursor: pointer;
}
.list-add:hover { background: var(--teal-faint); }
.list-sub { font-size: 11px; color: #a8b0b8; }
/* Routing-Übersicht in der Administration (Reiter KI & Kosten) */
.route-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 4px 0 10px 0; }
.route-table td { border: 1px solid var(--line); padding: 7px 9px; vertical-align: top; }
.route-table td:first-child { white-space: nowrap; background: #f8fafb; color: var(--navy); }
/* Balken in der Token-Aufschlüsselung */
.balken { height: 4px; background: #eef1f3; border-radius: 2px; margin-top: 5px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--teal); border-radius: 2px; }
/* Nummern der Anklick-Reihenfolge im Werkzeug-Fenster */
.wz-nr { color: var(--teal); font-weight: 700; font-size: 11px; }
/* Zwei-Faktor-Einrichtung in den Einstellungen */
.zf-status { font-weight: 600; margin: 4px 0; }
.zf-status.ok { color: #1f7a4d; }
.zf-step { font-size: 12.5px; color: var(--gray); margin: 8px 0 4px 0; }
.zf-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
  letter-spacing: .04em; background: var(--teal-faint); border: 1px solid #cde4e7;
  border-radius: 8px; padding: 10px 12px; margin: 4px 0 8px 0; user-select: all;
  word-break: break-all; line-height: 1.7;
}
/* Rechner-Fenster */
.rechner { margin: 4px 0 10px 0; }
.re-anzeige {
  width: 100%; font-size: 22px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right; padding: 12px 14px !important; border: 1px solid var(--line) !important;
  border-radius: 10px; background: #fff;
}
.re-ergebnis {
  text-align: right; font-size: 15px; font-weight: 600; color: var(--navy);
  min-height: 22px; padding: 6px 4px 2px 0;
}
.re-ergebnis.fehler { color: #b23b2e; font-weight: 500; font-size: 12.5px; }
.re-funktionen { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.re-fn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer;
  padding: 6px 11px; font: inherit; font-size: 12.5px; color: #48525c;
}
.re-fn:hover { border-color: #b5dce0; background: var(--teal-faint); color: #1d5f66; }
.re-tasten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.re-taste {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer;
  padding: 13px 0; font: inherit; font-size: 16px; color: var(--ink);
  transition: background .1s, border-color .1s;
}
.re-taste:hover { background: #f5f9fa; border-color: #cfdde0; }
.re-taste.op { color: #1d5f66; background: #fafcfc; }
.re-taste.gleich { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.re-taste.gleich:hover { filter: brightness(1.12); background: var(--navy); }
.re-verlauf { margin-top: 10px; max-height: 110px; overflow-y: auto; }
.re-zeile {
  font-size: 12px; color: #7c868f; padding: 3px 0; border-bottom: 1px solid #f2f5f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Erzeugte Datei als Karte in der Antwort */
.datei-karte {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 12px 14px; margin: 10px 0 4px 0; max-width: 460px;
  box-shadow: 0 1px 3px rgba(13, 31, 49, .06); transition: border-color .12s, box-shadow .12s;
}
.datei-karte:hover { border-color: #b5dce0; box-shadow: 0 3px 10px rgba(63, 164, 169, .14); }
.datei-karte .dk-symbol { font-size: 24px; line-height: 1; flex: none; }
.datei-karte .dk-text { flex: 1; min-width: 0; }
.datei-karte .dk-name {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.datei-karte .dk-sub {
  display: block; font-size: 11.5px; color: #98a3ac; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Schmale Fenster: Knopf rutscht unter den Namen statt zu quetschen */
@media (max-width: 560px) {
  .datei-karte { flex-wrap: wrap; }
  .datei-karte .dk-text { min-width: 60%; }
  .datei-karte .dk-knopf { margin-left: 36px; }
}
.datei-karte .dk-knopf {
  flex: none; font-size: 12px; font-weight: 600; color: #20666c;
  background: var(--teal-faint); border: 1px solid #cde4e7;
  border-radius: 99px; padding: 5px 12px;
}
/* Interaktive Ansicht direkt in der Antwort (Sandkasten-Rahmen) */
.art-embed {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #fff; margin: 10px 0 4px 0;
  box-shadow: 0 1px 3px rgba(13, 31, 49, .06);
}
.art-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #fafcfc; border-bottom: 1px solid var(--line);
}
.art-head .art-titel { font-size: 12.5px; font-weight: 600; color: var(--navy); flex: 1; }
.art-head .art-btns { display: flex; gap: 6px; }
.art-embed .art-frame {
  width: 100%; height: 620px; border: none; display: block; background: #f6f9fa;
  transition: height .18s ease;
}
.art-embed.gross .art-frame { height: 85vh; }
.art-head .art-hinweis { font-size: 11px; color: #98a3ac; margin-right: 8px; }
/* Freigabeprinzip: Karte, wenn die KI auf Bibliotheks-Dateien zugreifen will */
.consent-card {
  border: 1px solid #e7d9a8; background: #fdf8e7; border-radius: 12px;
  padding: 10px 12px; margin: 4px 0 10px 0; font-size: 13px; color: #6a5620;
}
.consent-card .consent-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.consent-card .consent-kosten { margin-top: 5px; font-size: 12px; color: #8a6d1f; font-weight: 600; }
.consent-card .consent-status { margin-top: 7px; font-weight: 600; }
.consent-card.ok { border-color: #bfe0cd; background: #eaf6ef; color: #1f6b45; }
.consent-card.denied { border-color: #e5c2bd; background: #faeeec; color: #93463c; }
/* Wissens-Bibliothek: Team-Abzeichen + Admin-Schalter in der Datei-Unterzeile */
.team-tag { color: var(--teal); font-weight: 700; }
.sub-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 11px; color: #a8b0b8; text-decoration: underline;
}
.sub-link:hover { color: var(--teal); }

.panel-menu { border-top: 1px solid #eef1f3; padding: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: #48525c; font-size: 13px; cursor: pointer;
}
.menu-item:hover { background: #f3f7f8; }
.menu-item svg { color: #8fa9b4; flex: none; }
.menu-item.sub { padding-left: 32px; font-size: 12.5px; color: #5b6672; }
.mini-on {
  margin-left: auto; font-size: 10px; font-weight: 600; color: #1f7a4d;
  background: #e3f3ea; border-radius: 99px; padding: 2px 8px;
}
.mini-on.off { color: #8a5a1f; background: #f9edda; }

.panel-bottom {
  border-top: 1px solid #eef1f3; padding: 12px 16px; display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.who { flex: 1; line-height: 1.25; min-width: 0; }
.who .n { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #2b3138; }
.who .r { font-size: 11px; color: #9aa4ad; }
.badge-shield { width: 14px; height: 14px; border-radius: 4px; background: var(--teal-subtle); display: grid; place-items: center; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  color: #9aa4ad; background: none; border: none; cursor: pointer; flex: none;
}
.icon-btn:hover { background: #f1f5f6; color: #647079; }
.panel-bottom .icon-btn { width: 28px; height: 28px; }

/* ============ HAUPTBEREICH ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 18px 32px 6px 32px; }
/* Titelbereich wächst – ALLE Chat-Knöpfe (★, Assistent, Temporär, Mini)
   sitzen dadurch zusammen am rechten Rand. */
.topbar-left { flex: 1; }
/* Aktionsgruppe rechts: EIN zusammenhängendes Kästchen statt drei Einzelknöpfe */
.top-actions.gruppe {
  display: inline-flex; align-items: stretch;
  background: var(--teal-faint); border: 1px solid #cfe6e8; border-radius: 12px;
  padding: 3px; gap: 3px;
}
.top-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid transparent; background: none; border-radius: 9px;
  padding: 7px 13px; font: inherit; font-size: 13px; color: #3d6a70; cursor: pointer;
  transition: background .12s, color .12s;
}
.top-btn:hover { background: #fff; color: #1d5f66; }
.top-btn.accent { background: #fff; border-color: #bcdfe2; color: #1d5f66; font-weight: 600; }
.top-btn.accent:hover { background: #fff; box-shadow: 0 1px 4px rgba(63, 164, 169, .18); }

/* Aktualisieren-Knopf dreht sich kurz beim Klick – sichtbares Feedback */
.icon-btn.dreht svg { animation: drehen .45s ease; }
@keyframes drehen { to { transform: rotate(360deg); } }
/* Seitenleisten-Griff: sitzt mittig am Rand der Leiste, klappt sie ein/aus */
.panel-griff {
  position: fixed; top: 50%; left: 300px; transform: translate(-50%, -50%); z-index: 40;
  width: 22px; height: 46px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: #90a0aa; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(13, 31, 49, .10); transition: left .16s, color .12s, box-shadow .12s;
}
.panel-griff:hover { color: var(--teal); box-shadow: 0 2px 8px rgba(63, 164, 169, .22); }
.panel-griff svg { transition: transform .16s; }
/* Eingeklappt: Griff wandert an den linken Rand, Pfeil dreht sich um */
body.panel-zu .panel-griff { left: 12px; }
body.panel-zu .panel-griff svg { transform: rotate(180deg); }
.neu-wrap { position: relative; }
.neu-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 36;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 30, 60, .16); padding: 6px; min-width: 190px;
  display: flex; flex-direction: column;
}
.neu-item {
  text-align: left; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: #2b3138; padding: 8px 10px; border-radius: 8px;
}
.neu-item:hover { background: var(--teal-faint); color: #1d5f66; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-title {
  font-size: 14px; font-weight: 600; color: #3d4650; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-radius: 8px; padding: 3px 8px; cursor: text;
}
.chat-title:hover { background: #eef3f4; }
.chat-title:focus { outline: 2px solid var(--teal); background: #fff; }

.chat-scroll { flex: 1; display: flex; justify-content: center; overflow-y: auto; }
.chat-col { width: 900px; max-width: 100%; padding: 16px 16px 8px 16px; display: flex; flex-direction: column; gap: 26px; }

/* Leerzustand */
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 40px 16px; }
.empty .spark { width: 56px; height: 56px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(63, 164, 169, .3); margin-bottom: 14px; }
.empty h2 { font-family: "Roboto Slab", serif; font-weight: 600; font-size: 22px; color: var(--teal); }
.empty p { color: #7c8791; font-size: 14px; max-width: 440px; }

.day-divider { display: flex; align-items: center; gap: 14px; }
.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: #e3ebed; }
.day-divider span { font-size: 11.5px; color: #4d8f94; background: var(--teal-faint); padding: 3px 12px; border-radius: 99px; font-weight: 500; }

.msg-user { align-self: flex-end; max-width: 78%; }
.msg-user .bubble { background: var(--teal-subtle); color: #1d3050; border-radius: 18px 18px 6px 18px; padding: 12px 16px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: break-word; }
.msg-user .meta { text-align: right; margin-top: 6px; font-size: 11px; color: #a8b0b8; }
.msg-user .file-chip { margin-top: 6px; justify-content: flex-end; }

.msg-ai { display: flex; gap: 14px; max-width: 92%; }
.ai-avatar { width: 30px; height: 30px; border-radius: 10px; flex: none; margin-top: 2px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(63, 164, 169, .35); }
.msg-ai .body { font-size: 14.5px; color: #2b3138; min-width: 0; overflow-wrap: break-word; }
.msg-ai .body p + p, .msg-ai .body p + ul, .msg-ai .body ul + p { margin-top: 10px; }
.msg-ai .body ul { margin-left: 18px; }
.msg-ai .body li + li { margin-top: 5px; }
.msg-ai .body strong { font-weight: 600; color: var(--ink); }
.msg-ai .meta { margin-top: 8px; font-size: 11px; color: #a8b0b8; display: flex; gap: 12px; align-items: center; }
.exp-actions { display: inline-flex; gap: 6px; }
.act-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer;
  font-size: 10.5px; font-weight: 600; color: #68737d; padding: 2px 8px;
}
.act-btn:hover { color: #20666c; border-color: #bcdfe2; background: var(--teal-faint); }
.act-btn:disabled { opacity: .5; cursor: default; }
.msg-ai .ai-col { min-width: 0; flex: 1; }
.cursor::after { content: "▍"; color: var(--teal); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Ansichten: Tabellen, Überschriften, Code */
.body .md-h { font-family: "Roboto Slab", serif; color: var(--navy); font-weight: 600; margin: 14px 0 6px; }
.body h3.md-h { font-size: 16px; }
.body h4.md-h { font-size: 14.5px; }
.body h5.md-h { font-size: 13.5px; }
.table-wrap { overflow-x: auto; margin: 10px 0; border: 1px solid #dfe7ea; border-radius: 12px; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.table-wrap th {
  text-align: left; font-weight: 600; color: var(--navy); background: var(--teal-faint);
  padding: 9px 12px; border-bottom: 1px solid #d5e4e7; white-space: nowrap;
}
.table-wrap td { padding: 8px 12px; border-bottom: 1px solid #eef3f4; color: #2b3138; vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:nth-child(even) td { background: #fafcfc; }
.body pre.code {
  background: #f4f7f8; border: 1px solid #e4ebee; border-radius: 10px; padding: 10px 12px;
  font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; overflow-x: auto;
  margin: 8px 0; white-space: pre;
}
.body code {
  background: #f0f5f6; border-radius: 5px; padding: 1px 5px;
  font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px;
}
.body a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.body a:hover { color: #20666c; }

/* Werkzeug- und Datei-Chips über der Antwort */
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.run-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500;
  color: #4d6a8f; background: #eef2f8; border: 1px solid #dbe4f0; border-radius: 99px; padding: 3px 10px;
}
.run-chip.file { color: #20666c; background: var(--teal-faint); border-color: #cde4e7; text-decoration: none; }
.run-chip.file:hover { background: var(--teal-subtle); }

/* ============ EINGABEFELD ============ */
.composer-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 16px 12px 16px; }
.composer { width: 900px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(13, 31, 49, .05), 0 10px 30px rgba(13, 31, 49, .07); padding: 6px 8px 8px 8px; }
.composer-row { display: flex; align-items: flex-end; gap: 6px; padding: 4px 6px; }
.composer textarea {
  flex: 1; border: none; outline: none; resize: none; font: inherit; font-size: 14.5px;
  color: #1c1c1c; padding: 8px 4px; max-height: 180px; background: transparent; line-height: 1.5;
}
.composer textarea::placeholder { color: #9aa4ad; }
/* Senden-Knopf: freundlicher Marken-Verlauf statt dunklem Navy-Block */
.send-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; flex: none; border: none; cursor: pointer; box-shadow: 0 3px 8px rgba(63, 164, 169, .35); }
.send-btn:hover:not(:disabled) { filter: brightness(1.08); }
.rec-btn.recording { color: #fff; background: #d64545; animation: recpulse 1.4s ease-in-out infinite; }
.rec-btn.recording:hover { background: #c23b3b; color: #fff; }
.rec-btn.busy { color: var(--teal); animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .55; } }
.send-btn:disabled { opacity: .45; cursor: default; }
/* Silben: jede Pill ist so breit wie ihr sichtbarer Text (misst app.js, weil
   ein <select> sich sonst nach seiner LÄNGSTEN Option richtet). Die Zeile ist
   so breit wie das Eingabefeld und bricht bei schmalem Bildschirm um. */
.composer-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 2px 8px; }
.pill-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid #d9e9eb; border-radius: 99px; background-color: #f4fafb;
  color: #33565c; font: inherit; font-size: 12px; letter-spacing: .01em;
  padding: 5px 24px 5px 12px; cursor: pointer;
  white-space: nowrap; flex: none;
  box-shadow: 0 1px 2px rgba(13, 31, 49, .05);
  transition: border-color .12s, background .12s, box-shadow .12s, color .12s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%239aa4ad' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
button.pill-select { background-image: none; padding-right: 16px; }
.pill-select:hover { border-color: #b5dce0; color: #1d4f56; box-shadow: 0 2px 6px rgba(63, 164, 169, .14); background-color: var(--teal-faint); }
.pill-select:focus { outline: none; }
.pill-select:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(63, 164, 169, .12); }
.pill-select.set {
  color: #17606a; border-color: #b5dce0; background-color: var(--teal-faint); font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%23118b89' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Schmale Bildschirme: Pillen kompakter, damit maximal zwei Zeilen entstehen. */
@media (max-width: 700px) {
  .pill-select { font-size: 11px; padding: 4px 20px 4px 10px; background-position: right 7px center; }
  button.pill-select { padding-right: 12px; }
}
.disclaimer { margin-top: 9px; font-size: 11px; color: #aab4bb; text-align: center; }

.attach-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 0 8px; }
.file-chip {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #20666c;
  background: var(--teal-faint); border: 1px solid #cde4e7; border-radius: 99px; padding: 4px 10px;
  max-width: 100%;
}
.file-chip .fn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.file-chip button { border: none; background: none; cursor: pointer; color: #6d9aa0; display: grid; place-items: center; padding: 0; }
.file-chip button:hover { color: #b23b2e; }
.file-chip.quiet { color: #68737d; background: #f3f6f7; border-color: #e2e9eb; }
.file-chip.warn { color: #7a5410; background: #fdf5e3; border-color: #efdcb0; }
.file-chip .warn-note { font-size: 11px; font-weight: 600; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28, 40, 58, .35); display: grid;
  place-items: center; z-index: 40; padding: 16px;
}
/* Wichtig: `display: grid` würde das hidden-Attribut sonst aushebeln –
   dann läge das (leere) Modal unsichtbar über der ganzen Seite und
   blockierte alle Klicks. */
.modal-overlay[hidden] { display: none; }
.modal {
  width: 520px; max-width: 100%; max-height: calc(100vh - 64px); overflow-y: auto;
  background: #fff; border-radius: 18px; padding: 24px;
  box-shadow: 0 20px 60px rgba(16, 30, 60, .25);
}
.modal h3 { font-family: "Roboto Slab", serif; font-weight: 600; font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.modal .m-sub { font-size: 12.5px; color: #7c8791; margin-bottom: 14px; }
.modal h4 { font-size: 13px; font-weight: 600; color: #3d4650; margin: 18px 0 6px; }
.modal label { display: block; font-size: 12px; font-weight: 500; color: #5b6672; margin: 12px 0 4px; }
.modal input[type="text"], .modal input[type="password"], .modal textarea, .modal select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font: inherit; font-size: 13.5px; background: #fafcfc;
}
.modal textarea { min-height: 110px; resize: vertical; }
.modal input:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--teal); background: #fff; }
.m-actions { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }
.btn {
  border: none; border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.btn.primary { background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(13, 31, 49, .25); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: #fff; color: #48525c; border: 1px solid var(--line); }
.btn.ghost:hover { background: #f5f8f9; }
.btn.danger-ghost { background: #fff; color: #b23b2e; border: 1px solid #eccfcb; }
.m-feedback { font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.m-feedback.ok { color: #1f7a4d; }
.m-feedback.err { color: #b23b2e; }

.user-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #eef1f3;
  border-radius: 10px; margin-top: 6px; font-size: 13px;
}
.user-row .u-name { flex: 1; min-width: 0; }
.user-row .u-name .un { font-weight: 500; color: #2b3138; }
.user-row .u-name .us { font-size: 11.5px; color: #9aa4ad; }
.user-row .u-tag { font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 2px 8px; }
.user-row .u-tag.admin { color: #20666c; background: var(--teal-subtle); }
.user-row .u-tag.inactive { color: #8a5a1f; background: #f9edda; }
/* mini-btn galt nur innerhalb der Nutzerliste – überall sonst (Assistenten-
   Fenster, Projekte, Feedback, Aufgaben) erschien der nackte Browser-Knopf. */
.mini-btn {
  font: inherit; font-size: 11px; padding: 4px 10px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, #d8dee3);
  border-radius: 99px; background: #fff; color: color-mix(in srgb, var(--teal) 75%, #123);
  transition: background-color .12s, border-color .12s;
}
.mini-btn:hover { background: var(--teal-faint); border-color: color-mix(in srgb, var(--teal) 55%, #fff); }
.mini-btn.gefahr { color: #a33; border-color: #e3c4c4; }
.mini-btn.gefahr:hover { background: #fdf3f3; border-color: #d09a9a; }

/* Topbar-Pillen (R74): Umschlag · Temporär · Mini als abgestimmte Silben –
   Optik wie die Pillen in Nicoles Plattform, nur in der Werkstatt-Farbwelt. */
.topbar .top-pille {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 30px; padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 26%, #fff);
  border-radius: 99px;
  background: color-mix(in srgb, var(--teal) 9%, #fff);
  color: color-mix(in srgb, var(--teal) 72%, #17323a);
  transition: background .15s, border-color .15s, transform .12s;
}
.topbar .top-pille:hover {
  background: color-mix(in srgb, var(--teal) 18%, #fff);
  border-color: color-mix(in srgb, var(--teal) 45%, #fff);
  transform: translateY(-1px);
}
.top-pille-wrap { position: relative; display: inline-flex; }
.brief-menu-top { position: absolute; z-index: 40; }
html[data-dunkel="1"] .topbar .top-pille { background: #232b33; border-color: #35414c; color: #9fd4d8; }

/* Logo als Aktualisieren-Knopf */
.marke { cursor: pointer; border-radius: 10px; transition: opacity .15s; }
.marke:hover { opacity: .82; }

/* Schutz-Silbe: kleines ℹ als Teil der Pille (kein angeklebtes Extra) */
.pill-schild { gap: 5px; }
.schutz-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid currentColor; opacity: .75;
  font-size: 9px; font-style: italic; font-weight: 700; font-family: Georgia, serif;
  line-height: 1;
}

/* Kiwi-Knopf (R74): nur noch das Icon, ohne Namensschild */
.robot-label { display: none; }

/* Fähigkeiten-Reiter (P5): Karten mit Wirkung-Ampel + Prompts-Klappgruppen */
.fk-karte { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; background: #fff; }
.fk-karte summary { cursor: pointer; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.fk-pille { font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.fk-gruen { background: #e8f5ec; color: #1d6b3a; }
.fk-gelb { background: #fdf6e3; color: #8a6d1f; }
.fk-rot { background: #fdeeee; color: #a33; }
.fk-blau { background: var(--teal-faint); color: #20666c; }
.fk-aus { background: #eef1f3; color: #6a7480; text-decoration: line-through; }
.fk-code { font-size: 11px; background: #f6f8f9; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; white-space: pre-wrap; max-height: 260px; overflow-y: auto; }
.fk-zeile { font-size: 13px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pr-gruppe { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin: 8px 0; background: #fbfdfd; }
.pr-gruppe summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
html[data-dunkel="1"] .fk-karte, html[data-dunkel="1"] .pr-gruppe { background: #1d232b; }
html[data-dunkel="1"] .fk-code { background: #171c22; }
.user-row .mini-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 11.5px;
  padding: 4px 8px; cursor: pointer; color: #48525c;
}
.user-row .mini-btn:hover { background: #f5f8f9; }

/* Audit-Protokoll */
.audit-list { max-height: 220px; overflow-y: auto; border: 1px solid #eef1f3; border-radius: 10px; padding: 4px 0; }
.audit-row {
  display: flex; gap: 10px; align-items: baseline; padding: 5px 12px; font-size: 12px;
  border-bottom: 1px solid #f4f6f8;
}
.audit-row:last-child { border-bottom: none; }
.audit-row .a-ts { color: #9aa4ad; flex: none; width: 82px; }
.audit-row .a-us { color: #2b3138; font-weight: 500; flex: none; width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row .a-ac { color: #3d4650; flex: none; }
.audit-row .a-dt { color: #7c8791; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hilfe: Anleitung + Quiz */
.guide h4 { font-family: "Roboto Slab", serif; font-size: 14px; font-weight: 600; color: var(--navy); margin: 16px 0 4px; }
.guide h4:first-child { margin-top: 0; }
.guide p { font-size: 13px; color: #3d4650; line-height: 1.55; }
.guide .guide-foot { margin-top: 16px; color: #7c8791; font-size: 12px; }
.quiz-q { border: 1px solid #eef1f3; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.quiz-q.ok { border-color: #b7dfc8; background: #f4fbf6; }
.quiz-q.err { border-color: #eccfcb; background: #fdf7f6; }
.qq-title { font-size: 13.5px; font-weight: 600; color: #2b3138; margin-bottom: 8px; }
.qq-opt { display: flex; align-items: flex-start; gap: 8px; padding: 5px 2px; font-size: 13px; color: #3d4650; cursor: pointer; }
.qq-opt input { margin-top: 3px; accent-color: var(--teal); }
.quiz-q.ok .qq-opt.is-correct span, .quiz-q.err .qq-opt.is-correct span { color: #1f7a4d; font-weight: 600; }
.qq-why { margin-top: 8px; font-size: 12px; color: #5b6672; background: #f4f7f8; border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.quiz-result { font-size: 13.5px; font-weight: 600; color: var(--navy); padding: 10px 2px 0; }

/* Status-Pille (Admin) + Aufbewahrungs-Auswahl */
.status-pill {
  display: inline-block; font-size: 10px; font-weight: 600; border-radius: 99px;
  padding: 2px 8px; margin-left: 6px; color: #8a5a1f; background: #f9edda; vertical-align: 1px;
}
.status-pill.ok { color: #1f7a4d; background: #e3f3ea; }
.retention-wrap { display: flex; align-items: center; gap: 6px; flex: none; font-size: 13px; color: #5b6672; }
.retention-inp {
  width: 72px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: inherit;
  font-size: 13px; background: #fafcfc; text-align: right;
}
.retention-inp:focus { outline: none; border-color: var(--teal); background: #fff; }

/* Auffälliges globales Suchfeld */
.search.global {
  background: var(--teal-faint); border-color: #c3dde5; color: #4d8f94; height: 38px;
}
.search.global input { color: var(--ink); }
.search.global input::placeholder { color: #6fa0a6; }
.search.global:focus-within { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(63, 164, 169, .15); }

/* Chats-Block direkt unter der Suche */
.chats-block { padding: 4px 8px 0 8px; border-bottom: 1px solid #eef1f3; margin-bottom: 2px; }
.chats-block .retention-note { padding: 6px 10px 10px; }

/* Chat-Assistent (Roboter-Knopf, frei verschiebbar) */
.robot-btn {
  position: fixed; left: 0; top: 0; z-index: 30; /* Position setzt app.js */
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: none; background: none; cursor: grab; touch-action: none; user-select: none;
}
.robot-btn:active { cursor: grabbing; }

/* Mini-Chat-Fenster des Assistenten */
.robot-panel {
  position: fixed; width: 330px; height: 420px; z-index: 34;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(16, 30, 60, .22);
  display: flex; flex-direction: column; overflow: hidden;
}
.rp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px 10px 14px; border-bottom: 1px solid #eef1f3;
  font-family: "Roboto Slab", serif; font-weight: 600; font-size: 14px; color: var(--navy);
  background: var(--teal-faint);
}
.rp-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rp-msg { font-size: 13px; line-height: 1.5; max-width: 92%; overflow-wrap: break-word; }
.rp-msg.user { align-self: flex-end; background: var(--teal-subtle); color: #1d3050; border-radius: 13px 13px 4px 13px; padding: 8px 11px; }
.rp-msg.ai { align-self: flex-start; color: #2b3138; }
.rp-msg.ai .table-wrap { font-size: 12px; }
.rp-input { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eef1f3; }
.rp-input input {
  flex: 1; border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px;
  font: inherit; font-size: 13px; background: #fafcfc; outline: none; min-width: 0;
}
.rp-input input:focus { border-color: var(--teal); background: #fff; }
.send-btn.rp-send { width: 32px; height: 32px; }
.robot-btn svg.flori-svg {
  width: 78px; height: 58px; padding: 8px 10px; border-radius: 20px; /* R74: ~15 % größer */
  background: var(--grad);
  overflow: visible; /* die Kelle darf beim Winken über die Kachel hinaus */
  box-shadow: 0 8px 22px rgba(63, 164, 169, .45), inset 0 2px 4px rgba(255, 255, 255, .35), inset 0 -3px 6px rgba(20, 45, 80, .25);
  transition: transform .15s;
}
.robot-btn:hover svg { transform: scale(1.06) rotate(-2deg); }

/* Kiwis Schraubenschlüssel winkt: beim ersten Anzeigen der Startseite und beim
   Drüberfahren über den Kiwi-Knopf. Wer Bewegung reduziert hat, sieht sie ruhig. */
.flori-kelle { transform-box: fill-box; transform-origin: 50% 92%; }
@keyframes floriWinken {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-24deg); }
  40% { transform: rotate(7deg); }
  60% { transform: rotate(-18deg); }
  80% { transform: rotate(4deg); }
}
.flori-winkt .flori-kelle { animation: floriWinken 1.6s ease-in-out .35s 1 both; }
.robot-btn:hover .flori-kelle { animation: floriWinken 1.2s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .flori-kelle { animation: none !important; }
}
.robot-label {
  font-size: 10.5px; font-weight: 600; color: #20666c; background: #fff;
  border: 1px solid #cde4e7; border-radius: 99px; padding: 2px 9px;
  box-shadow: 0 2px 6px rgba(16, 30, 60, .08);
}

/* Admin-Fenster mit Reitern */
.modal.wide { width: 640px; }
.admin-tabs { margin-bottom: 14px; }
.admin-tabs .tab { font-size: 12px; padding: 6px 0; }
.tab-expl { font-size: 12.5px; color: #5b6672; line-height: 1.5; margin: 4px 0 10px; }
.check-row {
  display: flex; align-items: flex-start; gap: 9px; padding: 6px 2px; font-size: 13px;
  color: #2b3138; cursor: pointer;
}
.check-row input { margin-top: 3px; accent-color: var(--teal); }
.check-row.tool { border-bottom: 1px solid #f2f5f6; padding: 8px 2px; }
.check-sub { font-size: 11.5px; color: #8a95a0; line-height: 1.4; }
.all-chats-list { max-height: 320px; overflow-y: auto; }

/* Darstellung: Schriftgröße und -stil (Einstellungen, pro Gerät) */
html[data-fontsize="klein"] body { font-size: 13px; }
html[data-fontsize="klein"] .msg-ai .body, html[data-fontsize="klein"] .msg-user .bubble { font-size: 13px; }
html[data-fontsize="gross"] body { font-size: 15px; }
html[data-fontsize="gross"] .msg-ai .body, html[data-fontsize="gross"] .msg-user .bubble { font-size: 16px; }
html[data-fontstyle="serif"] .msg-ai .body, html[data-fontstyle="serif"] .msg-user .bubble {
  font-family: Georgia, "Times New Roman", serif;
}

/* Umschalter */
.switch-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.switch-row .s-text { flex: 1; }
.switch-row .s-title { font-size: 13.5px; font-weight: 500; color: #2b3138; }
.switch-row .s-sub { font-size: 12px; color: #7c8791; }
.switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cfd8db; border-radius: 99px; transition: background .15s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s;
}
.switch input:checked + .slider { background: var(--teal); }
.switch input:checked + .slider::before { transform: translateX(18px); }

@media (max-width: 720px) {
  .panel { position: fixed; inset: 4px 60px 0 0; z-index: 30; box-shadow: 20px 0 50px rgba(16,30,60,.2); }
  .panel.collapsed { display: none; }
}

/* ============ RECHTER KONTEXTBEREICH (Phase 10) ============ */
.context {
  width: var(--ctx-breite, 360px); flex: none; background: #fff;
  border-left: 1px solid #e8edef; display: flex; flex-direction: column;
  position: relative; min-width: 240px; max-width: 560px;
}
.context.collapsed { display: none; }
.ctx-top { padding: 10px 14px 0 14px; }
.ctx-top .tabs { margin-top: 0; }
.ctx-body { flex: 1; overflow-y: auto; padding: 10px 10px 16px 10px; }
.ctx-resize {
  position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 5;
}
.ctx-resize:hover { background: rgba(63, 164, 169, .18); }
/* Griff folgt der ECHTEN Panel-Breite (--ctx-breite) – vorher stand er bei
   verändertem Panel mitten im Inhalt (Runde-38-Fix). */
.ctx-griff { left: auto; right: var(--ctx-breite, 360px); transform: translate(50%, -50%); }
body.ctx-zu .ctx-griff { right: 12px; }
body.ctx-zu .ctx-griff svg { transform: rotate(180deg); }

/* Linker Griff fürs Chats-Panel: sitzt am Panel-Rand bzw. an der Rail */
.links-griff { left: 64px; }
body.panel-offen .links-griff { left: calc(58px + 260px); transform: translate(-50%, -50%); }
body.panel-offen .links-griff svg { transform: rotate(180deg); }
.ctx-abschnitt { margin-bottom: 6px; }
.ctx-karte {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 2px;
  font-size: 12.5px; color: #3d4650; background: #fafcfc;
}
.ctx-karte h5 { font-size: 12.5px; color: var(--navy); margin-bottom: 4px; }
/* Auf schmalen Bildschirmen wird der Bereich zur Schublade von rechts */
@media (max-width: 1100px) {
  .context { position: fixed; top: 4px; right: 0; bottom: 0; z-index: 30; box-shadow: -20px 0 50px rgba(16,30,60,.2); }
}

/* Schwebender „Zur neuesten Antwort“-Knopf (Phase 1) */
.jump-down {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 150px; z-index: 20;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy); color: #fff; border: none; border-radius: 99px;
  padding: 8px 16px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(13, 31, 49, .35);
}
.jump-down:hover { filter: brightness(1.12); }
.main { position: relative; }

/* Aufnahme-Statusleiste (Phase 1) */
.rec-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 auto; width: 900px; max-width: calc(100% - 32px);
  border: 1px solid #e7c9c9; background: #fdf3f3; border-radius: 12px;
  padding: 8px 14px; font-size: 12.5px; color: #7a2e2e;
}
.rec-status.pausiert { border-color: #e7dcb0; background: #fdf9e9; color: #6a5620; }
.rec-status.upload-problem { border-color: #e7c9a0; background: #fdf6ec; color: #7a5410; }
.rec-status.fertig { border-color: #cde4e7; background: var(--teal-faint); color: #20666c; }
.rec-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #d64545; flex: none;
  animation: recpulse 1.4s ease-in-out infinite;
}
.rec-status.pausiert .rec-dot { background: #d99a1b; animation: none; }
.rec-status.fertig .rec-dot { background: var(--teal); animation: none; }
.rec-text { font-weight: 600; }
.rec-sub { color: inherit; opacity: .75; flex: 1; min-width: 120px; }
.rec-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Tabellen-Editor (Phase 8) */
.te-wrap { overflow: auto; max-height: 55vh; border: 1px solid #dfe7ea; border-radius: 12px; }
.te-tabelle { border-collapse: collapse; width: 100%; font-size: 13px; }
.te-tabelle th {
  position: sticky; top: 0; background: var(--teal-faint); color: var(--navy);
  text-align: left; padding: 8px 10px; border-bottom: 1px solid #d5e4e7; white-space: nowrap; z-index: 2;
}
.te-tabelle th .te-typ { font-weight: 400; font-size: 10px; color: #7c9a9e; display: block; }
.te-tabelle td { border-bottom: 1px solid #eef3f4; padding: 0; }
.te-tabelle td .te-zelle {
  display: block; width: 100%; border: none; background: none; font: inherit;
  padding: 7px 10px; outline: none; min-width: 80px;
}
.te-tabelle td .te-zelle:focus { background: var(--teal-faint); box-shadow: inset 0 0 0 2px var(--teal); }
.te-tabelle td.te-fehler .te-zelle { background: #fdeeec; box-shadow: inset 0 0 0 2px #d98576; }
.te-tabelle .te-zeilen-btn {
  border: none; background: none; color: #c3ccd2; cursor: pointer; padding: 4px 6px; font-size: 12px;
}
.te-tabelle .te-zeilen-btn:hover { color: #b23b2e; }
.te-leiste { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px 0; align-items: center; }
.te-hinweis { font-size: 11.5px; color: #8a95a0; }

/* Companion angedockt: klebt am rechten Rand in voller Höhe */
.robot-panel.gedockt {
  left: auto !important; top: 4px !important; right: 0; bottom: 0; height: auto;
  border-radius: 16px 0 0 16px; resize: none;
}
.robot-panel { resize: both; overflow: hidden; min-width: 280px; min-height: 300px; }
.rp-fluechtig {
  font-size: 9.5px; font-weight: 600; color: #8a95a0; background: #fff;
  border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px;
  vertical-align: 2px; margin-left: 4px;
}
.rp-head-btns { display: inline-flex; gap: 2px; }

/* Lokale Werkzeuge (Phase 3) */
.lt-ergebnis {
  border: 1px solid var(--line); border-radius: 10px; background: #fafcfc;
  padding: 10px 12px; margin-top: 10px; font-size: 13px;
}
.lt-ergebnis.ok { border-color: #bfe0cd; background: #eaf6ef; color: #1f6b45; }
.lt-ergebnis.fehler { border-color: #e5c2bd; background: #faeeec; color: #93463c; }
.lt-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.lt-gross { font-size: 17px; letter-spacing: .03em; }
.lt-staerke { height: 6px; border-radius: 3px; background: #eef1f3; margin-top: 8px; overflow: hidden; }
.lt-staerke span { display: block; height: 100%; border-radius: 3px; }
.lt-schritte { font-size: 12px; color: #5b6672; line-height: 1.6; margin-top: 8px; }
.lt-schritte li { margin-left: 18px; }
.lt-zeile { display: flex; gap: 8px; align-items: center; }
.lt-zeile > * { flex: 1; }
.lt-qr-vorschau { display: grid; place-items: center; padding: 12px; }
.lt-qr-vorschau canvas, .lt-qr-vorschau svg { image-rendering: pixelated; }
.lt-bild-vorschau { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.lt-bild-vorschau img { max-width: 200px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); }

/* ============ FARBWELTEN (Runde 34) ============ */
/* Dezente Abwechslung: Akzentfarben wechseln, das Layout bleibt gleich. */
html[data-theme="petrol"] { --navy: #14555c; --teal: #176b70; --teal-subtle: #d9eceb; --teal-faint: #ecf5f4; --grad: linear-gradient(60deg, #14555c 0%, #176b70 55%, #7cc4c0 100%); }
html[data-theme="violett"] { --navy: #3d2d77; --teal: #5b43a7; --teal-subtle: #e5def5; --teal-faint: #f1edf9; --grad: linear-gradient(60deg, #3d2d77 0%, #5b43a7 55%, #b3a3e3 100%); }
html[data-theme="gruen"] { --navy: #1d4f41; --teal: #286b58; --teal-subtle: #dcebe4; --teal-faint: #edf5f1; --grad: linear-gradient(60deg, #1d4f41 0%, #286b58 55%, #8fc7b3 100%); }
html[data-theme="rosa"] { --navy: #7c2d55; --teal: #c2558b; --teal-subtle: #f4dbe8; --teal-faint: #fbf0f6; --grad: linear-gradient(60deg, #7c2d55 0%, #c2558b 55%, #eec3d8 100%); }
html[data-theme="ocker"] { --navy: #7a4620; --teal: #b66c35; --teal-subtle: #f3e2d4; --teal-faint: #f9f1ea; --grad: linear-gradient(60deg, #7a4620 0%, #b66c35 55%, #e0b48d 100%); }
.brandline { background: var(--grad); }

/* Schriftzug neben dem Logo: größer, türkis, Firmen-Schrift bevorzugt.
   Aptos ist eine Microsoft-Lizenzschrift – wir dürfen sie nicht ausliefern,
   nutzen sie aber automatisch, wo sie installiert ist (sonst Fallback). */
.app-name-top {
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  font-weight: 600; font-size: 17px; color: var(--teal);
  letter-spacing: .04em; flex: none;
}

/* Ausgabe-/Optionen-Menüs an den Silben (klappen nach OBEN auf) */
.ausgabe-wrap, .mehr-wrap { position: relative; }
.pill-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(16, 30, 60, .18); padding: 10px;
  display: flex; gap: 12px; min-width: 340px;
}
.mehr-wrap .pill-menu { left: auto; right: 0; flex-direction: column; gap: 6px; min-width: 200px; }
.pm-spalte { flex: 1; min-width: 150px; }
.pm-titel {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: #8a95a0; padding: 2px 8px 6px;
}
.pm-eintrag {
  display: block; width: 100%; text-align: left; border: none; background: none;
  cursor: pointer; font: inherit; font-size: 12.5px; color: #2b3138;
  padding: 6px 9px; border-radius: 8px;
}
.pm-eintrag:hover { background: var(--teal-faint); }
.pm-eintrag.aktiv { background: var(--teal-subtle); color: var(--navy); font-weight: 600; }
.pm-fuss { flex-basis: 100%; font-size: 10.5px; color: #8a95a0; padding: 6px 8px 0; border-top: 1px solid #f2f5f6; margin-top: 2px; }
.pill-schild { color: var(--teal); background: #fff; border-color: #bcdfe2; padding: 5px 10px; display: inline-flex; align-items: center; }
.pill-schild:hover { background: var(--teal-faint); }
/* Silbenzeile bleibt EINE Zeile – Überlauf wandert in „Optionen ▾“.
   WICHTIG: overflow muss sichtbar bleiben, sonst werden die Aufklapp-Menüs
   (Ausgabe/Feinschliff/Silben) an der Zeilenkante abgeschnitten. Das kurze
   Überstehen vor dem Einpassen ist harmlos – pillsEinpassen räumt sofort auf. */
.composer-tools { flex-wrap: nowrap; overflow: visible; }
.composer-tools > * { flex: 0 0 auto; }
#mehrMenu .pill-select { width: 100%; }

/* Silben-Erklärfenster */
.pill-tip {
  position: fixed; z-index: 60; max-width: 320px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 36px rgba(16, 30, 60, .18);
  padding: 10px 13px; font-size: 12.5px; line-height: 1.5; color: #3d4650;
  pointer-events: none;
}
.pill-tip strong { color: var(--navy); }

/* Grenzen-Hinweis im Leerzustand (KRITIS/ISMS) */
.empty-grenzen {
  font-size: 12px !important; color: #8a95a0 !important; max-width: 480px !important;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px;
}

/* ============ RAIL (schmale linke Leiste, Runde 33) ============ */
.rail {
  width: 58px; flex: none; border-right: none;
  /* Keine harte Kante zum Inhalt (Runde 72): Der Verlauf endet in der
     Seiten-Hintergrundfarbe und ein hauchzarter, ausgefederter Schatten
     ersetzt die 1-Pixel-Linie. */
  background: linear-gradient(180deg, #fdfefe 0%, #f5fafa 55%, #f6f9fa 100%);
  box-shadow: inset -14px 0 18px -16px rgba(13, 31, 49, .10);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px 10px; gap: 6px; overflow-y: auto;
}
.rail-btn {
  width: 50px; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: 12px; color: #68737d;
  /* Nicht zu klein (Lesbarkeit), nicht zu fett (Ruhe im Bild) */
  font-size: 10px; font-weight: 500; letter-spacing: .01em;
}
.rail-btn svg { color: #8fa9b4; }
.rail-btn { transition: background .15s ease, color .15s ease, transform .12s ease; }
.rail-btn:hover { background: #fff; box-shadow: 0 2px 10px rgba(13, 31, 49, .08); color: #1d5f66; }
.rail-btn:hover svg { color: var(--teal); transform: translateY(-1px); }
.rail-btn svg { transition: color .15s ease, transform .12s ease; }
/* „Neu“: türkis gefüllt, kompakt (etwa Avatar-Größe) mit Menü daneben */
.rail-btn.accent {
  color: #fff;
  border: none; box-shadow: none; font-weight: 500;
  width: 44px; padding: 6px 2px; border-radius: 12px; font-size: 9px;
}
.rail-btn.accent svg { width: 15px; height: 15px; }
.rail-neu-menu {
  position: fixed; left: 64px; top: 12px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(16, 30, 60, .2); padding: 6px; min-width: 190px;
  display: flex; flex-direction: column;
}
.neu-item {
  text-align: left; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: #2b3138; padding: 8px 11px; border-radius: 8px;
}
.neu-item:hover { background: var(--teal-faint); color: color-mix(in srgb, var(--teal) 85%, #123); }
.neu-trenner { height: 1px; background: #f0f3f5; margin: 4px 6px; }

/* Eubis Tagesgruß-Sprechblase */
.eubi-blase {
  position: fixed; z-index: 45; max-width: 240px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 4px 14px;
  box-shadow: 0 10px 30px rgba(16, 30, 60, .18);
  padding: 10px 13px; font-size: 12.5px; line-height: 1.5; color: #2b3138;
  animation: blaseRein .35s ease;
}
.eubi-blase.weg { opacity: 0; transform: translateY(6px); transition: all .35s; }
@keyframes blaseRein { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.rail-btn.accent svg { color: #fff; }
.rail-btn.accent:hover { filter: brightness(1.07); color: #fff; box-shadow: 0 6px 16px rgba(63, 164, 169, .45); }
.rail-spacer { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-self: stretch; }
.rail-spacer::after { content: ""; height: 1px; margin: 0 10px 4px; background: linear-gradient(90deg, transparent, #d5e3e6, transparent); }
.rail-avatar { margin-top: 6px; cursor: default; }

/* Chats-Panel: schlank, klappt über die Rail-Knöpfe auf/zu */
.panel { width: 260px; }
.panel .chat-list { padding-bottom: 10px; }

/* Kopfzeile: Logo links */
.topbar { padding: 14px 32px 6px 24px; }
.topbar-left svg.logo { height: 30px; width: auto; flex: none; }
.topbar-left .sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.temp-badge {
  font-size: 11px; font-weight: 600; color: #4a4f57; background: #eef0f3;
  border: 1px dashed #c8cdd4; border-radius: 99px; padding: 3px 10px; white-space: nowrap;
}
.pill-schild { font-size: 14px; padding: 4px 12px; }

/* Fünf Reiter im rechten Bereich: kompakter, damit alles passt */
#ctxTabs .tab { font-size: 11px; padding: 6px 1px; }

/* Tipps: großes Fenster, Kästchen/Liste, eingestreute Fragen */
.tipps-inhalt.tipps-kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.tipps-inhalt.tipps-liste { display: flex; flex-direction: column; gap: 10px; }
.tipps-karte { border: 1px solid #eef1f3; border-radius: 14px; padding: 14px 16px; background: #fff; }
.tipps-karte h4 { font-family: "Roboto Slab", serif; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
.tipps-karte p, .tipps-karte li { font-size: 13px; color: #3d4650; line-height: 1.55; margin-top: 6px; }
.tipps-karte ul { margin-left: 18px; }
.tipps-frage { background: var(--teal-faint); border-color: #cde4e7; }
.tipps-frage.ok { background: #eaf6ef; border-color: #bfe0cd; }
.tipps-frage.err { background: #fdf7f6; border-color: #eccfcb; }
.tipps-option {
  display: block; width: 100%; text-align: left; margin-top: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 7px 11px; font: inherit; font-size: 12.5px; color: #2b3138;
}
.tipps-option:hover { border-color: #b5dce0; }
.tipps-option.richtig { border-color: #1f7a4d; color: #1f7a4d; font-weight: 600; }
.tipps-option.gewaehlt:not(.richtig) { border-color: #b23b2e; color: #b23b2e; }
@media (max-width: 860px) { .tipps-inhalt.tipps-kacheln { grid-template-columns: 1fr; } }

/* Umschalter (Split) im rechten Bereich */
.split-leiste {
  display: flex; background: #f0f4f6; border-radius: 10px; padding: 3px; margin: 4px 2px 8px;
}
.split-knopf {
  flex: 1; border: none; background: none; cursor: pointer; font: inherit;
  font-size: 11.5px; font-weight: 600; color: #68737d; padding: 6px 4px; border-radius: 8px;
}
.split-knopf.aktiv { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(13, 31, 49, .12); }

/* Übersicht: vier kleine Kästchen in EINER Zeile – Symbol über Titel,
   Farbabstufung von kräftig (Neuer Chat) bis zart (Eubi), Runde 40 */
.uebersicht-knoepfe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 2px 10px; position: relative; }
.ueb-mini {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 4px 7px; cursor: pointer; font: inherit; font-size: 10.5px;
  font-weight: 600; color: var(--navy); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ueb-mini:hover { filter: brightness(0.97); }
.ueb-mini.um-chat { background: color-mix(in srgb, var(--teal) 50%, #fff); border-color: transparent; color: #fff; }
.ueb-mini.um-chat svg { color: #fff; }
.ueb-mini.um-temp { background: color-mix(in srgb, var(--teal) 20%, #fff); border-color: transparent; color: color-mix(in srgb, var(--teal) 90%, #102); }
.ueb-mini.um-tipps { background: #fdf5d8; border-color: transparent; color: #8a6d1f; }
.ueb-mini.um-eubi { background: color-mix(in srgb, var(--teal) 5%, #fff); }
.eubi-menu { position: absolute; z-index: 40; }
.fav-frist {
  font-size: 11.5px; font-weight: 400;
  background: var(--teal-faint); border-radius: 8px; padding: 6px 10px; margin: 2px 2px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Darstellung-Auswahlfelder: freundlicher als die nackten Browser-Selects */
.ctx-karte select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; font: inherit; font-size: 13px; background: #fafcfc;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23118b89' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.ctx-karte select:focus { outline: none; border-color: var(--teal); background-color: #fff; }
.ctx-karte label { font-weight: 500; }

/* Aufklappbare Gruppen (Favoriten in der Übersicht) */
.klapp-gruppe { border: 1px solid #eef1f3; border-radius: 12px; margin: 4px 2px; background: #fff; }
.klapp-gruppe summary {
  cursor: pointer; list-style: none; padding: 9px 12px; font-size: 12.5px;
  font-weight: 600; color: #3d4650; display: flex; align-items: center; gap: 8px;
}
.klapp-gruppe summary::before { content: "▸"; color: var(--teal); transition: transform .12s; }
.klapp-gruppe[open] summary::before { transform: rotate(90deg); }
.klapp-gruppe summary::-webkit-details-marker { display: none; }
.klapp-gruppe .klapp-inhalt { padding: 0 4px 6px; }

/* Favoriten-Galerie (Kacheln in Werkzeugen/Bibliothek) */
.fav-galerie { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 2px 8px; }
.fav-karte {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  padding: 0 0 6px 0; overflow: hidden; text-align: left; font: inherit;
}
.fav-karte:hover { border-color: #b5dce0; box-shadow: 0 3px 10px rgba(63, 164, 169, .14); }
.fav-karte span {
  display: block; font-size: 11px; font-weight: 600; color: #3d4650; padding: 6px 8px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fav-mini { height: 84px; background: #f6f9fa; overflow: hidden; position: relative; pointer-events: none; }
.fav-mini iframe {
  width: 400%; height: 400%; border: none; transform: scale(.25); transform-origin: 0 0;
}
.fav-mini.fav-doc { display: grid; place-items: center; font-size: 30px; }

/* Feinschliff-Regler */
.fein-zeile { border: 1px solid #eef1f3; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.fein-kopf { font-size: 13px; font-weight: 600; color: #2b3138; display: flex; align-items: center; gap: 8px; }
.fein-slider { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.fein-slider input[type="range"] { flex: 1; accent-color: var(--teal); }
.fein-label { font-size: 11px; color: #8a95a0; flex: none; width: 74px; }
.fein-label:last-child { text-align: right; }
.fein-stand { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--teal); margin-top: 2px; }

/* Vorschau-Fenster (Dokumente/Dateien/Ansichten) */
.vf-kopf { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.vf-inhalt { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f8fafb; }
.vf-frame { width: 100%; height: 52vh; border: none; display: block; background: #fff; }
.vf-dokument { background: #fff; padding: 22px 26px; max-height: 52vh; overflow-y: auto; font-size: 14px; }
.modal.vollbild { width: calc(100vw - 48px); max-width: 1400px; }
.modal.vollbild .vf-frame { height: 74vh; }
.modal.vollbild .vf-dokument { max-height: 74vh; }
.datei-karte .dk-knopf { cursor: pointer; border: 1px solid #cde4e7; background: var(--teal-faint); font: inherit; font-size: 12px; font-weight: 600; color: #20666c; text-decoration: none; }

/* Warnbanner, wenn Presidio fehlt (Phase 9) */
.anon-warn {
  width: 900px; max-width: calc(100% - 32px); margin: 0 auto 6px auto;
  border: 1px solid #e7dcb0; background: #fdf9e9; color: #6a5620;
  border-radius: 10px; padding: 7px 12px; font-size: 12px;
}


/* ============ FARBWELT KONSEQUENT (Runde 39) ============ */
/* Vorher hingen viele Töne fest auf dem Standard-Petrol – jetzt folgt ALLES der
   gewählten Farbwelt (color-mix leitet helle/dunkle Abstufungen aus ihr ab). */
.pill-select {
  border-color: color-mix(in srgb, var(--teal) 28%, #fff);
  color: color-mix(in srgb, var(--teal) 72%, #1c2c34);
  background-color: color-mix(in srgb, var(--teal) 5%, #fff);
}
.pill-select:hover { border-color: color-mix(in srgb, var(--teal) 55%, #fff); background-color: var(--teal-faint); color: color-mix(in srgb, var(--teal) 85%, #102); }
.pill-select.set { color: color-mix(in srgb, var(--teal) 90%, #102); border-color: color-mix(in srgb, var(--teal) 55%, #fff); background-color: var(--teal-faint); }
.search.global { background: var(--teal-faint); border-color: color-mix(in srgb, var(--teal) 35%, #fff); color: color-mix(in srgb, var(--teal) 80%, #123); }
.search.global input::placeholder { color: color-mix(in srgb, var(--teal) 60%, #789); }
.list-add { color: color-mix(in srgb, var(--teal) 80%, #123); border-color: color-mix(in srgb, var(--teal) 35%, #ccd); }
.chat-item svg { color: color-mix(in srgb, var(--teal) 55%, #fff); }
.chat-item.active svg { color: var(--navy); }
.fav-frist { color: color-mix(in srgb, var(--teal) 85%, #123); background: var(--teal-faint); }
.rail-btn.accent { background: linear-gradient(150deg, #1c4f8f 0%, #118b89 62%, #3fa79f 100%); box-shadow: 0 4px 12px rgba(63, 164, 169, .35); }
.new-chat { background: var(--grad); }
.file-chip { color: color-mix(in srgb, var(--teal) 85%, #123); border-color: color-mix(in srgb, var(--teal) 30%, #fff); background: var(--teal-faint); }
.run-chip.file { color: color-mix(in srgb, var(--teal) 85%, #123); background: var(--teal-faint); border-color: color-mix(in srgb, var(--teal) 30%, #fff); }
.datei-karte .dk-knopf { color: color-mix(in srgb, var(--teal) 85%, #123); background: var(--teal-faint); border-color: color-mix(in srgb, var(--teal) 30%, #fff); }
.klapp-gruppe summary::before { color: var(--teal); }
.day-divider span { color: color-mix(in srgb, var(--teal) 80%, #123); background: var(--teal-faint); }
.robot-label { color: color-mix(in srgb, var(--teal) 85%, #123); border-color: color-mix(in srgb, var(--teal) 30%, #fff); }


/* Kompakte Kacheln (Runde 41): rund ein Drittel kleiner, drei je Zeile */
.fav-galerie.klein { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fav-galerie.klein .fav-mini { height: 52px; }
.fav-galerie.klein .fav-mini.fav-doc { font-size: 20px; }
.fav-galerie.klein .fav-karte span { font-size: 9.5px; padding: 4px 6px 0; }
.fav-galerie.klein .fav-mini iframe { transform: scale(.18); width: 556%; height: 556%; }

/* Schnellstart kompakter; „Neu“ 15 % kräftiger */
.ueb-mini { padding: 7px 3px 6px; font-size: 10px; gap: 3px; }
.ueb-mini svg { width: 14px; height: 14px; }
.ueb-mini.um-chat { background: color-mix(in srgb, var(--teal) 65%, #fff); }


/* Runde 42: Griff mit dezentem Quer-Text statt Pfeil */
.ctx-griff { height: 96px; width: 24px; }
.griff-text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--teal); text-transform: uppercase;
}
/* Kacheln nochmals kompakter (~25 % kleiner) */
.fav-galerie.klein { gap: 5px; }
.fav-galerie.klein .fav-mini { height: 40px; }
.fav-galerie.klein .fav-mini.fav-doc { font-size: 15px; }
.fav-galerie.klein .fav-karte span { font-size: 9px; padding: 3px 5px 0; }
/* Handy: 16px-Eingaben verhindern das automatische Rein-Zoomen von iOS */
@media (max-width: 720px) {
  .composer textarea, .modal input, .modal textarea, .modal select, .search input { font-size: 16px; }
}


/* Runde 42b: Silben einheitlich in Form und Höhe */
.composer-tools .pill-select, .composer-tools button.pill-select {
  height: 29px; display: inline-flex; align-items: center; border-radius: 99px;
  font-size: 12px; line-height: 1;
}
/* Aufklapp-Knöpfe (Ausgabe/Feinschliff/Optionen) bekommen denselben Pfeil wie die Auswahl-Silben */
#btnAusgabe, #btnFinish, #btnMehr {
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%239aa4ad' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.pill-schild { padding: 0 12px; }
.pill-schild svg { display: block; }

/* Themes färben auch die Hinweis-/Hilfe-Elemente vollständig */
.hinweis-knopf { border-color: color-mix(in srgb, var(--teal) 35%, #fff); background: var(--teal-faint); color: var(--teal); }
.hinweis-knopf:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.act-btn:hover { color: color-mix(in srgb, var(--teal) 85%, #123); border-color: color-mix(in srgb, var(--teal) 45%, #fff); background: var(--teal-faint); }
.sub-link:hover { color: var(--teal); }
.gruppen-hinweis { border-left-color: var(--teal-subtle); }
.qq-opt input, .check-row input, .fein-slider input[type="range"] { accent-color: var(--teal); }
.tab.active { color: var(--navy); }

/* Schutz-Begriffe-Eingabe: leicht getönt, unaufdringlich */
.sz-eingabe {
  background: var(--teal-faint) !important;
  border-color: color-mix(in srgb, var(--teal) 30%, #fff) !important;
}

/* Runde 43: Stopp-Knopf während der Antwort + klickbarer Favoriten-Kopf */
.send-btn.stoppen { background: #b23b2e; box-shadow: 0 3px 8px rgba(178, 59, 46, .35); }
.fav-pfeil { color: var(--teal); font-size: 11px; }


/* ============ Runde 44: Reiter kräftiger, Wortmarke, moderne Silben ============ */
/* Reiter-Leiste rechts: deutlich in der Farbwelt (aktiv ~50 % Farbanteil). */
#ctxTabs { background: color-mix(in srgb, var(--teal) 14%, #fff); }
#ctxTabs .tab { color: color-mix(in srgb, var(--teal) 78%, #16323a); font-weight: 600; }
#ctxTabs .tab:hover { color: color-mix(in srgb, var(--teal) 95%, #000); }
#ctxTabs .tab.active {
  background: color-mix(in srgb, var(--teal) 50%, #fff);
  color: #fff;
  text-shadow: 0 1px 2px rgba(16, 30, 60, .18);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--teal) 35%, transparent);
}

/* Wortmarke: GROSSBUCHSTABEN, mehr Lauf­weite, ~1,5 pt kleiner – passt zum Logo. */
.app-name-top {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 15px;
  font-weight: 600;
}

/* Silben moderner: weicher Schatten, sanftes Anheben beim Überfahren. */
.composer-tools .pill-select, .composer-tools button.pill-select {
  box-shadow: 0 1px 2px rgba(16, 30, 60, .05);
  transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.composer-tools .pill-select:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(16, 30, 60, .12); }
.composer-tools .pill-select:active { transform: translateY(0); }

/* Eigene Silben-Aufklapper (ersetzen die System-Dropdowns). */
.silbe-wrap { position: relative; display: inline-flex; }
.silbe-knopf {
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%239aa4ad' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  white-space: nowrap;
}
.silbe-menu { flex-direction: column; min-width: 190px; max-height: 320px; overflow-y: auto; }
.silbe-menu .pm-eintrag { white-space: nowrap; }
.pm-eintrag.pm-neu {
  border-top: 1px dashed color-mix(in srgb, var(--teal) 30%, #fff);
  margin-top: 4px; padding-top: 8px;
  color: color-mix(in srgb, var(--teal) 85%, #123); font-weight: 600;
}
.pill-menu {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--teal) 22%, #fff);
  box-shadow: 0 18px 50px rgba(16, 30, 60, .16);
}
#mehrMenu .silbe-wrap, #mehrMenu .fein-wrap { width: 100%; }
#mehrMenu .silbe-wrap .pill-select, #mehrMenu .fein-wrap .pill-select { width: 100%; }

/* Feinschliff: Aufklapper statt Fenster – kompakte Reglerzeilen. */
.fein-wrap { position: relative; display: inline-flex; }
#feinMenu { flex-direction: column; min-width: 270px; }
.fein-zeile.kompakt { margin: 6px 0 2px; }
.fein-zeile.kompakt .fein-kopf { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.fein-zeile.kompakt .fein-stand { margin-left: auto; font-size: 10.5px; color: color-mix(in srgb, var(--teal) 85%, #123); }
.fein-zeile.kompakt .fein-slider { display: flex; align-items: center; gap: 8px; }
.fein-zeile.kompakt .fein-slider input { flex: 1; }
.fein-zeile.kompakt .fein-label { font-size: 10px; color: #8a95a0; flex: 0 0 auto; }

/* Werkzeug-Hilfe: kleines ? an Kacheln und Listen-Einträgen. */
.fav-karte { position: relative; }
.wz-hilfe {
  position: absolute; top: 3px; right: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 10px; line-height: 15px; text-align: center;
  background: var(--teal-faint); color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, #fff);
  opacity: 0; transition: opacity .12s;
}
.fav-karte:hover .wz-hilfe { opacity: 1; }
.chat-item .wz-frage { flex: 0 0 auto; opacity: 0; transition: opacity .12s; }
.chat-item:hover .wz-frage { opacity: 1; }

/* Schnellstart flacher: „Neu“ nur als + (heller), Tipps als Balken darunter. */
.ueb-mini.flach { padding: 5px 3px 4px; gap: 2px; }
.ueb-mini.flach svg { width: 13px; height: 13px; }
.ueb-mini.um-chat { background: color-mix(in srgb, var(--teal) 45%, #fff); }
.ueb-mini.um-chat.flach { flex: 0 0 44px; }
.tipps-balken {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin: 6px 0 2px; padding: 6px 10px;
  border: 1px solid #f0e3b0; border-radius: 10px;
  background: #fdf5d8; color: #7a6417;
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.tipps-balken:hover { background: #fbeeba; }

/* Runde 44e: Schnellstart als rechteckige Text-Knöpfe + Suchfeld darunter */
.ueb-btn {
  flex: 1; padding: 7px 6px; border-radius: 9px; border: 1px solid transparent;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; line-height: 1.2;
}
/* R74: Neu sieht 1:1 aus wie der Neu-Knopf oben links (Marken-Verlauf),
   Tipps mit Glühbirne, Suche mit Lupe – alle in EINER abgestimmten Höhe. */
.ueb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ueb-btn svg { flex: none; }
.ueb-btn.ub-neu {
  background: linear-gradient(150deg, #1c4f8f 0%, #118b89 62%, #3fa79f 100%);
  border: none; color: #fff; text-shadow: 0 1px 2px rgba(16, 30, 60, .15);
  box-shadow: 0 4px 12px rgba(63, 164, 169, .35);
}
.ueb-btn.ub-neu:hover { filter: brightness(1.07); box-shadow: 0 6px 16px rgba(63, 164, 169, .45); }
.ueb-btn.ub-tipps { background: #fdf5d8; border-color: #f0e3b0; color: #7a6417; }
.ueb-btn.ub-tipps:hover { background: #fbeeba; }
.ueb-btn.ub-suchbtn { background: color-mix(in srgb, var(--teal) 9%, #fff); border-color: color-mix(in srgb, var(--teal) 26%, #fff); color: color-mix(in srgb, var(--teal) 72%, #17323a); }
.ueb-btn.ub-suchbtn:hover { background: var(--teal-faint); }
.ueb-btn.ub-eubi { flex: 0 1 auto; min-width: 64px; background: color-mix(in srgb, var(--teal) 6%, #fff); border-color: color-mix(in srgb, var(--teal) 25%, #fff); color: color-mix(in srgb, var(--teal) 80%, #123); }
.ueb-btn.ub-eubi:hover { background: var(--teal-faint); }
/* WICHTIG: Grundklasse .rail-neu-menu ist fixed – ohne absolute läge das
   Menü bei „top: 100%“ unterhalb des BILDSCHIRMS (unsichtbar). */
.ctx-neu-menu { position: absolute; left: 8px; right: auto; top: calc(100% + 4px); }
.ctx-suche {
  width: 100%; margin: 8px 0 2px; padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, #fff); border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 4%, #fff);
  font: inherit; font-size: 12.5px; color: var(--ink);
}
.ctx-suche:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent); }
.ctx-suche::placeholder { color: color-mix(in srgb, var(--teal) 45%, #9aa4ad); }
#ctxSucheTreffer .chat-item { margin: 2px 0; }

/* Runde 45: Schnellstart-Knöpfe füllen die Zeile (die alte 4er-Raster-Vorgabe
   ließ neben drei Knöpfen eine leere Spalte) und sind flacher. */
.uebersicht-knoepfe { display: flex; grid-template-columns: none; }
.ueb-btn { padding: 5px 6px; font-size: 11px; }

/* Runde 46: Schnellstart noch flacher/breiter; Aktiv-Töne dunkler (Kontrast
   zur weißen Schrift auf hellen Farbwelten). */
.ueb-btn { padding: 4px 6px; font-size: 11px; border-radius: 8px; }
.ueb-btn.ub-neu { background: color-mix(in srgb, var(--teal) 58%, #fff); }
.ueb-btn.ub-neu:hover { background: color-mix(in srgb, var(--teal) 70%, #fff); }
#ctxTabs .tab.active { background: color-mix(in srgb, var(--teal) 62%, #fff); }

/* Runde 46: Brief-Silbe (✉️ mit Herz) + Einführungstour */
.brief-wrap { position: relative; display: inline-flex; }
.pill-brief {
  color: color-mix(in srgb, var(--teal) 85%, #123);
  border-color: color-mix(in srgb, var(--teal) 35%, #fff);
  background: color-mix(in srgb, var(--teal) 6%, #fff);
  padding: 0 12px; display: inline-flex; align-items: center;
}
.pill-brief:hover { background: var(--teal-faint); border-color: color-mix(in srgb, var(--teal) 55%, #fff); }
.pill-brief svg { display: block; }
#briefMenu { flex-direction: column; }
.tour-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(16, 30, 60, .45); }
.tour-rahmen {
  position: fixed; z-index: 201; border-radius: 12px; pointer-events: none;
  border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(16, 30, 60, .45), 0 0 0 4px color-mix(in srgb, var(--teal) 70%, #fff);
  transition: all .25s ease;
}
.tour-overlay { background: transparent; } /* Abdunkeln übernimmt der Rahmen-Schatten */
.tour-tip {
  position: fixed; z-index: 202; width: 320px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 18px 50px rgba(16, 30, 60, .3);
}
.tour-tip h4 { margin: 2px 0 6px; color: var(--navy); font-size: 15px; }
.tour-tip p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: #3a424b; }
.tour-schritt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: color-mix(in srgb, var(--teal) 85%, #123); }
.tour-knoepfe { display: flex; gap: 8px; align-items: center; }
.tour-knoepfe .btn { padding: 6px 12px; font-size: 12px; }

/* Runde 47: Mikro = Diktieren (Menü) – rote Pulse-Anzeige während des Diktats */
.rec-wrap { position: relative; display: inline-flex; }
.rec-menu { bottom: calc(100% + 8px); left: auto; right: 0; flex-direction: column; }
.rec-btn.aktiv { color: #b23b2e; border-color: #e0a9a2; background: #fdf2f0; animation: diktatPuls 1.2s ease-in-out infinite; }
@keyframes diktatPuls { 0%, 100% { box-shadow: 0 0 0 0 rgba(178, 59, 46, .25); } 50% { box-shadow: 0 0 0 6px rgba(178, 59, 46, 0); } }

/* Runde 47b: reine Erklär-Knöpfe deutlich als Info kennzeichnen */
.act-btn.info-knopf {
  border-style: dashed; background: transparent;
  color: #7c8791; font-size: 10.5px;
}
.act-btn.info-knopf:hover { color: color-mix(in srgb, var(--teal) 80%, #123); border-color: color-mix(in srgb, var(--teal) 40%, #fff); background: var(--teal-faint); }

/* Runde 50: ★ oben rechts im Chat (Favorit) */
.chat-star { color: #b9c2cb; }
.chat-star:hover { color: #d99a1b; }
.chat-star.an { color: #d99a1b; }
.chat-star.an svg path { fill: #f5c04c; stroke: #d99a1b; }


/* Runde 52b: Mini-Zug INLINE hinter „…Assistent" + ?-Knöpfe ausblendbar */
.empty-zug-mini { display: inline-block; vertical-align: -6px; margin-left: 6px; }
body.hilfe-aus .hinweis-knopf { display: none; }

/* Gruß-Schild: identisch zur Schutz-Silbe (gleiches SVG, gleiche 70%-Füllung) */
.gruss-schild { display: inline-block; vertical-align: -2px; color: var(--teal); }

/* Runde 53: Handy-Bedienung des rechten Bereichs */
.mobil-reiter { display: none; margin-left: auto; color: color-mix(in srgb, var(--teal) 80%, #123); }
@media (max-width: 720px) {
  .mobil-reiter { display: inline-flex; }
  /* Schublade nutzt (fast) die volle Breite – die Reiter stehen damit oben. */
  .context { width: calc(100vw - 48px); min-width: 0; max-width: none; }
  .ctx-resize { display: none; }
  /* Der schmale Seiten-Griff ist auf Touch fummelig – der Knopf oben übernimmt. */
  .ctx-griff { display: none; }
}


/* ============ DUNKELMODUS (Runde 58, Stufe 1) ============ */
/* Bewusst über Variablen + gezielte Flächen: Farbwelt-Akzente bleiben. */
html[data-dunkel="1"] {
  --navy: #9db4f0;             /* Überschriften lesbar auf dunklem Grund */
  --teal-subtle: #17383d;
  --teal-faint: #10262b;
  --ink: #e4ebf0;
  --gray: #9aa7b1; --gray-mid: #55636d;
  --line: #263540;
  color-scheme: dark;
}
html[data-dunkel="1"] body { background: #0d151b; color: var(--ink); }
html[data-dunkel="1"] .rail { background: linear-gradient(180deg, #0c141a 0%, #0a1218 55%, #0b161d 100%); border-right: none; box-shadow: inset -14px 0 18px -16px rgba(0, 0, 0, .55); }
html[data-dunkel="1"] .rail-btn:hover { background: #14212a; box-shadow: none; }
html[data-dunkel="1"] .rail-spacer::after { background: linear-gradient(90deg, transparent, #24343d, transparent); }
html[data-dunkel="1"] .panel,
html[data-dunkel="1"] .context { background: #101a21; border-color: var(--line); }
html[data-dunkel="1"] .topbar { background: transparent; }
html[data-dunkel="1"] .composer,
html[data-dunkel="1"] .modal,
html[data-dunkel="1"] .pill-menu,
html[data-dunkel="1"] .rail-neu-menu,
html[data-dunkel="1"] .pill-tip,
html[data-dunkel="1"] .tour-tip,
html[data-dunkel="1"] .ctx-karte,
html[data-dunkel="1"] .fav-karte,
html[data-dunkel="1"] .rec-menu { background: #141f27; border-color: var(--line); color: var(--ink); }
/* Menü-Einträge haben eine feste helle Textfarbe – im Dunkeln aufhellen,
   sonst ist z. B. das „Neu ▾“-Menü kaum lesbar. */
html[data-dunkel="1"] .neu-item { color: var(--ink); }
html[data-dunkel="1"] .neu-item:hover { background: #1d3138; color: #9fdbe0; }
html[data-dunkel="1"] .composer textarea,
html[data-dunkel="1"] input,
html[data-dunkel="1"] select,
html[data-dunkel="1"] textarea { background: #0f181f; color: var(--ink); border-color: var(--line); }
html[data-dunkel="1"] .pill-select,
html[data-dunkel="1"] button.pill-select { background-color: #16232b; color: #bfd6da; border-color: #2c4149; }
html[data-dunkel="1"] .pill-select.set { background-color: var(--teal-subtle); color: #cfeef1; }
html[data-dunkel="1"] .pm-eintrag { color: #cdd8de; }
html[data-dunkel="1"] .pm-eintrag:hover { background: var(--teal-faint); }
html[data-dunkel="1"] .chat-item { color: var(--ink); }
html[data-dunkel="1"] .chat-item:hover,
html[data-dunkel="1"] .chat-item.active { background: #18262f; }
html[data-dunkel="1"] .msg-user .bubble { background: #1a3a3f; color: #dcecef; }
html[data-dunkel="1"] .msg-ai .body { color: #d7dfe5; }
html[data-dunkel="1"] .msg-ai .body strong { color: #f0f5f8; }
html[data-dunkel="1"] .tabs { background: #0f181f; }
html[data-dunkel="1"] .tab { color: #93a3ae; }
html[data-dunkel="1"] .tab.active { background: #1c2b34; color: #e8f0f4; box-shadow: none; }
html[data-dunkel="1"] #ctxTabs { background: #12212a; }
html[data-dunkel="1"] #ctxTabs .tab.active { background: color-mix(in srgb, var(--teal) 45%, #0d151b); color: #fff; }
html[data-dunkel="1"] .ueb-btn.ub-eubi { background: #16232b; border-color: #2c4149; color: #bfd6da; }
html[data-dunkel="1"] .ueb-btn.ub-tipps,
html[data-dunkel="1"] .tipps-balken { background: #2c2712; border-color: #4a4222; color: #e3cf7c; }
html[data-dunkel="1"] .list-add { background: transparent; }
html[data-dunkel="1"] .mini-btn,
html[data-dunkel="1"] .act-btn,
html[data-dunkel="1"] .btn.ghost { background: #16232b; color: #bfd6da; border-color: #2c4149; }
html[data-dunkel="1"] .fav-frist { background: var(--teal-faint); }
html[data-dunkel="1"] .empty-zug path[fill="#fff"],
html[data-dunkel="1"] .empty-zug-mini path[fill="#fff"],
html[data-dunkel="1"] .flori-svg path[fill="#fff"] { fill: #e8eef2; }

/* Kiwis Herzblut-Zeile in der Begrüßung: leise, aber mit Haltung. */
.empty-herz {
  font-style: italic; color: color-mix(in srgb, var(--teal) 55%, #4a5560);
  font-size: 13.5px; margin-top: 2px;
}
html[data-dunkel="1"] .empty-herz { color: color-mix(in srgb, var(--teal) 60%, #aab6c0); }
html[data-dunkel="1"] .disclaimer,
html[data-dunkel="1"] .check-sub,
html[data-dunkel="1"] .list-note,
html[data-dunkel="1"] .tab-expl { color: #8fa0ab; }
html[data-dunkel="1"] .gruppen-hinweis { background: #101c23; color: #b9c7d0; }
html[data-dunkel="1"] .search.global,
html[data-dunkel="1"] .ctx-suche { background: #0f181f; color: var(--ink); }
html[data-dunkel="1"] .user-row,
html[data-dunkel="1"] .audit-row { border-color: var(--line); }
.temp-knopf { color: #8fa0ab; }
.temp-knopf:hover { color: var(--teal); }
/* Logo im Dunkelmodus aufhellen (Navy-Pfade wären sonst kaum sichtbar) */
html[data-dunkel="1"] .logo path[fill="#0d1f31"] { fill: #c9d6f7; }

/* Runde 62: klarere Abschnitts-Bänder + Dunkelmodus-Nachschliff */
.abschnitt-band {
  background: #e8eff1; border-radius: 8px; padding: 6px 10px !important;
  margin: 14px 2px 6px !important; color: #44565e;
}
html[data-dunkel="1"] .abschnitt-band { background: #182631; color: #aebfc9; }
/* Dunkelmodus: Restposten (Nicoles 90 %-Befund) */
html[data-dunkel="1"] .ctx-karte label,
html[data-dunkel="1"] .check-row,
html[data-dunkel="1"] .check-row strong { color: #cfdae1 !important; }
html[data-dunkel="1"] .check-row .check-sub { color: #8fa0ab !important; }
html[data-dunkel="1"] .split-leiste { background: #0f181f; }
html[data-dunkel="1"] .split-knopf { color: #93a3ae; }
html[data-dunkel="1"] .split-knopf.aktiv { background: #1c2b34; color: #e8f0f4; }
html[data-dunkel="1"] .klapp-gruppe summary { color: #cfdae1; }
html[data-dunkel="1"] .group-label { color: #7e929d; }
html[data-dunkel="1"] .robot-panel { background: #141f27; border-color: #263540; color: #e4ebf0; }
html[data-dunkel="1"] .rp-msg.ai { background: #1a2a33; color: #dbe5ea; }
html[data-dunkel="1"] .rp-messages { background: #101a21; }
html[data-dunkel="1"] .jump-down { background: #2c4a8f; }
html[data-dunkel="1"] .u-tag.inactive { background: #33272a; color: #d8a0a6; }
html[data-dunkel="1"] .team-tag { background: #143238; color: #9fd7db; }
html[data-dunkel="1"] .fav-karte span { color: #b9c7d0; }
html[data-dunkel="1"] .tour-tip h4 { color: #cdd9f5; }
html[data-dunkel="1"] .tour-tip p { color: #b9c7d0; }

/* Runde 63: Wortmarke klein UNTER dem Logo + Mini-Fenster-Knopf */
.marke { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.app-name-top { font-size: 11.5px; letter-spacing: .24em; }
.mini-knopf { color: #8fa0ab; }
.mini-knopf:hover { color: var(--teal); }
.zf-secret { user-select: all; }
#zfQr svg { border: 8px solid #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(16,30,60,.12); }
html[data-dunkel="1"] #zfQr svg { border-color: #fff; } /* QR braucht Weiß zum Scannen */
#zfQr svg { width: 168px; height: 168px; }
.chip-schwarz { border: none; background: none; cursor: pointer; font-size: 13px; padding: 0 2px; }

/* Runde 65: klappbare Abschnitte in allen rechten Reitern */
.klapp-gruppe.sektion { border: none; background: transparent; margin: 6px 0 2px; }
.klapp-gruppe.sektion > summary { list-style: none; cursor: pointer; }
.klapp-gruppe.sektion > summary::-webkit-details-marker { display: none; }
.klapp-gruppe.sektion > summary::before { content: "▾"; color: var(--teal); font-size: 10px; margin-right: 6px; }
.klapp-gruppe.sektion:not([open]) > summary::before { content: "▸"; }

/* Runde 66: kürzere Wortmarke, Brief neben dem Schild, größere Klapp-Pfeile */
.klapp-gruppe.sektion > summary::before { font-size: 13px; font-weight: 700; }
.klapp-gruppe.sektion > summary { padding: 4px 0; }
.klapp-gruppe summary::before { font-size: 12px; }
.brief-wrap { margin-right: 2px; }

/* Runde 67: Kosten-Schätzrechner aufgeräumt */
.kosten-rechner { padding: 14px; }
.kr-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kr-feld { display: flex; flex-direction: column; gap: 4px; }
.kr-feld span {
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: #68737d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kr-feld input {
  font: inherit; font-size: 14px; padding: 8px 10px; width: 100%;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, #dfe6ea); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.kr-feld input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent); }
.kr-ergebnis {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 10%, #fff);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.kr-ergebnis strong { font-size: 16px; color: color-mix(in srgb, var(--teal) 90%, #123); }
.kr-ergebnis span { font-size: 11.5px; color: #68737d; }
html[data-dunkel="1"] .kr-feld input { background: #0f181f; color: var(--ink); }
html[data-dunkel="1"] .kr-ergebnis { background: var(--teal-faint); }
html[data-dunkel="1"] .kr-feld span, html[data-dunkel="1"] .kr-ergebnis span { color: #8fa0ab; }
