* {
  box-sizing: border-box;
  font-family: inherit;
}

/* Screen-reader only: no raw labels visible in production */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Theme: single source of truth (spec section 3) */
:root {
  --focus-primary: #00b4ff;
  --focus-secondary: #00ecbc;
  --focus-accent: #00c8ff;
  --focus-bg-start: #0a192f;
  --focus-bg-end: #02060a;
  --focus-text: #e6fbff;
  --focus-text-soft: #94a3b8;
  --focus-space-xs: 4px;
  --focus-space-sm: 8px;
  --focus-space-md: 16px;
  --focus-space-lg: 24px;
  --focus-space-xl: 32px;
  --focus-font-size-base: 1rem;
  --focus-line-height: 1.5;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;
  background: radial-gradient(circle at top, var(--focus-bg-start), var(--focus-bg-end));
  color: var(--focus-text);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
.header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e; /* green = idle/ready; blue = thinking/generating */
  opacity: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
}

/* Engine state classes — always override theme accent color; no blink */
.dot.dot-loading {
  background: #f59e0b !important;
}

.dot.dot-ready {
  background: #22c55e !important;
}

/* Red state removed: dot is green (idle) or blue (active) only. */

.dot.dot-cloud {
  background: #0ff !important;
}

.dot.thinking,
.dot.dot-generating {
  background: #0284c7 !important; /* strong blue when AI is talking/generating */
}

/* Online/Offline label — matches provider health */
.ai0-online-label {
  font-size: 11px;
  font-weight: 500;
  margin-left: 2px;
  transition: color 0.2s ease;
}
.ai0-online-label.ai0-online {
  color: var(--focus-secondary, #22c55e);
}
.ai0-online-label.ai0-offline {
  color: #ef4444;
}
body[data-theme="white"] .ai0-online-label.ai0-online {
  color: #059669;
}
body[data-theme="white"] .ai0-online-label.ai0-offline {
  color: #dc2626;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--focus-text-soft);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
}

.icon-btn:hover {
  color: var(--focus-accent);
}

.icon-btn.active{
  color: var(--focus-accent);
  outline: 2px solid rgba(0, 200, 255, 0.35);
  outline-offset: 2px;
  border-radius: 10px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* Core: PLAN in the middle only; when chat has content, hide so chat takes full space */
.core-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 0;
}
.main:has(#chat:not(:empty)) .core-wrap {
  display: none;
}
.main:has(#chat:not(:empty)) .chat {
  flex: 1;
  display: flex;
}

.core {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 2px;
  background: rgba(0, 180, 255, 0.06);
  box-shadow:
    0 0 50px rgba(0, 180, 255, 0.45),
    0 0 80px rgba(0, 180, 255, 0.2),
    inset 0 0 30px rgba(0, 180, 255, 0.2);
  transition: box-shadow 0.4s ease;
}

.core.active {
  box-shadow:
    0 0 60px rgba(0, 220, 255, 0.8),
    inset 0 0 30px rgba(0, 220, 255, 0.4);
}

/* Chat — full main area when messages exist; scrollable column */
.chat {
  flex: 1;
  min-height: 0;
  max-width: min(1200px, 96vw);
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.chat:empty {
  display: none;
}

.msg {
  width: fit-content;
  max-width: min(90ch, 94%);
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.msg.user {
  max-width: min(70ch, 85%);
  background: linear-gradient(135deg, var(--focus-primary), var(--focus-secondary));
  color: #001018;
  margin-left: auto;
  align-self: flex-end;
}

.msg.ai {
  max-width: min(90ch, 94%);
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  color: var(--focus-text);
  border: 1px solid rgba(255,255,255,0.12);
}

.msg.is-streaming {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Subtitle below PLAN — "Tell me what you're building. I'll keep it simple." */
.stage-subtitle {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--focus-text-soft);
  margin-top: 8px;
  padding: 0 16px;
}
body[data-theme="white"] .stage-subtitle {
  color: #64748b;
}

/* Input modes: Quick / Deep / Write + Private (Section 8) */
.input-modes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,180,255,0.1);
  flex-wrap: wrap;
}

.quick-deep-toggle {
  display: flex;
  border-radius: 8px;
  border: 1px solid rgba(0,180,255,0.25);
  overflow: hidden;
}

.quick-deep-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--focus-text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.quick-deep-btn:hover {
  color: var(--focus-text);
  background: rgba(0,180,255,0.08);
}

.quick-deep-btn.active {
  background: var(--focus-primary);
  color: #001018;
}

.private-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--focus-text-soft);
  cursor: pointer;
}

.private-mode-toggle input {
  margin: 0;
}

/* Try this buttons (Section 8) */
.try-this-label {
  display: none; /* no "Suggested" label */
  font-size: 0.75rem;
  color: var(--focus-text-soft);
  opacity: 0.85;
  padding: 4px 16px 0;
  text-align: center;
}

.try-this-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 6px 16px 12px;
}

.try-this-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,180,255,0.4);
  background: rgba(0,180,255,0.08);
  color: var(--focus-text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.try-this-btn:hover {
  border-color: var(--focus-primary);
  background: rgba(0,180,255,0.12);
}

/* White theme overrides for input-modes and try-this */
html[data-theme="white"] .quick-deep-btn.active {
  color: #0b1220;
}

html[data-theme="white"] .try-this-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
}

html[data-theme="white"] .try-this-btn:hover {
  border-color: #0ea5e9;
  background: #f8fafc;
  color: #0f172a;
}

html[data-theme="white"] .private-mode-toggle {
  color: #475569;
}

/* Input — compact panel to match reference UI */
.input-bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 8px 16px 8px 0;
  padding-left: 0;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.input-bar input {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--focus-primary);
  border-radius: 10px;
  color: var(--focus-text);
  padding: 0 12px;
  font-size: 16px;
  overflow-x: auto;
  overflow-y: hidden;
}

.input-bar input:focus {
  outline: none;
  border-color: var(--focus-accent);
}

.input-bar input::placeholder {
  color: var(--focus-text-soft);
  opacity: 0.6;
}

.input-bar button {
  width: 56px;
  border-radius: 10px;
  border: none;
  background: var(--focus-primary);
  color: #001018;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.input-bar button:hover {
  background: var(--focus-accent);
}

.input-bar button:active {
  background: var(--focus-secondary);
}

.input-bar button,
.input-bar #sendBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.focus-stop-btn {
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 600;
  min-width: 64px;
}

.focus-stop-btn:hover {
  background: #b91c1c !important;
}

/* History */
.history {
  position: fixed;
  right: 0;
  top: 0;
  width: 240px;
  height: 100%;
  background: var(--focus-bg-end);
  padding: 16px;
  border-left: 1px solid var(--focus-primary);
  z-index: 100;
}

.history h3 {
  margin: 0 0 16px 0;
  color: var(--focus-text-soft);
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-panel {
  background: none;
  border: none;
  color: var(--focus-text-soft);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.close-panel:hover {
  color: var(--focus-accent);
  background: rgba(255,255,255,0.1);
}

.history button {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--focus-primary);
  color: var(--focus-text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
}

.history button:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--focus-accent);
}

.history #newChatBtn {
  background: linear-gradient(135deg, var(--focus-primary), var(--focus-secondary));
  color: #001018;
  font-weight: 600;
  border: none;
}

.history #newChatBtn:hover {
  opacity: 0.9;
}

/* Chat item hover effect */
.chat-item:hover {
  background: rgba(0, 180, 255, 0.15) !important;
  border-color: var(--focus-accent) !important;
}

.delete-chat-btn:hover {
  background: rgba(255,77,77,1) !important;
}

/* Message actions (copy, regenerate) */
.msg {
  position: relative;
}

.msg-content {
  flex: 1;
  min-height: 2em;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.msg:hover .msg-actions {
  opacity: 1;
}

.msg-action-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--focus-text-soft);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg-action-btn:hover {
  background: rgba(255,255,255,0.2);
  color: var(--focus-accent);
  border-color: var(--focus-accent);
}

.msg-action-btn svg {
  display: block;
}

/* Markdown styling in messages */
.msg-content pre {
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.msg-content code {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.msg-content pre code {
  background: none;
  padding: 0;
}

/* Code block box: copy button + colored syntax */
.msg-code-block {
  position: relative;
  margin: 10px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,180,255,0.25);
  background: rgba(0,0,0,0.35);
}
.msg-code-copy {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--focus-accent);
  background: var(--focus-primary);
  color: #001018;
  cursor: pointer;
  z-index: 2;
}
.msg-code-copy:hover {
  background: var(--focus-accent);
}
.msg-code-block pre {
  margin: 0;
  padding: 36px 12px 12px 12px;
  max-height: 40vh;
  overflow: auto;
}

.msg-content p {
  margin: 8px 0;
}

.msg-content ul, .msg-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.msg-content blockquote {
  border-left: 3px solid var(--focus-accent);
  padding-left: 12px;
  margin: 8px 0;
  opacity: 0.8;
}

.msg-content h1, .msg-content h2, .msg-content h3 {
  margin: 12px 0 8px 0;
  color: var(--focus-accent);
}

.msg-content a {
  color: var(--focus-accent);
  text-decoration: underline;
}

.msg-content table {
  border-collapse: collapse;
  margin: 8px 0;
  width: 100%;
}

.msg-content th, .msg-content td {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 12px;
  text-align: left;
}

.msg-content th {
  background: rgba(0,0,0,0.3);
  font-weight: 600;
}

/* Search input focus */
#searchChats:focus {
  outline: none;
  border-color: var(--focus-accent);
}

.hidden {
  display: none;
}

/* Settings backdrop */
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  transition: opacity 0.15s ease;
}

/* Settings Panel */
.settings {
  position: fixed;
  right: 0;
  top: 0;
  width: min(340px, 90vw);
  height: 100%;
  background: var(--focus-bg-end);
  padding: 16px;
  padding-bottom: 32px;
  border-left: 1px solid var(--focus-primary);
  box-shadow: -20px 0 40px rgba(0,0,0,0.6);
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 600px) {
  .settings { width: 100%; border-left: none; }
}

/* Settings section headers */
.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--focus-text-soft);
  margin: 20px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.settings-section-title:first-of-type { margin-top: 0; }

/* Settings links (Docs & Tools section) */
.settings-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--focus-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.settings-link:hover {
  background: rgba(0,0,0,0.4);
  border-color: var(--focus-primary);
}

/* Auth section extracted classes */
.auth-input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: var(--focus-text);
  font-size: 13px;
}
.auth-input:focus {
  outline: none;
  border-color: var(--focus-accent);
}
.auth-btn {
  width: 100%;
  margin-bottom: 8px;
}
.auth-divider {
  text-align: center;
  margin: 12px 0;
  color: var(--focus-text-soft);
  font-size: 13px;
}

.settings h3 {
  margin: 0 0 20px 0;
  color: var(--focus-text-soft);
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting {
  margin-bottom: 20px;
  font-size: 14px;
}

.setting label {
  display: block;
  margin-bottom: 8px;
  color: var(--focus-text-soft);
  font-weight: 500;
}

.setting label input[type="checkbox"] {
  margin-right: 8px;
  margin-left: 0;
}

.settings select {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--focus-primary);
  border-radius: 6px;
  color: var(--focus-text);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  appearance: auto; /* Ensure native dropdown appears */
  -webkit-appearance: menulist; /* For WebKit browsers */
  -moz-appearance: menulist; /* For Firefox */
  z-index: 1000; /* Ensure dropdown appears above other elements */
  position: relative;
}

.settings select:focus {
  outline: none;
  border-color: var(--focus-accent);
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.2);
}

/* Ensure dropdown options are visible */
.settings select option {
  background: rgba(10, 26, 36, 0.95);
  color: var(--focus-text);
  padding: 8px;
}

.settings select optgroup {
  background: rgba(0, 180, 255, 0.1);
  color: var(--focus-accent);
  font-weight: 600;
  padding: 4px 8px;
}

.settings select optgroup option {
  background: rgba(0,0,0,0.6);
  color: var(--focus-text);
  padding-left: 20px;
}

/* Personality & Pace (adorable rates) */
.personality-vibe {
  font-size: 13px;
  color: var(--focus-text-soft, rgba(255,255,255,0.75));
  margin: 0 0 12px 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,180,255,0.2);
}
.personality-slider-wrap {
  margin-bottom: 14px;
}
.personality-slider-wrap label {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.personality-hint {
  display: block;
  font-size: 11px;
  color: var(--focus-text-soft, rgba(255,255,255,0.6));
  margin-bottom: 4px;
}
.personality-select {
  width: 100%;
  margin-top: 2px;
}
.personality-range-labels {
  font-size: 11px;
  color: var(--focus-text-soft, rgba(255,255,255,0.5));
  margin-top: 2px;
  display: block;
}

.danger {
  margin-top: 32px;
  margin-bottom: 16px;
  background: #ff4d4d;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.danger:hover {
  background: #ff6666;
}

/* Focus Mode Theme Customizer */
.focus-theme-customizer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.focus-color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.focus-color-picker label {
  min-width: 60px;
  font-size: 12px;
  margin: 0;
}

.focus-color-picker input[type="color"] {
  width: 50px;
  height: 32px;
  border: 2px solid var(--focus-primary);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 2px;
}

.focus-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.focus-color-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.focus-apply-btn,
.focus-reset-btn {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-top: 4px;
}

.focus-apply-btn {
  background: linear-gradient(135deg, var(--focus-primary), var(--focus-secondary));
  color: #001018;
}

.focus-apply-btn:hover {
  opacity: 0.9;
}

.focus-reset-btn {
  background: rgba(255,255,255,0.1);
  color: var(--focus-text);
  border: 1px solid var(--focus-primary);
}

.focus-reset-btn:hover {
  background: rgba(255,255,255,0.15);
}

.focus-theme-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.focus-theme-actions .focus-apply-btn,
.focus-theme-actions .focus-reset-btn {
  flex: 1;
}

/* ── Settings section titles ── */
.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--focus-text-soft);
  padding-bottom: 6px;
  margin-top: 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.settings-section-title:first-of-type {
  margin-top: 0;
}

/* ── Settings links (Docs & Tools) ── */
.settings-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--focus-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
.settings-link:hover {
  background: rgba(255,255,255,0.1);
}

/* ── Auth section classes (replace inline styles) ── */
.auth-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--focus-primary), var(--focus-secondary));
  color: #001018;
  transition: opacity 0.15s;
}
.auth-btn:hover { opacity: 0.9; }
.auth-btn--secondary {
  background: rgba(255,255,255,0.1);
  color: var(--focus-text);
  border: 1px solid rgba(255,255,255,0.15);
}
.auth-btn--secondary:hover { background: rgba(255,255,255,0.15); }
.auth-btn--gmail {
  background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
  color: #fff;
}
.auth-btn--apple {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  color: #fff;
  border: 1px solid #666;
}
.auth-divider {
  text-align: center;
  margin: 12px 0;
  color: var(--focus-text-soft);
  font-size: 12px;
}
.auth-input {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.4);
  color: var(--focus-text);
  font-size: 13px;
}
.auth-input:focus {
  outline: none;
  border-color: var(--focus-accent);
}
.auth-message {
  margin-top: 8px;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
}
.auth-user-card {
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  margin-bottom: 10px;
}
.auth-user-label { font-weight: bold; margin-bottom: 4px; color: var(--focus-text-soft); font-size: 12px; }
.auth-user-email { color: var(--focus-accent); font-size: 13px; }
.auth-user-name { color: var(--focus-text-soft); font-size: 12px; margin-top: 4px; }

/* ── Danger zone ── */
.settings-danger-zone {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,77,77,0.2);
}

/* ── Confirm modal ── */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
}
.confirm-modal.hidden {
  display: none;
}
.confirm-modal-box {
  background: var(--focus-bg-end, #0a0a0a);
  border: 1px solid var(--focus-primary, #00b4ff);
  border-radius: 10px;
  padding: 28px 24px 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.confirm-modal-text {
  color: var(--focus-text, #ffffff);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
  min-height: 1.6em;
  word-break: break-word;
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
}
.confirm-modal-cancel {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--focus-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.confirm-modal-cancel:hover { background: rgba(255,255,255,0.15); }
.confirm-modal-ok {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #ff4d4d;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.confirm-modal-ok:hover { background: #ff6666; }

/* ── Toast ── */
.ai0-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--focus-primary);
  color: #001018;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 400;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.ai0-toast.show {
  opacity: 1;
}

/* ── Mobile: full-width panel ── */
@media (max-width: 600px) {
  .settings {
    width: 100vw;
    border-left: none;
  }
}

/* Mic and speaker — match reference panel */
.input-bar #micBtn svg {
  width: 18px;
  height: 18px;
}

.input-bar #micBtn {
  color: var(--focus-accent);
}

.input-bar #micBtn.active {
  outline: 2px solid var(--focus-accent);
  outline-offset: 2px;
}

.input-bar #speakBtn svg {
  width: 18px;
  height: 18px;
}

.input-bar #speakBtn {
  color: var(--focus-accent);
}

.input-bar #speakBtn.active {
  outline: 2px solid var(--focus-accent);
  outline-offset: 2px;
}

/* Use Last Image button */
.input-bar #useLastImageBtn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(0, 180, 255, 0.1);
  color: var(--focus-accent);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-bar #useLastImageBtn:hover {
  background: rgba(0, 180, 255, 0.2);
  transform: scale(1.05);
}

.input-bar #useLastImageBtn:active {
  transform: scale(0.95);
}

/* =========================
   Pure White Theme (data-theme="white")
   ========================= */

[data-theme="white"] {
  /* Backgrounds */
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #ffffff;

  /* Text */
  --text: #0b1220;
  --text-2: #1f2a3a;
  --muted: #526074;

  /* Borders */
  --border: rgba(11, 18, 32, 0.10);
  --border-2: rgba(11, 18, 32, 0.06);

  /* AI0 identity accent (blue ring) */
  --accent: #0ea5e9;
  --accent-2: #38bdf8;
  --accent-soft: rgba(14,165,233,0.10);

  /* Shadows (very light to keep "clean") */
  --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.08);

  /* Chat bubbles */
  --bubble-ai: #ffffff;
  --bubble-ai-border: rgba(11,18,32,0.10);

  --bubble-user: rgba(14,165,233,0.10);
  --bubble-user-border: rgba(14,165,233,0.22);

  /* Focus glow */
  --glow: 0 0 0 6px rgba(14,165,233,0.10);
}

/* App base */
[data-theme="white"] body,
[data-theme="white"] .app {
  background: var(--bg);
  color: var(--text);
}

/* Body background */
body[data-theme="white"] {
  background: #ffffff;
  color: var(--text);
}

/* Containers */
[data-theme="white"] .panel,
[data-theme="white"] .chat-shell,
body[data-theme="white"] .header,
body[data-theme="white"] .main,
body[data-theme="white"] .settings,
body[data-theme="white"] .history {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

/* Messages */
body[data-theme="white"] .msg.ai {
  background: var(--bubble-ai);
  border: 1px solid var(--bubble-ai-border);
  color: var(--text);
}

body[data-theme="white"] .msg.user {
  background: var(--bubble-user);
  border: 1px solid var(--bubble-user-border);
  color: var(--text);
}

/* Inputs */
body[data-theme="white"] input,
body[data-theme="white"] textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

body[data-theme="white"] input:focus,
body[data-theme="white"] textarea:focus {
  border-color: rgba(14,165,233,0.55);
  box-shadow: var(--glow);
}

/* Buttons */
body[data-theme="white"] .btn,
body[data-theme="white"] .icon-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

body[data-theme="white"] .btn.primary,
body[data-theme="white"] #sendBtn {
  background: linear-gradient(135deg, rgba(14,165,233,0.98), rgba(56,189,248,0.98));
  border: 1px solid rgba(14,165,233,0.30);
  color: #fff;
}

/* Big ring (keeps AI0 identity) */
body[data-theme="white"] .core {
  background: radial-gradient(circle at 50% 50%,
    rgba(14,165,233,0.18),
    rgba(14,165,233,0.05) 55%,
    transparent 72%);
  border: 1px solid rgba(14,165,233,0.28);
  box-shadow:
    0 0 0 10px rgba(14,165,233,0.06),
    0 18px 50px rgba(2, 6, 23, 0.08);
  color: var(--text);
}

/* Header adjustments */
body[data-theme="white"] .header {
  border-bottom: 1px solid var(--border);
}

body[data-theme="white"] .dot {
  background: var(--accent);
}
body[data-theme="white"] .dot.dot-ready {
  background: #22c55e;
}
/* Blue dot when AI is generating — must override white theme .dot */
body[data-theme="white"] .dot.thinking,
body[data-theme="white"] .dot.dot-generating {
  background: #0284c7 !important;
}

body[data-theme="white"] .input-modes {
  border-top-color: #e2e8f0;
  background: #ffffff;
}

body[data-theme="white"] .quick-deep-toggle {
  border-color: #e2e8f0;
  background: #fff;
}

body[data-theme="white"] .quick-deep-btn {
  color: #475569;
}
body[data-theme="white"] .quick-deep-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Settings panel */
body[data-theme="white"] .settings {
  border-left: 1px solid var(--border);
}

body[data-theme="white"] .settings select {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

body[data-theme="white"] .settings select option {
  background: #ffffff;
  color: var(--text);
}
body[data-theme="white"] .settings-backdrop {
  background: rgba(0, 0, 0, 0.2);
}
body[data-theme="white"] .settings-section-title {
  color: var(--muted);
  border-bottom-color: var(--border);
}
body[data-theme="white"] .settings-link {
  background: rgba(0,0,0,0.03);
  border-color: var(--border);
  color: var(--accent);
}
body[data-theme="white"] .settings-link:hover {
  background: rgba(0,0,0,0.06);
}
body[data-theme="white"] .auth-input {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}
body[data-theme="white"] .ai0-confirm-box,
body[data-theme="white"] .confirm-modal-box {
  background: #ffffff;
  border-color: var(--border);
}
body[data-theme="white"] .ai0-confirm-msg,
body[data-theme="white"] .confirm-modal-text { color: var(--text); }
body[data-theme="white"] .ai0-confirm-cancel,
body[data-theme="white"] .confirm-modal-cancel {
  border-color: var(--border);
  color: var(--muted);
}
body[data-theme="white"] .ai0-toast {
  background: var(--accent);
  color: #ffffff;
}

/* History panel */
body[data-theme="white"] .history {
  border-left: 1px solid var(--border);
}

body[data-theme="white"] .history button {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

body[data-theme="white"] .history button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Input bar — white theme, compact like reference */
body[data-theme="white"] .input-bar {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

body[data-theme="white"] .input-bar input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body[data-theme="white"] .input-bar input:focus {
  border-color: #0ea5e9;
  background: #ffffff;
}

body[data-theme="white"] .input-bar input::placeholder {
  color: #64748b;
}

body[data-theme="white"] .input-bar button {
  background: #0ea5e9;
  color: #fff;
}

body[data-theme="white"] .input-bar button:hover {
  background: #0284c7;
}

/* Message actions */
body[data-theme="white"] .msg-action-btn {
  background: rgba(11, 18, 32, 0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
}

body[data-theme="white"] .msg-action-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Code blocks */
body[data-theme="white"] .msg-content pre {
  background: rgba(11, 18, 32, 0.05);
  border: 1px solid var(--border);
}
body[data-theme="white"] .msg-code-block {
  border-color: #e2e8f0;
  background: #f8fafc;
}
body[data-theme="white"] .msg-code-copy {
  background: #0ea5e9;
  color: #fff;
  border-color: #0284c7;
}

body[data-theme="white"] .msg-content code {
  background: rgba(11, 18, 32, 0.05);
  border: 1px solid var(--border);
}

/* Links */
body[data-theme="white"] .msg-content a {
  color: var(--accent);
}

/* Tables */
body[data-theme="white"] .msg-content th,
body[data-theme="white"] .msg-content td {
  border: 1px solid var(--border);
}

body[data-theme="white"] .msg-content th {
  background: rgba(11, 18, 32, 0.05);
}

/* 🎤 GPT-style Microphone Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

#micBtn.active {
  animation: pulse 1.5s ease-in-out infinite !important;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.6) !important;
}

#listeningIndicator {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ── Voice Talk Mode Button States ── */
#voiceTalkBtn {
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#voiceTalkBtn.voice-listening {
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
}

#voiceTalkBtn.voice-thinking {
  animation: pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

#voiceTalkBtn.voice-speaking {
  animation: pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
}

/* ── AI0 Thinking indicator — two-line bubble ── */
.ai0-thinking {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ai0-think-primary {
  font-weight: 600;
  font-size: 14px;
  color: var(--focus-text, rgba(255,255,255,0.9));
  animation: thinkFade 2s ease-in-out infinite;
}
.ai0-think-hint {
  display: block;
  font-size: 12px;
  opacity: 0.65;
  margin-top: 6px;
  font-style: italic;
  color: var(--focus-text, rgba(255,255,255,0.7));
  animation: thinkFade 1.8s ease-in-out infinite;
}
@keyframes thinkFade {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

body[data-theme="white"] .ai0-think-primary {
  color: var(--text, #1a1a1a);
}
body[data-theme="white"] .ai0-think-hint {
  color: var(--text, #555);
}
.ai0-dots span {
  animation: ai0DotPulse 1.4s ease-in-out infinite;
  opacity: 0;
}
.ai0-dots span:nth-child(1) { animation-delay: 0s; }
.ai0-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai0-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai0DotPulse {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* Inline thinking indicator — pulsing ellipsis appended to partial text during mid-stream stall */
.ai0-inline-thinking {
  display: inline;
  animation: inlineThinkPulse 1.2s ease-in-out infinite;
  color: var(--focus-primary, #00e5ff);
  margin-left: 2px;
  font-weight: 600;
  letter-spacing: 2px;
}
@keyframes inlineThinkPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* Soft clarifier (tiny check) and refusal — friendly, not scary */
.ai0-clarifier {
  font-size: 13px;
  color: var(--focus-text-soft, rgba(255,255,255,0.85));
  margin-bottom: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,180,255,0.3);
}
.ai0-soft-refusal {
  font-size: 14px;
  color: var(--focus-text, #e0f4ff);
  line-height: 1.5;
  padding: 8px 0;
}

/* Core circle stays with original design — no thinking override */

/* ── Toast ── */
.ai0-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--focus-primary, #00b4ff);
  color: #001018;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 400;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.ai0-toast.hidden { opacity: 0; pointer-events: none; }

/* ── Confirm modal ── */
.ai0-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai0-confirm-overlay.hidden {
  display: none;
}
.ai0-confirm-box {
  background: var(--focus-bg-end, #0a0a0a);
  border: 1px solid var(--focus-primary, #00b4ff);
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ai0-confirm-msg {
  color: var(--focus-text, #e6fbff);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px 0;
}
.ai0-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.ai0-confirm-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--focus-text-soft, #94a3b8);
  cursor: pointer;
  font-size: 13px;
}
.ai0-confirm-cancel:hover { background: rgba(255,255,255,0.05); }
.ai0-confirm-cancel:focus { outline: 2px solid var(--focus-accent); outline-offset: 2px; }
.ai0-confirm-ok { font-size: 13px; padding: 8px 16px; }

/* ── Trust Panel (Deep mode, collapsible) ────────────────────────── */
.ai0-trust-panel {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--focus-border, #334155);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  color: var(--focus-text-soft, #94a3b8);
  line-height: 1.5;
}
.ai0-trust-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  color: var(--focus-text, #e6fbff);
  user-select: none;
}
.ai0-trust-panel summary:hover { color: var(--focus-primary, #00b4ff); }
.ai0-trust-panel[open] summary { margin-bottom: 6px; }
.ai0-trust-panel div { margin-bottom: 4px; }
.ai0-trust-panel ul, .ai0-trust-panel ol {
  margin: 2px 0 4px 16px;
  padding: 0;
}
.ai0-trust-panel li { margin-bottom: 2px; }
.ai0-trust-panel strong { color: var(--focus-text, #e6fbff); }
.ai0-trust-panel em { color: var(--focus-accent, #00c8ff); font-style: normal; }
[data-theme="white"] .ai0-trust-panel {
  background: rgba(0, 0, 0, 0.03);
  border-color: #e2e8f0;
}
[data-theme="white"] .ai0-trust-panel summary { color: #1e293b; }
[data-theme="white"] .ai0-trust-panel strong { color: #1e293b; }
[data-theme="white"] .ai0-trust-panel em { color: #0369a1; }
.ai0-trust-band {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 180, 255, 0.15);
  color: var(--focus-primary, #00b4ff);
}
.ai0-trust-factors { margin-bottom: 4px; }
.ai0-trust-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  margin: 1px 3px 1px 0;
  border-radius: 3px;
  background: rgba(0, 200, 255, 0.1);
  color: var(--focus-accent, #00c8ff);
}
.ai0-trust-verify {
  margin-top: 4px;
  padding: 4px 8px;
  border-left: 2px solid var(--focus-warning, #f59e0b);
  font-size: 11px;
  color: var(--focus-warning, #f59e0b);
}
[data-theme="white"] .ai0-trust-band { background: rgba(3, 105, 161, 0.1); color: #0369a1; }
[data-theme="white"] .ai0-trust-tag { background: rgba(3, 105, 161, 0.08); color: #0369a1; }
[data-theme="white"] .ai0-trust-verify { border-color: #d97706; color: #92400e; }
/* ── Trust Session Panel v3 additions ─────────────────────────── */
.ai0-trust-v3 .ai0-trust-conf { margin-bottom: 6px; }
.ai0-trust-decid {
  font-size: 10px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(0, 180, 255, 0.12);
  color: var(--focus-primary, #00b4ff);
  font-family: monospace;
}
.ai0-trust-link {
  font-size: 10px;
  color: var(--focus-text-soft, #94a3b8);
  font-style: italic;
}
.ai0-trust-flag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  margin: 1px 2px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--focus-warning, #f59e0b);
}
.ai0-trust-session-stats {
  font-size: 11px;
  margin-top: 4px;
  color: var(--focus-text-soft, #94a3b8);
}
.ai0-trust-decisions ol { margin-left: 16px; padding: 0; }
.ai0-trust-evidence ul { margin-left: 16px; padding: 0; }
.ai0-trust-integrity { margin-top: 4px; }
[data-theme="white"] .ai0-trust-decid { background: rgba(3, 105, 161, 0.08); color: #0369a1; }
[data-theme="white"] .ai0-trust-flag { background: rgba(217, 119, 6, 0.1); color: #92400e; }
[data-theme="white"] .ai0-trust-link { color: #64748b; }
/* ── Trust Session Panel v4 additions ─────────────────────────── */
.ai0-trust-why {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.ai0-trust-why em {
  color: var(--focus-text-soft, #94a3b8);
  font-style: italic;
}
.ai0-trust-top-factor {
  background: rgba(34, 197, 94, 0.12);
  color: var(--focus-success, #22c55e);
  font-weight: 600;
}
.ai0-trust-severity {
  margin-bottom: 4px;
}
.ai0-trust-sev-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.ai0-trust-sev-mid {
  background: rgba(245, 158, 11, 0.18);
  color: var(--focus-warning, #f59e0b);
}
.ai0-trust-sev-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--focus-error, #ef4444);
}
.ai0-trust-snippet {
  color: var(--focus-text, #e6fbff);
  font-size: 11px;
}
.ai0-trust-decid-small {
  font-size: 9px;
  padding: 0 3px;
  border-radius: 2px;
  background: rgba(0, 180, 255, 0.08);
  color: var(--focus-primary, #00b4ff);
  font-family: monospace;
}
[data-theme="white"] .ai0-trust-why em { color: #64748b; }
[data-theme="white"] .ai0-trust-top-factor { background: rgba(22, 163, 74, 0.08); color: #15803d; }
[data-theme="white"] .ai0-trust-sev-mid { background: rgba(217, 119, 6, 0.1); color: #92400e; }
[data-theme="white"] .ai0-trust-sev-high { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
[data-theme="white"] .ai0-trust-snippet { color: #1e293b; }
[data-theme="white"] .ai0-trust-decid-small { background: rgba(3, 105, 161, 0.06); color: #0369a1; }
/* ── Command Palette (Ctrl+K) ──────────────────────────────── */
.ai0-cmd-palette {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
}
.ai0-cmd-palette-visible { display: flex; }
.ai0-cmd-palette-inner {
  background: var(--focus-bg-alt, #1a2332);
  border: 1px solid var(--focus-primary, #00b4ff);
  border-radius: 10px;
  padding: 16px 20px;
  min-width: 320px;
  max-width: 480px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.ai0-cmd-palette-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--focus-text-soft, #94a3b8);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai0-cmd-palette-result {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 14px;
  color: var(--focus-text, #e0e7ff);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  word-break: break-all;
  min-height: 20px;
}
.ai0-cmd-palette-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.ai0-cmd-copy-btn, .ai0-cmd-close-btn {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.ai0-cmd-copy-btn {
  background: var(--focus-primary, #00b4ff);
  color: #fff;
}
.ai0-cmd-copy-btn:hover { opacity: 0.85; }
.ai0-cmd-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--focus-text-soft, #94a3b8);
}
.ai0-cmd-close-btn:hover { background: rgba(255, 255, 255, 0.18); }
.ai0-cmd-hint { font-size: 11px; color: var(--focus-text-soft, #94a3b8); font-weight: 400; }
.ai0-cmd-palette-list { max-height: 180px; overflow-y: auto; margin-bottom: 8px; }
.ai0-cmd-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; border-radius: 4px; cursor: pointer;
  transition: background 0.12s;
}
.ai0-cmd-item:hover { background: rgba(0, 180, 255, 0.12); }
.ai0-cmd-item-label { font-size: 12px; color: var(--focus-text, #e0e7ff); }
.ai0-cmd-item-cmd {
  font-size: 11px; color: var(--focus-text-soft, #94a3b8);
  font-family: 'SF Mono', 'Cascadia Code', monospace;
}
[data-theme="white"] .ai0-cmd-palette-inner { background: #fff; border-color: #0284c7; }
[data-theme="white"] .ai0-cmd-palette-result { background: #f1f5f9; color: #1e293b; }
[data-theme="white"] .ai0-cmd-close-btn { background: #e2e8f0; color: #475569; }
[data-theme="white"] .ai0-cmd-item:hover { background: rgba(3, 105, 161, 0.08); }
[data-theme="white"] .ai0-cmd-item-label { color: #1e293b; }
[data-theme="white"] .ai0-cmd-item-cmd { color: #64748b; }

/* ===== DEV TRACE ===== */
.devTrace{
  margin: 12px auto 18px;
  max-width: min(1200px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(233,255,246,.10);
  background: rgba(0,0,0,.22);
  overflow: hidden;
}
.devTraceHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(233,255,246,.10);
}
.devTraceTitle{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: rgba(233,255,246,.85);
}
.devTraceBody{
  margin:0;
  padding: 12px;
  max-height: 260px;
  overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(233,255,246,.75);
  white-space: pre-wrap;
}
