/* PawBot Voice — Premium Edition */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base structural vars ─────────────────────────────── */
:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 50%;
  --transition-fast: 0.15s;
  --transition-theme: 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   THEME SYSTEM: [data-theme] = color palette
                 [data-mode]  = dark / light
   Each theme has dark (default) + light variant.
   Moon button toggles mode. Settings choose theme.
   ═══════════════════════════════════════════════════════════ */

/* ── Default (Elegant) — warm gold, refined ──────────── */
:root, [data-theme="elegant"] {
  --accent: #b89940;
  --accent-soft: rgba(184, 153, 64, 0.18);
  --accent-glow: rgba(184, 153, 64, 0.35);
  --green: #5da048;
  --red: #b85540;
  --call-bg: #b89940;
  --call-shadow: rgba(184, 153, 64, 0.3);
  --viz-primary: #b89940;
  --viz-secondary: #7a6428;
  --viz-glow: rgba(184, 153, 64, 0.45);
}

/* ── Cyberpunk — vivid teal, digital ─────────────────── */
[data-theme="cyberpunk"] {
  --accent: #22a0b5;
  --accent-soft: rgba(34, 160, 181, 0.18);
  --accent-glow: rgba(34, 160, 181, 0.35);
  --green: #30a880;
  --red: #b84848;
  --call-bg: #22a0b5;
  --call-shadow: rgba(34, 160, 181, 0.3);
  --viz-primary: #22a0b5;
  --viz-secondary: #105560;
  --viz-glow: rgba(34, 160, 181, 0.45);
}

/* ── Nature — lush sage, organic ─────────────────────── */
[data-theme="nature"] {
  --accent: #5ea87a;
  --accent-soft: rgba(94, 168, 122, 0.18);
  --accent-glow: rgba(94, 168, 122, 0.35);
  --green: #5ea87a;
  --red: #a06050;
  --call-bg: #5ea87a;
  --call-shadow: rgba(94, 168, 122, 0.3);
  --viz-primary: #5ea87a;
  --viz-secondary: #3a6a4a;
  --viz-glow: rgba(94, 168, 122, 0.45);
}

/* ── Synthwave — rich purple, nostalgic ──────────────── */
[data-theme="synthwave"] {
  --accent: #9955aa;
  --accent-soft: rgba(153, 85, 170, 0.18);
  --accent-glow: rgba(153, 85, 170, 0.35);
  --green: #7088b0;
  --red: #b84466;
  --call-bg: #9955aa;
  --call-shadow: rgba(153, 85, 170, 0.3);
  --viz-primary: #9955aa;
  --viz-secondary: #5a2a6a;
  --viz-glow: rgba(153, 85, 170, 0.45);
}

/* ── KITT — bold red, classic ────────────────────────── */
[data-theme="kitt"] {
  --accent: #c62828;
  --accent-soft: rgba(178, 34, 34, 0.18);
  --accent-glow: rgba(178, 34, 34, 0.35);
  --green: #38b855;
  --red: #c62828;
  --call-bg: #c62828;
  --call-shadow: rgba(178, 34, 34, 0.3);
  --viz-primary: #e53935;
  --viz-secondary: #7f1d1d;
  --viz-glow: rgba(229, 57, 53, 0.40);
}

/* ── Mode: Dark (default) ────────────────────────────── */
:root, [data-mode="dark"] {
  --bg: #0a0a0c;
  --surface: #161618;
  --surface-2: #222226;
  --border: #333338;
  --text: #eeeef0;
  --text-sec: #b0b0b8;
  --text-ter: #707078;
  --body-bg: #0a0a0c;
}

/* ── Mode: Light ─────────────────────────────────────── */
[data-mode="light"] {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface-2: #e8e8ee;
  --border: #d0d0d8;
  --text: #1a1a1e;
  --text-sec: #4a4a54;
  --text-ter: #7a7a84;
  --body-bg: #f4f4f8;
}

/* ── Smooth theme transitions ─────────────────────────── */
html, body, .screen, #voice-center, #bot-avatar,
.call-button, .ctrl-button {
  transition: background var(--transition-theme), color var(--transition-theme),
              border-color var(--transition-theme), box-shadow var(--transition-theme);
}

body {
  font-family: -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--body-bg, #000); color: var(--text);
  margin: 0; padding: 0;
  height: 100dvh; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; -webkit-font-smoothing: antialiased;
}

/* Mobile: fixed fullscreen */
.screen { display: none; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
.screen.active { display: flex; }

/* Desktop: centered phone container */
@media (min-width: 600px) {
  body { padding: 20px; }
  [data-mode="light"] body { background: #e5e5ea; }
  .screen {
    position: relative;
    max-width: 420px; max-height: 820px;
    width: 420px; height: calc(100dvh - 40px);
    border-radius: 24px;
    background: var(--bg);
    box-shadow: 0 0 60px rgba(108,99,255,0.08), 0 0 0 1px rgba(255,255,255,0.06);
    top: auto; left: auto; right: auto; bottom: auto;
  }
  [data-mode="light"] .screen {
    box-shadow: 0 0 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.08);
  }
  [data-theme="kitt"] .screen { box-shadow: 0 0 60px rgba(178, 34, 34, 0.06), 0 0 0 1px rgba(178, 34, 34, 0.1); }
  [data-theme="elegant"] .screen { box-shadow: 0 0 60px rgba(160, 136, 72, 0.05), 0 0 0 1px rgba(160, 136, 72, 0.08); }
  [data-theme="cyberpunk"] .screen { box-shadow: 0 0 60px rgba(26, 136, 153, 0.06), 0 0 0 1px rgba(26, 136, 153, 0.1); }
  [data-theme="nature"] .screen { box-shadow: 0 0 60px rgba(90, 138, 106, 0.05), 0 0 0 1px rgba(90, 138, 106, 0.08); }
  [data-theme="synthwave"] .screen { box-shadow: 0 0 60px rgba(136, 68, 136, 0.06), 0 0 0 1px rgba(136, 68, 136, 0.1); }
}
.hidden { display: none !important; }

/* ── Auth ─────────────────────────────────────────────── */

#auth-screen {
  background: var(--bg);
}

.auth-card {
  max-width: 320px; margin: auto; padding: 48px 24px; text-align: center;
}

.auth-logo {
  width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.auth-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.auth-subtitle { color: var(--text-sec); margin-bottom: 4px; font-size: 14px; }
.auth-brand {
  color: var(--text-ter); margin-bottom: 28px; font-size: 11px;
  letter-spacing: 0.5px;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%; padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 15px; outline: none;
}
.auth-card input::placeholder { color: var(--text-ter); }
.auth-card input:focus { border-color: var(--accent); box-shadow: none; }

.auth-card .remember {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 13px; color: var(--text-sec); cursor: pointer; justify-content: center;
}
.auth-card .remember input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }

.auth-card button {
  width: 100%; padding: 12px;
  background: var(--accent); color: white; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.auth-card button:hover { opacity: 0.9; }
.auth-card button:active { opacity: 0.8; transform: scale(0.98); }

.error { color: var(--red); margin-top: 10px; font-size: 14px; }

/* ── Connection Banner ────────────────────────────────── */
.conn-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 600;
  padding: 8px 20px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  animation: slide-down 0.3s ease-out;
  transition: background 0.3s, color 0.3s;
}
.conn-banner.hidden { display: none !important; }
.conn-banner.offline { background: #dc2626; color: white; }
.conn-banner.slow { background: #f59e0b; color: #1a1a1a; }
.conn-banner.reconnecting { background: #6366f1; color: white; }

/* ── Update Banner ───────────────────────────────────── */

#update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: var(--accent); color: white;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  animation: slide-down 0.3s ease-out;
}

#update-banner.hidden { display: none !important; }

#update-btn {
  background: rgba(255,255,255,0.2); color: white; border: none;
  padding: 6px 16px; border-radius: 8px; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
#update-btn:active { background: rgba(255,255,255,0.3); }

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ── Top Bar ──────────────────────────────────────────── */

#top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; flex-shrink: 0;
  background: var(--accent);
  border-bottom: 1px solid rgba(0,0,0,0.2);
  position: relative; z-index: 10;
}

.top-left { display: flex; align-items: center; gap: 10px; }
.top-logo { width: 26px; height: 26px; border-radius: 7px; }
.top-logo-paw {
  width: 24px; height: 24px; color: white;
}
.top-title {
  font-size: 16px; font-weight: 700; color: white;
  letter-spacing: 0.3px;
}

/* Header buttons: white icons on accent background */
#top-bar .icon-button { color: rgba(255,255,255,0.85); }
#top-bar .icon-button:hover { color: white; }
#top-bar .user-avatar-btn {
  background: rgba(255,255,255,0.2); color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
#top-bar .user-avatar-btn:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.top-version { font-weight: 400; color: var(--text-sec); }

.top-right { display: flex; align-items: center; gap: 12px; }

#voice-select, #viz-style {
  padding: 6px 10px; font-size: 13px;
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border); border-radius: 8px; outline: none;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
#voice-select:focus, #viz-style:focus { border-color: var(--accent); }

/* ── Hero View ────────────────────────────────────────── */

#hero-view { position: relative; background: var(--bg); }
#voice-main { background: var(--bg); }

[data-theme="synthwave"] #hero-view::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 30%;
  background:
    linear-gradient(180deg, transparent, rgba(136, 68, 136, 0.03)),
    linear-gradient(rgba(136, 68, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(136, 68, 136, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* ── Voice Center ─────────────────────────────────────── */

#voice-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

#voice-center {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; padding: 24px;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(108,99,255,0.04) 0%, transparent 50%);
}

#bot-section {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

#bot-selector {
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 16px;
}
.bot-choice {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface-2);
  font-size: 20px; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.bot-choice:hover { border-color: var(--text-sec); }
.bot-choice.active { border-color: var(--accent); background: var(--surface); }
.bot-choice:disabled { opacity: 0.4; cursor: default; }

#bot-avatar {
  width: 104px; height: 104px; border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  transition: box-shadow 0.3s;
}

#bot-avatar.speaking {
  box-shadow: 0 0 0 3px var(--accent), 0 0 32px rgba(108,99,255,0.25);
}

#bot-avatar.listening {
  box-shadow: 0 0 0 3px #4ade80, 0 0 24px rgba(74,222,128,0.3);
}

#bot-name {
  font-size: 20px; font-weight: 600; color: var(--text);
  letter-spacing: 0.3px;
}


#viz-canvas {
  width: min(460px, 90vw); height: 96px;
}

/* ── Call Controls ────────────────────────────────────── */

#call-duration {
  font-size: 40px; font-weight: 100; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: 4px;
}

#call-buttons { display: flex; align-items: center; gap: 28px; }

.ctrl-button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ctrl-button:hover { border-color: var(--accent); color: var(--accent); }
.ctrl-button:active { transform: scale(0.9); }
.ctrl-button.muted {
  background: #e83030; color: white; border-color: #e83030;
  box-shadow: 0 2px 12px rgba(232,48,48,0.3);
}
#stop-speaking-btn {
  width: 56px; height: 56px;
  background: #e83030; color: white; border-color: #e83030;
  box-shadow: 0 2px 16px rgba(232,48,48,0.4);
  animation: pulse-stop 1.5s ease-in-out infinite;
}
#stop-speaking-btn:hover { opacity: 0.85; }
@keyframes pulse-stop {
  0%, 100% { box-shadow: 0 2px 16px rgba(232,48,48,0.4); }
  50% { box-shadow: 0 2px 24px rgba(232,48,48,0.6); }
}

/* Update Banner — neuer Server-Code wartet auf manuelle Aktivierung */
.update-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(108,99,255,0.14), rgba(108,99,255,0.08));
  border-bottom: 1px solid rgba(108,99,255,0.35);
  font-size: 0.85em; color: var(--text);
  animation: slide-down 0.2s ease-out;
}
.update-banner.hidden { display: none; }
.update-banner-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.update-banner-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.update-banner-title { font-weight: 600; }
.update-banner-sub { font-size: 0.85em; color: var(--text-sec); }
.update-banner-btn {
  background: var(--accent); color: white; border: none;
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
  font-size: 0.9em; font-weight: 600;
  transition: filter 0.15s;
}
.update-banner-btn:hover { filter: brightness(1.1); }
.update-banner-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.update-banner-dismiss {
  background: none; border: none; color: var(--text-sec);
  font-size: 1.4em; cursor: pointer; width: 24px; height: 24px; padding: 0;
}
.update-banner-dismiss:hover { color: var(--text); }

/* Task Banner — persistent indicator for background tasks */
.task-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(108,99,255,0.1);
  border-bottom: 1px solid rgba(108,99,255,0.2);
  font-size: 0.8em; color: var(--text-secondary, #aaa);
  transition: opacity 0.3s, background 0.15s;
  cursor: pointer;
  user-select: none;
}
.task-banner:hover { background: rgba(108,99,255,0.18); }
.task-banner.hidden { display: none; }
.task-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6c63ff;
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
#task-banner-text {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-banner-chevron {
  opacity: 0.6; font-size: 0.9em; transition: transform 0.2s;
}
.task-banner.expanded .task-banner-chevron { transform: rotate(180deg); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Task Detail Panel — expanded view with live progress log */
.task-detail-panel {
  position: relative;
  margin: 0 12px 8px; padding: 12px 14px;
  background: rgba(108,99,255,0.06);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 10px;
  font-size: 0.82em; color: var(--text, #ddd);
  animation: slide-down 0.2s ease-out;
}
.task-detail-panel.hidden { display: none; }
.task-detail-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.task-detail-header strong { color: #9b94ff; font-size: 1.05em; }
.task-detail-elapsed {
  font-family: ui-monospace, monospace; font-size: 0.9em;
  color: var(--text-secondary, #888);
  background: rgba(108,99,255,0.12);
  padding: 1px 7px; border-radius: 4px;
}
.task-detail-close {
  margin-left: auto;
  background: none; border: none; color: var(--text-secondary, #888);
  font-size: 1.4em; line-height: 1; cursor: pointer;
  width: 24px; height: 24px; padding: 0;
}
.task-detail-close:hover { color: var(--text, #fff); }
.task-detail-task {
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  font-style: italic;
  white-space: pre-wrap; word-break: break-word;
}
.task-detail-history-label {
  font-size: 0.85em; color: var(--text-secondary, #888);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}
.task-detail-history {
  margin: 0; padding-left: 20px;
  max-height: 220px; overflow-y: auto;
  list-style-type: decimal;
}
.task-detail-history li {
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.task-detail-history li:last-child {
  font-weight: 500; color: #9b94ff;
}
.task-detail-history .history-time {
  font-family: ui-monospace, monospace;
  font-size: 0.85em; opacity: 0.6;
  margin-right: 6px;
}

/* ── Notification Banner ─────────────────────────────── */
.notify-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; flex-shrink: 0;
  background: var(--surface); border-bottom: 2px solid var(--green);
  animation: slide-down 0.2s ease-out;
}
.notify-banner.hidden { display: none; }
.notify-banner.error { border-bottom-color: var(--red); }
.notify-banner-icon {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  animation: pulse 1.5s infinite;
}
.notify-banner.error .notify-banner-icon { background: var(--red); }
.notify-banner-content { flex: 1; min-width: 0; }
.notify-banner-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notify-banner-body {
  font-size: 11px; color: var(--text-sec); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notify-banner-close {
  background: none; border: none; color: var(--text-ter);
  font-size: 18px; cursor: pointer; padding: 0 4px;
}
.notify-banner-close:hover { color: var(--text); }

/* ── Notify Toggle Badge ─────────────────────────────── */
#notify-toggle { position: relative; }
.notify-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--red); color: white;
  font-size: 9px; font-weight: 700; min-width: 14px; height: 14px;
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.notify-badge.hidden { display: none; }

.call-button {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--call-bg); color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 6px 28px var(--call-shadow), 0 0 0 3px var(--accent-soft);
}
.call-button:hover {
  box-shadow: 0 6px 32px var(--call-shadow), 0 0 16px var(--accent-glow);
}
.call-button:active { transform: scale(0.92); }
.call-button.active {
  background: #e83030;
  box-shadow: 0 6px 28px rgba(232,48,48,0.4), 0 0 0 3px rgba(232,48,48,0.15);
}

#call-status {
  font-size: 13px; color: var(--text-ter); text-align: center; min-height: 16px;
  letter-spacing: 0.3px; margin-top: 2px;
}

/* ── Open Chat Button ────────────────────────────────── */

.open-chat-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto 16px; padding: 10px 24px;
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border); border-radius: 14px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.open-chat-btn:hover { background: var(--surface); color: var(--text); border-color: var(--accent); }
.open-chat-btn:active { transform: scale(0.97); }

/* ── Action Window ───────────────────────────────────── */

#action-window {
  margin: 0 24px 8px; flex-shrink: 0;
  display: none; /* shown when items exist */
}
#action-window.has-items { display: block; }

.aw-header {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-ter); margin-bottom: 8px;
}
.aw-items {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 160px; overflow-y: auto;
}

/* ── Voice Banner ────────────────────────────────────── */

.voice-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; flex-shrink: 0;
  background: var(--surface); border-bottom: 0.5px solid var(--border);
  cursor: pointer; transition: background 0.15s;
  min-height: 60px; box-sizing: border-box;
}
.voice-banner:hover { background: var(--surface-2); }

.banner-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--accent);
  transition: border-color 0.2s;
}
.banner-avatar.speaking { border-color: var(--accent); box-shadow: 0 0 12px rgba(108,99,255,0.3); }
.banner-avatar.listening { border-color: #4ade80; box-shadow: 0 0 12px rgba(74,222,128,0.3); }

.banner-info { flex: 1; min-width: 0; }
.banner-name { font-size: 14px; font-weight: 600; color: var(--text); display: block; }
.banner-status { font-size: 11px; color: var(--text-ter); transition: color 0.2s; }
.banner-status.live { color: var(--green); }

.mini-viz {
  flex-shrink: 0; border-radius: 4px; opacity: 0;
  transition: opacity 0.2s;
  width: 60px; height: 22px;
}
.mini-viz.active { opacity: 1; }

.banner-ctrl {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-sec); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.banner-ctrl svg { width: 18px; height: 18px; }
.banner-ctrl:active { transform: scale(0.9); }
.banner-ctrl.muted { background: var(--red); color: white; border-color: var(--red); }
.banner-call {
  background: var(--call-bg); color: white; border-color: var(--call-bg);
  box-shadow: 0 2px 10px rgba(48,209,88,0.3);
}
.banner-call:hover { opacity: 0.85; }
.banner-call.hidden { display: none; }
.banner-hangup {
  background: #e83030; color: white; border-color: #e83030;
  box-shadow: 0 2px 10px rgba(232,48,48,0.3);
  display: none;
}
.banner-hangup.visible { display: flex; }
.banner-hangup:hover { opacity: 0.85; }
.banner-ctrl.banner-mute { display: none; }
.banner-ctrl.banner-mute.visible { display: flex; }

/* Hidden tab-bar elements for JS compatibility */
#tab-bar { display: none; }

/* ── Views ───────────────────────────────────────────── */

.view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.view.active { display: flex; }
.ch-row-tools {
  display: flex; align-items: center; gap: 2px;
  padding: 6px 12px;
  flex-shrink: 0;
}
.ch-tool-btn {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 12px; border: none;
  background: var(--surface-2); color: var(--text-sec);
  font-size: 12px; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.ch-tool-btn:hover { background: var(--surface); color: var(--text); }
.ch-tool-btn.tg-off { opacity: 0.35; }
.ch-tool-btn.filter-active { background: var(--accent); color: white; }
.ch-tool-label { font-size: 11px; }
.ch-tool-spacer { flex: 1; }
/* (mini-viz styles moved to .mini-viz in Voice Banner) */
/* Activity indicator */
.ch-activity {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--accent);
}
.ch-activity.hidden { display: none; }
.ch-activity-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: ch-pulse 1.5s ease-in-out infinite;
}
@keyframes ch-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.ch-activity-text { font-weight: 500; }

/* (old chat header controls removed — replaced by voice-banner) */

/* (old chat call/hangup buttons removed — replaced by banner controls) */

#chat-transcript {
  flex: 1; overflow-y: auto; padding: 16px 24px;
  transition: background 0.2s;
}
#chat-transcript.drag-over {
  background: rgba(108,99,255,0.08);
  outline: 2px dashed var(--accent);
  outline-offset: -8px;
  border-radius: 8px;
}

#transcript { max-width: 560px; margin: 0 auto; }

.msg {
  margin-bottom: 6px; padding: 9px 14px;
  border-radius: 18px; max-width: 80%;
  font-size: 15px; line-height: 1.4;
  animation: msg-in 0.15s ease-out;
  overflow-wrap: break-word; word-break: break-word;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg.user {
  background: var(--accent); color: white;
  margin-left: auto; border-bottom-right-radius: 4px;
}
.msg.assistant {
  background: var(--surface-2); color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-channel {
  display: block; font-size: 10px; margin-bottom: 3px;
  opacity: 0.6; font-weight: 500;
}
.msg-time {
  display: block; font-size: 10px; margin-top: 4px;
  opacity: 0.5; font-weight: 400;
}
.msg.user .msg-time { text-align: right; }
.msg-link {
  color: inherit; text-decoration: underline;
  text-underline-offset: 2px; font-weight: 500;
  word-break: break-all;
}
.msg.user .msg-link { color: rgba(255,255,255,0.95); }
.msg.assistant .msg-link { color: var(--accent); }

.msg.action {
  background: none; color: var(--text-ter); font-size: 12px;
  text-align: center; max-width: 100%; padding: 4px;
}

/* Telegram filter */
.tg-hidden .msg[data-channel="telegram"] { display: none; }
#tg-filter-btn.tg-off { opacity: 0.35; }

/* Chat filter bar */
.chat-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.chat-filter-bar.hidden { display: none; }
.chat-filter-days { display: flex; gap: 4px; }
.chat-day-btn {
  padding: 4px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: transparent; color: var(--text-sec); font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.chat-day-btn:hover { border-color: var(--accent); }
.chat-day-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.chat-search-input {
  flex: 1; padding: 5px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; min-width: 0;
}
.chat-search-input:focus { outline: none; border-color: var(--accent); }
.chat-search-input::placeholder { color: var(--text-ter); }
/* Search + Day filter hide */
.msg.chat-search-hidden { display: none; }
.msg.chat-day-hidden { display: none; }
#chat-filter-toggle.filter-active { color: var(--accent); }

/* ── Chat Input Bar ───────────────────────────────────── */

#chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; border-top: 0.5px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}

.upload-button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-sec);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; border: none; flex-shrink: 0;
}
.upload-button:hover { background: var(--accent); color: white; }
.upload-button:active { transform: scale(0.92); }

#chat-text-input {
  flex: 1; padding: 10px 14px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; outline: none;
  min-width: 0;
}
#chat-text-input::placeholder { color: var(--text-ter); }
#chat-text-input:focus { border-color: var(--accent); }

.emoji-button {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; color: var(--text-ter); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color 0.15s; flex-shrink: 0; padding: 0;
}
.emoji-button:hover { color: var(--text); }

.emoji-picker {
  position: absolute; bottom: 56px; right: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px; width: 280px; max-height: 260px;
  overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 500; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.emoji-picker.hidden { display: none; }
.emoji-picker button {
  width: 34px; height: 34px; background: none; border: none;
  border-radius: 8px; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.emoji-picker button:hover { background: var(--surface-2); }

.send-button {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.send-button:active { transform: scale(0.9); }
.send-button:disabled { opacity: 0.3; cursor: default; }

#upload-status {
  position: absolute; bottom: 60px; left: 24px; right: 24px;
  font-size: 13px; color: var(--text-ter);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#upload-status.uploading { color: var(--accent); }
#upload-status.error { color: var(--red); }

/* Upload preview in transcript */
.msg-upload {
  margin-bottom: 6px; padding: 10px 14px;
  border-radius: 18px; max-width: 85%;
  background: var(--accent); margin-left: auto;
  border-bottom-right-radius: 4px;
  animation: msg-in 0.15s ease-out;
}

.msg-upload img {
  max-width: 100%; border-radius: 10px; display: block;
  margin-bottom: 6px;
}

.msg-upload .upload-name {
  font-size: 12px; color: rgba(255,255,255,0.7);
}

.msg-upload .upload-analysis {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-top: 4px; font-style: italic;
}

::-webkit-scrollbar { width: 0; }

/* ── Archive Panel ────────────────────────────────────── */

.archive-button { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px; }

#archive-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 100%;
  background: var(--surface);
  transform: translateX(100%); transition: transform 0.25s;
  z-index: 100; display: flex; flex-direction: column;
}
#archive-panel.open { transform: translateX(0); }

.archive-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 600; color: var(--text-sec);
}
.archive-close-btn {
  background: none; border: none; color: var(--text-ter);
  font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.archive-close-btn:hover { color: var(--text); }

.archive-list {
  flex: 1; overflow-y: auto; padding: 10px 14px;
}

.archive-item-wrap {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 6px; border-radius: 10px;
  background: var(--surface-2); transition: background 0.15s;
}
.archive-item-wrap:hover { background: var(--border); }

.archive-item {
  display: flex; gap: 10px; padding: 10px; flex: 1; min-width: 0;
  text-decoration: none; color: var(--text-sec);
}

.archive-dl {
  padding: 10px 12px; font-size: 14px; text-decoration: none;
  color: var(--text-ter); flex-shrink: 0; border-radius: 0 10px 10px 0;
}
.archive-dl:hover { color: var(--accent); }

.archive-thumb {
  width: 44px; height: 44px; border-radius: 6px; object-fit: cover;
  background: var(--border); flex-shrink: 0;
  content-visibility: auto; contain-intrinsic-size: 44px;
}
.archive-thumb-icon {
  width: 44px; height: 44px; border-radius: 6px;
  background: var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.archive-info { flex: 1; min-width: 0; }
.archive-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.archive-meta {
  font-size: 11px; color: var(--text-ter); margin-top: 2px;
}
/* File Manager previews */
.fm-preview { margin-top: -2px; }
.fm-preview.hidden { display: none; }
.fm-audio { width: 100%; height: 36px; border-radius: 8px; }
.fm-video { width: 100%; max-height: 200px; border-radius: 8px; background: #000; }
.archive-thumb-icon svg { color: var(--text-ter); }

/* File manager toolbar */
.fm-toolbar { padding: 8px 12px; }
.fm-type-btns {
  display: flex; gap: 4px; margin-bottom: 6px;
}
.fm-type-btn {
  padding: 4px 10px; border-radius: 6px; border: none;
  font-size: 11px; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--text-ter);
  transition: all 0.15s;
}
.fm-type-btn:hover { color: var(--text-sec); }
.fm-type-btn.active { background: var(--accent); color: #fff; }
.fm-search {
  width: 100%; padding: 6px 10px; font-size: 12px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  outline: none; font-family: inherit;
}
.fm-search:focus { border-color: var(--accent); }

.archive-empty {
  text-align: center; color: var(--text-ter); padding: 40px 20px;
  font-size: 14px;
}

/* ── Icon Buttons (top bar) ───────────────────────────── */

.icon-button {
  background: none; border: none; color: var(--text-ter);
  cursor: pointer; padding: 8px; display: flex; align-items: center;
  transition: color 0.15s;
}
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { color: var(--text); }

/* ── User Avatar Menu (Google-Style) ─────────────────── */
.user-menu { position: relative; }
.user-avatar-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.15s;
}
.user-avatar-btn:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.user-dropdown {
  position: absolute; top: 42px; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; min-width: 220px; padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000; animation: fade-in 0.12s ease-out;
}
.user-dropdown.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ud-header { padding: 12px 16px; }
.ud-name { font-size: 14px; font-weight: 600; color: var(--text); display: block; }
.ud-email { font-size: 12px; color: var(--text-ter); display: block; margin-top: 2px; }
.ud-divider { height: 1px; background: var(--border); margin: 4px 0; }
.ud-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 16px; background: none; border: none;
  color: var(--text-sec); font-size: 13px; cursor: pointer;
  transition: background 0.1s; text-align: left;
}
.ud-item:hover { background: var(--surface-2); color: var(--text); }
.ud-item svg { flex-shrink: 0; opacity: 0.7; }
.ud-icon-right { margin-left: auto; }
.ud-logout { color: var(--red); }
.ud-logout:hover { background: rgba(255,60,60,0.08); }
.ud-version {
  padding: 6px 16px; font-size: 11px; color: var(--text-ter);
  letter-spacing: 0.3px;
}
.ud-badge-new {
  margin-left: auto;
  background: var(--accent); color: white;
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
  letter-spacing: 0.5px;
}

/* Inline Erscheinungsbild-Reihe im Avatar-Menü — 5 Farben + 3 Modi */
.ud-appearance {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 16px 12px;
}
.ud-appearance-divider {
  display: block;
  width: 1px; height: 18px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

/* Farb-Swatch: schlichter runder Kreis */
.ud-swatch.theme-swatch,
.ud-swatch {
  flex: 0 0 auto;
  min-width: 0;
  width: 20px; height: 20px;
  padding: 0; margin: 0;
  background: none; border: none; border-radius: 50%;
  display: block;
  cursor: pointer;
  transition: transform 0.15s;
}
.ud-swatch.theme-swatch:hover,
.ud-swatch:hover {
  background: none; border: none; transform: scale(1.12);
}
.ud-swatch.theme-swatch.active,
.ud-swatch.active {
  background: none;
  border: none;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.ud-swatch .swatch-color {
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  box-shadow: none;
  margin: 0;
}

/* Modus-Cycle-Button: ein einziger Button, zeigt aktuellen Modus */
.ud-mode {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  padding: 0; margin: 0;
  background: none; border: none;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, color 0.15s;
}
.ud-mode:hover { transform: scale(1.15); }
.ud-mode svg { width: 16px; height: 16px; }
.ud-mode svg.hidden { display: none; }

/* ── What's New Modal ───────────────────────────────── */
.whatsnew-content {
  max-width: 460px !important;
  max-height: 85vh !important;
}
.whatsnew-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 0.5px solid var(--border);
}
.whatsnew-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.whatsnew-header h3 {
  flex: 1; margin: 0; font-size: 20px; font-weight: 700; color: var(--text);
}
.whatsnew-body {
  max-height: 60vh; overflow-y: auto;
  padding: 4px 2px;
}
.wn-entry {
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--surface-2); border-radius: 12px;
  border: 0.5px solid var(--border);
  position: relative;
}
.wn-entry.wn-highlight {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.wn-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--accent); color: white;
  margin-bottom: 8px;
}
.wn-entry h4 {
  margin: 0 0 6px 0; font-size: 14px; font-weight: 600; color: var(--text);
}
.wn-entry p {
  margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-sec);
}

/* ── Settings Panel ──────────────────────────────────── */

#settings-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 100%;
  background: var(--bg);
  transform: translateX(100%); transition: transform 0.25s;
  z-index: 110; display: flex; flex-direction: column;
}
#settings-panel.open { transform: translateX(0); }

.settings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 0.5px solid var(--border);
  background: var(--surface);
}

.settings-tabs {
  display: flex; gap: 6px;
}

.settings-tab {
  padding: 8px 16px; border-radius: 20px; border: none;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: transparent; color: var(--text-ter);
  transition: all 0.15s;
}
.settings-tab:hover { background: var(--surface-2); color: var(--text-sec); }
.settings-tab.active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}

.settings-body { flex: 1; overflow-y: auto; padding: 14px 14px; }
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }

.settings-section {
  margin-bottom: 12px;
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
  border: 0.5px solid var(--border);
}

.settings-section-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  text-transform: none; letter-spacing: 0;
  margin-bottom: 12px;
}

.connector {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--bg); margin-bottom: 10px;
  border: 0.5px solid var(--border);
  flex-wrap: wrap;
}
.connector:last-child { margin-bottom: 0; }

.connector-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.connector-info { flex: 1; min-width: 100px; }
.connector-name { font-size: 14px; font-weight: 600; color: var(--text); }
.connector-desc { font-size: 12px; color: var(--text-ter); margin-top: 2px; }

.connector-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-ter);
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-ter);
}
.status-dot.connected { background: var(--green); }
.status-dot.disconnected { background: var(--red); }

.connector-btn {
  padding: 7px 14px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: white;
  transition: opacity 0.15s;
}
.connector-btn:hover { opacity: 0.85; }
.connector-btn.connected {
  background: transparent; color: var(--text-ter);
  border: 1px solid var(--border);
}

.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 0.5px solid rgba(255,255,255,0.06);
}
.setting-row label { font-size: 14px; color: var(--text-sec); }
.setting-row select {
  padding: 6px 10px; font-size: 13px;
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border); border-radius: 8px;
  outline: none; cursor: pointer;
}

/* ── SSI Footer ──────────────────────────────────────── */

#ssi-footer {
  padding: 4px 24px; text-align: center;
  font-size: 11px; color: var(--text-sec);
  letter-spacing: 0.5px; flex-shrink: 0;
}
body.keyboard-open #ssi-footer { display: none; }

.ssi-brand {
  font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ssi-sep { margin: 0 4px; opacity: 0.4; }
.ssi-ver { opacity: 0.6; }

/* Light mode overrides */
[data-mode="light"] #auth-screen {
  background: var(--bg);
}
[data-mode="light"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(88,86,214,0.04) 0%, transparent 50%);
}
[data-theme="kitt"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(178, 34, 34, 0.04) 0%, transparent 50%);
}
[data-theme="elegant"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(160, 136, 72, 0.03) 0%, transparent 50%);
}
[data-theme="cyberpunk"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(26, 136, 153, 0.04) 0%, transparent 50%);
}
[data-theme="nature"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(90, 138, 106, 0.04) 0%, transparent 50%);
}
[data-theme="synthwave"] #voice-center {
  background: radial-gradient(ellipse at 50% 35%, rgba(136, 68, 136, 0.05) 0%, transparent 50%);
}
[data-mode="light"] #bot-avatar {
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
[data-mode="light"] #bot-avatar.speaking {
  box-shadow: 0 0 0 3px var(--accent), 0 0 32px rgba(88,86,214,0.2);
}
[data-theme="kitt"] #bot-avatar { box-shadow: 0 2px 20px rgba(178, 34, 34, 0.2); }
[data-theme="elegant"] #bot-avatar { box-shadow: 0 2px 20px rgba(160, 136, 72, 0.15); }
[data-theme="cyberpunk"] #bot-avatar { box-shadow: 0 2px 20px rgba(26, 136, 153, 0.2); }
[data-theme="nature"] #bot-avatar { box-shadow: 0 2px 20px rgba(90, 138, 106, 0.15); }
[data-theme="synthwave"] #bot-avatar { box-shadow: 0 2px 20px rgba(136, 68, 136, 0.2); }
[data-mode="light"] .msg.assistant {
  background: var(--surface-2); color: var(--text);
}
[data-mode="light"] .auth-card button {
  background: var(--accent);
}
[data-mode="light"] .ssi-brand {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Changelog Modal ──────────────────────────────────── */

#changelog-overlay {
  position: absolute; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

#changelog-modal {
  background: var(--surface); border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}

.changelog-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 600;
}

#changelog-body {
  overflow-y: auto; padding: 16px 20px;
  font-size: 14px; line-height: 1.6; color: var(--text-sec);
}

.changelog-version {
  font-size: 15px; font-weight: 700; color: var(--accent);
  margin-bottom: 8px; margin-top: 16px;
}
.changelog-version:first-child { margin-top: 0; }

.changelog-entry { margin-bottom: 16px; }

.changelog-entry h4 {
  font-size: 12px; font-weight: 600; color: var(--text-ter);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 8px 0 4px;
}

.changelog-entry ul {
  list-style: none; padding: 0;
}

.changelog-entry li {
  padding: 2px 0 2px 16px; position: relative;
  color: var(--text-sec);
}

.changelog-entry li::before {
  content: '·'; position: absolute; left: 4px;
  color: var(--accent); font-weight: 700;
}

.setting-row.clickable {
  cursor: pointer; border-radius: 8px; padding: 10px 8px;
  margin: 0 -8px; transition: background 0.15s;
}
.setting-row.clickable:hover { background: var(--surface-2); }
.setting-row.clickable label { cursor: pointer; }

.setting-value {
  font-size: 13px; color: var(--accent); font-weight: 600;
}

.setting-hint { font-size: 13px; color: var(--text-ter); }

/* Settings grid layout */
.s-grid {
  display: flex; flex-direction: row; gap: 10px;
  margin-top: 12px;
  width: 100%;
}
.s-grid > .s-field {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0 !important;
}
.s-field { display: flex; flex-direction: column; gap: 8px; }
.s-field label {
  font-size: 11px; font-weight: 500; color: var(--text-ter);
  text-transform: none; letter-spacing: 0;
}
.s-field select, .s-field input {
  padding: 7px 10px; font-size: 13px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  outline: none; width: 100%;
}
.s-field select { cursor: pointer; }
.s-field input::placeholder { color: var(--text-ter); }

/* Consistent spacing between s-fields (labels + their pickers) in settings sections */
.settings-section .s-field + .s-field,
.settings-section .s-field + .s-grid,
.settings-section .s-grid + .s-field,
.settings-section .s-grid + .s-grid { margin-top: 18px; }

/* ── Theme Picker — visual swatches ──────────────────── */
.theme-picker {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1 1 0; min-width: 54px; padding: 7px 6px; border-radius: 9px;
  background: var(--surface-2); border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.theme-swatch:hover { border-color: var(--border); }
.theme-swatch.active { border-color: var(--accent); background: var(--accent-soft); }
.swatch-color {
  width: 22px; height: 22px; border-radius: 50%;
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.swatch-label {
  font-size: 10px; color: var(--text-sec); font-weight: 500;
  white-space: nowrap;
}
.theme-swatch.active .swatch-label { color: var(--text); }

/* ── Visualizer Picker — icon cards ──────────────────── */
.viz-picker {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.viz-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1 1 0; min-width: 54px; padding: 7px 6px; border-radius: 9px;
  background: var(--surface-2); border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.viz-card:hover { border-color: var(--border); }
.viz-card.active { border-color: var(--accent); background: var(--accent-soft); }
.viz-icon { flex-shrink: 0; }
.viz-card span {
  font-size: 10px; color: var(--text-sec); font-weight: 500;
  white-space: nowrap;
}
.viz-card.active span { color: var(--text); }

/* ── Settings Save Toast ─────────────────────────────── */
.settings-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #fff; padding: 8px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.settings-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* API Service Cards */
/* API Service Cards */
.svc-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); margin-bottom: 6px;
  transition: opacity 0.2s, background 0.15s;
  cursor: pointer;
}
.svc-card:hover { background: var(--border); }
.svc-card.missing { opacity: 0.4; }
.svc-card.missing:hover { opacity: 0.65; }
.svc-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.svc-info { flex: 1; min-width: 0; overflow: hidden; }
.svc-name { font-size: 13px; font-weight: 600; color: var(--text); display: block; line-height: 1.3; }
.svc-desc { font-size: 11px; color: var(--text-ter); display: block; margin-top: 2px; line-height: 1.3; }
.svc-badge {
  font-size: 10px; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px;
  flex-shrink: 0;
}
.svc-badge.system { background: rgba(48,209,88,0.15); color: var(--green); }
.svc-badge.user { background: rgba(139,131,255,0.15); color: var(--accent); }
.svc-badge.missing { background: rgba(255,69,58,0.1); color: var(--red); }

/* Key editor (slide-up panel) */
.key-editor {
  position: sticky; bottom: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 0; margin-top: 12px;
}
.key-editor.hidden { display: none; }
.key-editor-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.key-input-full {
  width: 100%; padding: 10px 12px; font-size: 13px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  outline: none; font-family: monospace;
}
.key-input-full:focus { border-color: var(--accent); }
.key-editor-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.key-btn-cancel {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-sec); cursor: pointer; font-size: 12px;
}
.key-btn-save {
  padding: 6px 14px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; cursor: pointer; font-size: 12px; font-weight: 600;
}
.key-btn-save:hover { opacity: 0.85; }

/* Module cards */
.mod-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--bg); margin-bottom: 8px;
  border: 0.5px solid var(--border);
  opacity: 0.4;
}
.mod-card.active { opacity: 1; }
.mod-icon {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); opacity: 0.8;
}
.mod-icon svg { width: 20px; height: 20px; }
.mod-info { flex: 1; min-width: 0; }
.mod-name { font-size: 13px; font-weight: 600; color: var(--text); display: block; }
.mod-tools { font-size: 10px; font-weight: 400; color: var(--text-ter); margin-left: 4px; }
.mod-desc { font-size: 11px; color: var(--text-ter); display: block; margin-top: 2px; line-height: 1.35; }
.mod-badge {
  font-size: 9px; font-weight: 600; padding: 3px 7px;
  border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0;
}
.mod-badge.on { background: rgba(48,209,88,0.15); color: var(--green); }
.mod-badge.core { background: rgba(139,131,255,0.15); color: var(--accent); }
.mod-badge.off { background: rgba(255,255,255,0.05); color: var(--text-ter); }

/* ── Module Detail Modal ─────────────────────────────── */
.mod-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.mod-modal.hidden { display: none; }
.mod-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.mod-modal-content {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; width: 90%; max-width: 380px;
  max-height: 80vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.mod-modal-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.mod-modal-header h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.mod-modal-icon { flex-shrink: 0; color: var(--accent); }
.mod-modal-icon svg { width: 28px; height: 28px; }
.mod-modal-desc { font-size: 12px; color: var(--text-sec); line-height: 1.4; display: block; margin-top: 2px; }
.mod-modal-close {
  margin-left: auto; background: none; border: none; color: var(--text-ter);
  font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.mod-modal-close:hover { color: var(--text); }

.mod-modal-toggle { margin-bottom: 16px; }
.toggle-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text);
}
.toggle-label input { display: none; }
.toggle-slider {
  width: 40px; height: 22px; background: var(--surface-2); border-radius: 11px;
  position: relative; transition: background 0.2s; flex-shrink: 0;
  border: 1px solid var(--border);
}
.toggle-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-ter); transition: all 0.2s;
}
.toggle-label input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-label input:checked + .toggle-slider::after { left: 20px; background: white; }
.toggle-label input:disabled + .toggle-slider { opacity: 0.4; cursor: not-allowed; }

.mod-modal-section-title {
  font-size: 10px; font-weight: 600; color: var(--text-ter);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.mod-tool-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; background: var(--surface-2); border-radius: 8px; margin-bottom: 4px;
}
.mod-tool-name { font-size: 12px; font-weight: 600; color: var(--text); font-family: monospace; }
.mod-tool-desc { font-size: 11px; color: var(--text-sec); line-height: 1.3; }
.mod-modal-meta { margin-top: 12px; font-size: 10px; color: var(--text-ter); }

/* Usage — cost-focused redesign */
.usage-total {
  text-align: center; padding: 16px 0 12px;
}
.usage-total-value {
  font-size: 32px; font-weight: 200; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.usage-total-label {
  font-size: 11px; color: var(--text-ter); margin-top: 2px;
}
.usage-breakdown { margin-top: 12px; }
.usage-svc {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 0.5px solid rgba(255,255,255,0.04);
  font-size: 12px;
}
.usage-svc-icon { width: 18px; text-align: center; }
.usage-svc-name { flex: 1; color: var(--text-sec); }
.usage-svc-calls { color: var(--text-ter); min-width: 36px; text-align: right; }
.usage-svc-cost { color: var(--text); font-weight: 600; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.usage-bar-wrap {
  height: 3px; background: var(--surface-2); border-radius: 2px;
  margin-top: 8px; overflow: hidden;
}
.usage-bar {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.5s ease;
}

/* Help Overlay */
.help-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.help-overlay.hidden { display: none; }
.help-panel {
  background: var(--surface); border-radius: 16px;
  max-width: 400px; width: 100%; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.help-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; font-size: 15px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.help-body { overflow-y: auto; padding: 14px 18px; }
.help-section { margin-bottom: 16px; }
.help-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.help-text { font-size: 12px; color: var(--text-sec); line-height: 1.5; }
.help-example {
  font-size: 12px; color: var(--text); padding: 6px 10px;
  background: var(--surface-2); border-radius: 8px;
  margin: 3px 0; font-style: italic;
}

/* Tip lightbulb button — subtle glow, click to show tip */
.tip-btn {
  position: absolute; bottom: 108px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 40; transition: all 0.3s;
  animation: tip-glow 3s ease-in-out infinite;
}
.tip-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
@keyframes tip-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px var(--accent-glow); }
}

/* Tipp-Banner — positioned above input bar */
.tip-banner {
  position: absolute; bottom: 108px; left: 16px; right: 60px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-sec);
  z-index: 50;
  animation: tipSlideIn 0.3s ease;
}
.tip-banner.hidden { display: none; }
.tip-banner #tip-close {
  background: none; border: none; color: var(--text-ter);
  cursor: pointer; font-size: 14px; padding: 0 2px; margin-left: auto;
  flex-shrink: 0;
}
@keyframes tipSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline / Verlauf */
.tl-day {
  margin-bottom: 16px;
}
.tl-date {
  font-size: 12px; font-weight: 700; color: var(--accent);
  margin-bottom: 8px; letter-spacing: 0.3px;
}
.tl-card {
  background: var(--surface-2); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 5px;
}
.tl-card-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text);
}
.tl-card-header .tl-icon { font-size: 14px; }
.tl-card-header .tl-meta {
  margin-left: auto; font-weight: 400; color: var(--text-ter); font-size: 11px;
}
.tl-card-body {
  margin-top: 6px; font-size: 11px; color: var(--text-sec); line-height: 1.5;
}
.tl-topic {
  display: inline-block; padding: 2px 6px; margin: 1px;
  background: rgba(139,131,255,0.1); border-radius: 4px;
  font-size: 10px; color: var(--accent);
}
.tl-cli {
  font-family: monospace; font-size: 10px; color: var(--text-ter);
  padding: 4px 0; border-top: 0.5px solid rgba(255,255,255,0.04); margin-top: 4px;
}

.chat-archive-list { overflow-y: auto; }

.archive-entry {
  padding: 12px 14px; margin-bottom: 8px; border-radius: 12px;
  background: var(--surface-2); cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.archive-entry:hover { background: var(--border); }
.archive-entry.expanded {
  border-color: var(--border);
}

.archive-entry-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.archive-entry-date { font-size: 13px; font-weight: 500; color: var(--text-sec); }
.archive-entry-type {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.archive-entry-type.voice { background: rgba(52, 199, 89, 0.15); color: var(--green); }
.archive-entry-type.chat { background: rgba(108, 99, 255, 0.15); color: var(--accent); }
.archive-entry-type.telegram { background: rgba(0, 136, 204, 0.15); color: #0088cc; }

.archive-entry-topics {
  font-size: 13px; color: var(--text);
  line-height: 1.4;
}

.archive-entry-preview {
  font-size: 12px; color: var(--text-sec); margin-top: 8px;
  line-height: 1.5; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid var(--border); padding-top: 0;
}
.archive-entry.expanded .archive-entry-preview {
  max-height: 400px; padding-top: 8px;
}

.archive-preview-line {
  padding: 3px 0;
}
.archive-preview-line.user { color: var(--accent); }
.archive-preview-line.assistant { color: var(--text-sec); }

/* ── Usage Tab ───────────────────────────────────────── */

.usage-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.usage-card {
  background: var(--surface-2); border-radius: 10px;
  padding: 12px 8px; text-align: center;
}
.usage-card-value {
  font-size: 20px; font-weight: 700; color: var(--accent);
}
.usage-card-label {
  font-size: 11px; color: var(--text-ter); margin-top: 4px;
}
.usage-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 0.5px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.usage-service { flex: 1; color: var(--text-sec); }
.usage-model { color: var(--text-ter); font-size: 11px; }
.usage-calls { color: var(--text); font-weight: 600; }
.usage-date-header {
  font-size: 12px; font-weight: 600; color: var(--accent);
  margin-top: 12px; margin-bottom: 4px;
}

body.embed #top-bar, body.embed #transcript-panel { display: none; }

@media (max-width: 480px) {
  #bot-avatar { width: 80px; height: 80px; }
  #bot-name { font-size: 18px; }
  #call-duration { font-size: 32px; }
  .call-button { width: 86px; height: 86px; }
  .ctrl-button { width: 44px; height: 44px; }
  .auth-card { margin: auto 16px; }
}

/* ── Image Viewer Modal ─────────────────────────────────── */
.img-viewer {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px;
}
.img-viewer.hidden { display: none !important; }
.img-viewer-close {
  position: absolute; top: 12px; right: 16px;
  background: rgba(255,255,255,0.15); border: none;
  color: white; font-size: 28px; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.img-viewer-close:hover { background: rgba(255,255,255,0.3); }
.img-viewer img {
  max-width: 95vw; max-height: 80vh;
  object-fit: contain; border-radius: 8px;
}
.img-viewer-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 8px 16px;
  background: rgba(255,255,255,0.1); border-radius: 10px;
  color: white; font-size: 13px;
}
.img-viewer-bar span { opacity: 0.7; flex: 1; }
.img-viewer-dl-btn {
  color: white; text-decoration: none;
  padding: 6px 14px; border-radius: 8px;
  background: var(--accent, #6366f1); font-weight: 600; font-size: 13px;
  white-space: nowrap;
}

/* ── Voice Activity Feed ─────────────────────────────────── */
.voice-activity-feed {
  width: 100%; max-width: 320px;
  margin-top: 16px; display: flex; flex-direction: column; gap: 6px;
}
.voice-activity-feed:empty { display: none; }
.vaf-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); font-size: 12px;
  color: var(--text-sec); animation: msg-in 0.2s ease-out;
}
.vaf-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  animation: ch-pulse 1.5s ease-in-out infinite;
}
.vaf-dot.running { background: var(--accent, #6366f1); }
.vaf-dot.done { background: var(--green, #22c55e); animation: none; }
.vaf-dot.error { background: var(--red, #ef4444); animation: none; }
.vaf-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vaf-time { font-size: 10px; color: var(--text-ter); flex-shrink: 0; }

/* Bot Profiles */
/* Bot Profile Tabs */
.bp-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.bp-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-sec); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.bp-tab:hover { background: var(--surface-2); }
.bp-tab.active {
  background: var(--surface-2); border-color: var(--accent);
  color: var(--text);
}
.bp-tab .bp-tab-emoji { font-size: 16px; }
.bp-content { padding: 4px 0; }
.bp-emoji { font-size: 22px; }
.bp-name { font-size: 15px; font-weight: 600; color: var(--text); }
.bp-voice-row { display: flex; align-items: center; gap: 6px; }
.bp-voice-row select { flex: 1; }
.bp-preview-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.bp-preview-btn:hover { border-color: var(--accent); color: var(--accent); }
.bp-preview-btn.playing { background: var(--accent); color: white; border-color: var(--accent); }

/* Browser Extension Settings + Takeover Banner */
.ext-takeover-banner {
  background: linear-gradient(90deg, rgba(221,40,24,0.2), rgba(221,40,24,0.08));
  border-bottom: 2px solid #dd2818;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ext-takeover-banner.hidden { display: none; }
.ext-takeover-off-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
}
.ext-takeover-off-btn:hover { background: rgba(255, 255, 255, 0.3); }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 14px;
  font-size: 12px;
}
.chip .chip-x {
  cursor: pointer;
  color: var(--text-sec);
  font-weight: bold;
  user-select: none;
}
.chip .chip-x:hover { color: var(--red); }
