/* ─── Nativer Feinschliff (Okt. 2026) ──────────────────────────────────────
   Muster iOS/ChatGPT: Flächen statt Rahmen, Haarlinien, Materialien mit
   Unschärfe, weiche Schatten. Lädt nach mobile.css, vor utilities.css. */

:root { --hairline: color-mix(in srgb, var(--text-primary) 9%, transparent); }
:root[data-theme=dark] { --chat-user-bg: #2e2e34; }
:root[data-theme=light] { --chat-user-bg: #ececef; }

/* Chat: Nutzerblase neutral wie ChatGPT/Claude, rundere Form. */
.chat-message.user { border-radius: 22px; padding: 10px 16px; }
.chat-message.user .message-time { opacity: .7; }

/* Kopf und Composer als Material mit Unschärfe statt fester Linie. */
@media (max-width: 600px) {
  /* Kein backdrop-filter: iOS rechnet die Unschärfe bei jedem Scroll-Frame
     neu, der Verlauf ruckelte. Deckende Fläche + Haarlinie. */
  .ws-header {
    background: var(--bg-primary);
    border-bottom: .5px solid var(--hairline);
  }
  .chat-input-area {
    border-top: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-primary) 22px);
  }
  .composer-card .chat-composer {
    border: .5px solid var(--hairline);
    background: var(--composer-field-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.08);
  }
  :root[data-theme=dark] .composer-card .chat-composer { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}
.scroll-bottom-btn {
  width: 36px; height: 36px; border: .5px solid var(--hairline);
  background: var(--bg-elevated);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* Dashboard: Aktionen als gleich breite Kacheln statt Pillen-Stapel. */
.dex-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin-top: 16px; max-width: 560px; }
.dex-offer {
  flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  min-height: 76px; padding: 12px 14px; border-radius: 16px; border: 0;
  background: var(--bg-elevated); color: var(--text-primary); font-weight: 500; text-align: left;
  box-shadow: 0 0 0 .5px var(--hairline), 0 1px 3px rgba(0,0,0,.06);
  transition: transform .15s ease, background var(--transition-fast);
}
.dex-offer:hover { background: var(--bg-hover); border: 0; }
.dex-offer:active { transform: scale(.97); }
.dex-offer svg { width: 20px; height: 20px; color: var(--accent); }
.dex-offer-label { max-width: 100%; font-size: var(--fs-sm); line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.dex-offer-chat { color: var(--text-primary); border: 0; }
@media (max-width: 600px) {
  .dex-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin-right: 0; padding-right: 0; }
  .dex-offer { flex-shrink: 1; font-size: var(--fs-xs); }
}

/* Karten: Fläche + Haarlinie + weicher Schatten statt grauer Rahmen. */
.live, .dash-card, .dash-kpis .kpi-card, .dash-ws-grid > * {
  border: 0 !important;
  border-radius: 20px;
  background: var(--bg-elevated);
  box-shadow: 0 0 0 .5px var(--hairline), 0 2px 10px rgba(0,0,0,.05);
}
:root[data-theme=dark] .live, :root[data-theme=dark] .dash-card,
:root[data-theme=dark] .dash-kpis .kpi-card, :root[data-theme=dark] .dash-ws-grid > * { background: var(--bg-secondary); }
.live .lcard { border-radius: 16px; }
.live-badge { letter-spacing: .04em; }
.live-tech-toggle { border: 0; background: var(--bg-tertiary, var(--bg-hover)); }
@media (prefers-reduced-motion: reduce) { .dex-offer { transition: none; } }
.live .lcard { border: .5px solid var(--hairline); background: var(--bg-elevated); }
.chat-message.user { box-shadow: none; }

/* Composer gleitet mit der Tastatur (Kurve ähnlich der iOS-Tastatur). */
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  .chat-input-area { transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
}

/* Fehlerkarte: Titel, Erklärung, eine Handlung. */
.chat-message.error-msg { border-radius: 16px; padding: 12px 14px; }
.chat-message.error-msg .error-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chat-message.error-msg .error-title { color: var(--danger, #dc2626); font-size: var(--fs-base); font-weight: 600; }
.chat-message.error-msg .error-body > span { color: var(--text-secondary); }
.chat-message.error-msg .error-action { margin-top: 4px; }
.md-image-missing { display: inline-block; padding: 6px 10px; border-radius: 10px; background: var(--bg-hover); color: var(--text-muted); font-size: var(--fs-sm); }
.set-name-form { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.set-name-input { width: 200px; max-width: 100%; }

/* Verlaufsleiste links (Muster OpenClaw): ein Strich je Frage, sichtbare dunkel. */
.msg-rail {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; z-index: var(--z-sticky);
  max-height: 60%; overflow: hidden;
}
.msg-rail[hidden] { display: none; }
.msg-rail-tick {
  width: 22px; height: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center;
}
.msg-rail-tick::before {
  content: ''; display: block; width: 12px; height: 2px; border-radius: 1px;
  background: var(--text-muted); opacity: .35;
  transition: width .15s ease, opacity .15s ease;
}
.msg-rail-tick.is-in-view::before { opacity: .9; background: var(--text-primary); }
.msg-rail-tick:hover::before, .msg-rail-tick:focus-visible::before { width: 18px; opacity: 1; }
@media (max-width: 860px), (pointer: coarse) { .msg-rail { display: none; } }

/* Statuspunkte in der Sidebar (Muster Claude): blau pulsierend = arbeitet,
   orange = fertig/ungelesen oder Rückfrage, grau = ruhig. */
.st-dot {
  flex: 0 0 auto; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: color-mix(in srgb, var(--text-muted) 55%, transparent);
  align-self: center;
}
.st-dot[data-state="run"] { background: #3b82f6; box-shadow: 0 0 0 0 rgba(59, 130, 246, .55); animation: st-pulse 1.6s ease-out infinite; }
.st-dot[data-state="done"] { background: #f59e0b; }
@keyframes st-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .55); }
  70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
@media (prefers-reduced-motion: reduce) { .st-dot[data-state="run"] { animation: none; } }
.sb-project-open { display: flex; align-items: center; }
.sidebar-collapsed .st-dot { display: none; }

/* ─── Sidebar: ruhiger, mehr Platz für Namen (25.10.2026) ─────────────────
   Der Statuspunkt ersetzt beim Workspace das Ordner-Symbol (Muster Claude):
   ein Zeichen pro Zeile statt zwei, der Name bekommt die Breite. */
.sb-project-open:has(.st-dot) .sb-project-icon { display: none; }
.sb-project-open .st-dot { margin: 0 11px 0 6px; }
.sb-project-name { letter-spacing: -0.005em; }
.sb-project.active .sb-project-name { font-weight: 600; }
.st-dot[data-state="idle"] { background: color-mix(in srgb, var(--text-muted) 38%, transparent); }

/* Unterhaltungen unter dem Workspace: eingerückt an der Namenskante, leiser. */
.sb-sessions .agent-item { padding-left: 18px; }
.sb-sessions .agent-item .st-dot { width: 6px; height: 6px; }
.sb-sessions .agent-item:not(.active) .agent-item-title { color: var(--text-secondary); }
.sb-sessions .agent-item.active .agent-item-title { color: var(--text-primary); font-weight: 500; }

/* Initiale fremder Unterhaltungen: Text statt Kreis mit Rahmen. */
.agent-item-owner {
  width: auto; height: auto; padding: 1px 5px; border: 0; border-radius: 6px;
  background: var(--bg-hover); color: var(--text-muted); font-size: 10px;
}

/* Dünne, nur beim Überfahren deutliche Scrollleiste in der Sidebar. */
#app-sidebar .sb-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; }
#app-sidebar .sb-scroll:hover { scrollbar-color: var(--border-strong) transparent; }
#app-sidebar .sb-scroll::-webkit-scrollbar-thumb { background: transparent; }
#app-sidebar .sb-scroll:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }

/* Verlaufsleiste: kürzer und leiser, damit sie nicht mit dem Text konkurriert. */
.msg-rail { gap: 0; }
.msg-rail-tick { height: 8px; }
.msg-rail-tick::before { width: 10px; opacity: .25; }

/* Eingeklappte lange Nachrichten: Ausblenden per Maske (passt zu jedem
   Hintergrund, vorher sah man einen andersfarbigen Balken) und der Knopf
   sitzt als kleine Pille darunter statt über dem Text. */
.chat-message.is-collapsed .message-clip {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent);
}
.chat-message.is-collapsed .message-clip::after { display: none; }
.chat-message.is-expandable .msg-expand {
  width: auto; height: 26px; gap: 4px; padding: 0 10px 0 6px; margin-top: 6px;
  border-radius: 999px; background: var(--bg-hover); font-size: var(--fs-xs); color: var(--text-secondary);
  align-self: flex-start;
}
.chat-message.is-collapsed.is-expandable .msg-expand { margin-top: 6px; height: 26px; }
.chat-message.user.is-expandable .msg-expand { align-self: flex-end; background: color-mix(in srgb, var(--text-primary) 8%, transparent); }
.msg-expand svg { width: 14px; height: 14px; }

/* Unterhaltungen weiter eingerückt: Punkt unter dem Workspace-Namen. */
.sb-sessions .agent-item { padding-left: 30px; }

/* ─── Workspace-Kopf am Desktop: drei Haupt-Seiten sichtbar, Rest im Menü ── */
@media (min-width: 601px) {
  .ws-tab-secondary, .ws-right > .ws-actions { display: none; }
  .ws-more {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 0; border-radius: 8px; background: none;
    color: var(--text-secondary); cursor: pointer;
  }
  .ws-more:hover, .ws-more.has-active { background: var(--bg-hover); color: var(--text-primary); }
  .ws-sheet-backdrop.is-menu { position: fixed; inset: 0; z-index: var(--z-sheet-backdrop); background: transparent; }
  .ws-sheet-backdrop.is-menu .ws-sheet {
    position: absolute; top: 52px; right: 16px; width: 240px; padding: 6px;
    border-radius: 14px; background: var(--bg-elevated);
    box-shadow: 0 0 0 .5px var(--hairline), 0 12px 32px rgba(0,0,0,.18);
    opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease;
  }
  .ws-sheet-backdrop.is-menu.is-open .ws-sheet { opacity: 1; transform: none; }
  .ws-sheet-backdrop.is-menu .ws-sheet-grip { display: none; }
  .ws-sheet-backdrop.is-menu .ws-sheet-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
    color: var(--text-primary); text-decoration: none; font-size: var(--fs-sm);
  }
  .ws-sheet-backdrop.is-menu .ws-sheet-item:hover { background: var(--bg-hover); }
  .ws-sheet-backdrop.is-menu .ws-sheet-item svg { width: 16px; height: 16px; color: var(--text-muted); }
  .ws-sheet-backdrop.is-menu .ws-sheet-item.active { background: var(--bg-hover); font-weight: 500; }
  .ws-sheet-backdrop.is-menu .ws-sheet-actions {
    display: flex; gap: 6px; justify-content: flex-start; padding: 6px 4px 2px; margin-top: 4px;
    border-top: .5px solid var(--hairline);
  }
  .ws-sheet-backdrop.is-menu .ws-sheet-actions:empty { display: none; }
  .ws-sheet-backdrop.is-menu .ws-sheet-actions .ws-actions { display: flex; gap: 6px; }
}

/* Breite Bildschirme: Lesespalte wächst mit, statt als schmaler Streifen
   zwischen zwei leeren Flächen zu stehen. */
@media (min-width: 1440px) { .chat-container, .chat-messages { --read-width: 52rem; } }
@media (min-width: 1800px) { .chat-container, .chat-messages { --read-width: 58rem; } }

/* Arbeitsschritte während eines Laufs: leise Zeilen wie „N Dateien
   geändert“, keine eigene graue Box mehr. Auch die Statuszeile ohne Kasten. */
.chat-message.assistant.agent-todos-bubble {
  background: transparent; box-shadow: none; padding: 0 0 2px; max-width: none; align-self: stretch;
}
.chat-message.assistant.agent-todos-bubble .activity-section > summary { padding: 2px 0; }
.chat-message.assistant.status-bubble { background: transparent; box-shadow: none; padding-left: 0; }
#settings-name-save[hidden] { display: none; }
.set-name-form .btn { height: 34px; }

/* Unterhaltungen unter dem Workspace: luftiger, höchstens drei sichtbar,
   „Alle N anzeigen“ und das Plus teilen sich eine leise Fußzeile. */
.sb-sessions .agent-item {
  min-height: 32px; padding-top: 6px; padding-bottom: 6px; margin: 1px 0;
  border-radius: 8px; line-height: 1.3;
}
.sb-sessions .agent-item .agent-item-title { font-size: 13.5px; }
.sb-sessions-foot {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; padding: 0 6px 6px 30px;
}
.sb-sessions-more {
  border: 0; background: none; padding: 2px 0; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--text-muted);
}
.sb-sessions-more:hover { color: var(--text-primary); }
.sb-sessions .agent-item-new {
  display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--text-muted);
  opacity: .7; cursor: pointer;
}
.sb-sessions .agent-item-new svg { width: 14px; height: 14px; }
.sb-sessions .agent-item-new:hover { opacity: 1; color: var(--text-primary); background: var(--bg-hover); }
@media (pointer: coarse) { .sb-sessions .agent-item { min-height: 40px; } .sb-sessions .agent-item-new { width: 32px; height: 32px; } }
.sb-sessions .sb-sessions-foot .agent-item-new svg { position: static; transform: none; }
.sb-sessions-list .agent-item:first-child { font-weight: inherit; }
/* Nur das Plus übrig (keine „Alle N“): keine eigene leere Zeile, das Plus
   sitzt rechts in der Workspace-Zeile neben dem Stern. */
.sb-sessions { position: relative; }
.sb-sessions-foot.is-solo { min-height: 0; padding: 0; }
.sb-sessions-foot.is-solo .agent-item-new { position: absolute; top: -30px; right: 34px; }
/* Einheitlich: Plus immer in der Workspace-Zeile, Fußzeile nur für „Alle N“. */
.sb-sessions-foot .agent-item-new { position: absolute; top: -30px; right: 34px; }
.sb-sessions-foot { justify-content: flex-start; }

/* ─── Kopf der Sidebar: Dashboard und Dex heben sich ab (25.10.2026) ─────
   Größere Zeilen, eigene Kacheln; Dex wirkt lebendig: Augen klimpern, die
   Kugel atmet mit einem weichen Lichtring. Abstand + Haarlinie trennen den
   Block von den Workspaces. */
.sb-nav-item.sb-nav-dash, .sb-nav-item.sb-nav-home {
  min-height: 44px; padding-top: 8px; padding-bottom: 8px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
}
.sb-dash-tile {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-hover); color: var(--text-primary);
  box-shadow: 0 0 0 .5px var(--hairline);
}
.sb-dash-tile svg { width: 16px; height: 16px; }
.sb-nav-dash.active .sb-dash-tile { background: var(--text-primary); color: var(--bg-primary); }

.sb-nav-home { margin: 4px 0 2px; box-shadow: inset 0 0 0 1px rgba(90, 169, 255, .28), 0 4px 18px rgba(59, 130, 246, .12); }
.sb-dex-orb { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; }
.sb-dex-orb::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, .55), transparent 70%);
  animation: sb-dex-breathe 3.2s ease-in-out infinite;
}
.sb-dex-orb::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, .5);
  animation: sb-dex-ring 3.2s ease-out infinite;
}
.sb-dex-orb .sb-dex-avatar { position: relative; width: 28px; height: 28px; border-radius: 50%; display: block; }
.sb-dex-eyes { transform-origin: 128px 126px; animation: sb-dex-blink 4.6s infinite; }
.sb-nav-home:hover .sb-dex-eyes { animation-duration: 1.6s; }
.sb-nav-home .sb-dex-sub { color: color-mix(in srgb, #60a5fa 70%, var(--text-muted)); }
@keyframes sb-dex-blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } 96% { transform: scaleY(1); } 97.5% { transform: scaleY(.1); } }
@keyframes sb-dex-breathe { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .9; transform: scale(1.12); } }
@keyframes sb-dex-ring { 0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(96, 165, 250, 0); } }
@media (prefers-reduced-motion: reduce) {
  .sb-dex-eyes, .sb-dex-orb::before, .sb-dex-orb::after { animation: none; }
}
/* Abstand und Haarlinie vor „Workspaces“. */
.sb-scroll > .sb-section-label.sb-section-row { margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--hairline); }
/* Plus des aktiven Workspace darf den Namen nicht überdecken. */
.sb-project.active .sb-project-open { padding-right: 60px; }
.app-shell.sidebar-collapsed .sb-dash-tile { background: none; box-shadow: none; }

/* ─── Dashboard: Platz nutzen (25.10.2026) ────────────────────────────────
   Oben Begrüßung + Aktionen links, Kennzahlen als 2×2 rechts daneben; darunter
   der Live-Bereich über die volle Breite mit begrenzt hohem Aktivitätsstrom.
   Schmal: alles untereinander wie bisher. */
.dash-top { display: grid; gap: var(--space-6); }
.dash-home-scroll > .dash-top + .live { margin-top: var(--space-6); }
@media (min-width: 1100px) {
  .dash-top { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: center; }
  .dash-top > .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin: 0; }
  .dash-top .kpi-card { min-height: 0; }
  .dash-top .dex-offers { max-width: none; }
}
.dash-top > .dash-kpis { margin-top: 0; }
@media (min-width: 900px) {
  .live-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
  .live .feed-list { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (min-width: 1500px) {
  .live-main { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .dash-ws-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
}
.dash-home-scroll { --dash-width: 1600px; }
.dash-home-scroll > .dash-top { max-width: var(--dash-width); margin-left: auto; margin-right: auto; }
.dash-top > section { max-width: none; margin: 0; }
/* Handy: Kennzahlen als schmale Leiste (4 nebeneinander, ohne Symbole),
   damit der Live-Bereich nicht unter die Falz rutscht. */
@media (max-width: 600px) {
  .dash-top > .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 6px; }
  .dash-top .kpi-card { padding: 8px 6px; border-radius: 12px; text-align: center; }
  .dash-top .kpi-ico, .dash-top .kpi-lbl .info-tip { display: none; }
  .dash-top .kpi-val { font-size: 15px; }
  .dash-top .kpi-lbl { font-size: 10.5px; line-height: 1.2; }
  .dash-top { gap: var(--space-4); }
}

/* ─── Live-Karten als Multitasking-Fläche (25.10.2026) ───────────────────
   Zustand auf einen Blick: blau pulsierender Rand = arbeitet, orange = wartet
   auf dich / ungelesen fertig, grau = ruhig. Jede Karte hat einen Schnell-Chat. */
.live-main { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lcard { display: flex; flex-direction: column; }
.lcard:not(.lcard-wait):not(.lcard-done) { border-left-color: #3b82f6 !important; animation: lcard-glow 2.4s ease-in-out infinite; }
@keyframes lcard-glow { 50% { box-shadow: 0 0 0 .5px var(--hairline), 0 0 0 3px rgba(59, 130, 246, .14); } }
.lcard-wait { border-left-color: #f59e0b !important; }
.lcard-done { border-left: 3px solid color-mix(in srgb, var(--text-muted) 40%, transparent) !important; opacity: .92; }
.lcard-done.is-unread { border-left-color: #f59e0b !important; opacity: 1; }
.lcard-done.is-failed { border-left-color: var(--danger, #dc2626) !important; }
.lcard-done .lcard-title { color: var(--text-secondary); }
.ldone-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--success-muted); color: var(--success); }
.lcard-done.is-failed .ldone-ico { background: color-mix(in srgb, var(--danger, #dc2626) 15%, transparent); color: var(--danger, #dc2626); }
.lcard-done.is-unread .lphase-label { color: #f59e0b; }
.lcard-ago { margin-left: auto; font-size: var(--fs-xs); color: var(--text-muted); }
.lcard-dismiss {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--text-muted); cursor: pointer; opacity: .6;
}
.lcard-dismiss:hover { opacity: 1; background: var(--bg-hover); color: var(--text-primary); }
.lcard.is-leaving { opacity: 0; transform: scale(.97); transition: opacity .18s, transform .18s; }

.lquick {
  display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px;
}
.lquick-input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px;
  border: .5px solid var(--hairline); background: var(--bg-primary); color: var(--text-primary);
  font: inherit; font-size: var(--fs-sm);
}
.lquick-input:focus { outline: none; border-color: var(--accent); }
.lquick-send {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0;
  border: 0; border-radius: 9px; background: var(--text-primary); color: var(--bg-primary); cursor: pointer;
}
.lquick.is-sending .lquick-send { opacity: .5; }
.lquick.is-sent .lquick-input { border-color: var(--success); }
.lquick.is-error .lquick-input { border-color: var(--danger, #dc2626); }
@media (pointer: coarse) { .lquick-input { height: 38px; font-size: 16px; } .lquick-send { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .lcard { animation: none !important; } }

/* Handy-Kopf: Workspace als Haupttitel, Unterhaltung klein darunter
   (vorher nur der Sitzungstitel, man sah nicht, wo man ist). */
@media (max-width: 600px) {
  .ws-crumb { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; line-height: 1.2; gap: 1px; }
  .ws-crumb .ws-name { display: flex !important; max-width: 100%; font-size: 15px; font-weight: 600; color: var(--text-primary); pointer-events: none; }
  .ws-crumb .ws-name svg { display: none; }
  .ws-crumb .ws-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-crumb .ws-crumb-sep { display: none !important; }
  .ws-crumb .ws-crumb-cur { max-width: 100%; font-size: 12px; font-weight: 400 !important; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* `hidden` muss gegen .btn { display: inline-flex } gewinnen (Anlage-
   Assistent zeigte in Schritt 3 noch „Weiter“ und „Ohne Rückfragen“). */
.btn[hidden], button[hidden] { display: none !important; }

/* ─── Handy-Chat im Stil der ChatGPT-App (Nutzerwunsch 01.11.2026) ─────────
   Kein Kopfbalken: Menü links und Neu/Mehr rechts schweben als runde Knöpfe
   über dem Verlauf, der darunter durchläuft und nach oben ausblendet.
   Kein backdrop-filter (iOS ruckelt), stattdessen Verlauf + deckende Knöpfe. */
.ws-new { display: none; }
@media (max-width: 600px) {
  #app:has(.app-main > .session-body) { background: var(--bg-primary); }
  .app-main:has(> .session-body) { position: relative; }
  .app-main:has(> .session-body) > .ws-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-sticky);
    height: 80px; min-height: 80px; padding: 0 12px 16px; gap: 10px;
    border-bottom: 0;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-primary) 62%, color-mix(in srgb, var(--bg-primary) 60%, transparent) 82%, transparent 100%);
    pointer-events: none;
  }
  .app-main:has(> .session-body) > .ws-header > * { pointer-events: auto; }
  .app-main:has(> .session-body) .chat-messages { padding-top: 72px; }

  .app-main:has(> .session-body) .sb-mobile-toggle,
  .app-main:has(> .session-body) .ws-right {
    background: var(--bg-elevated);
    box-shadow: 0 0 0 .5px var(--hairline), 0 4px 14px rgba(0,0,0,.12);
  }
  :root[data-theme=dark] .app-main:has(> .session-body) .sb-mobile-toggle,
  :root[data-theme=dark] .app-main:has(> .session-body) .ws-right { box-shadow: 0 0 0 .5px var(--hairline), 0 4px 14px rgba(0,0,0,.4); }
  .app-main:has(> .session-body) .sb-mobile-toggle {
    width: 42px; height: 42px; border-radius: 50%; flex: none;
    display: inline-grid; place-items: center; margin: 0;
  }
  .app-main:has(> .session-body) .ws-right { border-radius: 999px; padding: 3px; gap: 0; flex: none; }
  .app-main:has(> .session-body) .ws-new {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent;
    color: var(--text-primary); cursor: pointer;
  }
  .app-main:has(> .session-body) .ws-new:active,
  .app-main:has(> .session-body) .ws-more:active { background: var(--bg-hover); }
  .app-main:has(> .session-body) .ws-more { color: var(--text-primary); }
  .app-main:has(> .session-body) .ws-crumb { flex: 1; min-width: 0; text-shadow: 0 0 12px var(--bg-primary); }

  /* Eigene Blase ohne Uhrzeit, Antworten ohne Laut-Leiste-Rauschen. */
  .chat-message.user .message-time { display: none; }

  /* Laufende Arbeit: eine leise Zeile, Gedanken erst nach dem Turn. */
  .agent-todos-bubble .activity-think { display: none !important; }
}

/* Zitat in einer Antwort = Text zum Weitergeben: Karte mit Kopierknopf. */
.chat-message.assistant blockquote.quote-card {
  margin: 12px 0; padding: 4px 18px 14px; border: 0; border-radius: 16px;
  background: var(--bg-secondary); color: var(--text-primary); font-style: normal;
  box-shadow: 0 0 0 .5px var(--hairline);
}
:root[data-theme=dark] .chat-message.assistant blockquote.quote-card { background: var(--bg-elevated); }
.quote-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 -6px 4px 0; padding-top: 6px; font-size: var(--fs-xs); color: var(--text-muted);
}
.quote-copy {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.quote-copy:hover { background: var(--bg-hover); color: var(--text-primary); }
.quote-card > p:first-of-type { margin-top: 0; }
