/* ─────────────────────────────────────────────────────────────────────────
 * Broder chat-first workspace (mobile first).
 * Four agents, one private conversation each, plus the conversation primitives
 * ported from beautifului.dev: loading state, thinking trace, streaming text,
 * approval card, task rows and diff table. Tokens are scoped to .bc-body so
 * nothing leaks into the conventional screens.
 * ───────────────────────────────────────────────────────────────────────── */

.bc-draft-summary {
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

:root {
  color-scheme: light dark;
  --bc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bc-display: 'Cooper BT', Georgia, 'Times New Roman', serif;
  --bc-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --bc-bg: #eceef0;
  --bc-canvas: #ffffff;
  --bc-surface: #ffffff;
  --bc-ink: #17191a;
  --bc-ink-2: #565b60;
  --bc-ink-3: #8a9095;
  --bc-inset: #f3f4f5;
  --bc-line: rgb(23 25 26 / 8%);
  --bc-line-strong: rgb(23 25 26 / 16%);
  --bc-hover: rgb(23 25 26 / 4%);
  --bc-hover-2: rgb(23 25 26 / 7%);
  --bc-accent: #ffd32a;
  --bc-accent-hover: #ffdf61;
  --bc-accent-ink: #2b2100;
  --bc-link: #8a5a00;
  --bc-green: #1f9d63;
  --bc-green-tint: rgb(31 157 99 / 12%);
  --bc-red: #d1453b;
  --bc-red-tint: rgb(209 69 59 / 10%);
  --bc-blue: #3f7bef;
  --bc-tooltip: #1d1f21;
  --bc-shadow-hairline: inset 0 0 0 1px var(--bc-line);
  --bc-shadow-btn: 0 0 0 1px var(--bc-line), 0 1px 2px rgb(0 0 0 / 5%);
  --bc-shadow-card: 0 0 0 1px var(--bc-line), 0 1px 2px rgb(0 0 0 / 4%), 0 10px 28px rgb(0 0 0 / 6%);
  --bc-shadow-overlay: 0 0 0 1px var(--bc-line), 0 18px 48px rgb(0 0 0 / 18%);
  --bc-radius-control: 10px;
  --bc-radius-card: 20px;
  --bc-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --bc-safe-top: env(safe-area-inset-top, 0px);
  --bc-safe-bottom: env(safe-area-inset-bottom, 0px);
}
html[data-bs-theme='dark'] {
  --bc-bg: #0d0d0e;
  --bc-canvas: #161617;
  --bc-surface: #1f1f21;
  --bc-ink: #f2f1ef;
  --bc-ink-2: #b4b3b0;
  --bc-ink-3: #85847f;
  --bc-inset: #232325;
  --bc-line: rgb(255 255 255 / 8%);
  --bc-line-strong: rgb(255 255 255 / 16%);
  --bc-hover: rgb(255 255 255 / 5%);
  --bc-hover-2: rgb(255 255 255 / 8%);
  --bc-link: #ffd32a;
  --bc-green: #4fcf93;
  --bc-green-tint: rgb(79 207 147 / 14%);
  --bc-red: #f0786d;
  --bc-red-tint: rgb(240 120 109 / 14%);
  --bc-blue: #7aa6ff;
  --bc-tooltip: #2a2b2d;
  --bc-shadow-btn: 0 0 0 1px var(--bc-line);
  --bc-shadow-card: 0 0 0 1px var(--bc-line), 0 10px 28px rgb(0 0 0 / 35%);
  --bc-shadow-overlay: 0 0 0 1px var(--bc-line-strong), 0 18px 48px rgb(0 0 0 / 55%);
}

@keyframes bc-pixel-on { 0%, 100% { opacity: 0.15; } 30%, 55% { opacity: 1; } }
@keyframes bc-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes bc-pop-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes bc-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bc-spin { to { transform: rotate(360deg); } }
@keyframes bc-word { from { opacity: 0; filter: blur(5px); transform: translateY(2px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes bc-slide-in { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bc-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.bc-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bc-bg);
  color: var(--bc-ink);
  font-family: var(--bc-font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
.bc-body *, .bc-body *::before, .bc-body *::after { box-sizing: border-box; }
.bc-body :is(button, input, textarea, select) { font-family: inherit; }
.bc-body button { -webkit-tap-highlight-color: transparent; }
.bc-body :is(a, button, input, textarea, summary):focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.bc-body :where(a) { color: inherit; text-decoration: none; }
.bc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bc-skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--bc-ink); color: var(--bc-canvas); font-weight: 600; }
.bc-skip:focus { top: 12px; }

/* ── Frame ─────────────────────────────────────────────────────────────── */
.bc-app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bc-canvas);
  overflow: hidden;
}
@media (min-width: 600px) {
  .bc-app { box-shadow: 0 0 0 1px var(--bc-line), 0 0 80px rgb(0 0 0 / 6%); }
}
.bc-app--chat { animation: bc-slide-in 380ms var(--bc-ease) both; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.bc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--bc-inset); color: var(--bc-ink);
  font: 600 15px/1 var(--bc-font); cursor: pointer; text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease, opacity 140ms ease;
}
.bc-btn:active { transform: scale(0.97); }
.bc-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.bc-btn--primary { background: var(--bc-accent); color: var(--bc-accent-ink); }
.bc-btn--primary:hover { background: var(--bc-accent-hover); }
.bc-btn--ghost { background: var(--bc-surface); box-shadow: var(--bc-shadow-btn); }
.bc-btn--ghost:hover { background: var(--bc-hover); }
.bc-btn--quiet { background: transparent; color: var(--bc-ink-2); }
.bc-btn--quiet:hover { background: var(--bc-hover); color: var(--bc-ink); }
.bc-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.bc-btn--block { width: 100%; }

.bc-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 999px; padding: 0;
  background: transparent; color: var(--bc-ink); cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}
.bc-iconbtn:hover { background: var(--bc-hover-2); }
.bc-iconbtn:active { transform: scale(0.94); }
.bc-iconbtn--ring { background: var(--bc-surface); box-shadow: var(--bc-shadow-btn); }
.bc-iconbtn--plus { background: var(--bc-accent); color: var(--bc-accent-ink); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.bc-iconbtn--plus:hover { background: var(--bc-accent-hover); }
.bc-iconbtn--soft { width: 38px; height: 38px; background: var(--bc-inset); color: var(--bc-ink-2); }
.bc-iconbtn--soft[aria-pressed='true'] { background: var(--bc-red-tint); color: var(--bc-red); }
.bc-iconbtn--mini { width: 28px; height: 28px; color: var(--bc-ink-3); }
.bc-iconbtn--mini:hover { color: var(--bc-ink-2); }
.bc-icon { flex: none; }

.bc-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border: 0; border-radius: 999px; padding: 0;
  background: var(--bc-inset); color: var(--bc-ink);
  font: 600 14px/1 var(--bc-font); letter-spacing: 0.02em; cursor: pointer; box-shadow: var(--bc-shadow-hairline);
}
.bc-avatar--lg { width: 52px; height: 52px; font-size: 17px; cursor: default; }

/* ── Mascots ───────────────────────────────────────────────────────────── */
.bc-mascot { position: relative; display: inline-flex; flex: none; width: var(--bc-size); height: var(--bc-size); }
.bc-mascot-poster, .bc-mascot-canvas { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
/* The live 3D canvas sits exactly over its poster and takes over once it has drawn. */
.bc-mascot-canvas { position: absolute; inset: 0; }
.bc-mascot.is-3d .bc-mascot-poster { visibility: hidden; }
.bc-mascot.is-working::before {
  content: ''; position: absolute; inset: -4px; border-radius: 34%;
  background: conic-gradient(from 0deg, #ffd32a, #ff7aa2, #7aa6ff, #6ee7b7, #ffd32a);
  opacity: 0.8; filter: blur(5px); animation: bc-spin 2.4s linear infinite; z-index: -1;
}

/* ── List screen ───────────────────────────────────────────────────────── */
.bc-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--bc-safe-top)) 20px 12px;
}
.bc-greeting { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 24px/1.1 var(--bc-display); letter-spacing: -0.02em; }
.bc-search { position: relative; flex: none; margin: 4px 20px 6px; }
.bc-search-icon { position: absolute; z-index: 1; top: 50%; left: 15px; display: inline-flex; color: var(--bc-ink-3); transform: translateY(-50%); pointer-events: none; }
.bc-search-input {
  width: 100%; height: 46px; padding: 0 16px 0 42px; border: 0; border-radius: 16px;
  background: var(--bc-inset); color: var(--bc-ink); font-size: 16px; outline: none; box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 160ms ease, background-color 160ms ease; -webkit-appearance: none; appearance: none;
}
.bc-search-input:focus { background: var(--bc-surface); box-shadow: inset 0 0 0 2px var(--bc-accent); }
.bc-search-input::placeholder { color: var(--bc-ink-3); }
.bc-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bc-list-main { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px calc(var(--broder-bottom-nav-height, 96px) + 28px + var(--bc-safe-bottom)); }
.bc-agent-list { margin: 0; padding: 0; list-style: none; }
.bc-agent-item { animation: bc-fade-up 420ms var(--bc-ease) both; animation-delay: calc(var(--bc-i, 0) * 60ms); }
.bc-agent-item[hidden] { display: none; }
.bc-agent-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: 18px; transition: background-color 140ms ease;
}
.bc-agent-row:hover, .bc-agent-row:active { background: var(--bc-hover); }
.bc-agent-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.bc-agent-name { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; }
.bc-verified { display: inline-flex; color: var(--bc-blue); }
.bc-agent-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bc-ink-2); font-size: 14.5px; }
.bc-agent-preview.is-cta { color: var(--bc-link); }
.bc-agent-meta { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 7px; align-self: flex-start; padding-top: 3px; color: var(--bc-ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 14px; }
.bc-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--bc-accent); box-shadow: 0 0 0 2px var(--bc-canvas), 0 0 0 3px rgb(138 90 0 / 35%); }
.bc-empty-search { margin: 36px 20px; text-align: center; color: var(--bc-ink-3); }
.bc-list-foot { margin: 18px 20px 0; color: var(--bc-ink-3); font-size: 12.5px; line-height: 1.5; text-align: center; }

/* ── Bottom sheet ──────────────────────────────────────────────────────── */
.bc-sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; margin: 0 auto;
  padding: 10px 20px calc(18px + var(--bc-safe-bottom)); border: 0; border-radius: 26px 26px 0 0;
  background: var(--bc-canvas); color: var(--bc-ink); box-shadow: var(--bc-shadow-overlay);
}
.bc-sheet[open] { display: flex; flex-direction: column; gap: 10px; animation: bc-sheet-up 320ms var(--bc-ease) both; }
.bc-sheet::backdrop { background: rgb(10 12 14 / 40%); animation: bc-fade-in 240ms ease both; }
.bc-sheet-grab { align-self: center; width: 38px; height: 5px; margin-bottom: 6px; border-radius: 99px; background: var(--bc-line-strong); }
.bc-sheet-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.bc-sheet-head h2 { margin: 0; font: 650 18px/1.2 var(--bc-font); }
.bc-sheet-head p { margin: 2px 0 0; color: var(--bc-ink-2); font-size: 14px; }
.bc-sheet-links { display: flex; flex-direction: column; border-radius: 16px; background: var(--bc-inset); overflow: hidden; }
.bc-sheet-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.bc-sheet-link + .bc-sheet-link { border-top: 1px solid var(--bc-line); }
.bc-sheet-link:hover { background: var(--bc-hover); }
.bc-sheet-link span { font-weight: 600; font-size: 15.5px; }
.bc-sheet-link small { color: var(--bc-ink-2); font-size: 13px; }
.bc-sheet-language .broder-language-selector { margin: 0; }
.bc-sheet-language select { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--bc-inset); color: var(--bc-ink); font-size: 15px; }
.bc-sheet-language .broder-language-status { display: block; margin-top: 6px; color: var(--bc-ink-2); font-size: 12.5px; }
.bc-sheet form { margin: 0; }
.bc-sheet-note { margin: 0; color: var(--bc-ink-3); font-size: 12.5px; line-height: 1.5; text-align: center; }

/* ── Chat header ───────────────────────────────────────────────────────── */
.bc-chat-head {
  position: relative; z-index: 5; flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--bc-safe-top)) 14px 10px;
  background: linear-gradient(var(--bc-canvas) 70%, transparent);
}
.bc-chat-pill {
  display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; align-self: stretch;
  padding: 4px 16px 4px 6px; max-width: max-content; border-radius: 999px;
  background: var(--bc-surface); box-shadow: var(--bc-shadow-btn);
}
.bc-chat-pill-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bc-chat-pill-copy strong { font-size: 15px; font-weight: 650; }
.bc-chat-pill-copy > span { display: inline-flex; align-items: center; gap: 5px; color: var(--bc-ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-chat-head > .bc-iconbtn:last-child { margin-left: auto; }
.bc-live-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--bc-green); animation: bc-pulse 1.4s ease-in-out infinite; }
.bc-live-dot[hidden] { display: none; }

/* ── Timeline ──────────────────────────────────────────────────────────── */
.bc-timeline { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; outline: none; }
.bc-timeline-inner { display: flex; flex-direction: column; gap: 18px; padding: 8px 20px 24px; }
.bc-timeline-inner > div[data-bc-entries] { display: contents; }
.bc-day { text-align: center; color: var(--bc-ink-3); font-size: 12.5px; }
.bc-system { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--bc-ink-2); font-size: 12.5px; }
.bc-system::before, .bc-system::after { content: ''; flex: 1; height: 1px; background: var(--bc-line); }
.bc-system > span { display: inline-flex; align-items: center; gap: 6px; }
.bc-entry { display: flex; flex-direction: column; gap: 8px; animation: bc-fade-up 360ms var(--bc-ease) both; }
.bc-entry:not(:has(*)) { display: none; }
.bc-entry--user { align-items: flex-end; }
.bc-bubble { max-width: 84%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--bc-inset); font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bc-bubble-note { color: var(--bc-red); font-size: 12.5px; }
.bc-msg { font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.bc-md > :first-child { margin-top: 0; }
.bc-md > :last-child { margin-bottom: 0; }
.bc-md p { margin: 0 0 10px; }
.bc-md :is(ul, ol) { margin: 0 0 10px; padding-left: 22px; }
.bc-md li { margin: 3px 0; }
.bc-md strong { font-weight: 650; }
.bc-md a { color: var(--bc-link); text-decoration: underline; text-underline-offset: 2px; }
.bc-md :is(h1, h2, h3, h4) { margin: 14px 0 6px; font: 650 17px/1.3 var(--bc-font); }
.bc-md code { padding: 1px 5px; border-radius: 6px; background: var(--bc-inset); font: 13.5px var(--bc-mono); }
.bc-md pre { overflow-x: auto; padding: 12px; border-radius: 12px; background: var(--bc-inset); }
.bc-md table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bc-md :is(th, td) { padding: 6px 8px; border-bottom: 1px solid var(--bc-line); text-align: left; }
.bc-md blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--bc-line-strong); color: var(--bc-ink-2); }
.bc-w { display: inline; animation: bc-word 420ms var(--bc-ease) both; animation-delay: var(--bc-d, 0ms); }
.bc-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; border-radius: 2px; background: var(--bc-ink); animation: bc-fade-in 150ms ease both; }
.bc-msg-actions { display: flex; align-items: center; gap: 4px; margin-top: -2px; color: var(--bc-ink-3); font-size: 12px; transition: opacity 400ms ease; }
.bc-msg-actions time { font-variant-numeric: tabular-nums; }
.bc-msg-actions.is-pending { opacity: 0; pointer-events: none; }
.bc-answered { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--bc-green-tint); color: var(--bc-green); font-size: 12.5px; font-weight: 600; }
.bc-notice { padding: 10px 14px; border-radius: 14px; background: var(--bc-red-tint); color: var(--bc-red); font-size: 14px; }
.bc-notice[hidden] { display: none; }
.bc-notice button { margin-left: 8px; }

/* ── Live work: loading state + thinking trace ─────────────────────────── */
.bc-live { display: flex; flex-direction: column; gap: 6px; }
.bc-live:empty { display: none; }
.bc-loading { display: flex; width: fit-content; align-items: center; gap: 10px; }
.bc-loader-grid { display: grid; flex: none; grid-template-columns: repeat(3, 4px); gap: 1.5px; }
.bc-loader-grid i { display: block; width: 4px; height: 4px; border-radius: 1px; background: var(--bc-ink); opacity: 0.15; animation: bc-pixel-on 650ms ease-in-out infinite; animation-delay: var(--bc-delay, 0ms); }
.bc-loader-grid i.is-off { opacity: 0.07; animation: none; }
.bc-loader-grid--dots i { border-radius: 999px; }
.bc-shimmer {
  background-image: linear-gradient(90deg, var(--bc-ink-3) 35%, var(--bc-ink) 50%, var(--bc-ink-3) 65%);
  background-size: 200% 100%; background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  font-size: 13.5px; font-weight: 500; animation: bc-shimmer 1.4s linear infinite;
}
.bc-elapsed { color: var(--bc-ink-3); font: 12px var(--bc-mono); font-variant-numeric: tabular-nums; }

.bc-think { display: flex; flex-direction: column; width: 100%; max-width: 380px; }
.bc-think-head {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-left: -6px; padding: 4px 6px;
  border: 0; border-radius: var(--bc-radius-control); background: transparent; color: var(--bc-ink-2); cursor: pointer;
  font: 500 13.5px/1.2 var(--bc-font); transition: background-color 100ms ease;
}
.bc-think-head:hover { background: var(--bc-hover-2); }
.bc-think-spark { display: inline-flex; color: var(--bc-ink-3); transition: color 200ms ease; }
.bc-think.is-working .bc-think-spark { color: var(--bc-ink-2); }
.bc-think-label { white-space: nowrap; }
.bc-think-chev { display: inline-flex; color: var(--bc-ink-3); transition: transform 300ms var(--bc-ease); }
.bc-think-head[aria-expanded='true'] .bc-think-chev, .bc-task-head[aria-expanded='true'] .bc-task-chev { transform: rotate(180deg); }
.bc-collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 400ms var(--bc-ease), opacity 400ms var(--bc-ease); }
.bc-collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.bc-collapse-in { overflow: hidden; }
.bc-think-trace { position: relative; margin: 4px 0 2px 5px; padding-left: 16px; }
.bc-think-line { position: absolute; left: 3px; top: -6px; bottom: 4px; width: 1px; background: var(--bc-line-strong); }
.bc-think-steps { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 4px 0; list-style: none; }
.bc-think-steps li { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 2px 6px; font-size: 13px; font-weight: 500; animation: bc-fade-up 320ms var(--bc-ease) both; animation-delay: calc(var(--bc-i, 0) * 90ms); }
.bc-think-check { display: inline-flex; color: var(--bc-ink-3); }
.bc-think-spin { display: inline-block; width: 12px; height: 12px; flex: none; border: 1.5px solid var(--bc-line-strong); border-top-color: var(--bc-ink-2); border-radius: 999px; animation: bc-spin 700ms linear infinite; }

/* ── Cards: draft, diff, rows ──────────────────────────────────────────── */
.bc-card { overflow: hidden; border-radius: var(--bc-radius-card); background: var(--bc-surface); box-shadow: var(--bc-shadow-card); animation: bc-fade-up 380ms var(--bc-ease) both; }
.bc-card-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--bc-line); }
.bc-card-title { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.bc-card-title strong { font-size: 15.5px; font-weight: 650; }
.bc-card-title small { display: -webkit-box; overflow: hidden; color: var(--bc-ink-2); font-size: 13.5px; line-height: 1.4; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bc-badge { flex: none; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--bc-inset); color: var(--bc-ink-2); font-size: 12px; font-weight: 600; box-shadow: var(--bc-shadow-hairline); }
.bc-rows { margin: 0; padding: 6px 16px 10px; }
.bc-rows > div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 8px 0; animation: bc-fade-up 320ms var(--bc-ease) both; animation-delay: calc(var(--bc-i, 0) * 50ms + 120ms); }
.bc-rows dt { color: var(--bc-ink-3); font-size: 14px; }
.bc-rows dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.bc-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--bc-line); }
.bc-card-note { flex: 1 1 100%; color: var(--bc-ink-3); font-size: 12.5px; }
@media (min-width: 420px) { .bc-card-note { flex: 1; } }
.bc-card.is-busy { opacity: 0.7; pointer-events: none; }

.bc-diff { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.bc-diff thead tr { border-bottom: 1px solid var(--bc-line); }
.bc-diff th, .bc-diff td { padding: 10px 14px; vertical-align: top; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.bc-diff thead th { color: var(--bc-ink-3); font-weight: 500; font-size: 12px; }
.bc-diff tbody tr { border-bottom: 1px solid var(--bc-line); animation: bc-fade-up 320ms var(--bc-ease) both; animation-delay: calc(var(--bc-i, 0) * 70ms + 100ms); }
.bc-diff tbody tr:last-child { border-bottom: 0; }
.bc-diff tbody th { color: var(--bc-ink); font-weight: 600; }
.bc-diff .is-removed { background: var(--bc-red-tint); color: var(--bc-red); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bc-red) 50%, transparent); }
.bc-diff .is-added { background: var(--bc-green-tint); color: var(--bc-green); font-weight: 600; }

/* ── Task rows ─────────────────────────────────────────────────────────── */
.bc-task { max-width: 440px; overflow: hidden; border-radius: 22px; background: var(--bc-surface); box-shadow: var(--bc-shadow-card); transition: border-radius 300ms ease, background-color 150ms ease; animation: bc-fade-up 450ms var(--bc-ease) both; }
.bc-task:hover { background: var(--bc-inset); }
.bc-task.is-open { border-radius: 14px; }
.bc-task-head { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 10px; padding: 0 10px; border: 0; background: transparent; color: var(--bc-ink); text-align: left; cursor: pointer; }
.bc-task-badge { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: var(--bc-green); color: #fff; animation: bc-pop-in 300ms var(--bc-ease) both; }
.bc-task--muted .bc-task-badge { background: var(--bc-ink-3); }
.bc-task-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.bc-task-meta { color: var(--bc-ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bc-task-chev { display: inline-flex; margin-left: -4px; color: var(--bc-ink-3); transition: transform 300ms var(--bc-ease); }
.bc-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.bc-pill--done { background: var(--bc-green-tint); color: var(--bc-green); }
.bc-pill--muted { background: var(--bc-inset); color: var(--bc-ink-2); box-shadow: var(--bc-shadow-hairline); }
.bc-pill--red { background: var(--bc-red-tint); color: var(--bc-red); }
.bc-task-detail { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin: 0 10px 12px; }
.bc-task-line { width: 1px; height: 100%; margin: 0 auto; background: var(--bc-line-strong); }
.bc-task-lines { display: flex; flex-direction: column; gap: 8px; }
.bc-task-lines > div { display: flex; justify-content: space-between; gap: 12px; animation: bc-fade-up 300ms var(--bc-ease) both; }
.bc-task-lines span { color: var(--bc-ink-2); font-size: 13px; }
.bc-task-lines strong { max-width: 60%; font-weight: 500; font-size: 13px; text-align: right; white-space: pre-line; overflow-wrap: anywhere; }
.bc-task-link { align-self: flex-start; color: var(--bc-link); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ── Approval card (human in the loop) ─────────────────────────────────── */
.bc-approval { width: 100%; max-width: 360px; }
.bc-ap-card { position: relative; overflow: hidden; border-radius: var(--bc-radius-card); background: var(--bc-surface); box-shadow: var(--bc-shadow-card); animation: bc-fade-up 380ms var(--bc-ease) both; }
.bc-ap-dismiss { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; color: var(--bc-ink-3); }
.bc-ap-pad { padding: 16px; }
.bc-ap-viewport { overflow: hidden; }
.bc-ap-track { display: flex; flex-direction: column; gap: 26px; will-change: transform; }
.bc-ap-q { transition: opacity 360ms cubic-bezier(0.22, 1, 0.36, 1); }
.bc-ap-q-title { padding-right: 28px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.bc-ap-options { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.bc-ap-option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px 6px 6px; border: 0; border-radius: var(--bc-radius-control); background: transparent; color: var(--bc-ink-2); text-align: left; font-size: 14.5px; line-height: 1.25; cursor: pointer; transition: background-color 100ms ease, color 200ms ease; }
.bc-ap-option:hover { background: var(--bc-hover); }
.bc-ap-option[aria-pressed='true'] { color: var(--bc-ink); }
.bc-ap-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; color: transparent; box-shadow: inset 0 0 0 1.5px var(--bc-line-strong); transition: background-color 200ms ease, color 200ms ease; }
.bc-ap-mark--check { border-radius: 5px; }
.bc-ap-option[aria-pressed='true'] .bc-ap-mark { background: var(--bc-ink); color: var(--bc-canvas); box-shadow: none; }
.bc-ap-mark i { display: block; width: 6px; height: 6px; border-radius: 99px; background: var(--bc-canvas); transform: scale(0); transition: transform 200ms ease; }
.bc-ap-option[aria-pressed='true'] .bc-ap-mark i { transform: scale(1); }
.bc-ap-custom { display: flex; align-items: center; min-height: 40px; padding: 4px 8px 4px 30px; border-radius: var(--bc-radius-control); }
.bc-ap-custom input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--bc-ink); font-size: 14.5px; }
.bc-ap-custom input::placeholder { color: var(--bc-ink-3); }
.bc-ap-custom:focus-within { background: var(--bc-hover); }
.bc-ap-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--bc-line); }
.bc-ap-nav { display: flex; align-items: center; gap: 4px; color: var(--bc-ink-3); }
.bc-ap-nav button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.bc-ap-nav button:enabled:hover { color: var(--bc-ink); }
.bc-ap-nav button:disabled { opacity: 0.3; cursor: default; }
.bc-ap-nav .bc-ap-up svg { transform: rotate(180deg); }
.bc-ap-count { display: inline-flex; align-items: center; min-width: 38px; justify-content: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.bc-ap-actions { display: flex; align-items: center; gap: 6px; }
.bc-ap-roll { display: inline-block; position: relative; overflow: hidden; height: 1em; line-height: 1em; vertical-align: -0.05em; }
.bc-ap-roll > span { display: flex; flex-direction: column; transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1); }
.bc-ap-roll > span > span { height: 1em; line-height: 1em; }

/* ── Dock: suggestions + composer ──────────────────────────────────────── */
.bc-dock { flex: none; position: relative; z-index: 4; padding: 0 14px calc(12px + var(--bc-safe-bottom)); background: linear-gradient(transparent, var(--bc-canvas) 28%); }
.bc-chips { display: flex; gap: 8px; margin: 0 -14px; padding: 8px 14px 10px; overflow-x: auto; scrollbar-width: none; }
.bc-chips::-webkit-scrollbar { display: none; }
.bc-chips:empty, .bc-chips.is-hidden { display: none; }
.bc-chip { flex: none; padding: 10px 14px; border: 0; border-radius: 16px; background: var(--bc-surface); box-shadow: var(--bc-shadow-btn); color: var(--bc-ink); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: transform 140ms ease, background-color 140ms ease; }
.bc-chip:hover { background: var(--bc-hover); }
.bc-chip:active { transform: scale(0.97); }
.bc-composer { padding: 12px 12px 10px 16px; border-radius: 26px; background: var(--bc-surface); box-shadow: var(--bc-shadow-card); transition: box-shadow 200ms ease; }
.bc-composer:focus-within { box-shadow: 0 0 0 1.5px var(--bc-accent), 0 10px 28px rgb(0 0 0 / 8%); }
.bc-input { display: block; width: 100%; min-height: 26px; max-height: 148px; padding: 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--bc-ink); font-size: 16px; line-height: 1.5; }
.bc-input::placeholder { color: var(--bc-ink-3); }
.bc-composer-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.bc-composer-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bc-ink-3); font-size: 12.5px; }
.bc-send { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 999px; background: var(--bc-accent); color: var(--bc-accent-ink); cursor: pointer; transition: transform 140ms ease, opacity 200ms ease, background-color 200ms ease; }
.bc-send:active { transform: scale(0.92); }
.bc-send[disabled] { opacity: 0.4; cursor: default; }
.bc-send-icon { position: absolute; display: inline-flex; transition: opacity 180ms ease, transform 240ms var(--bc-ease); }
.bc-send-icon--stop { opacity: 0; transform: scale(0.6); }
.bc-send.is-stop { background: var(--bc-ink); color: var(--bc-canvas); opacity: 1; }
.bc-send.is-stop .bc-send-icon--send { opacity: 0; transform: scale(0.6); }
.bc-send.is-stop .bc-send-icon--stop { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bc-app--chat, .bc-agent-item, .bc-entry, .bc-card, .bc-task, .bc-search, .bc-sheet[open], .bc-sheet::backdrop,
  .bc-rows > div, .bc-diff tbody tr, .bc-think-steps li, .bc-task-lines > div, .bc-ap-card { animation: none; }
  .bc-mascot.is-working::before, .bc-live-dot, .bc-shimmer { animation: none; }
  .bc-loader-grid i { animation: none; opacity: 0.4; }
  .bc-w { animation: none; }
  .bc-collapse, .bc-think-chev, .bc-task-chev, .bc-ap-roll > span { transition: none; }
  .bc-timeline { scroll-behavior: auto; }
}

/* ── Small refinements ─────────────────────────────────────────────────── */
.bc-input:focus-visible { outline: none; }
.bc-msg--failed { color: var(--bc-ink-2); font-size: 14.5px; }
.bc-retry-row { display: flex; align-items: center; gap: 10px; }
.bc-body [hidden] { display: none !important; }
.bc-body .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Shared motion + large button ──────────────────────────────────────── */
@keyframes bc-float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); } 50% { transform: translate3d(0, -14px, 0) rotate(4deg); } }
.bc-btn--lg { min-height: 54px; font-size: 17px; }

/* ── First-conversation connection suggestions ─────────────────────────── */
.bc-connect { max-width: 400px; padding: 14px 8px 8px; }
.bc-connect-title { margin: 0 8px 6px; font-size: 15px; font-weight: 650; }
.bc-connect-list { margin: 0; padding: 0; list-style: none; }
.bc-connect-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; transition: background-color 140ms ease; }
a.bc-connect-row:hover { background: var(--bc-hover); }
.bc-connect-row.is-soon { opacity: 0.85; }
.bc-connect-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: var(--bc-inset); color: var(--bc-ink-2); }
.bc-connect-icon--whatsapp { background: var(--bc-green-tint); color: var(--bc-green); }
.bc-connect-icon--google_calendar { background: rgb(63 123 239 / 14%); color: var(--bc-blue); }
.bc-connect-icon--gmail { background: var(--bc-red-tint); color: var(--bc-red); }
.bc-connect-icon--sheets { background: var(--bc-green-tint); color: var(--bc-green); }
.bc-connect-icon .broder-icon { width: 20px; height: 20px; }
.bc-connect-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.bc-connect-copy strong { font-size: 15px; font-weight: 600; }
.bc-connect-copy small { color: var(--bc-ink-2); font-size: 13px; line-height: 1.35; }
.bc-connect-go { display: inline-flex; color: var(--bc-ink-3); transform: rotate(-90deg); }

/* ── Rename an agent ───────────────────────────────────────────────────── */
.bc-rename { display: flex; flex-direction: column; gap: 6px; }
.bc-rename label { font-size: 13.5px; font-weight: 600; color: var(--bc-ink-2); }
.bc-rename-row { display: flex; gap: 8px; }
.bc-rename-row input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--bc-inset); color: var(--bc-ink); font-size: 16px; outline: 0; }
.bc-rename-row input:focus { box-shadow: 0 0 0 2px var(--bc-accent); }
.bc-rename-row .bc-btn { height: 44px; min-height: 44px; }
.bc-rename small { color: var(--bc-ink-3); font-size: 12.5px; line-height: 1.4; }
.bc-rename-error { margin: 0; color: var(--bc-red); font-size: 13px; }

/* ── Your team page ────────────────────────────────────────────────────── */
.bc-team-main { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 20px calc(24px + var(--bc-safe-bottom)); }
.bc-team-title { margin: 6px 0 0; font: 500 32px/1.1 var(--bc-display); letter-spacing: -0.02em; }
.bc-team-copy { margin: 10px 0 20px; color: var(--bc-ink-2); font-size: 16px; line-height: 1.5; }
.bc-team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bc-team-grid > li { animation: bc-fade-up 480ms var(--bc-ease) both; animation-delay: calc(var(--bc-i, 0) * 70ms); }
.bc-team-card { position: relative; display: flex; height: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--bc-accent) 16%, var(--bc-surface)); transition: transform 160ms ease; }
.bc-team-card:active { transform: scale(0.98); }
.bc-team-card .bc-mascot { margin-bottom: 8px; }
.bc-team-card strong { font-size: 16px; font-weight: 650; }
.bc-team-card small { color: var(--bc-ink-2); font-size: 13px; line-height: 1.35; }
.bc-team-check { position: absolute; top: 12px; right: 12px; background: var(--bc-ink); color: var(--bc-canvas); box-shadow: none; }
.bc-team-sub { margin: 26px 0 10px; font: 650 17px/1.2 var(--bc-font); }
.bc-connect--page { max-width: none; }
.bc-team-note { margin: 18px 4px 0; color: var(--bc-ink-3); font-size: 13px; line-height: 1.5; text-align: center; }

/* ── Never scroll sideways ─────────────────────────────────────────────── */
html:has(.bc-body), .bc-body { overflow-x: clip; max-width: 100%; }
.bc-app, .bc-timeline, .bc-list-main, .bc-team-main { overflow-x: clip; }
.bc-timeline-inner > *, .bc-entry > * { min-width: 0; max-width: 100%; }
.bc-md, .bc-bubble, .bc-card, .bc-task, .bc-approval { overflow-wrap: anywhere; }

/* ── Chat shell: one column on a phone, list + conversation on a desktop ── */
.bc-shell { display: contents; }
.bc-stage { display: none; }
.bc-shell--chat > .bc-rail { display: none; }
.bc-rail { position: relative; }
.bc-agent-item.is-current .bc-agent-row { background: var(--bc-inset); }

@media (min-width: 900px) {
  .bc-sheet { inset: 0; height: fit-content; max-width: 460px; margin: auto; border-radius: 26px; }
  .bc-shell { display: flex; height: 100dvh; background: var(--bc-canvas); }
  .bc-shell > .bc-rail, .bc-shell--chat > .bc-rail { display: flex; flex: none; width: 340px; max-width: none; margin: 0; border-right: 1px solid var(--bc-line); box-shadow: none; }
  .bc-shell .bc-app--chat { flex: 1; min-width: 0; max-width: none; margin: 0; box-shadow: none; animation: none; }
  .bc-shell .bc-chat-head > a.bc-iconbtn:first-child { display: none; }
  .bc-shell .bc-chat-head { padding-inline: 28px; }
  .bc-shell .bc-timeline-inner, .bc-shell .bc-dock { width: 100%; max-width: 820px; margin-inline: auto; }
  .bc-shell .bc-timeline-inner { padding-inline: 28px; }
  .bc-shell .bc-dock { padding-inline: 28px; }
  .bc-shell .bc-chips { margin-inline: -28px; padding-inline: 28px; }
  .bc-stage { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px; text-align: center; background: radial-gradient(90% 60% at 50% 38%, color-mix(in srgb, var(--bc-accent) 14%, var(--bc-canvas)) 0%, var(--bc-canvas) 70%); }
  .bc-stage h2 { margin: 18px 0 0; font: 500 32px/1.1 var(--bc-display); letter-spacing: -0.02em; }
  .bc-stage p { max-width: 36ch; margin: 6px 0 0; color: var(--bc-ink-2); font-size: 16px; line-height: 1.5; }
  .bc-stage-mascots { position: relative; width: 280px; height: 130px; }
  .bc-stage-mascot { position: absolute; animation: bc-float 6s ease-in-out infinite; }
  .bc-stage-mascot--0 { left: 4%; top: 28px; animation-delay: -1s; }
  .bc-stage-mascot--1 { left: 30%; top: 0; animation-delay: -3s; }
  .bc-stage-mascot--2 { left: 54%; top: 34px; animation-delay: -2s; }
  .bc-stage-mascot--3 { left: 78%; top: 6px; animation-delay: -4s; }
  .bc-app--team { max-width: 980px; }
  .bc-app--team .bc-team-main { padding-inline: 40px; }
  .bc-team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .bc-stage-mascot { animation: none; } }

/* Team motion now lives in the 3D mascots themselves (blinks, breathing, hover faces). */

/* ── The chat inside the app frame ─────────────────────────────────────── */
.page--chat .page-wrapper--chat { min-height: 0; padding-bottom: 0 !important; background: var(--bc-canvas); }
.page--chat .bc-app { height: 100dvh; }
/* Touch keyboards (broder_agents.js initViewport, docs/product/MOBILE_BEHAVIOR.md): during a
   conversation the page is pinned to the visible area, so iOS has nothing to scroll away
   when its keyboard opens; the composer rides on top of the keyboard. */
html.bc-vv, html.bc-vv body { overflow: hidden; overscroll-behavior: none; }
html.bc-vv body { position: fixed; left: 0; right: 0; top: var(--bc-vv-top, 0px); height: var(--bc-vv-height, 100dvh); min-height: 0; }
html.bc-vv .page--chat .bc-app, html.bc-vv .page--chat .bc-shell { height: var(--bc-vv-height, 100dvh); }
/* While typing, the keyboard (or its accessory bar) covers the home indicator: no safe-area gap. */
html.bc-keyboard .bc-dock, html.bc-vv .bc-dock:focus-within { padding-bottom: 8px; }
html.bc-keyboard .bc-chips { display: none; }
@media (min-width: 992px) {
  .page--chat .page-wrapper--chat { margin-left: var(--broder-sidebar-width, 232px); }
  .page--chat .bc-shell { height: 100dvh; }
  .page--chat .bc-app--chat, .page--chat .bc-app--team { height: 100dvh; }
}

/* ── The user menu: dark liquid glass, slides up from the bottom and back down ─ */
@keyframes bc-sheet-down { from { transform: none; opacity: 1; } to { transform: translateY(100%); opacity: 0.6; } }
@keyframes bc-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.bc-sheet[open] { animation: bc-sheet-up 420ms var(--bc-ease) both; }
.bc-sheet.is-closing { animation: bc-sheet-down 320ms cubic-bezier(0.5, 0, 0.75, 0) both; }
.bc-sheet.is-closing::backdrop { animation: bc-backdrop-out 320ms ease both; }
@keyframes bc-sheet-up { from { transform: translateY(100%); opacity: 0.6; } to { transform: none; opacity: 1; } }

.bc-sheet--glass {
  --bc-ink: #f4f3f1; --bc-ink-2: rgb(244 243 241 / 72%); --bc-ink-3: rgb(244 243 241 / 52%);
  --bc-line: rgb(255 255 255 / 10%); --bc-line-strong: rgb(255 255 255 / 18%); --bc-hover: rgb(255 255 255 / 7%); --bc-hover-2: rgb(255 255 255 / 11%);
  --bc-inset: rgb(255 255 255 / 8%); --bc-surface: rgb(255 255 255 / 14%);
  color: var(--bc-ink); border: 1px solid rgb(255 255 255 / 16%); border-bottom: 0;
  background: linear-gradient(160deg, rgb(255 255 255 / 10%), rgb(255 255 255 / 0%) 55%), rgb(16 16 18 / 66%);
  -webkit-backdrop-filter: blur(44px) saturate(150%); backdrop-filter: blur(44px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), 0 -18px 60px rgb(0 0 0 / 40%);
}
.bc-sheet--glass::backdrop { background: rgb(6 8 10 / 46%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (prefers-reduced-transparency: reduce) { .bc-sheet--glass { background: #19191b; -webkit-backdrop-filter: none; backdrop-filter: none; } }
.bc-sheet--glass .bc-sheet-head { outline: none; }
.bc-sheet--glass .bc-avatar--lg { background: rgb(255 255 255 / 12%); color: var(--bc-ink); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); }
.bc-sheet-label { margin: 4px 4px -2px; color: var(--bc-ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.bc-sheet--glass .bc-sheet-links { border-radius: 20px; background: rgb(255 255 255 / 7%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 9%); }
.bc-sheet--glass .bc-sheet-link { flex-direction: row; align-items: center; gap: 14px; padding: 12px 14px; outline-offset: -3px; }
.bc-sheet--glass .bc-sheet-link + .bc-sheet-link { border-top: 1px solid rgb(255 255 255 / 8%); }
.bc-sheet-link-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: rgb(255 255 255 / 10%); color: var(--bc-accent); }
.bc-sheet-link-icon .broder-icon { width: 19px; height: 19px; }
.bc-sheet-link-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.bc-sheet-link-copy > span { font-size: 15.5px; font-weight: 600; }
.bc-sheet-link-copy > small { color: var(--bc-ink-2); font-size: 13px; }
.bc-sheet-link-go { display: inline-flex; color: var(--bc-ink-3); transform: rotate(-90deg); }
.bc-sheet--glass .bc-sheet-link:focus-visible { outline: 2px solid rgb(255 211 42 / 70%); border-radius: 18px; }

.bc-theme { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 18px; background: var(--bc-inset); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%); }
.bc-theme-option { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 8px; border: 0; border-radius: 14px; background: transparent; color: var(--bc-ink-2); font: 600 13.5px var(--bc-font); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 140ms ease; }
.bc-theme-option .broder-icon { width: 17px; height: 17px; flex: none; }
.bc-theme-option:active { transform: scale(0.97); }
.bc-theme-option[aria-pressed='true'] { background: rgb(255 255 255 / 16%); color: var(--bc-ink); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%), 0 2px 8px rgb(0 0 0 / 25%); }
.bc-theme-option[aria-pressed='true'] .broder-icon { color: var(--bc-accent); }

.bc-sheet-language { position: relative; }
.bc-sheet-language .broder-language-selector { margin: 0; }
.bc-sheet-language-icon { position: absolute; top: 14px; left: 14px; z-index: 1; display: inline-flex; color: var(--bc-accent); pointer-events: none; }
.bc-sheet-language-icon .broder-icon { width: 19px; height: 19px; }
.bc-sheet--glass .bc-sheet-language select {
  -webkit-appearance: none; appearance: none; width: 100%; height: 48px; padding: 0 44px 0 44px; border: 0; border-radius: 16px;
  background: var(--bc-inset) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f4f3f1' stroke-opacity='.6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--bc-ink); font: 600 15px var(--bc-font); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 9%); cursor: pointer;
}
.bc-sheet--glass .bc-sheet-language select:focus-visible { outline: 2px solid rgb(255 211 42 / 70%); outline-offset: 2px; }
.bc-sheet--glass .bc-sheet-language select option { background: #1b1b1d; color: #f4f3f1; }
.bc-sheet--glass .bc-sheet-language .broder-language-status { color: var(--bc-ink-2); }
.bc-btn--glass { background: rgb(255 255 255 / 9%); color: var(--bc-ink); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 13%); }
.bc-btn--glass:hover { background: rgb(255 255 255 / 15%); }
.bc-sheet-logout { gap: 9px; }
.bc-sheet-logout .broder-icon { width: 18px; height: 18px; }
.bc-sheet--glass .bc-btn--quiet { color: var(--bc-ink-2); }
.bc-sheet--glass .bc-btn--quiet:hover { color: var(--bc-ink); background: rgb(255 255 255 / 7%); }
@media (prefers-reduced-motion: reduce) { .bc-sheet[open], .bc-sheet.is-closing, .bc-sheet.is-closing::backdrop { animation: none; } }

/* The app's global link colour must not leak into the chat's own links. */
body.bc-body a.bc-agent-row, body.bc-body a.bc-team-card, body.bc-body a.bc-connect-row, body.bc-body a.bc-sheet-link { color: var(--bc-ink); text-decoration: none; }
body.bc-body a.bc-iconbtn { color: var(--bc-ink); }
body.bc-body a.bc-iconbtn--plus { color: var(--bc-accent-ink); }
body.bc-body a.bc-btn--primary { color: var(--bc-accent-ink); }
.bc-sheet { max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; }
.bc-sheet-language .broder-language-selector { display: block; width: 100%; }
.bc-sheet--glass .bc-sheet-language select { max-width: none; flex: 1 1 auto; }
.bc-sheet--glass .bc-sheet-language select.form-select { width: 100% !important; min-width: 0; max-width: none !important; flex: 1 1 100% !important; padding-left: 44px; }
body.bc-body .bc-sheet h2, body.bc-body .bc-sheet h3 { color: var(--bc-ink); }
