.workspace-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f7f7f8;
}

[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.workspace-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  color: #202123;
}

.workspace-sidebar {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border-right: 1px solid #dedee3;
  background: #ececf1;
}
.workspace-sidebar > * { flex-shrink: 0; }

.workspace-brand { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px 14px; }
.workspace-brand img { width: 34px; height: 34px; border-radius: 8px; }
.workspace-brand span { display: grid; line-height: 1.15; }
.workspace-brand strong { font-size: .91rem; color: #202123; }
.workspace-brand small { margin-top: 3px; color: #6b6b73; font-size: .72rem; }

.new-chat-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #c8c8cf;
  border-radius: 9px;
  background: #fff;
  color: #202123;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.new-chat-button:hover { border-color: #9d8fa7; background: #f8f5fa; }
.new-chat-button span { color: var(--color-brand); font-size: 1.15rem; }

.workspace-nav { display: grid; gap: 3px; margin-top: 13px; }
.workspace-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: #4b4b52;
  font-size: .84rem;
  font-weight: 550;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.workspace-nav-item:hover, .workspace-nav-item.active { background: #dedee5; color: #202123; }
.workspace-nav-item.active span:first-child { color: var(--color-brand); }
.workspace-nav-item small { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: #fff; color: #6f6f77; font-size: .61rem; }

.sidebar-section { min-height: 0; margin-top: 25px; }
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 7px; }
.sidebar-section-heading > span { color: #777780; font-size: .69rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-section-heading button { border: 0; background: transparent; color: #676770; font: inherit; font-size: .7rem; cursor: pointer; }
.sidebar-section-heading button:hover { color: var(--color-brand); }
.project-shortcuts { display: grid; gap: 2px; }
.project-shortcut {
  display: grid;
  grid-template-columns: 7px 1fr;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4d4d54;
  font: inherit;
  font-size: .79rem;
  text-align: left;
  cursor: pointer;
}
.project-shortcut:hover { background: #dedee5; }
.project-shortcut i { width: 7px; height: 7px; border-radius: 50%; background: #7f8c97; }
.project-shortcut i[data-status="active"] { background: #20945c; }
.project-shortcut i[data-status="blocked"] { background: #d14343; }
.project-shortcut i[data-status="paused"] { background: #d28a22; }
.project-shortcut span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priority-shortcut { display: block; }
.sidebar-empty { padding: 7px 9px; color: #85858d; font-size: .76rem; line-height: 1.45; }
.conversation-history-section { margin-top: 18px; }
.conversation-search { display: block; padding: 0 7px 7px; }
.conversation-search input { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #d1d1d7; border-radius: 8px; background: #fff; color: #303036; font: inherit; font-size: .75rem; }
.conversation-search input:focus { border-color: #9e88aa; outline: 2px solid rgba(67,22,92,.12); outline-offset: 0; }
.conversation-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 7px 7px; padding: 3px; border-radius: 8px; background: #dedee4; }
.conversation-tabs button { min-height: 28px; border: 0; border-radius: 6px; background: transparent; color: #696970; font: inherit; font-size: .68rem; font-weight: 650; cursor: pointer; }
.conversation-tabs button[aria-selected="true"] { background: #fff; color: #302c33; box-shadow: 0 1px 2px rgba(20,20,24,.08); }
.conversation-shortcuts { display: grid; max-height: min(30vh, 260px); gap: 2px; overflow-y: auto; scrollbar-width: thin; }
.conversation-shortcut { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; border-radius: 7px; }
.conversation-shortcut[data-can-delete="true"] { grid-template-columns: minmax(0, 1fr) 28px 28px; }
.conversation-shortcut:hover, .conversation-shortcut[data-active="true"] { background: #dedee5; }
.conversation-shortcut > button { border: 0; background: transparent; color: #4d4d54; font: inherit; cursor: pointer; }
.conversation-shortcut-open { display: grid; min-width: 0; gap: 2px; padding: 7px 4px 7px 9px; text-align: left; }
.conversation-shortcut-open strong, .conversation-shortcut-open small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-shortcut-open strong { font-size: .77rem; font-weight: 590; }
.conversation-shortcut-open small { color: #7b7b84; font-size: .64rem; }
.conversation-shortcut-delete, .conversation-shortcut-lifecycle { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 6px; color: #807984 !important; opacity: 0; }
.conversation-shortcut:hover .conversation-shortcut-delete, .conversation-shortcut:focus-within .conversation-shortcut-delete, .conversation-shortcut:hover .conversation-shortcut-lifecycle, .conversation-shortcut:focus-within .conversation-shortcut-lifecycle { opacity: 1; }
.conversation-shortcut-delete:hover { background: #fff; color: #9d2f2f !important; }
.conversation-shortcut-lifecycle:hover { background: #fff; color: var(--color-brand) !important; }
.conversation-group-label { padding: 8px 9px 3px; color: #85858d; font-size: .59rem; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.message-failure { display: inline-flex; margin-top: 10px; color: #9d4b2f; font-size: .7rem; font-weight: 700; }
.message-retry { margin: 8px 0 0 8px; border: 1px solid #9d4b2f; border-radius: 999px; background: #fff; color: #79351f; padding: 4px 9px; font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.message-retry:hover, .message-retry:focus-visible { background: #fff3ed; outline: 2px solid transparent; }

.workspace-account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px 6px 3px;
  border-top: 1px solid #d5d5db;
}
.account-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--color-brand); color: #fff; font-size: .68rem; font-weight: 750; }
.workspace-account div:nth-child(2) { display: grid; min-width: 0; line-height: 1.25; }
.workspace-account strong, .workspace-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account strong { font-size: .74rem; }
.workspace-account small { margin-top: 2px; color: #74747c; font-size: .66rem; text-transform: capitalize; }
.workspace-account button { border: 0; background: transparent; color: #74747c; font-size: 1rem; cursor: pointer; }

.brain-main { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; grid-template-rows: 65px minmax(0, 1fr) auto; background: #fff; }
.conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px; border-bottom: 1px solid #ececf0; }
.conversation-header > div:first-child { min-width: 0; }
.product-kicker { display: block; color: #777780; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.conversation-header h1 { overflow: hidden; margin-top: 2px; font-size: .96rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.connection-state { padding: 4px 8px; border-radius: 999px; background: #f0f0f3; color: #64646c; font-size: .67rem; font-weight: 600; }
.connection-state[data-state="ready"] { background: #e4f5eb; color: #1d7048; }
.connection-state[data-state="error"] { background: #fde8e8; color: #a32d2d; }
.icon-button { min-height: 34px; padding: 5px 10px; border: 1px solid #dedee4; border-radius: 7px; background: #fff; color: #56565e; font: inherit; font-size: .74rem; cursor: pointer; }
.icon-button:hover { border-color: #a79cab; color: var(--color-brand); }
.mobile-conversations-button { display: none; }

.conversation-stage { min-height: 0; overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #aaa3ad #f3f3f5; scrollbar-width: auto; scroll-behavior: smooth; }
.conversation-stage::-webkit-scrollbar { width: 12px; }
.conversation-stage::-webkit-scrollbar-track { background: #f3f3f5; }
.conversation-stage::-webkit-scrollbar-thumb { min-height: 44px; border: 3px solid #f3f3f5; border-radius: 999px; background: #aaa3ad; }
.conversation-stage:focus { outline: 0; }
.conversation-stage:focus-visible { box-shadow: inset 0 0 0 2px rgba(67, 22, 92, .32); }
.welcome { display: grid; max-width: 760px; min-height: 100%; place-items: center; align-content: center; margin: 0 auto; padding: 44px 28px 76px; text-align: center; }
.brain-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 20px; border-radius: 15px; background: var(--color-brand); color: var(--gr-yellow); font-size: 1.5rem; box-shadow: 0 9px 25px rgba(67, 22, 92, .18); }
.welcome h2 { font-size: clamp(1.65rem, 3.5vw, 2.15rem); letter-spacing: -.045em; }
.welcome > p { max-width: 600px; margin-top: 12px; color: #666670; font-size: .91rem; line-height: 1.65; }
.prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 28px; }
.prompt-grid button { min-height: 78px; padding: 13px; border: 1px solid #dedee4; border-radius: 11px; background: #fff; color: #414148; font: inherit; font-size: .78rem; font-weight: 580; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.025); }
.prompt-grid button:hover { border-color: #aa94b6; background: #fbf9fc; }

.message-list { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 820px; gap: 22px; margin: 0 auto; padding: 38px 28px 24px; }
.message { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 13px; }
.message-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: var(--color-brand); color: var(--gr-yellow); font-size: .82rem; font-weight: 800; }
.message[data-role="user"] .message-avatar { border-radius: 50%; background: #e9e9ee; color: #575760; }
.message-content { min-width: 0; padding-top: 4px; }
.message-content > strong { display: block; margin-bottom: 6px; color: #242428; font-size: .8rem; }
.message-copy { color: #34343a; font-size: .91rem; line-height: 1.68; overflow-wrap: anywhere; }
.message-copy p, .message-copy ul, .message-copy h2, .message-copy h3 { margin: 0 0 11px; }
.message-copy p:last-child, .message-copy ul:last-child { margin-bottom: 0; }
.message-copy ul { padding-left: 20px; }
.message-copy li + li { margin-top: 5px; }
.message-copy h2 { font-size: 1.14rem; }
.message-copy h3 { font-size: 1rem; }
.message-copy hr { margin: 14px 0; border: 0; border-top: 1px solid #e2e2e7; }
.message-meta { display: flex; overflow-wrap: anywhere; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.message-meta span { padding: 3px 7px; border-radius: 999px; background: #f0eef2; color: #665c6a; font-size: .65rem; }
.message-interrupted { display: inline-flex; margin-top: 10px; color: #77717a; font-size: .7rem; font-weight: 700; }

.thinking { display: flex; align-items: center; gap: 4px; max-width: 820px; margin: 0 auto; padding: 0 28px 24px 73px; color: #707079; }
.thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--color-brand); animation: pulse 1.1s infinite ease-in-out; }
.thinking span:nth-child(2) { animation-delay: .12s; }.thinking span:nth-child(3) { animation-delay: .24s; }
.thinking em { margin-left: 7px; font-size: .73rem; font-style: normal; }
.thinking button { margin-left: 10px; padding: 4px 9px; border: 1px solid #d6d2d9; border-radius: 7px; background: #fff; color: #5c5660; font: inherit; font-size: .7rem; font-weight: 650; cursor: pointer; }
.thinking button:hover { border-color: #a18aaa; color: var(--color-brand); }
.thinking button:disabled { opacity: .55; cursor: default; }
@keyframes pulse { 0%, 65%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.conversation-footer { padding: 10px 24px 14px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 15%); }
.composer { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: end; gap: 8px; max-width: 820px; margin: 0 auto; padding: 9px; border: 1px solid #cfcfd6; border-radius: 15px; background: #fff; box-shadow: 0 5px 24px rgba(31, 31, 35, .08); }
.composer:focus-within { border-color: #a18aaa; box-shadow: 0 5px 26px rgba(67,22,92,.11); }
.composer textarea { max-height: 150px; min-height: 28px; resize: none; overflow-y: auto; scrollbar-width: none; border: 0; outline: 0; background: transparent; color: #27272c; font: inherit; font-size: .9rem; line-height: 1.55; }
.composer textarea::-webkit-scrollbar { display: none; }
.composer textarea::placeholder { color: #8c8c94; }
.composer button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 10px; background: var(--color-brand); color: #fff; font-size: 1.05rem; cursor: pointer; }
.composer .attach-file { background: #f0eaf3; color: var(--color-brand); font-size: 1.45rem; line-height: 1; }
.composer .attach-file:hover { background: #e4d8e9; }
.composer button:disabled { background: #d6d6db; cursor: default; }
.attachment-tray { display: flex; flex-wrap: wrap; gap: 7px; max-width: 820px; margin: 0 auto 8px; }
.attachment-chip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; max-width: min(100%, 360px); padding: 7px 8px 7px 10px; border: 1px solid #d9d3dd; border-radius: 10px; background: #fff; color: #39353d; font-size: .76rem; }
.attachment-chip[data-status="uploading"] { border-style: dashed; color: #6d6670; }
.attachment-chip[data-status="error"] { border-color: #c85555; color: #8d2626; }
.attachment-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip span { color: #77717a; white-space: nowrap; }
.attachment-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; }
.message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.message-attachments span { padding: 4px 7px; border-radius: 7px; background: #eee9f1; color: #55485c; font-size: .72rem; }
.conversation-history-dialog .conversation-shortcut-lifecycle, .conversation-history-dialog .conversation-shortcut-delete { opacity: 1; }
@media (hover: none) { .conversation-shortcut-lifecycle, .conversation-shortcut-delete { opacity: 1; } }
.conversation-boundary { max-width: 820px; margin: 7px auto 0; color: #8a8a92; font-size: .62rem; text-align: center; }
.conversation-error { max-width: 820px; margin: 0 auto 8px; padding: 8px 11px; border-radius: 8px; background: #fdecec; color: #9d2f2f; font-size: .75rem; }

.context-panel { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(390px, calc(100vw - 32px)); overflow-y: auto; border-left: 1px solid #dedee4; background: #f8f8fa; box-shadow: -12px 0 30px rgba(27, 27, 31, .1); transform: translateX(102%); transition: transform 190ms ease; }
.context-panel[data-open="true"] { transform: translateX(0); }
.context-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 18px; border-bottom: 1px solid #e3e3e8; background: #fff; }
.context-panel h2 { margin-top: 2px; font-size: 1rem; }
.context-panel #close-context { border: 0; font-size: 1.1rem; }
.context-section { padding: 19px 18px; border-bottom: 1px solid #e3e3e8; }
.context-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.context-heading h3 { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.context-heading span { display: grid; min-width: 24px; height: 22px; place-items: center; border-radius: 999px; background: #e8e6eb; color: #67616a; font-size: .66rem; }
.context-list { display: grid; gap: 7px; }
.context-card { padding: 11px; border: 1px solid #e0e0e5; border-radius: 9px; background: #fff; }
.context-card > span { display: inline-flex; align-items: center; gap: 5px; color: #6f6f77; font-size: .63rem; font-weight: 650; text-transform: capitalize; }
.context-card > span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8b8b94; }
.context-card > span[data-status="active"]::before { background: #20945c; }
.context-card > span[data-status="blocked"]::before { background: #d14343; }
.context-card > span[data-status="paused"]::before { background: #d28a22; }
.context-card strong { display: block; margin-top: 5px; color: #303036; font-size: .79rem; line-height: 1.35; }
.context-card p { margin-top: 4px; color: #6e6e76; font-size: .7rem; line-height: 1.45; }
.context-card button { margin-top: 8px; border: 0; background: transparent; color: var(--color-brand); font: inherit; font-size: .69rem; font-weight: 650; cursor: pointer; }
.context-empty { color: #7d7d85; font-size: .72rem; line-height: 1.45; }
.source-chip { display: block; padding: 7px 9px; border-radius: 7px; background: #eeecf0; color: #5f5863; font-family: var(--font-mono); font-size: .63rem; overflow-wrap: anywhere; }
.source-chip[data-state="partial"] { background: #fff3d9; color: #765214; }
.source-chip[data-state="error"] { background: #fde8e8; color: #9a2e2e; }
.source-chip a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.context-scrim { position: fixed; z-index: 20; inset: 0; border: 0; background: rgba(20,18,22,.18); backdrop-filter: blur(1px); cursor: default; }

.connections-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); padding: 0; overflow: hidden; border: 1px solid #d7d4d9; border-radius: 16px; background: #fff; color: #29272b; box-shadow: 0 24px 70px rgba(30, 19, 35, .25); }
.connections-dialog::backdrop { background: rgba(26, 20, 29, .42); backdrop-filter: blur(3px); }
.connections-sheet { display: grid; max-height: min(760px, calc(100vh - 28px)); grid-template-rows: auto minmax(0, 1fr) auto; }
.connections-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 0 22px; border-bottom: 1px solid #e6e3e8; }
.connections-sheet h2 { margin-top: 3px; font-size: 1.15rem; }
.connections-body { overflow-y: auto; padding: 22px; }
.connections-intro { color: #5d5961; font-size: .86rem; line-height: 1.55; }
.connected-account { margin-top: 16px; padding: 11px 13px; border: 1px solid #dce8e1; border-radius: 9px; background: #f1faf5; color: #285f44; font-size: .76rem; font-weight: 650; }
.capability-list { display: grid; gap: 9px; margin-top: 18px; padding: 0; border: 0; }
.capability-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid #dfdce2; border-radius: 10px; background: #fff; cursor: pointer; }
.capability-option:has(input:checked) { border-color: #aa91b7; background: #fcf9fd; }
.capability-option input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--color-brand); }
.capability-copy { display: grid; gap: 3px; }
.capability-copy strong { font-size: .82rem; }
.capability-copy small { color: #6e6971; font-size: .72rem; line-height: 1.4; }
.capability-state { padding: 3px 7px; border-radius: 999px; background: #f0eef2; color: #706775; font-size: .61rem; font-weight: 650; text-transform: capitalize; }
.capability-state[data-state="connected"] { background: #e4f5eb; color: #1d7048; }
.capability-state[data-state="missing"] { background: #fff1d2; color: #77530e; }
.connection-detail { margin-top: 17px; color: #77717a; font-size: .7rem; line-height: 1.5; }
.connections-error { margin-top: 14px; padding: 9px 11px; border-radius: 8px; background: #fdecec; color: #982e2e; font-size: .75rem; }
.connections-sheet > footer { display: flex; align-items: center; gap: 8px; padding: 15px 22px; border-top: 1px solid #e6e3e8; background: #faf9fb; }
.connections-sheet > footer button { min-height: 38px; padding: 0 14px; border-radius: 8px; font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; }
.secondary-action { border: 1px solid #d3cfd6; background: #fff; color: #5b565e; }
.danger-action { margin-left: auto; border: 1px solid #e3b8b8; background: #fff; color: #9a3030; }
.primary-action { margin-left: auto; border: 1px solid var(--color-brand); background: var(--color-brand); color: #fff; }
.danger-action + .primary-action { margin-left: 0; }
.connections-sheet > footer button:disabled { opacity: .55; cursor: default; }
.conversation-history-dialog { width: min(430px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 24px)); padding: 0; overflow: hidden; border: 1px solid #d7d4d9; border-radius: 15px; background: #f4f4f7; box-shadow: 0 24px 70px rgba(30,19,35,.25); }
.conversation-history-dialog::backdrop { background: rgba(26,20,29,.42); backdrop-filter: blur(3px); }
.conversation-history-dialog > header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 16px; border-bottom: 1px solid #dedee4; background: #fff; }
.conversation-history-dialog h2 { font-size: .95rem; }
.conversation-history-dialog .conversation-shortcuts { max-height: calc(100dvh - 108px); padding: 10px; }
.conversation-history-dialog .conversation-shortcut { background: #fff; }
.mobile-conversation-controls { padding: 10px 10px 0; }
.mobile-conversation-controls .conversation-search { padding-inline: 0; }
.mobile-conversation-controls .conversation-tabs { margin-inline: 0; }
.conversation-rename-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 1px solid #d7d4d9; border-radius: 15px; background: #fff; box-shadow: 0 24px 70px rgba(30,19,35,.25); }
.conversation-rename-dialog::backdrop { background: rgba(26,20,29,.42); backdrop-filter: blur(3px); }
.conversation-rename-dialog form { display: grid; gap: 18px; padding: 20px; }
.conversation-rename-dialog header, .conversation-rename-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conversation-rename-dialog h2 { margin-top: 2px; font-size: 1.05rem; }
.conversation-rename-dialog label { display: grid; gap: 6px; color: #615c64; font-size: .72rem; font-weight: 650; }
.conversation-rename-dialog input { min-height: 42px; padding: 8px 10px; border: 1px solid #cfccd2; border-radius: 8px; color: #29272b; font: inherit; }
.conversation-rename-dialog footer { justify-content: flex-end; }
.conversation-rename-dialog footer .primary-action { margin-left: 0; }
.conversation-rename-error { color: #982e2e; font-size: .74rem; }

@media (max-width: 800px) {
  .workspace-shell { grid-template-columns: 66px minmax(0, 1fr); }
  .workspace-sidebar { padding: 9px; }
  .workspace-brand { justify-content: center; padding: 5px 0 14px; }.workspace-brand img { width: 36px; height: 36px; }.workspace-brand span { display: none; }
  .new-chat-button { justify-content: center; padding: 0; font-size: 0; }.new-chat-button span { font-size: 1.25rem; }
  .workspace-nav-item { justify-content: center; padding: 0; font-size: 0; }.workspace-nav-item span:first-child { font-size: 1rem; }
  .workspace-nav-item small { display: none; }
  .sidebar-section { display: none; }
  .workspace-account { grid-template-columns: 1fr; justify-items: center; padding: 12px 0 2px; }.workspace-account div:nth-child(2), .workspace-account button { display: none; }
  .conversation-header { padding: 0 14px; }.connection-state { display: none; }
  .conversation-action { display: none; }
  .mobile-conversations-button { display: inline-flex; }
  .conversation-footer { padding-inline: 12px; }
  .welcome { padding: 30px 17px 55px; }.prompt-grid { grid-template-columns: 1fr; }.prompt-grid button { min-height: 54px; }
  .message-list { padding: 26px 15px 18px; }.thinking { padding-left: 60px; }
  .connections-sheet > footer { flex-wrap: wrap; }.connections-sheet > footer button { flex: 1 1 auto; }.danger-action, .primary-action { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.working-scope { display: flex; flex-wrap: wrap; gap: .5rem; padding: .4rem 0; max-width: 820px; margin: 0 auto; }
.working-scope label { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; color: var(--color-text-secondary, #555); }
.working-scope select, .working-scope input { max-width: 100%; padding: .35rem; border: 1px solid #ccc; border-radius: .35rem; background: white; font: inherit; }

.message-table-scroll { max-width: 100%; overflow-x: auto; margin: 1rem 0; }
.message-table-scroll table { width: max-content; min-width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.message-table-scroll th, .message-table-scroll td { overflow-wrap: normal; padding: .65rem .8rem; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.message-table-scroll th { font-weight: 700; background: #f5f5f8; }
.message-copy a { overflow-wrap: anywhere; text-decoration: underline; }
.message-pending { display: block; margin: .75rem 0; color: #505565; }

/* Prevent intrinsic table/footer widths from expanding the single chat track. */
.brain-main > * { min-width: 0; }

.message-feedback { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; font-size:0.875rem; }
.message-feedback button[aria-pressed="true"] { background:#eee9fa; border-color:#7651a8; }
.message-feedback [role="status"] { flex-basis:100%; color:#555; }

.event-review { border:2px solid #7651a8; border-radius:14px; padding:20px; margin-top:20px; overflow-wrap:anywhere; }
.event-review article { padding:12px 0; border-bottom:1px solid #ddd; }
.event-review p { margin:.6rem 0; }
.event-review button { margin:12px 12px 0 0; padding:10px 16px; border:2px solid #7651a8; border-radius:8px; background:#eee9fa; font-weight:700; cursor:pointer; }
.event-review button:disabled { opacity:.55; cursor:default; }
