/* =====================================================================
   Business Cockpit — Designsystem (hell, minimalistisch, ein Akzent)
   Linien-Icons (currentColor), dünne Ränder, viel Weißraum, breite Inhalte.
   Alle Klassennamen bleiben erhalten; nur die Optik ist neu.
   ===================================================================== */
:root {
  /* Flächen — hell & ruhig */
  --bg: #f6f7f9;            /* App-Hintergrund */
  --surface: #ffffff;      /* Karten / Panels */
  --surface-2: #f1f2f5;    /* Inputs / verschachtelte Flächen */
  --surface-hover: #eceef1;
  --sidebar-bg: #fbfbfc;

  /* Linien — dünn & zurückhaltend */
  --border: #e4e6eb;
  --border-soft: #eef0f3;

  /* Text */
  --text: #1f2329;
  --muted: #6b7280;
  --faint: #9aa1ad;

  /* EIN Akzent: Indigo */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.10);

  /* Semantische Status (Text dunkel genug für helle Tints) */
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.12);
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.11);
  --warn: #92660a;
  --warn-soft: rgba(146, 102, 10, 0.12);

  --radius: 10px;
  --radius-sm: 6px;

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 28px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.muted { color: var(--muted); }
.error, .err { color: var(--danger); }

/* Icons — eine Quelle, skaliert mit der Schriftgröße des Kontexts */
.ico { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* dezente Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #d4d7dd transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d4d7dd; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #c2c6cf; background-clip: padding-box; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =====================================================================
   Login
   ===================================================================== */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.login-card p { margin: 0; }
.login-card input,
.login-card button {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}
.login-card input { background: var(--surface); color: var(--text); }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-card button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
}
.login-card button:hover { background: var(--accent-hover); }

/* =====================================================================
   App-Layout (Sidebar + Hauptbereich)
   ===================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { font-size: 15px; font-weight: 650; padding: 6px 8px 20px; letter-spacing: -0.01em; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* =====================================================================
   Navigation (Hauptreiter + immer sichtbare Unterreiter)
   ===================================================================== */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; flex-direction: column; margin-bottom: 8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.2;
}
.nav-link:hover { background: var(--surface-hover); }

.nav-top { font-weight: 600; }
.nav-top.active { color: var(--accent); }

.nav-ic { width: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted); }
.nav-top .nav-ic { color: var(--faint); }
.nav-top.active .nav-ic { color: var(--accent); }
.nav-ic .ico { width: 17px; height: 17px; }

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 3px 0 0 9px;
  padding-left: 9px;
  border-left: 1px solid var(--border);
}
.nav-child { font-weight: 500; font-size: 13px; color: var(--muted); padding: 7px 10px; }
.nav-child:hover { color: var(--text); }
.nav-child .nav-ic { width: 16px; }
.nav-child .nav-ic .ico { width: 15px; height: 15px; }
.nav-child.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-child.active .nav-ic { color: var(--accent); }

/* Zahlen-Badge rechts am Unterreiter (z.B. offene Kommentare). */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-foot { padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
.sidebar-foot .btn { width: 100%; }

/* =====================================================================
   Topbar
   ===================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  min-height: 58px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .status { flex: 1; font-size: 12.5px; color: var(--muted); text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.topbar .status .ico { width: 14px; height: 14px; }
.topbar .actions { display: flex; gap: 8px; }

.crumb { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.crumb .sep { color: var(--faint); margin: 0 6px; font-weight: 400; }

/* =====================================================================
   Buttons (primär = Akzent, ghost = dezent)
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn .ico { width: 15px; height: 15px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger:hover { background: var(--danger); filter: brightness(0.92); }
.btn.like.liked { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.like.liked .ico { fill: currentColor; }
.btn.recording { background: var(--danger); color: #fff; border-color: transparent; }

.link-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 5px; border-radius: var(--radius-sm);
}
.link-btn .ico { width: 16px; height: 16px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }

/* =====================================================================
   Badges & Tags (dezente Tints, kaum gerundet)
   ===================================================================== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.st-published { background: var(--success-soft); color: var(--success); border-color: transparent; }
.st-error, .st-needs_attention { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.st-processing, .st-publishing, .st-downloading { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
/* "bereit/Entwurf" = wartet auf deine Freigabe → auffälliger Amber-Ton (offener Punkt). */
.st-processed, .st-draft { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.badge-dry {
  display: inline-block;
  background: var(--warn-soft); color: var(--warn);
  padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700;
}

/* Chevron (Icon, rotiert beim Aufklappen) */
.chev { width: 15px; height: 15px; color: var(--faint); transition: transform 0.15s ease; }
.post-ctx.open .chev,
.lc-card.open .chev,
.idea-row.open .chev { transform: rotate(90deg); }

/* =====================================================================
   Liste & Kommentar-Karten  (breiter — mehr Fläche genutzt)
   ===================================================================== */
.list {
  max-width: 1040px;
  margin: 28px auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.empty { text-align: center; padding: 72px 0; color: var(--muted); }
.empty p { margin: 4px 0; }

/* Freundlicher „Alles erledigt"-Leerzustand (Kommentare) */
.empty-done { padding: 64px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-illu { width: 104px; height: 104px; margin-bottom: 14px; animation: empty-pop 0.45s ease both; }
.empty-illu svg { width: 100%; height: 100%; }
.empty-illu .illu-halo { fill: var(--accent-soft); }
.empty-illu .illu-disc { fill: var(--accent); }
.empty-illu .illu-check { stroke: #fff; }
.empty-illu .illu-spark { fill: var(--accent); opacity: 0.85; transform-origin: center; animation: empty-twinkle 2.4s ease-in-out infinite; }
.empty-illu .illu-spark-2 { animation-delay: 0.8s; }
.empty-illu .illu-dot { fill: var(--accent); opacity: 0.5; animation: empty-twinkle 2.4s ease-in-out infinite; animation-delay: 1.4s; }
.empty-illu .illu-dot-2 { animation-delay: 0.4s; }
.empty-title { font-size: 18px; font-weight: 650; color: var(--text); margin: 0; }
.empty-done .muted { max-width: 360px; }
.empty-done .empty-hint { font-size: 12.5px; opacity: 0.85; }

@keyframes empty-pop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes empty-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 0.9; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .empty-illu, .empty-illu .illu-spark, .empty-illu .illu-dot { animation: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow);
  transition: opacity 0.25s ease;
}
.card.removing { opacity: 0; }

/* Kommentar-Block: gleiche Abstaende wie die Karte. Bei vorhandenem Post wird er
   eingerueckt + bekommt eine dezente Verbindungslinie, damit klar ist: gehoert zum Post. */
.comment-block { display: flex; flex-direction: column; gap: 13px; }
.card.has-post .comment-block {
  margin-left: 13px;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}
.card.has-post .post-ctx { margin-bottom: 1px; }

.card-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }

/* Monogramm-Fallback für Avatare (kein/kaputtes Profilbild). Geteilt: Skool + YouTube.
   Größe/Form kommt von der Basisklasse (.avatar / .sk-msg-av / .yt-msg-av); hier nur das
   Zentrieren der Initialen + Farben. Farbe sonst inline aus dem Namen (siehe app.js). */
.avatar-mono { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; line-height: 1; color: var(--muted); text-transform: uppercase; }
.avatar-mono.mine { background: var(--accent); color: #fff; }
.avatar.avatar-mono { font-size: 14px; } /* größerer Karten-Kopf-Avatar (38px) */
.who { flex: 1; min-width: 0; }
.who .name { font-weight: 600; font-size: 14px; }
.who .sub { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.group-badge {
  padding: 1px 7px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 600; font-size: 11px; color: var(--muted);
}
/* Offizielle Community-Farben: Business = blau, Kostenlos = gelb (Hintergrund). */
.group-badge.biz { background: #2563eb; color: #fff; border-color: transparent; }
.group-badge.free { background: #f5c518; color: #1a1a1a; border-color: transparent; }

/* Kommentare-Toolbar: Sortierung + Community-Filter */
/* Kommentare-Toolbar: gleiche Breite/Raender wie die Karten darunter. */
.comments-toolbar {
  max-width: 1040px; margin: 24px auto 0; padding: 0 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.comments-toolbar + .list { margin-top: 14px; }
.comments-toolbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-select {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
#c-count { font-size: 12.5px; white-space: nowrap; }

/* Segment-Control: Community-Filter (genau ein aktiver Button) */
.seg {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
}
.seg-btn {
  border: none; background: none; cursor: pointer;
  padding: 6px 14px; border-radius: 5px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  color: var(--muted);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-btn.seg-biz.active { background: #2563eb; color: #fff; }
.seg-btn.seg-free.active { background: #f5c518; color: #1a1a1a; }
.open-link { color: var(--faint); text-decoration: none; padding: 5px 7px; border-radius: var(--radius-sm); display: inline-flex; }
.open-link .ico { width: 17px; height: 17px; }
.open-link:hover { background: var(--surface-2); color: var(--text); }

.incoming {
  margin: 0;
  padding: 11px 14px;
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: normal;
  word-break: break-word;
}

/* Geparstes Skool-Rich-Text: Listen, Links, Erwaehnungen (Kommentar + Post + Verlauf) */
.incoming ul, .incoming ol, .post-body ul, .post-body ol,
.sk-msg-text ul, .sk-msg-text ol { margin: 6px 0; padding-left: 22px; }
.incoming li, .post-body li, .sk-msg-text li { margin: 2px 0; }
.incoming a, .post-body a, .sk-msg-text a { color: var(--accent); text-decoration: none; }
.incoming a:hover, .post-body a:hover, .sk-msg-text a:hover { text-decoration: underline; }
.incoming .mention, .post-body .mention, .sk-msg-text .mention { color: var(--accent); font-weight: 600; }

/* Konversationsverlauf eines Skool-Threads (aufklappbar, nicht verschachtelt) */
.sk-convo-toggle {
  align-self: flex-start;
  background: none; border: none; padding: 2px 0; margin-bottom: 6px;
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.sk-convo-toggle:hover { text-decoration: underline; }
.sk-convo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.sk-msg { display: flex; gap: 8px; align-items: flex-start; }
.sk-msg-av { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); }
.sk-msg-body { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 7px 11px; }
.sk-msg.mine .sk-msg-body { background: var(--accent-soft); }
.sk-msg.target .sk-msg-body { box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.sk-msg-author { font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.sk-msg.mine .sk-msg-author { color: var(--accent); }
.sk-msg-text { font-size: 13.5px; line-height: 1.45; word-break: break-word; }

/* Zeitstempel (Datum + Uhrzeit) im Kommentar-Verlauf — Skool + YouTube */
.msg-time { font-weight: 400; font-size: 11px; color: var(--faint); margin-left: 6px; }
.msg-time::before { content: "·"; margin-right: 6px; }

.draft, .lc-desc, .lc-input, .lc-course {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
}
.draft, .lc-desc { resize: vertical; }
.draft:focus, .lc-desc:focus, .lc-input:focus, .lc-course:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-status { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.row-status.ok { color: var(--success); }
.row-status.err { color: var(--danger); }

/* Toolbar: Filter + Sortierung + Anzahl links gruppiert, Zahnrad rechts */
.comments-toolbar .tb-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn.icon-btn { padding: 8px; }
.btn.icon-btn .ico { width: 17px; height: 17px; }

/* Langer Kommentar: auf 3 Zeilen klemmen + Aufklapp-Link */
.incoming.clamped {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.incoming-more {
  align-self: flex-start;
  background: none; border: none; cursor: pointer; padding: 2px 0;
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600;
}
.incoming-more:hover { text-decoration: underline; }

/* Antwort diktieren: Aufnahme-Leiste (Wellenform + Fertig/Abbrechen) */
.dictate-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dictate-wave {
  width: 240px; height: 34px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.btn.dictate-ok { background: var(--success); border-color: transparent; }
.btn.dictate-ok:hover { background: var(--success); filter: brightness(0.94); }
.dictate-status { font-size: 12.5px; }

/* Original-Post-Kontext (aufklappbar) */
.post-ctx { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden; }
.post-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 9px 12px; font: inherit; text-align: left;
}
.post-toggle:hover { background: var(--surface-hover); }
.post-icon { width: 15px; height: 15px; color: var(--muted); }
.post-title { flex: 1; font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-thumb { order: -1; width: 34px; height: 24px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.post-body {
  padding: 11px 14px; border-top: 1px solid var(--border-soft);
  white-space: normal; word-break: break-word;
  font-size: 13px; color: var(--muted); max-height: 360px; overflow-y: auto;
}

/* =====================================================================
   Übersichtsseite
   ===================================================================== */
.overview { max-width: 1100px; margin: 32px auto; padding: 0 28px; }
.overview h1 { margin: 0 0 4px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 22px; }
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.tool-ic { color: var(--accent); display: inline-flex; }
.tool-ic .ico { width: 24px; height: 24px; }
.tool-label { font-weight: 600; }
.tool-desc { font-size: 13px; color: var(--muted); }

/* =====================================================================
   Live-Calls
   ===================================================================== */
.lc-toolbar {
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.lc-classroom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-classroom-bar {
  max-width: 1040px; margin: 16px auto 0; padding: 0 28px;
  display: flex; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 6px;
}
.classroom-name { font-weight: 600; }
.classroom-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lc-input.small { font-size: 13px; padding: 6px 9px; }
#classroom-name { min-width: 240px; }

.lc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lc-head { display: flex; align-items: center; gap: 8px; padding: 2px 12px 2px 2px; }
.lc-toggle {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 13px 12px; font: inherit; text-align: left; min-width: 0;
}
.lc-toggle:hover { background: var(--surface-2); }
/* Thumbnail-Slot links: zeigt den Poster-Frame, sonst den Pfeil. Feste Größe = ruhige Liste. */
.lc-thumb-wrap {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 32px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2);
}
.lc-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-thumb-wrap:has(.lc-thumb:not([hidden])) { background: transparent; }
/* Ohne Thumbnail bleibt nur der Pfeil sichtbar — Slot dann schmal, nicht als Kasten. */
.lc-thumb-wrap:not(:has(.lc-thumb:not([hidden]))) { width: 22px; height: auto; background: transparent; }
.lc-date { color: var(--accent); background: var(--accent-soft); border-color: transparent; flex-shrink: 0; }

/* Offen-Banner in der Live-Call-Toolbar: grün = alles erledigt, amber = N offen. */
.lc-open-banner {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm);
  background: var(--success-soft); color: var(--success);
}
.lc-open-banner .ico { width: 15px; height: 15px; }
.lc-open-banner.has-open { background: var(--warn-soft); color: var(--warn); }
.lc-title-text { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-link { color: var(--accent); text-decoration: none; padding: 6px 8px; display: inline-flex; }
.lc-link .ico { width: 16px; height: 16px; }
.lc-link:hover { color: var(--accent-hover); }
.lc-del { color: var(--muted); background: none; border: none; cursor: pointer; padding: 6px 8px; display: inline-flex; border-radius: 8px; flex-shrink: 0; }
.lc-del .ico { width: 16px; height: 16px; }
.lc-del:hover { color: var(--danger); background: var(--surface-2); }
.lc-del:disabled { opacity: 0.5; cursor: default; }
.lc-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-soft); }
.lc-label { font-size: 11.5px; color: var(--muted); margin-top: 10px; letter-spacing: 0.01em; }
.lc-count.err { font-weight: 700; }
.lc-title-input { width: 100%; }
.lc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lc-sep { flex: 1; }
.lc-rowstatus { font-size: 12.5px; color: var(--muted); }
.lc-rowstatus.ok { color: var(--success); }
.lc-rowstatus.err { color: var(--danger); }
.lc-error { font-size: 12px; white-space: pre-wrap; }

/* =====================================================================
   Modal
   ===================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.4); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  width: min(560px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.modal-section { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.modal-section h3 { margin: 0; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.modal-section h3 .ico { width: 16px; height: 16px; color: var(--muted); }
.modal-section p { margin: 0; font-size: 12.5px; color: var(--muted); }
.modal-section .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.modal-section .row .lc-input { flex: 1; min-width: 180px; }
.modal-section.dev { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; border-top: 1px solid var(--border); }
.modal-status { font-size: 12.5px; min-height: 18px; color: var(--muted); }
.modal-status.ok { color: var(--success); }
.modal-status.err { color: var(--danger); }

/* Breiteres Modal mit Mini-Sidebar (Kommentar-Einstellungen) */
.modal-box.modal-wide { width: min(760px, 95vw); }
.settings-layout { display: flex; gap: 18px; align-items: stretch; }
.settings-nav {
  display: flex; flex-direction: column; gap: 2px; min-width: 150px;
  border-right: 1px solid var(--border-soft); padding-right: 12px;
}
.settings-nav-item {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--muted); padding: 9px 10px; border-radius: var(--radius-sm);
}
.settings-nav-item .ico { width: 16px; height: 16px; }
.settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.settings-panes { flex: 1; min-width: 0; }
.settings-pane { display: flex; flex-direction: column; gap: 6px; }
.settings-pane textarea { width: 100%; font-size: 13px; line-height: 1.5; resize: vertical; }
.settings-pane .lc-label { margin-top: 8px; }
.settings-pane .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
/* KI-Modell-Pane: Anbieter-Dropdown kompakt, Inline-Code dezent. */
.settings-pane #ps-provider { width: auto; min-width: 180px; align-self: flex-start; }
.settings-pane p code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---- Kosten / Usage-Pane ---- */
.usage-head { display: flex; align-items: center; gap: 10px; }
.usage-kpis { display: flex; gap: 10px; margin-top: 12px; }
.usage-kpi {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 11px 13px; display: flex; flex-direction: column; gap: 3px;
}
.usage-kpi-feature { background: var(--accent-soft); border-color: transparent; }
.usage-kpi-label { font-size: 11.5px; color: var(--muted); }
.usage-kpi-feature .usage-kpi-label { color: var(--accent); }
.usage-kpi-val { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
.usage-kpi-feature .usage-kpi-val { color: var(--accent); }
.usage-kpi-sub { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.usage-kpi-feature .usage-kpi-sub { color: var(--accent); opacity: 0.85; }

.usage-chart-wrap { position: relative; margin-top: 16px; }
.usage-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-bottom: 2px; }
.usage-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.usage-bar-fill {
  width: 100%; background: var(--accent-soft); border-radius: 3px 3px 0 0;
  display: flex; align-items: flex-end; transition: background 0.12s; min-height: 2px;
}
.usage-bar:hover .usage-bar-fill { background: #cdd0f5; }
.usage-bar-scope { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; }
.usage-tip {
  position: absolute; transform: translate(-50%, -100%); margin-top: -6px;
  background: var(--text); color: #fff; font-size: 11.5px; line-height: 1.45;
  padding: 6px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 20;
  box-shadow: var(--shadow-md);
}
.usage-tip-feat { color: #c7c9ff; }
.usage-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; }
.usage-legend span { display: inline-flex; align-items: center; gap: 6px; }
.usage-sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.usage-sw-total { background: var(--accent-soft); }
.usage-sw-feature { background: var(--accent); }

.usage-prices { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.usage-prices summary { cursor: pointer; font-weight: 600; }
.price-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.price-row .lc-input.small { font-size: 12.5px; padding: 6px 8px; }
.price-missing .price-model { border-color: var(--warn); background: var(--warn-soft); }

/* Kosten-Hint an KI-Buttons */
.cost-hint { font-size: 12px; color: var(--faint); margin-left: 8px; display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .settings-layout { flex-direction: column; }
  .settings-nav {
    flex-direction: row; border-right: none; border-bottom: 1px solid var(--border-soft);
    padding-right: 0; padding-bottom: 8px;
  }
}

/* Generisches Bestätigungs-Modal (z.B. Löschen) */
.confirm-box { width: min(440px, 94vw); }
.confirm-message { margin: 0; font-size: 13.5px; color: var(--text); white-space: pre-line; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* =====================================================================
   Ideen-Katalog  (breiteste Ansicht)
   ===================================================================== */
.ideas-toolbar {
  max-width: 1200px; margin: 24px auto 0; padding: 0 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.ideas-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ideas-controls { display: flex; gap: 10px; align-items: stretch; }

/* Großes, prägnantes Suchfeld über die ganze Breite; Buttons rechts daneben. */
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.search-wrap > .ico { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
#idea-search { width: 100%; height: 46px; font-size: 15px; padding: 0 16px 0 44px; border-radius: var(--radius); }
.ideas-controls .btn { height: 46px; flex: none; }

.domain-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.domain-chip:hover { color: var(--text); background: var(--surface-2); }
.domain-chip.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.ideas-count { max-width: 1200px; margin: 12px auto 0; padding: 0 28px; font-size: 12px; color: var(--muted); }

.idea-list { max-width: 1200px; margin: 8px auto 36px; padding: 0 28px; display: flex; flex-direction: column; gap: 6px; }
.idea-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.idea-row.st-done { opacity: 0.6; }
.idea-head { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.idea-toggle {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 12px; font: inherit; text-align: left; min-width: 0;
}
.idea-toggle:hover { background: var(--surface-2); }
.idea-title-text { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-row.st-done .idea-title-text { text-decoration: line-through; }

.idea-prio { flex-shrink: 0; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.prio-high { background: var(--success-soft); color: var(--success); border-color: transparent; }
.prio-mid { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.prio-low { background: var(--surface-2); color: var(--muted); }

.idea-domains { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }
.domain-tag {
  padding: 1px 7px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.idea-status { flex-shrink: 0; }
.ist-done { background: var(--success-soft); color: var(--success); border-color: transparent; }
.ist-in_progress { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ist-needs_info { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* Urheber-Avatar (Monogramm) — rundes Profilbild-Platzhalter in Konto-Farbe. */
.idea-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  /* bg/color werden je Konto inline gesetzt; dezenter Fallback, falls nicht */
  background: var(--surface-2);
  color: var(--muted);
}

.idea-quick { display: flex; gap: 2px; flex-shrink: 0; }
.idea-quick .idea-done:hover { color: var(--success); }
.idea-quick .idea-del:hover { color: var(--danger); }

.idea-body { padding: 4px 16px 16px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; }
.idea-summary { margin: 10px 0 0; }
.idea-detail { margin: 0; font-size: 13px; color: var(--muted); }
.idea-questions {
  background: var(--warn-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
}
.idea-questions strong { color: var(--warn); font-weight: 600; }
.idea-questions ul { margin: 6px 0 0; padding-left: 18px; }
.idea-meta-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.idea-meta-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.idea-domain-edit { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-raw { font-size: 13px; }
.idea-raw summary { cursor: pointer; color: var(--muted); }
.idea-reason { margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.idea-rawtext {
  margin: 0; padding: 9px 12px;
  background: var(--surface-2); border-left: 2px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: pre-wrap; word-break: break-word; font-size: 12px; color: var(--muted);
}
.idea-actions { display: flex; gap: 8px; align-items: center; }
.idea-rowstatus { font-size: 12.5px; color: var(--muted); }
.idea-rowstatus.err { color: var(--danger); }
.idea-rowstatus.ok { color: var(--success); }

#idea-add-text { width: 100%; }
.idea-add-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.idea-curl {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}

/* =====================================================================
   YouTube › Videobeschreibung
   ===================================================================== */
.yt-desc { max-width: 1040px; margin: 28px auto; padding: 0 28px; display: flex; flex-direction: column; gap: 14px; }
.yt-drop {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.yt-drop #yt-filename { flex: 1; min-width: 120px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-hint { font-size: 12.5px; margin: 0; }
.yt-status { font-size: 13px; min-height: 18px; }
.yt-status.ok { color: var(--success); }
.yt-status.err { color: var(--danger); }

/* Adobe-Verbindungsstatus (Audio verbessern) */
.adobe-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow);
}
.ae-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ae-pill .ae-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--text-muted); flex: none; }
.ae-pill.ok { color: var(--success); }
.ae-pill.ok .ae-dot { background: var(--success); }
.ae-pill.err { color: var(--danger); }
.ae-pill.err .ae-dot { background: var(--danger); }
.ae-pill.checking { color: var(--text-muted); }
.ae-pill.checking .ae-dot { background: var(--text-muted); animation: ae-blink 1s ease-in-out infinite; }
@keyframes ae-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.ae-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* Fortschrittsleiste */
.yt-progress { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0%;
  background: var(--accent); border-radius: 999px;
  transition: width 0.5s ease;
  position: relative; overflow: hidden;
}
.bar-fill.active::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: barshimmer 1.25s ease-in-out infinite;
}
@keyframes barshimmer { to { transform: translateX(100%); } }
.bar-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.yt-output { display: flex; flex-direction: column; gap: 8px; }
.yt-output-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#yt-desc-text { min-height: 460px; font-size: 13.5px; line-height: 1.6; }

/* =====================================================================
   Responsiv
   ===================================================================== */
@media (max-width: 640px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-foot { border: none; padding-top: 8px; }
  .list, .overview, .lc-toolbar, .idea-list, .ideas-toolbar, .ideas-count, .lc-classroom-bar, .cr-toolbar, .cr-list { padding-left: 16px; padding-right: 16px; }
  .cr-sources { margin-left: 16px; margin-right: 16px; }
  .toast-host { left: 12px; right: 12px; }
  .toast { max-width: none; }
}

/* =====================================================================
   Mikrofon-Pegel (Waveform während der Aufnahme)
   ===================================================================== */
.rec-wave {
  height: 34px;
  width: 220px;
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* =====================================================================
   Toasts (Push-Benachrichtigungen oben rechts)
   ===================================================================== */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 340px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--text);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast .toast-ico { flex: 0 0 auto; display: flex; margin-top: 1px; }
.toast.ok .toast-ico { color: var(--success); }
.toast.err .toast-ico { color: var(--danger); }
.toast-body { flex: 1; min-width: 0; line-height: 1.45; }
.toast-title { font-weight: 600; }
.toast-msg { color: var(--muted); font-size: 12.5px; }

/* ====================== Konto-Wechsler (Topbar, oben rechts) ====================== */
.acct-switch { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; }
.acct-btn #acct-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .acct-caret { width: 13px; height: 13px; opacity: 0.7; }
.acct-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 50;
}
.acct-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}
.acct-item:hover { background: var(--surface-hover); }
.acct-item.active { color: var(--accent); font-weight: 600; }
.acct-item .acct-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-item .acct-check { color: var(--accent); display: inline-flex; }
.acct-item .acct-check .ico { width: 15px; height: 15px; }
.acct-item .acct-warn { color: var(--danger); display: inline-flex; }
.acct-item .acct-warn .ico { width: 15px; height: 15px; }

/* ====================== YouTube ====================== */
/* Statusampel: zusätzlicher "warn"-Zustand (Zugangsdaten da, aber noch nicht verbunden) */
.ae-pill.warn { color: var(--accent); }
.ae-pill.warn .ae-dot { background: var(--accent); }

/* Verbindungspanel auf der YouTube-Übersicht — volle Breite (wie die Tool-Karten darüber) */
.yt-connect {
  margin-top: 24px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.yt-connect-title { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 4px; }
.yt-connect-title .ico { width: 18px; height: 18px; color: var(--accent); }
.yt-connect-sub { margin: 0 0 16px; max-width: 640px; }
.yt-conn-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.yt-cred { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.yt-cred > summary { cursor: pointer; font-size: 13px; }
.yt-cred-body { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.yt-cred-body .lc-label { margin-top: 6px; }
/* Redirect-URI: Kopieren-Button NEBEN dem Feld (nicht darunter) */
.yt-connect .row { display: flex; gap: 8px; align-items: center; }
.yt-connect .row .lc-input { flex: 1; min-width: 0; }

/* Paginierung (unter der Karten-Liste): links Seiten, rechts Seitengröße */
.pagination {
  max-width: 1040px;
  margin: 4px auto 32px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pg-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pg-btn:hover:not(:disabled):not(.active) { background: var(--surface-hover); }
.pg-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); cursor: default; }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-btn .ico { width: 15px; height: 15px; }
.pg-ellipsis { color: var(--faint); padding: 0 2px; }
.pg-size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* Kommentar-Karte: Video prägnant oben, Verlauf darunter */
.yt-comment-card { display: block; }
.yt-video-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 12px;
}
.yt-vthumb { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.yt-vtitle { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; line-height: 1.35; }
.yt-vopen { color: var(--muted); flex: none; display: inline-flex; }
.yt-vopen:hover { color: var(--accent); }
.yt-vopen .ico { width: 18px; height: 18px; }

/* Konversationsverlauf */
.yt-convo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.yt-msg { display: flex; gap: 8px; align-items: flex-start; }
.yt-msg-av { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); }
.yt-msg-body {
  flex: 1; min-width: 0;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 7px 11px;
}
.yt-msg.mine .yt-msg-body { background: var(--accent-soft); }
.yt-msg.target .yt-msg-body { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.yt-msg-author { font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.yt-msg.mine .yt-msg-author { color: var(--accent); }
.yt-msg-text { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.yt-convo-toggle {
  align-self: flex-start;
  background: none; border: none; padding: 2px 0; margin-bottom: 6px;
  color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer;
}
.yt-convo-toggle:hover { text-decoration: underline; }

/* Deaktivierte Like/Herz-Buttons (von der YouTube-API nicht unterstützt) */
.btn.disabled-api { opacity: 0.45; cursor: not-allowed; }
.btn.disabled-api:hover { background: var(--surface); }

/* ===== Skool › Beiträge planen (Kanban) ===== */
#view-posts { padding: 16px 28px 28px; }
.posts-toolbar { display: flex; align-items: center; gap: 10px; padding: 4px 0 14px; }
.posts-toolbar #post-meta { margin-left: 4px; }
.posts-toolbar #post-settings-btn { margin-left: auto; }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.kanban-col { background: var(--surface-2, var(--surface-hover)); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; min-height: 120px; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 650; font-size: 13px; border-bottom: 1px solid var(--border); }
.kanban-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--border); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.kanban-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.kanban-empty { text-align: center; padding: 8px; font-size: 12px; }

.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 11px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.post-card:hover { border-color: var(--accent); box-shadow: 0 1px 6px rgba(16,24,40,.08); }
.post-card:focus { outline: 2px solid var(--accent-soft); }
.post-card.has-error { border-color: var(--danger); }
.post-card-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin-bottom: 4px; }
.post-card-snippet { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; font-size: 11.5px; }
.post-card-acct { color: var(--muted); }
.post-card-comm { font-size: 11px; }
.post-card-when { margin-left: auto; }

.modal-x { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: inline-flex; }
.modal-x:hover { background: var(--surface-hover); color: var(--text); }
.post-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.btn.danger, .danger { color: var(--danger); }
.comm-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.comm-row .comm-name { flex: 0 0 130px; }
.comm-row .comm-gid { flex: 1; min-width: 0; }
.comm-row .comm-label { flex: 0 0 150px; }

@media (max-width: 900px) {
  .kanban { grid-template-columns: 1fr 1fr; }
  .post-edit-grid { grid-template-columns: 1fr; }
}

/* ====================== YouTube › Content-Recherche ====================== */
/* Gleiche Breite/Ränder wie die anderen Views (max-width + 28px Seitenabstand). */
.yr-toolbar, .yr-pane, #yr-notconnected { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 44px; padding-right: 44px; }
.yr-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 36px; margin-bottom: 14px; }
.yr-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.yr-toolbar-right #yr-status { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.yr-pane { margin-top: 4px; }
.yr-pane-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.yr-pane-head p { margin: 0; flex: 1; min-width: 220px; }
.yr-pane-head .lc-input { flex: 1; min-width: 220px; }
.yr-hint { margin: -4px 0 12px; font-size: 12.5px; }

/* Filterzeile + Tabelle */
.yr-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.yr-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.yr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yr-table thead th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--surface); }
.yr-table thead th.yr-th-vid { cursor: default; }
.yr-table thead th.num { text-align: right; }
.yr-table thead th.sorted-asc::after { content: " ▲"; font-size: 10px; color: var(--accent); }
.yr-table thead th.sorted-desc::after { content: " ▼"; font-size: 10px; color: var(--accent); }
.yr-table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.yr-table tbody td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.yr-table tbody tr:hover { background: var(--surface-2); }
.yr-vid { max-width: 360px; }
.yr-vlink { display: flex; align-items: center; gap: 10px; color: var(--text); }
.yr-vlink:hover .yr-vtitle { color: var(--accent); }
.yr-thumb { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.yr-thumb-ph { display: inline-block; }
/* Laufzeit-/Format-Pille auf dem Thumbnail (unten rechts, wie auf YouTube). */
.yr-thumb-wrap { position: relative; flex-shrink: 0; line-height: 0; }
.yr-dur {
  position: absolute; right: 3px; bottom: 3px;
  font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .02em;
  padding: 2px 4px; border-radius: 3px;
  background: rgba(0, 0, 0, 0.78); color: #fff;
}
.yr-dur-short { background: var(--accent); }
.yr-vtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.yr-chlink { color: var(--text); }
.yr-chlink:hover { color: var(--accent); }
.yr-score { font-weight: 700; }
.yr-outlier { font-weight: 600; }
.yr-outlier.yr-hot { color: #c026d3; }

/* Kategorie-Badges */
.yr-cat { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; letter-spacing: .02em; vertical-align: middle; }
.yr-cat-us { background: #dbeafe; color: #1e40af; }
.yr-cat-direkt { background: #dcfce7; color: #166534; }
.yr-cat-breit { background: #fef3c7; color: #92400e; }
.yr-cat-entdeckt { background: var(--surface-2); color: var(--muted); }
.yr-cat-eigen { background: #ede9fe; color: #5b21b6; }

/* Kanal-Liste */
.yr-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.yr-add .lc-input { flex: 1; min-width: 240px; }
.yr-add #yr-add-status { font-size: 12.5px; }
.yr-channels { display: flex; flex-direction: column; gap: 8px; }
.yr-ch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.yr-ch-off { opacity: 0.55; }
.yr-ch-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.yr-ch-main { flex: 1; min-width: 0; }
.yr-ch-title { font-weight: 600; color: var(--text); }
.yr-ch-title:hover { color: var(--accent); }
.yr-ch-sub { font-size: 12px; margin-top: 2px; }
.yr-ch-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.yr-ch-del:hover { color: var(--danger); }
.yr-niche { margin-top: 18px; }
.yr-niche summary { cursor: pointer; padding: 6px 0; }
.yr-niche textarea { margin-top: 8px; font-family: inherit; font-size: 12.5px; line-height: 1.5; }
.yr-niche .row { margin-top: 8px; display: flex; align-items: center; gap: 10px; }

/* Analyse-Report */
.yr-report { display: flex; flex-direction: column; gap: 14px; }
.yr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.yr-card h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.yr-card h3 .ico { width: 16px; height: 16px; color: var(--accent); }
.yr-card ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.yr-card.yr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.yr-trend { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.yr-trend:last-child { border-bottom: none; }
.yr-trend-head { display: flex; align-items: center; gap: 8px; }
.yr-trend p { margin: 4px 0 0; font-size: 13px; }
.yr-heat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; }
.yr-heat-hot { background: #fee2e2; color: #b91c1c; }
.yr-heat-up { background: #dcfce7; color: #166534; }
.yr-heat-flat { background: var(--surface-2); color: var(--muted); }
.yr-examples { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.yr-ex { font-size: 11.5px; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.yr-ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yr-idea { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); }
.yr-idea-off { opacity: 0.6; }
.yr-idea-title { font-weight: 700; font-size: 13.5px; }
.yr-idea-hook { font-style: italic; margin: 4px 0; font-size: 12.5px; }
.yr-idea-meta { font-size: 12px; }
.yr-idea-ref { font-size: 11.5px; margin-top: 6px; }

/* Entdeckung */
.yr-candidates { display: flex; flex-direction: column; gap: 8px; }
.yr-cand { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.yr-cand-off { opacity: 0.62; }
.yr-cand-added { opacity: 0.55; }
.yr-cand-main { flex: 1; min-width: 0; }
.yr-cand-title { font-weight: 600; color: var(--text); }
.yr-cand-title:hover { color: var(--accent); }
.yr-cand-fit { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.yr-fit-yes { background: #dcfce7; color: #166534; }
.yr-fit-no { background: #fee2e2; color: #b91c1c; }
.yr-cand-why { font-size: 12px; margin-top: 3px; }
.yr-cand-ex { font-size: 11.5px; margin-top: 2px; }
.yr-cand-done { font-size: 12.5px; color: #166534; font-weight: 600; white-space: nowrap; }

/* Trend-Radar */
.yr-radar-meta { margin: 0 0 12px; }
.yr-risers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.yr-riser { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.yr-riser:hover { box-shadow: var(--shadow); }
.yr-riser-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.yr-riser-thumb { width: 100px; height: 56px; border-radius: 5px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.yr-riser-main { min-width: 0; }
.yr-riser-title { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yr-riser-sub { font-size: 12px; margin-top: 3px; }
.yr-riser-stats { font-size: 11.5px; margin-top: 4px; }
.yr-new-badge { background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; vertical-align: middle; }

@media (max-width: 900px) {
  .yr-card.yr-two { grid-template-columns: 1fr; }
  .yr-ideas { grid-template-columns: 1fr; }
}

/* ===== Post-Anhänge (Button + Strg+V) ===== */
.att-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.att-bar .att-hint { font-size: 12px; }
.att-status { font-size: 12px; margin-left: auto; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-chip { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); max-width: 220px; }
.att-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; cursor: zoom-in; flex-shrink: 0; }
.att-fileico { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.att-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-del { background: none; border: none; cursor: pointer; color: var(--muted); padding: 2px; border-radius: 4px; display: inline-flex; flex-shrink: 0; }
.att-del:hover { background: var(--surface-hover); color: var(--danger); }
.att-del .ico { width: 14px; height: 14px; }

.img-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(16,24,40,.85); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.img-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }

/* Diktat-Waveform im Neue-Postidee-Modal */
.post-wave { width: 100%; height: 40px; margin-top: 8px; display: block; }

/* ===== Skool › Content-Recherche ===== */
/* Gleiche zentrierte Spaltenbreite + Außenabstand wie die anderen Seiten (vgl. .list/.lc-toolbar). */
.cr-toolbar { max-width: 1040px; margin: 28px auto 12px; padding: 0 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cr-toolbar #cr-status { margin-left: auto; font-size: 12.5px; }

.cr-sources { max-width: 984px; margin: 0 auto 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.cr-sources > summary { cursor: pointer; font-weight: 600; list-style: none; }
.cr-sources > summary::-webkit-details-marker { display: none; }
.cr-sources > summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .15s; }
.cr-sources[open] > summary::before { transform: rotate(90deg); }
.cr-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.cr-add #cr-add-input { flex: 1; min-width: 220px; }
.cr-src-list { display: flex; flex-direction: column; gap: 6px; }
.cr-src { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--border-soft); font-size: 13px; }
.cr-src-off { opacity: 0.5; }
.cr-src-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cr-src-actions { display: inline-flex; gap: 2px; }
.cr-src-type { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.cr-src-rss { background: var(--accent-soft); color: var(--accent); }
.cr-src-instagram { background: rgba(214, 41, 118, 0.12); color: #c13584; }

.cr-list { max-width: 1040px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; gap: 12px; }
.cr-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.cr-score { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.cr-score-hi { background: var(--success-soft); color: var(--success); }
.cr-score-mid { background: var(--accent-soft); color: var(--accent); }
.cr-score-lo { background: var(--surface-2); color: var(--muted); }
.cr-main { flex: 1; min-width: 0; }
.cr-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cr-date { font-size: 12px; }
.cr-title { font-size: 15px; margin: 0 0 6px; font-weight: 600; line-height: 1.35; }
.cr-title a { color: var(--text); text-decoration: none; }
.cr-title a:hover { color: var(--accent); }
.cr-angle { margin: 0 0 6px; font-size: 13px; }
.cr-summary { margin: 0 0 6px; font-size: 13px; color: var(--text); line-height: 1.5; }
.cr-reason { margin: 0 0 8px; font-size: 12px; font-style: italic; }
.cr-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.cr-planned-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-size: 12.5px; font-weight: 600; }
.cr-planned-badge .ico { width: 15px; height: 15px; }
.cr-thumb { flex-shrink: 0; width: 120px; }
.cr-thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
@media (max-width: 720px) { .cr-thumb, .cr-thumb img { width: 80px; } .cr-thumb img { height: 80px; } }

.cr-media { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.cr-media .ico { width: 12px; height: 12px; }
.cr-media-video { background: rgba(214, 41, 118, 0.12); color: #c13584; }
.cr-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.cr-tag { font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.cr-keep { margin-left: auto; color: var(--muted); padding: 2px; flex-shrink: 0; }
.cr-keep .ico { width: 16px; height: 16px; fill: none; }
.cr-keep:hover { color: var(--warn); }
.cr-keep.on { color: var(--warn); }
.cr-keep.on .ico { fill: currentColor; }

.spin { animation: cr-spin 0.9s linear infinite; }
@keyframes cr-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Skool › Privatnachrichten (DM/Chat) — zweispaltig (WhatsApp-Desktop)
   ===================================================================== */
/* :not([hidden]), damit das UA-display:none beim Verstecken nicht ueberschrieben wird. */
#view-dm:not([hidden]) { display: flex; flex-direction: column; min-height: 0; }
/* Feste Viewport-Hoehe (NICHT flex:1 — sonst waechst die Spalte ueber die Hoehe und die
   Liste scrollt nicht intern, sondern schiebt die ganze Seite lang). Panels scrollen selbst. */
.dm-layout { display: flex; min-height: 0; height: calc(100vh - 58px); overflow: hidden; }

/* Linke Spalte: Chat-Liste */
.dm-list { width: 320px; flex: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.dm-list-head { padding: 12px; border-bottom: 1px solid var(--border); }
.dm-list-head .search-wrap > .ico { left: 12px; width: 16px; height: 16px; }
.dm-list-head #dm-search { width: 100%; height: 38px; font-size: 13.5px; padding: 0 12px 0 36px; border-radius: var(--radius-sm); }
.dm-threads { flex: 1; overflow-y: auto; min-height: 0; }
.dm-list .empty { padding: 40px 16px; }

.dm-thread { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 10px 12px; cursor: pointer; }
.dm-thread:hover { background: var(--surface-2); }
.dm-thread.active { background: var(--accent-soft); }
.dm-thread-av { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); font-size: 14px; }
.dm-thread-body { flex: 1; min-width: 0; }
.dm-thread-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dm-thread-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-thread.unread .dm-thread-name { font-weight: 700; }
.dm-thread-time { font-size: 11px; flex: none; }
.dm-thread-snip { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dm-thread.unread .dm-thread-snip { color: var(--text); }
.dm-thread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; opacity: 0; }
.dm-thread.unread .dm-thread-dot { opacity: 1; }

/* Rechte Spalte: Verlauf + Komponist */
.dm-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.dm-chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; }
.dm-chat-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dm-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.dm-head-av { width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); font-size: 14px; }
.dm-head-who { flex: 1; min-width: 0; }
.dm-head-name { font-weight: 650; font-size: 15px; }
.dm-head-sub { font-size: 12px; }
.dm-head-actions { display: flex; gap: 6px; align-items: center; }

.dm-messages { flex: 1; overflow-y: auto; min-height: 0; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.dm-msg { display: flex; flex-direction: column; max-width: 72%; align-self: flex-start; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dm-msg.mine .dm-bubble { background: var(--accent); border-color: var(--accent); color: #fff; }
.dm-msg-time { font-size: 10.5px; margin-top: 3px; }
.dm-loading { padding: 24px; text-align: center; }

.dm-composer { border-top: 1px solid var(--border); padding: 12px 18px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.dm-composer .dictate-rec { display: flex; align-items: center; gap: 8px; }
/* Ziehgriff oben am Eingabefeld: nach oben ziehen vergrößert das Feld (kein natives resize). */
.dm-composer #dm-draft { resize: none; }
.dm-resize { align-self: center; width: 54px; height: 12px; margin: -6px 0 -2px; padding: 0; border: none; background: transparent; cursor: ns-resize; display: flex; align-items: center; justify-content: center; }
.dm-resize::before { content: ""; width: 44px; height: 4px; border-radius: 999px; background: var(--border); transition: background .15s, width .15s; }
.dm-resize:hover::before { background: var(--accent); width: 54px; }
body.dm-resizing { cursor: ns-resize; user-select: none; }

/* ===== Einstellungen › Prompt-Feinschliff ===== */
.settings-view { max-width: 880px; margin: 0 auto; padding: 6px 4px 48px; display: flex; flex-direction: column; gap: 16px; }
.settings-view-head h1 { margin: 0 0 4px; }
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.settings-card-accent { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.settings-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 16px; }
.settings-card-title .ico { width: 18px; height: 18px; color: var(--accent); }
.settings-section-title { margin: 8px 0 0; font-size: 15px; }
.settings-section-sub { margin: 0 0 2px; }
.settings-prompts { display: flex; flex-direction: column; gap: 14px; }
