:root {
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F2;
  --border: #E7E7E4;
  --ink: #14161A;
  --muted: #6B7280;
  --accent: #5046E5;
  --accent-ink: #FFFFFF;
  --danger: #E5484D;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,22,26,0.04), 0 8px 24px rgba(20,22,26,0.06);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
button, a, select, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, .conversation-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- orb / signature element ---------- */
.orb {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #8b85ff, var(--accent) 70%);
  box-shadow: 0 0 0 0 rgba(80,70,229,0.35);
}
.orb.small { width: 22px; height: 22px; }
.orb.breathing { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(80,70,229,0.30); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(80,70,229,0); }
}
.orb.thinking { animation: breathe 1.1s ease-in-out infinite; }

/* ---------- generic screens ---------- */
.screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.boot-screen { background: var(--bg); }
.boot-text { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.5px; }

/* ---------- maintenance ---------- */
.maintenance-screen { background: var(--bg); padding: 24px; }
.maintenance-card {
  max-width: 380px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 28px; box-shadow: var(--shadow);
}
.mnt-icon { color: var(--danger); margin-bottom: 12px; }
.mnt-icon svg { width: 40px; height: 40px; }
.maintenance-card h1 { font-family: var(--font-display); font-size: 19px; margin: 0 0 8px; }
.maintenance-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* ---------- auth ---------- */
.auth-screen { background: var(--bg); padding: 20px; animation: fadeIn .35s ease; }
.auth-card {
  width: 100%; max-width: 360px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
#registerCaptcha { transform: scale(0.92); transform-origin: left top; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.auth-form input {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 14px; color: var(--ink); background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.auth-form input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-error {
  background: #FDECEC; border: 1px solid #F6C6C7; color: #A5121A;
  font-size: 13px; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

.google-btn-container { display: flex; justify-content: center; }
.google-btn-container > div { width: 100% !important; }

.code-input { text-align: center; font-size: 22px; letter-spacing: 8px; font-family: var(--font-mono); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 16px; font-size: 14px; font-weight: 600; transition: transform .12s, opacity .15s, background .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; border: none;
  background: transparent; color: var(--ink);
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- onboarding ---------- */
.onboarding-screen { background: var(--bg); padding: 20px; animation: fadeIn .35s ease; }
.onboard-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow);
  text-align: center;
}
.onboard-card h1 { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.onboard-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.onboard-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.onboard-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.onboard-form input[type="text"], .onboard-form input[type="date"] {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 14px; background: var(--surface-2);
}
.onboard-form input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.avatar-picker { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 6px; }
.avatar-preview {
  width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2);
  border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer; color: var(--muted);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-label { font-size: 13px; color: var(--accent); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.avatar-upload-label svg { width: 15px; height: 15px; }

/* ---------- dashboard layout ---------- */
.screen:not(.hidden) { animation: screenIn .28s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.dashboard-screen { position: fixed; inset: 0; flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 0; }
.sidebar {
  width: 260px; flex-shrink: 0; background: var(--surface-2);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 14px 10px; position: relative;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.sidebar-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 8px 10px 6px; }
.conversation-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.conversation-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--ink); cursor: pointer; border: none; background: transparent; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conversation-item:hover { background: var(--surface); }
.conversation-item.active { background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.sidebar-bottom { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-user-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px;
  border: none; background: transparent; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink);
}
.sidebar-user-btn:hover { background: var(--surface); }
.sidebar-user-btn svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); }
.sidebar-user-btn span:first-of-type { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--border); }
.user-menu {
  position: absolute; bottom: 58px; left: 10px; right: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; z-index: 20;
}
.user-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: none; background: transparent; border-radius: 8px; font-size: 13px; color: var(--ink); font-weight: 500;
}
.user-menu button:hover { background: var(--surface-2); }
.user-menu button.danger-item { color: var(--danger); }
.user-menu button.danger-item:hover { background: #FDECEC; }
.user-menu svg { width: 15px; height: 15px; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.chat-header h2 { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink); }
.mobile-only { display: none; }

/* ---------- messages ---------- */
.messages { flex: 1; overflow-y: auto; padding: 24px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.empty-state { margin: auto; text-align: center; color: var(--muted); max-width: 380px; padding: 0 20px; }
.empty-state h1 { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin: 14px 0 6px; }
.empty-state p { font-size: 14px; margin: 0; }
.empty-state .orb { margin: 0 auto; }

.msg-row { display: flex; padding: 10px 18px; animation: msgIn .28s ease; max-width: 860px; width: 100%; margin: 0 auto; gap: 12px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-row.user { justify-content: flex-end; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-avatar svg { width: 15px; height: 15px; color: var(--muted); }
.msg-bubble { padding: 11px 15px; border-radius: 16px; font-size: var(--msg-font-size, 14.5px); line-height: 1.6; max-width: 640px; }
.msg-row.user .msg-bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg-row.assistant .msg-bubble { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.msg-bubble p { margin: 0 0 8px; } .msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble pre { background: #0F1117; border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 8px 0; }
.msg-bubble pre code { color: #E6E6E6; font-family: var(--font-mono); font-size: 13px; }
.msg-bubble code { font-family: var(--font-mono); font-size: 13px; }
.msg-bubble :not(pre) > code { background: rgba(0,0,0,0.06); padding: 2px 5px; border-radius: 5px; }
.msg-row.user .msg-bubble :not(pre) > code { background: rgba(255,255,255,0.18); }

.code-block-wrap { position: relative; margin: 8px 0; }
.code-block-actions { position: absolute; top: 6px; right: 8px; display: flex; gap: 4px; }
.code-action-btn {
  display: flex; align-items: center; gap: 4px; font-size: 11px; color: #C9CDD6;
  background: rgba(255,255,255,0.08); border: none; border-radius: 6px; padding: 5px 8px; font-weight: 500;
}
.code-action-btn:hover { background: rgba(255,255,255,0.16); }
.code-action-btn svg { width: 12px; height: 12px; }

.attach-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.16); border-radius: 8px; padding: 5px 9px; font-size: 12px; margin-bottom: 6px; }
.msg-row.assistant .attach-chip { background: var(--border); }
.attach-chip svg { width: 13px; height: 13px; }

.typing-dots { display: flex; gap: 4px; padding: 4px 2px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typingBounce 1.1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- composer ---------- */
.composer { padding: 10px 18px 18px; max-width: 860px; width: 100%; margin: 0 auto; }
.attachment-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.attachment-chip { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 6px 9px; font-size: 12px; }
.attachment-chip img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
.attachment-chip button { border: none; background: transparent; color: var(--muted); display: flex; }
.attachment-chip svg { width: 13px; height: 13px; }

.composer-box {
  display: flex; align-items: flex-end; gap: 6px;
  background: var(--surface); padding: 6px 6px 6px 12px;
}
.composer-box textarea {
  flex: 1; border: none; resize: none; background: transparent; font-size: 14.5px;
  max-height: 160px; padding: 8px 4px; color: var(--ink); line-height: 1.5;
}
.composer-box textarea:focus { outline: none; }
.send-btn { background: var(--accent); color: #fff; }
.send-btn:hover { background: var(--accent); opacity: .9; }
.send-btn:disabled { opacity: .4; cursor: not-allowed; }

.composer-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden;
}
.composer-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 6px; border-bottom: 1px solid var(--border); }
.model-picker { position: relative; }
.model-picker-trigger {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 999px;
  padding: 6px 11px 6px 9px; color: var(--ink);
}
.model-picker-trigger:hover { border-color: var(--border); }
.model-picker-trigger svg:first-child { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.model-picker-trigger span { font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-picker-caret { width: 13px; height: 13px; color: var(--muted); flex-shrink: 0; }
.model-picker-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 220px; max-height: 280px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; z-index: 30; animation: fadeIn .12s ease;
}
.model-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 10px; border: none; background: transparent; border-radius: 8px;
  font-size: 13.5px; color: var(--ink); text-align: left;
}
.model-option:hover { background: var(--surface-2); }
.model-option.active { color: var(--accent); font-weight: 600; }
.model-option svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* ---------- theme panel ---------- */
.theme-panel {
  position: fixed; bottom: 76px; left: 14px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; width: 260px; animation: fadeIn .18s ease;
}
.theme-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.theme-panel-header h3 { font-size: 13px; margin: 0; }
.theme-options { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--sw, var(--border)); background: var(--sw, var(--border));
  padding: 0;
}
.hue-picker-label { font-size: 11.5px; color: var(--muted); margin: 14px 0 8px; }
.hue-strip {
  position: relative; height: 16px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, #FF0000, #FFFF00, #00FF00, #00FFFF, #0000FF, #FF00FF, #FF0000);
}
.hue-strip-thumb {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: #5046E5; border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  transform: translate(-50%, -50%); left: 8%; pointer-events: none;
}

/* ---------- preview modal ---------- */
.preview-modal { position: fixed; inset: 0; background: var(--surface); display: flex; z-index: 60; }
.preview-modal-inner { width: 100%; height: 100%; background: var(--surface); display: flex; flex-direction: column; }
.preview-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.preview-modal-header span { display: flex; align-items: center; gap: 6px; }
.preview-modal-header svg { width: 16px; height: 16px; }
#previewFrame { flex: 1; border: none; background: #fff; width: 100%; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- custom dialog (pengganti alert/confirm) ---------- */
.app-dialog { position: fixed; inset: 0; background: rgba(20,22,26,0.5); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 20px; animation: fadeIn .15s ease; }
.app-dialog-card { background: var(--surface); border-radius: var(--radius); padding: 26px 22px; max-width: 340px; width: 100%; text-align: center; box-shadow: var(--shadow); animation: msgIn .18s ease; }
.app-dialog-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.app-dialog-icon svg { width: 20px; height: 20px; }
.app-dialog-icon.danger { color: var(--danger); }
#appDialogMessage { font-size: 14px; color: var(--ink); line-height: 1.5; margin: 0 0 16px; white-space: pre-line; }
.app-dialog-input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; background: var(--surface-2); color: var(--ink);
  margin-bottom: 16px; text-align: center; font-family: var(--font-mono); letter-spacing: 0.5px;
}
.app-dialog-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.app-dialog-actions { display: flex; gap: 8px; }
.app-dialog-actions .btn { flex: 1; }

/* ---------- sidebar nav (Chat/Multi-AI/Settings) ---------- */
.sidebar-nav { border-top: 1px solid var(--border); padding: 8px 0; margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-link.active { background: var(--surface); box-shadow: 0 0 0 1px var(--border); font-weight: 600; color: var(--accent); }
.nav-link.active svg { color: var(--accent); }

/* ---------- settings page ---------- */
.settings-screen { position: fixed; inset: 0; background: var(--bg); overflow-y: auto; }
.settings-page { max-width: 640px; margin: 0 auto; padding: 0 20px 60px; }
.settings-header { display: flex; align-items: center; gap: 10px; padding: 18px 0; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.settings-header h1 { font-family: var(--font-display); font-size: 19px; margin: 0; }
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.settings-section h2 { font-size: 14px; margin: 0 0 16px; font-family: var(--font-display); }
.settings-profile-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.settings-profile-fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.settings-profile-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.settings-profile-fields input {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px;
  font-size: 13.5px; background: var(--surface-2); color: var(--ink);
}
.settings-email { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.settings-section .btn { margin-right: 8px; margin-top: 4px; }
.danger-btn { color: var(--danger); border-color: #F6C6C7; }
.danger-btn:hover { background: #FDECEC; }

.settings-toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; cursor: pointer; }
.settings-toggle-row span { display: flex; flex-direction: column; gap: 3px; }
.settings-toggle-row strong { font-size: 13.5px; }
.settings-toggle-row small { font-size: 12px; color: var(--muted); }
.settings-toggle-row input[type="checkbox"] { width: 40px; height: 24px; flex-shrink: 0; accent-color: var(--accent); }

.font-options, .font-size-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.font-option, .font-size-option {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: var(--ink);
}
.font-option.active, .font-size-option.active { border-color: var(--accent); background: var(--surface); color: var(--accent); font-weight: 600; }

/* ---------- multi-ai page ---------- */
.multiai-screen { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; }
.multiai-model-picker { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.multiai-chip {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: var(--ink);
}
.multiai-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.multiai-results { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .multiai-results { grid-template-columns: 1fr 1fr; } }
.multiai-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; animation: msgIn .25s ease; }
.multiai-card-header { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.multiai-card-header svg { width: 14px; height: 14px; }
.multiai-card-body { font-size: 13.5px; line-height: 1.6; }
.multiai-card-body pre { background: #0F1117; border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.multiai-card-body pre code { color: #E6E6E6; font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- connection banner ---------- */
.conn-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #FEF3C7; color: #92400E; font-size: 12.5px; font-weight: 600;
  text-align: center; padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
  animation: screenIn .2s ease;
}
.conn-banner svg { width: 14px; height: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .mobile-only { display: inline-flex; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .msg-bubble { max-width: 78vw; }
}
