/* =========================================================
   Rohit's Brain — design tokens
   Dark-first, Apple system palette, aurora accents.
   ========================================================= */
:root {
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --surface-3: #e5e5ea;
  --separator: rgb(60 60 67 / 0.13);
  --border: var(--separator);
  --field: #ffffff;
  --text: #000000;
  --text-2: rgb(60 60 67 / 0.62);
  --text-3: rgb(60 60 67 / 0.32);
  --accent: #7c4dff;
  --accent-text: #ffffff;
  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --material: rgb(249 249 251 / 0.78);
  --glow-1: rgb(124 77 255 / 0.16);
  --glow-2: rgb(10 200 255 / 0.12);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow: 0 1px 1px rgb(0 0 0 / 0.03), 0 8px 24px -8px rgb(0 0 0 / 0.12);
  --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / 0.3);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-color: var(--accent);
  --app-grad: linear-gradient(135deg, #a78bfa, #22d3ee);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #0e0e12;
    --surface: #121216;
    --surface-2: #1c1c22;
    --surface-3: #2a2a32;
    --separator: rgb(255 255 255 / 0.08);
    --field: #1c1c22;
    --text: #f5f5f7;
    --text-2: rgb(235 235 245 / 0.6);
    --text-3: rgb(235 235 245 / 0.28);
    --accent: #a78bfa;
    --accent-text: #0b0b10;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;
    --material: rgb(18 18 22 / 0.72);
    --glow-1: rgb(139 92 246 / 0.22);
    --glow-2: rgb(34 211 238 / 0.12);
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgb(255 255 255 / 0.05);
    --shadow-lg: 0 24px 64px -12px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.06);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.42 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body::before {
  content: '';
  position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 15% 0%, var(--glow-1), transparent 70%),
    radial-gradient(50% 60% at 90% 10%, var(--glow-2), transparent 70%);
}

#root {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--safe-bottom) + 32px);
}

button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
a { color: inherit; }
.icon { flex: none; display: block; }
.num { font-family: var(--font-rounded); font-variant-numeric: tabular-nums; }

/* page entrance */
/* Page entrance fades only: a transform here would trap position:fixed bars (chat input, tab bar, rest timer). */
.app, .launcher { animation: page-fade 0.35s ease-out backwards; }
@keyframes page-fade { from { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(14px) scale(0.99); } }

/* =========================================================
   Launcher
   ========================================================= */
.launcher { padding: calc(var(--safe-top) + 28px) 20px 20px; }
.launcher-date {
  color: var(--text-2); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.launcher-title {
  font: 700 34px/1.1 var(--font-display); letter-spacing: -0.035em; margin: 4px 0 26px;
}
.launcher-title span {
  background: var(--app-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.launcher-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.tile-icon {
  position: relative; width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, var(--g1), var(--g2));
  box-shadow: 0 8px 20px -8px var(--g2), inset 0 1px 0 rgb(255 255 255 / 0.35);
  transition: transform 0.35s var(--bounce);
}
.tile-icon::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.22), transparent 55%);
}
.tile-icon .icon { filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.18)); }
.tile:active .tile-icon { transform: scale(0.88); transition-duration: 0.1s; }
.tile-name { font-size: 12px; font-weight: 500; color: var(--text); letter-spacing: 0; }

.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.widget {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 156px; padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: transform 0.35s var(--bounce);
}
.widget:active { transform: scale(0.97); transition-duration: 0.1s; }
.widget.wide { grid-column: span 2; min-height: 0; }
.widget-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--w-color, var(--text-2));
}
.widget-value { font: 700 40px/1 var(--font-rounded); letter-spacing: -0.03em; }
.widget-value small { font-size: 17px; font-weight: 600; color: var(--text-2); margin-left: 3px; letter-spacing: 0; }
.widget-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.widget-glow {
  position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, var(--w-color), transparent 70%); opacity: 0.18; pointer-events: none;
}
.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { transition: stroke-dashoffset 1s var(--spring); }

.launcher-foot { display: grid; justify-items: center; gap: 12px; margin-top: 32px; }
.launcher-account {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 15px; font-weight: 500;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, #a78bfa, #22d3ee);
}
.launcher-settings { color: var(--text-3); font-size: 13px; text-decoration: none; }

.login {
  min-height: 100dvh; display: grid; align-content: center; justify-items: center; text-align: center;
  padding: calc(var(--safe-top) + 24px) 28px calc(var(--safe-bottom) + 24px); animation: page-in 0.6s var(--spring) backwards;
}
.login-badge {
  width: 88px; height: 88px; border-radius: 22.5%; margin-bottom: 18px;
  box-shadow: 0 20px 44px -16px #8b5cf6;
}
.login h1 { margin: 0; font: 700 32px/1.1 var(--font-display); letter-spacing: -0.035em; }
.login > p { margin: 6px 0 28px; }
.login-form { width: 100%; max-width: 340px; display: grid; gap: 10px; }
.login-form .btn { margin-top: 6px; }
.login-error { min-height: 18px; color: var(--danger); font-size: 14px; font-weight: 500; }
.login-help { margin-top: 24px; }
.account-form { display: grid; gap: 8px; }
.account-label { margin: 8px 4px 0; font-size: 13px; font-weight: 500; color: var(--text-2); }

/* =========================================================
   App chrome
   ========================================================= */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(var(--safe-top) + 8px) 8px 8px;
  background: transparent; border-bottom: 0.5px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
.appbar.scrolled {
  background: var(--material);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom-color: var(--separator);
}
.appbar-title {
  font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.25s var(--spring);
}
.appbar.scrolled .appbar-title, .appbar.no-large .appbar-title { opacity: 1; transform: none; }
.appbar > :last-child { justify-self: end; }
.appbar-back { display: inline-flex; align-items: center; gap: 0; padding-left: 2px; }

.large-title { padding: 2px 20px 12px; }
.large-title h1 { margin: 0; font: 700 34px/1.12 var(--font-display); letter-spacing: -0.035em; }
.large-title p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }

.app-body { padding: 4px 16px 16px; }

/* =========================================================
   Controls
   ========================================================= */
.btn-icon {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 8px 10px; border-radius: 10px;
  color: var(--app-color); font-size: 17px; font-weight: 400; text-decoration: none;
  transition: opacity 0.15s;
}
.btn-icon:active { opacity: 0.4; }
.btn-icon.strong { font-weight: 600; }
.btn-icon:disabled { opacity: 0.3; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 14px; border: 0;
  font-size: 17px; font-weight: 600; text-decoration: none;
  background: var(--app-color); color: #fff;
  transition: transform 0.3s var(--bounce), opacity 0.15s;
}
.btn:active { transform: scale(0.96); transition-duration: 0.08s; }
.btn:disabled { opacity: 0.4; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 15px; border-radius: 10px; }
.btn-grad { background: linear-gradient(135deg, var(--g1, var(--app-color)), var(--g2, var(--app-color))); color: #fff; box-shadow: 0 10px 24px -10px var(--app-color); }
.btn-tinted { background: color-mix(in srgb, var(--app-color) 16%, transparent); color: var(--app-color); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn-plain-danger { background: none; color: var(--danger); }

.input, .textarea, .select {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  border: 0; background: var(--field); outline: none; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.sheet .input, .sheet .textarea, .sheet .select, .card .input, .card .textarea, .card .select { background: var(--surface-2); box-shadow: none; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-color) 60%, transparent); }
.textarea { resize: none; line-height: 1.55; }
.select { appearance: none; -webkit-appearance: none; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { list-style: none; margin: 0; padding: 0; }

/* inset grouped list, iOS Settings style */
.group { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.group-header { margin: 24px 16px 8px; font-size: 13px; font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.group-footer { margin: 8px 16px 0; font-size: 13px; color: var(--text-2); }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px;
  text-decoration: none; color: var(--text); background: none; border: 0; width: 100%; text-align: left;
  position: relative;
}
.row + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--separator); }
.row:active { background: var(--surface-2); }
.row-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--app-color); flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-detail { color: var(--text-2); }
.row .icon.chev { color: var(--text-3); }

.segmented { display: flex; padding: 2px; border-radius: 10px; background: var(--surface-2); position: relative; }
.segmented button {
  flex: 1; border: 0; background: none; padding: 7px 8px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text); transition: background 0.25s var(--spring);
}
.segmented button.on { background: var(--surface); box-shadow: 0 3px 8px rgb(0 0 0 / 0.12), 0 0 0 0.5px rgb(0 0 0 / 0.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button.on { background: var(--surface-3); } }

.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
  width: 51px; height: 31px; border-radius: 999px; background: var(--surface-3);
  transition: background 0.25s; cursor: pointer;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgb(0 0 0 / 0.15), 0 1px 1px rgb(0 0 0 / 0.16);
  transition: transform 0.35s var(--spring);
}
.switch:checked { background: var(--success); }
.switch:checked::after { transform: translateX(20px); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 4px 10px; }
.section-head h2 { margin: 0; font: 700 22px/1.2 var(--font-display); letter-spacing: -0.025em; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2);
}

.empty { text-align: center; color: var(--text-2); padding: 56px 24px; }
.empty-icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(160deg, var(--g1, var(--app-color)), var(--g2, var(--app-color)));
  box-shadow: 0 16px 32px -12px var(--app-color);
}
.empty h3 { margin: 0 0 4px; color: var(--text); font-size: 20px; font-weight: 600; }

.fab {
  position: fixed; right: max(20px, calc(50% - 280px)); bottom: calc(var(--safe-bottom) + 24px); z-index: 15;
  width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center;
  color: #fff; background: linear-gradient(160deg, var(--g1, var(--app-color)), var(--g2, var(--app-color)));
  box-shadow: 0 14px 30px -8px var(--app-color), inset 0 1px 0 rgb(255 255 255 / 0.3);
  transition: transform 0.35s var(--bounce);
}
.fab:active { transform: scale(0.88); transition-duration: 0.08s; }

.muted { color: var(--text-2); }
.small { font-size: 13px; }

/* =========================================================
   Toasts & sheets
   ========================================================= */
#toasts {
  position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 10px);
  display: grid; justify-items: center; gap: 8px; pointer-events: none; z-index: 200;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: var(--material); color: var(--text);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.5s var(--bounce) both;
}
.toast.out { animation: toast-out 0.3s var(--spring) both; }
.toast.error { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-24px) scale(0.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px) scale(0.95); } }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgb(0 0 0 / 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in 0.3s ease both;
}
.sheet-backdrop.closing { animation: fade-out 0.25s ease both; }
.sheet {
  width: 100%; max-width: 600px; max-height: 92dvh; overflow: auto;
  background: var(--bg-elevated);
  border-radius: 28px 28px 0 0; padding: 8px 20px calc(var(--safe-bottom) + 20px);
  display: grid; gap: 14px; animation: sheet-in 0.5s var(--spring) both;
  box-shadow: var(--shadow-lg);
}
.sheet-backdrop.closing .sheet { animation: sheet-out 0.28s var(--spring) both; }
.sheet::before { content: ''; justify-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--surface-3); margin-bottom: 4px; }
.sheet h2 { margin: 0; font: 700 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* busy overlay (AI work) */
.busy {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px;
  background: rgb(0 0 0 / 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.25s ease both;
}
.busy-card {
  display: grid; justify-items: center; gap: 10px; text-align: center; padding: 26px 28px; max-width: 320px;
  border-radius: 22px; background: var(--bg-elevated); box-shadow: var(--shadow-lg);
}
.busy-title { font-weight: 600; font-size: 17px; }
.busy-sub { font-size: 14px; color: var(--text-2); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--app-color, var(--accent));
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.md p { margin: 0 0 8px; }
.md p:last-child { margin-bottom: 0; }
.md ul { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }

/* checklist rows used by import previews */
.pick-list { display: grid; gap: 0; max-height: 52dvh; overflow: auto; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 0.5px solid var(--separator); }
.pick-row input { width: 22px; height: 22px; accent-color: var(--app-color); flex: none; }
.pick-row .pick-main { flex: 1; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* pokes */
.tile-icon .tile-badge {
  position: absolute; top: -5px; right: -5px; z-index: 2; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: none; place-items: center; font: 700 12px/20px var(--font); color: #fff; background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
}
.tile-icon .tile-badge.on { display: grid; }
.poke-banner {
  display: flex; align-items: center; gap: 12px; margin: -8px 0 14px; padding: 12px 14px; border-radius: var(--radius-lg);
  text-decoration: none; color: #fff; background: linear-gradient(135deg, #f472d0, #a21caf);
  box-shadow: 0 14px 30px -14px #c026d3; animation: page-in 0.5s var(--bounce) backwards;
}
.poke-banner > div { flex: 1; min-width: 0; }
.poke-banner .small { opacity: 0.9; }
.poke-banner-emoji { font-size: 30px; line-height: 1; }

/* ---------- chat (Brain + Food coach) ---------- */
.chat { display: grid; padding-bottom: 96px; }
.chat-list { display: grid; gap: 10px; align-content: start; }
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.45; }
.chat-msg.new { animation: chat-in 0.3s var(--spring) both; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px); } }
.chat-msg.streaming { min-width: 64px; }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.chat-status:not(:empty) { margin-top: 6px; }
.small-spin { width: 12px; height: 12px; border-width: 2px; }
.chat-msg p { margin: 0; white-space: pre-wrap; }
.chat-msg.user { justify-self: end; background: var(--app-color); color: #fff; border-bottom-right-radius: 6px; }
.chat-msg.assistant, .chat-msg.typing { justify-self: start; background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.chat-actions { display: grid; gap: 4px; margin-top: 8px; }
.chat-done { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--success); }
.chat-divider { justify-self: center; font-size: 12px; color: var(--text-3); padding: 6px 0; }
.chat-empty { text-align: center; padding: 30px 12px 10px; }
.chat-empty h3 { margin: 0 0 4px; }
.chat-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chat-prompt {
  border: 0; border-radius: 999px; padding: 8px 13px; font-size: 14px; font-weight: 500;
  background: color-mix(in srgb, var(--app-color) 14%, var(--surface)); color: var(--app-color);
}
.chat-prompt:disabled { opacity: 0.4; }
.chat-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.chat-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: dot 1.2s infinite; }
.chat-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; align-items: flex-end;
  padding: 10px max(12px, calc(50% - 288px)) calc(var(--safe-bottom) + 10px);
  background: var(--material); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 0.5px solid var(--separator);
}
.chat-input { flex: 1; min-height: 42px; max-height: 140px; border-radius: 21px; padding: 10px 16px; background: var(--surface-2); box-shadow: none; }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--app-color); color: #fff; }
.chat-send:disabled { opacity: 0.4; }

/* Ask Brain bar on the home screen */
.ask-bar {
  display: flex; align-items: center; gap: 10px; margin: -12px 0 22px; padding: 13px 16px; border-radius: 16px;
  text-decoration: none; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, #a78bfa 35%, transparent);
}
.ask-bar .icon { color: #a78bfa; }
.ask-bar:active { transform: scale(0.98); }
.chat-powered { text-align: center; margin-top: 14px; }
