:root {
  --ai-canvas: #f5f6f8;
  --ai-surface: #ffffff;
  --ai-surface-soft: #f8f9fb;
  --ai-sidebar: #f1f3f6;
  --ai-ink: #18212b;
  --ai-muted: #5d6976;
  --ai-faint: #68737e;
  --ai-line: #e3e6ea;
  --ai-line-strong: #d3d8de;
  --ai-accent: #cf3f5f;
  --ai-accent-strong: #ad2848;
  --ai-accent-soft: #fff0f3;
  --ai-info: #28757c;
  --ai-info-soft: #edf8f8;
  --ai-success: #197451;
  --ai-danger: #a8324c;
  --ai-shadow: 0 18px 50px rgb(30 38 48 / 12%);
  --ai-ease: cubic-bezier(.22, 1, .36, 1);
}

body:has(.ai-studio) {
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--ai-canvas);
}

body:has(.ai-studio) .header,
body:has(.ai-studio) .middle,
body:has(.ai-studio) .header-wrap,
body:has(.ai-studio) .bg-wrap,
body:has(.ai-studio) .footer-warp,
body:has(.ai-studio) .lg-sidebar,
body:has(.ai-studio) #lgHeartMemory { display: none !important; }

.ai-studio,
.ai-studio * { box-sizing: border-box; }

.ai-studio {
  width: min(1480px, 100%);
  height: 100dvh;
  min-height: 640px;
  margin: 0 auto;
  overflow: hidden;
  color: var(--ai-ink);
  background: var(--ai-surface);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.ai-studio button,
.ai-studio input,
.ai-studio textarea { font: inherit; letter-spacing: 0; }
.ai-studio button,
.ai-studio a { -webkit-tap-highlight-color: transparent; }
.ai-studio button { cursor: pointer; }
.ai-studio button:disabled { cursor: not-allowed; }
.ai-studio a { color: inherit; text-decoration: none !important; }
.ai-studio svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.ai-studio button:focus-visible,
.ai-studio a:focus-visible,
.ai-studio input:focus-visible,
.ai-studio textarea:focus-visible,
.ai-studio summary:focus-visible { outline: 3px solid rgb(207 63 95 / 24%); outline-offset: 2px; }

.ai-studio__bar {
  position: relative;
  z-index: 20;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--ai-line);
  background: var(--ai-surface);
}

.ai-studio__brand,
.ai-studio__actions { display: flex; min-width: 0; align-items: center; gap: 10px; }
.ai-studio__brand > div { display: grid; min-width: 0; gap: 0; }
.ai-studio__brand strong { overflow: hidden; font-size: 17px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.ai-studio__brand span { color: var(--ai-muted); font-size: 13px; }

.ai-icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ai-ink);
  background: transparent;
  transition: color 180ms var(--ai-ease), background-color 180ms var(--ai-ease), border-color 180ms var(--ai-ease), transform 180ms var(--ai-ease);
}
.ai-icon-button:hover { border-color: var(--ai-line); background: var(--ai-surface-soft); transform: translateY(-1px); }
.ai-sidebar-toggle { display: none; }

.ai-clear-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  color: var(--ai-muted);
  background: var(--ai-surface);
  font-size: 13px;
  font-weight: 680;
  transition: color 170ms var(--ai-ease), border-color 170ms var(--ai-ease), background-color 170ms var(--ai-ease);
}
.ai-clear-button svg { width: 17px; height: 17px; }
.ai-clear-button:hover:not(:disabled) { border-color: #e6b5c0; color: var(--ai-accent-strong); background: var(--ai-accent-soft); }
.ai-clear-button:disabled { color: #aab1b9; background: var(--ai-surface-soft); opacity: .65; }

.ai-model-trigger {
  display: inline-flex;
  width: min(220px, 28vw);
  min-width: 170px;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  color: var(--ai-ink);
  background: var(--ai-surface);
  font-size: 14px;
  font-weight: 680;
  text-align: left;
  transition: border-color 180ms var(--ai-ease), background-color 180ms var(--ai-ease), box-shadow 180ms var(--ai-ease);
}
.ai-model-trigger[hidden] { display: none; }
.ai-model-trigger:hover { border-color: var(--ai-line-strong); background: var(--ai-surface-soft); box-shadow: 0 5px 14px rgb(33 42 52 / 6%); }
.ai-model-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-model-trigger svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--ai-muted); }
.ai-context-trigger { display: inline-flex; min-height: 42px; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--ai-line); border-radius: 8px; color: var(--ai-muted); background: var(--ai-surface); font-size: 12px; font-weight: 720; }
.ai-context-trigger svg { width: 16px; height: 16px; }
.ai-context-trigger:hover { color: var(--ai-ink); border-color: var(--ai-line-strong); background: var(--ai-surface-soft); }

.ai-studio__setup { width: min(720px, calc(100% - 32px)); margin: 64px auto; padding: 26px; border: 1px solid #f0c7d1; border-radius: 8px; background: var(--ai-accent-soft); }
.ai-studio__setup strong { font-size: 19px; }
.ai-studio__setup p { margin: 8px 0 0; color: var(--ai-muted); font-size: 15px; }

.ai-shell {
  position: relative;
  display: grid;
  height: calc(100dvh - 64px);
  min-height: 0;
  grid-template-columns: 280px minmax(0, 1fr);
  border-inline: 1px solid var(--ai-line);
  background: var(--ai-surface);
}

.ai-conversation-rail { display: flex; min-width: 0; min-height: 0; flex-direction: column; padding: 12px; overflow: hidden; border-right: 1px solid var(--ai-line); background: var(--ai-sidebar); }
.ai-conversation-rail__header { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 5px 8px; }
.ai-conversation-rail__header > div { display: grid; gap: 1px; }
.ai-conversation-rail__header strong { font-size: 15px; font-weight: 760; }
.ai-conversation-rail__header small { color: var(--ai-muted); font-size: 12px; }
.ai-conversation-rail__header > button { display: none; }

.ai-new-thread {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid #e9bec8;
  border-radius: 8px;
  color: var(--ai-accent-strong);
  background: var(--ai-accent-soft);
  text-align: left;
  transition: border-color 170ms var(--ai-ease), background-color 170ms var(--ai-ease), transform 170ms var(--ai-ease);
}
.ai-new-thread:hover { border-color: #dc9cac; background: #ffe8ed; transform: translateY(-1px); }
.ai-new-thread > svg { width: 19px; height: 19px; margin-inline: auto; }
.ai-new-thread > span { display: grid; min-width: 0; gap: 1px; }
.ai-new-thread strong { font-size: 14px; font-weight: 750; }
.ai-new-thread small { color: #7f5660; font-size: 11px; }

.ai-agent-picker { margin-top: 9px; }
.ai-agent-picker > summary { display: grid; min-height: 52px; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--ai-line); border-radius: 8px; color: var(--ai-ink); background: var(--ai-surface); cursor: pointer; list-style: none; }
.ai-agent-picker > summary::-webkit-details-marker { display: none; }
.ai-agent-picker > summary > i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: #fff; background: var(--ai-accent); font-size: 12px; font-style: normal; font-weight: 800; }
.ai-agent-picker > summary > span { display: grid; min-width: 0; gap: 0; }
.ai-agent-picker > summary small { color: var(--ai-muted); font-size: 11px; }
.ai-agent-picker > summary strong { overflow: hidden; font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ai-agent-picker > summary > svg { width: 17px; height: 17px; color: var(--ai-muted); transition: transform 170ms var(--ai-ease); }
.ai-agent-picker[open] > summary > svg { transform: rotate(180deg); }
.ai-agent-picker__list { display: grid; max-height: 260px; gap: 2px; overflow-y: auto; margin-top: 5px; padding: 4px; border: 1px solid var(--ai-line); border-radius: 8px; background: var(--ai-surface); box-shadow: 0 12px 28px rgb(30 38 48 / 8%); }
.ai-agent-picker__list button {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ai-ink);
  background: transparent;
  text-align: left;
  transition: color 170ms var(--ai-ease), background-color 170ms var(--ai-ease), border-color 170ms var(--ai-ease);
}
.ai-agent-picker__list button > i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: #4f5b67; background: #e3e7eb; font-size: 12px; font-style: normal; font-weight: 800; }
.ai-agent-picker__list button > span { display: grid; min-width: 0; gap: 1px; }
.ai-agent-picker__list button strong { overflow: hidden; font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ai-agent-picker__list button small { overflow: hidden; color: var(--ai-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-agent-picker__list button:hover { background: var(--ai-surface-soft); }
.ai-agent-picker__list button.is-active { border-color: #f0d6dc; background: var(--ai-accent-soft); }
.ai-agent-picker__list button.is-active > i { color: #fff; background: var(--ai-accent); }

.ai-history { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; margin-top: 14px; }
.ai-history > header { display: flex; min-height: 30px; align-items: center; padding: 0 7px; }
.ai-history > header strong { color: var(--ai-muted); font-size: 12px; font-weight: 720; }
.ai-history__list { min-height: 0; overflow-y: auto; padding-right: 2px; }
.ai-history-group + .ai-history-group { margin-top: 12px; }
.ai-history-group h3 { margin: 0; padding: 6px 7px 4px; color: var(--ai-faint); font-size: 11px; font-weight: 680; }
.ai-history-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 7px; }
.ai-history-item:hover { background: rgb(255 255 255 / 72%); }
.ai-history-item.is-active { background: var(--ai-surface); box-shadow: inset 0 0 0 1px var(--ai-line); }
.ai-history-item__open { display: grid; width: 100%; min-width: 0; min-height: 52px; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 4px 6px 7px; border: 0; color: var(--ai-ink); background: transparent; text-align: left; }
.ai-history-item__open > i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: var(--ai-muted); background: #e5e8ec; font-size: 11px; font-style: normal; font-weight: 800; }
.ai-history-item__open > span { display: grid; min-width: 0; gap: 1px; }
.ai-history-item__open strong { overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-item__open small { overflow: hidden; color: var(--ai-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-item__remove { min-height: 30px; margin-right: 5px; padding: 0 6px; border: 0; border-radius: 5px; color: var(--ai-danger); background: transparent; font-size: 11px; opacity: 0; transition: opacity 150ms var(--ai-ease), background-color 150ms var(--ai-ease); }
.ai-history-item:hover .ai-history-item__remove,
.ai-history-item:focus-within .ai-history-item__remove { opacity: 1; }
.ai-history-item__remove:hover { background: #fff0f3; }
.ai-history__empty { margin: 8px 7px 0; color: var(--ai-muted); font-size: 12px; line-height: 1.6; }
.ai-history__empty[hidden] { display: none; }

.ai-conversation-rail__footer { display: grid; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ai-line); }
.ai-conversation-rail__footer a,
.ai-conversation-rail__footer p { display: flex; min-height: 34px; align-items: center; gap: 8px; margin: 0; padding: 0 7px; color: var(--ai-muted); font-size: 12px; }
.ai-conversation-rail__footer a { border-radius: 6px; font-weight: 680; }
.ai-conversation-rail__footer a:hover { color: var(--ai-ink); background: var(--ai-surface); }
.ai-conversation-rail__footer svg { width: 17px; height: 17px; flex: 0 0 auto; }
.ai-conversation-rail__footer p svg { color: var(--ai-success); }
.ai-sidebar-backdrop { display: none; }

.ai-chat { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; background: var(--ai-surface); }
.ai-chat__context { display: none; min-width: 0; align-items: center; justify-content: space-between; gap: 18px; padding: 0 36px; border-bottom: 1px solid var(--ai-line); }
.ai-chat__context > div { display: flex; min-width: 0; align-items: baseline; gap: 9px; color: var(--ai-muted); font-size: 14px; }
.ai-chat__context strong { overflow: hidden; color: var(--ai-ink); font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat__context [data-ai-live-state] { color: var(--ai-muted); font-size: 13px; text-align: right; }

.ai-chat__stage { position: relative; min-height: 0; overflow: hidden; background: var(--ai-surface); }
.ai-chat__messages { display: grid; min-width: 0; height: 100%; align-content: start; gap: 32px; overflow-y: auto; overscroll-behavior: contain; padding: 34px max(32px, calc((100% - 900px) / 2)) 40px; scroll-behavior: smooth; }
.ai-chat__messages:empty { display: none; }

.ai-message { display: grid; width: min(900px, 100%); min-width: 0; gap: 9px; }
.ai-message.is-user { width: min(680px, 90%); justify-self: end; }
.ai-message__meta { display: flex; align-items: center; gap: 8px; color: var(--ai-muted); font-size: 13px; font-weight: 680; }
.ai-message.is-user .ai-message__meta { display: none; }
.ai-message__avatar { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--ai-accent-strong); background: var(--ai-accent-soft); font-size: 12px; font-style: normal; font-weight: 800; }
.ai-message.is-user .ai-message__avatar { order: 2; color: #fff; background: var(--ai-accent); }
.ai-message__body { min-width: 0; max-width: 74ch; overflow-wrap: anywhere; color: var(--ai-ink); font-size: 17px; line-height: 1.82; text-wrap: pretty; }
.ai-message.is-user .ai-message__body { justify-self: end; padding: 12px 15px; border: 1px solid #f2d6dd; border-radius: 14px 14px 4px 14px; background: var(--ai-accent-soft); font-size: 16px; line-height: 1.68; }
.ai-message.is-assistant .ai-message__body { padding: 0 1px; }
.ai-message.is-error .ai-message__body { padding: 12px 14px; border: 1px solid #f0c5d0; border-radius: 8px; color: var(--ai-danger); background: #fff4f6; }
.ai-message.is-streaming .ai-message__body::after { display: inline-block; width: 3px; height: 19px; margin-left: 4px; border-radius: 2px; background: var(--ai-accent); content: ""; vertical-align: -3px; animation: ai-caret 900ms steps(1) infinite; }
@keyframes ai-caret { 50% { opacity: 0; } }

.ai-message__body p { margin: 0; }
.ai-message__body p + p { margin-top: 14px; }
.ai-message__body h3,
.ai-message__body h4,
.ai-message__body h5,
.ai-message__body h6 { margin: 24px 0 9px; color: var(--ai-ink); font-weight: 760; line-height: 1.4; text-wrap: balance; }
.ai-message__body h3:first-child,
.ai-message__body h4:first-child,
.ai-message__body h5:first-child,
.ai-message__body h6:first-child { margin-top: 0; }
.ai-message__body h3 { font-size: 20px; }
.ai-message__body h4 { font-size: 18px; }
.ai-message__body h5,
.ai-message__body h6 { font-size: 17px; }
.ai-message__body strong { font-weight: 760; }
.ai-message__body em { color: #3e4b58; }
.ai-message__body del { color: var(--ai-faint); }
.ai-message__body ul,
.ai-message__body ol { display: grid; gap: 7px; margin: 12px 0; padding-left: 25px; }
.ai-message__body li { padding-left: 2px; }
.ai-message__body li::marker { color: var(--ai-accent); font-weight: 750; }
.ai-message__body blockquote { margin: 14px 0; padding: 11px 14px; border: 1px solid #dce9ea; border-radius: 8px; color: #375a5e; background: var(--ai-info-soft); font-size: 16px; }
.ai-message__body hr { height: 1px; margin: 22px 0; border: 0; background: var(--ai-line); }
.ai-message__body code { padding: 2px 5px; border-radius: 5px; color: #9b2d48; background: #f7edf0; font: .88em/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.ai-message__body a { color: var(--ai-info); font-weight: 680; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; }
.ai-citation { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin: 0 2px; border-radius: 5px; color: var(--ai-info) !important; background: var(--ai-info-soft); font-size: 11px; font-weight: 800; line-height: 1; text-decoration: none !important; vertical-align: 3px; }
.ai-task-item { display: flex; align-items: flex-start; gap: 8px; list-style: none; }
.ai-task-item > span:first-child { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 7px; border: 1px solid var(--ai-line-strong); border-radius: 4px; background: var(--ai-surface); }
.ai-task-item > span:first-child.is-checked { border-color: var(--ai-success); background: var(--ai-success); box-shadow: inset 0 0 0 3px var(--ai-surface); }

.ai-code-block { overflow: hidden; margin: 15px 0; border: 1px solid #dfe3e8; border-radius: 8px; background: #f6f7f9; }
.ai-code-block figcaption { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 13px; border-bottom: 1px solid #e1e4e8; color: var(--ai-muted); font-size: 12px; }
.ai-code-block figcaption span { font-family: "SFMono-Regular", Consolas, monospace; }
.ai-code-block figcaption button { min-height: 28px; padding: 0 7px; border: 0; border-radius: 5px; color: var(--ai-muted); background: transparent; font-size: 12px; }
.ai-code-block figcaption button:hover { color: var(--ai-ink); background: #e9ecf0; }
.ai-code-block pre { overflow-x: auto; margin: 0; padding: 14px; color: #26313d; background: transparent; font: 13px/1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace; white-space: pre; }
.ai-code-block pre code { padding: 0; color: inherit; background: transparent; font: inherit; }

.ai-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; margin: 15px 0; border: 1px solid var(--ai-line); border-radius: 8px; }
.ai-table-wrap table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.ai-table-wrap th,
.ai-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--ai-line); text-align: left; vertical-align: top; }
.ai-table-wrap th { color: #34414e; background: var(--ai-surface-soft); font-weight: 760; }
.ai-table-wrap tr:last-child td { border-bottom: 0; }

.ai-message__attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-message__generated-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; width: min(760px, 100%); margin-top: 12px; }
.ai-message__generated-images a { display: block; overflow: hidden; border: 1px solid var(--ai-line); border-radius: 10px; background: var(--ai-surface-soft); }
.ai-message__generated-images img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ai-message__generated-images a:hover { border-color: var(--ai-info); box-shadow: 0 8px 22px rgb(28 38 48 / 10%); }
.ai-message.is-user .ai-message__attachments { justify-content: flex-end; }
.ai-message__attachment { display: grid; width: 128px; min-height: 92px; grid-template-rows: 90px auto; overflow: hidden; border: 1px solid var(--ai-line); border-radius: 8px; background: var(--ai-surface); }
.ai-message__attachment img { width: 100%; height: 90px; object-fit: cover; background: #f1f3f5; }
.ai-message__attachment i { display: grid; height: 90px; place-items: center; color: var(--ai-muted); background: #f1f3f5; font-size: 13px; font-style: normal; font-weight: 700; }
.ai-message__attachment span { overflow: hidden; padding: 6px 8px; color: var(--ai-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.ai-message__sources { width: min(760px, 100%); margin: 2px 0 3px; }
.ai-message__sources summary { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px; color: var(--ai-info); cursor: pointer; list-style: none; }
.ai-message__sources summary::-webkit-details-marker { display: none; }
.ai-message__source-status { display: inline-flex; min-width: 0; align-items: center; gap: 9px; }
.ai-message__source-status i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ai-info); box-shadow: 0 0 0 4px rgb(40 117 124 / 10%); }
.ai-message__source-status strong { overflow: hidden; font-size: 14px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ai-message__sources summary > small { color: var(--ai-muted); font-size: 12px; white-space: nowrap; }
.ai-message__sources summary > small::after { display: inline-block; margin-left: 6px; content: "⌄"; transition: transform 180ms var(--ai-ease); }
.ai-message__sources[open] summary > small::after { transform: rotate(180deg); }
.ai-message__source-list { display: grid; gap: 2px; margin: 5px 0 13px; padding: 8px; border: 1px solid #dce8e9; border-radius: 8px; background: var(--ai-info-soft); }
.ai-message__source-list > a { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 9px; padding: 9px; border-radius: 6px; color: var(--ai-ink); }
.ai-message__source-list > a:hover { background: rgb(255 255 255 / 74%); }
.ai-message__source-list > a > span:first-child { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; color: var(--ai-info); background: #fff; font-size: 12px; font-weight: 800; }
.ai-message__source-list > a > span:last-child { display: grid; min-width: 0; gap: 2px; }
.ai-message__source-list strong { overflow: hidden; font-size: 14px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ai-message__source-list small { display: -webkit-box; overflow: hidden; color: var(--ai-muted); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ai-message__source-list em { overflow: hidden; color: var(--ai-info); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.ai-message__actions { display: flex; min-height: 29px; align-items: center; gap: 6px; opacity: 0; transition: opacity 160ms var(--ai-ease); }
.ai-message:hover .ai-message__actions,
.ai-message:focus-within .ai-message__actions { opacity: 1; }
.ai-message__actions button { min-height: 29px; padding: 4px 8px; border: 0; border-radius: 6px; color: var(--ai-muted); background: transparent; font-size: 12px; }
.ai-message__actions button:hover { color: var(--ai-ink); background: var(--ai-surface-soft); }

.ai-model-switch-notice { width: fit-content; max-width: min(560px, 100%); margin: 4px auto 16px; padding: 7px 12px; border: 1px solid #dfe6e8; border-radius: 7px; color: var(--ai-info); background: #f5faf9; font-size: 13px; line-height: 1.45; text-align: center; }

.ai-message.is-thinking .ai-message__body { display: inline-flex; width: max-content; align-items: center; gap: 10px; color: var(--ai-muted); font-size: 14px; }
.ai-message.is-thinking .ai-message__body i { width: 16px; height: 16px; border: 2px solid #dce3e7; border-top-color: var(--ai-info); border-radius: 50%; animation: ai-thinking 850ms linear infinite; }
@keyframes ai-thinking { to { transform: rotate(360deg); } }

.ai-chat__welcome { position: absolute; inset: 0; display: grid; max-width: 720px; align-content: center; justify-items: center; margin: auto; padding: 40px 28px 66px; text-align: center; }
.ai-chat__welcome[hidden] { display: none; }
.ai-studio.is-locked .ai-chat__welcome { visibility: hidden; }
.ai-chat__mark { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 14px; color: #fff; background: var(--ai-accent); box-shadow: 0 12px 28px rgb(207 63 95 / 19%); font-size: 17px; font-weight: 850; }
.ai-chat__welcome h1 { margin: 19px 0 0; font-size: 28px; font-weight: 760; line-height: 1.3; text-wrap: balance; }
.ai-chat__welcome > p { max-width: 50ch; margin: 10px 0 0; color: var(--ai-muted); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.ai-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.ai-starters button { min-height: 41px; padding: 8px 12px; border: 1px solid var(--ai-line); border-radius: 8px; color: #44515e; background: var(--ai-surface); font-size: 14px; font-weight: 620; transition: color 170ms var(--ai-ease), border-color 170ms var(--ai-ease), background-color 170ms var(--ai-ease), transform 170ms var(--ai-ease); }
.ai-starters button:hover { border-color: #e6b3bf; color: var(--ai-accent-strong); background: #fff8fa; transform: translateY(-1px); }

.ai-access { position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; width: min(460px, calc(100% - 32px)); grid-template-columns: minmax(0, 1fr) auto; gap: 13px; padding: 24px; border: 1px solid #ebd3d9; border-radius: 10px; background: var(--ai-surface); box-shadow: var(--ai-shadow); transform: translate(-50%, -50%); }
.ai-access[hidden] { display: none; }
.ai-access > div { grid-column: 1 / -1; }
.ai-access strong { font-size: 20px; font-weight: 760; }
.ai-access p { margin: 5px 0 0; color: var(--ai-muted); font-size: 14px; }
.ai-access label { display: grid; gap: 6px; }
.ai-access label span { font-size: 13px; font-weight: 720; }
.ai-access input { min-height: 44px; padding: 0 12px; border: 1px solid var(--ai-line-strong); border-radius: 8px; color: var(--ai-ink); background: var(--ai-surface); }
.ai-access button { min-height: 44px; align-self: end; padding: 0 15px; border: 0; border-radius: 8px; color: #fff; background: var(--ai-accent); font-size: 14px; font-weight: 720; }
.ai-access button:hover { background: var(--ai-accent-strong); }
.ai-access > p { grid-column: 1 / -1; min-height: 1.5em; margin: 0; color: var(--ai-muted); }
.ai-access > p.is-error { color: var(--ai-danger); }

.ai-composer { position: relative; z-index: 4; display: grid; gap: 8px; padding: 12px 28px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ai-line); background: var(--ai-surface); }
.ai-composer__file { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ai-composer__attachments,
.ai-composer__surface,
.ai-composer__footer { width: min(900px, 100%); margin-inline: auto; }
.ai-composer__attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-composer__attachments[hidden] { display: none; }
.ai-attachment-queue__item { position: relative; display: grid; width: 80px; height: 70px; overflow: hidden; border: 1px solid var(--ai-line); border-radius: 8px; background: var(--ai-surface-soft); }
.ai-attachment-queue__item img { width: 100%; height: 100%; object-fit: cover; }
.ai-attachment-queue__item.is-uploading::after { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgb(24 33 43 / 60%); content: "上传中"; font-size: 12px; font-weight: 700; }
.ai-attachment-queue__item button { position: absolute; top: 4px; right: 4px; display: grid; width: 23px; height: 23px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgb(24 33 43 / 78%); font-size: 16px; line-height: 1; }
.ai-attachment-queue__actions { position: absolute; z-index: 1; top: 4px; right: 4px; display: flex; gap: 3px; }
.ai-attachment-queue__actions button { position: static; width: auto; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 720; }
.ai-attachment-queue__actions .ai-attachment-queue__keep { color: #fff; background: rgb(24 33 43 / 78%); }
.ai-attachment-queue__actions .ai-attachment-queue__keep.is-kept { color: #eafff7; background: rgb(25 116 81 / 90%); }
.ai-attachment-queue__actions .ai-attachment-queue__keep:disabled { cursor: wait; opacity: .65; }
.ai-attachment-queue__actions .ai-attachment-queue__remove { width: 23px; padding: 0; border-radius: 50%; }
.ai-attachment-queue__item span { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; padding: 12px 6px 4px; color: #fff; background: rgb(24 33 43 / 58%); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-message__attachment.is-kept { border-color: #acd4d7; }

.ai-composer__surface { position: relative; display: grid; min-height: 58px; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: end; gap: 5px; padding: 7px; border: 1px solid var(--ai-line-strong); border-radius: 12px; background: var(--ai-surface); box-shadow: 0 9px 25px rgb(32 40 50 / 7%); transition: border-color 180ms var(--ai-ease), box-shadow 180ms var(--ai-ease); }
.ai-composer__surface.is-dragging { border-color: var(--ai-accent); background: #fff8fa; box-shadow: 0 0 0 4px rgb(207 63 95 / 11%), 0 12px 32px rgb(32 40 50 / 10%); }
.ai-composer:focus-within .ai-composer__surface { border-color: #dba5b1; box-shadow: 0 0 0 3px rgb(207 63 95 / 9%), 0 9px 25px rgb(32 40 50 / 7%); }
.ai-composer__drop-hint { position: absolute; z-index: 5; inset: 5px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px dashed var(--ai-accent); border-radius: 9px; color: var(--ai-accent-strong); background: rgb(255 248 250 / 94%); pointer-events: none; }
.ai-composer__drop-hint[hidden] { display: none; }
.ai-composer__drop-hint strong { font-size: 14px; font-weight: 760; }
.ai-composer__drop-hint span { color: var(--ai-muted); font-size: 12px; }
.ai-composer__attach,
.ai-composer__send,
.ai-composer__stop { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 8px; transition: color 170ms var(--ai-ease), background-color 170ms var(--ai-ease), transform 170ms var(--ai-ease); }
.ai-composer__attach { color: var(--ai-muted); background: transparent; }
.ai-composer__attach:hover:not(:disabled) { color: var(--ai-accent-strong); background: var(--ai-accent-soft); }
.ai-composer__attach:disabled { color: #b5bcc4; background: transparent; }
.ai-composer__input { display: block; min-width: 0; }
.ai-composer__input > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ai-composer textarea { display: block; width: 100%; min-height: 43px; max-height: 168px; resize: none; padding: 10px 4px; border: 0; outline: 0; color: var(--ai-ink); background: transparent; font-size: 16px; line-height: 1.55; }
.ai-composer textarea:focus-visible { outline: 0; }
.ai-composer textarea::placeholder { color: #697580; opacity: 1; }
.ai-composer textarea:disabled { color: #8a949e; }
.ai-composer__send { color: #fff; background: var(--ai-accent); }
.ai-composer__send:hover:not(:disabled) { background: var(--ai-accent-strong); transform: translateY(-1px); }
.ai-composer__send:disabled { opacity: .4; }
.ai-composer__stop { color: #fff; background: var(--ai-ink); }
.ai-composer__stop[hidden] { display: none; }
.ai-composer__stop span { width: 13px; height: 13px; border-radius: 3px; background: currentColor; }
.ai-composer__footer { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 16px; }
.ai-composer__modes { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--ai-line); border-radius: 10px; background: var(--ai-surface-soft); }
.ai-composer__modes button { position: relative; display: inline-flex; min-height: 31px; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--ai-muted); background: transparent; font-size: 13px; font-weight: 680; transition: color 160ms var(--ai-ease), border-color 160ms var(--ai-ease), background-color 160ms var(--ai-ease), box-shadow 160ms var(--ai-ease), transform 120ms var(--ai-ease); }
.ai-composer__modes button svg { width: 15px; height: 15px; transition: transform 160ms var(--ai-ease); }
.ai-composer__modes button:hover:not(:disabled) { color: var(--ai-info); background: var(--ai-surface); box-shadow: 0 2px 7px rgb(28 38 48 / 6%); }
.ai-composer__modes button:active:not(:disabled) { transform: scale(.97); }
.ai-composer__modes button[aria-pressed="true"] { border-color: #b8dadd; color: var(--ai-info); background: var(--ai-surface); box-shadow: 0 2px 8px rgb(40 117 124 / 13%); }
.ai-composer__modes button[aria-pressed="true"] svg { transform: scale(1.08); }
.ai-composer__modes button[aria-pressed="true"]::after { width: 4px; height: 4px; margin-left: -1px; border-radius: 50%; background: currentColor; content: ""; }
.ai-composer__modes button:disabled { color: #9ca5ae; background: transparent; opacity: .72; }
.ai-composer__modes button:disabled[aria-pressed="true"] { border-color: transparent; box-shadow: none; }
.ai-composer__footer > div:last-child { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 12px; color: var(--ai-muted); font-size: 12px; }
.ai-composer__footer > div:last-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-composer__footer small { color: var(--ai-faint); font-size: 12px; white-space: nowrap; }
.ai-composer__status-line { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ai-transport-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; color: var(--ai-faint); font-size: 11px; }
.ai-transport-status span { padding: 3px 6px; border: 1px solid var(--ai-line); border-radius: 999px; background: var(--ai-surface-soft); white-space: nowrap; }

.ai-model-dialog { position: fixed; inset: 0; width: min(640px, calc(100% - 32px)); max-height: min(700px, calc(100dvh - 32px)); margin: auto; padding: 0; border: 1px solid var(--ai-line); border-radius: 12px; color: var(--ai-ink); background: var(--ai-surface); box-shadow: 0 24px 70px rgb(25 32 40 / 22%); }
.ai-model-dialog::backdrop { background: rgb(24 30 37 / 42%); backdrop-filter: blur(2px); }
.ai-model-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 20px 13px; }
.ai-model-dialog header > div { display: grid; gap: 2px; }
.ai-model-dialog header span { color: var(--ai-muted); font-size: 13px; font-weight: 680; }
.ai-model-dialog h2 { margin: 0; font-size: 20px; font-weight: 760; line-height: 1.35; }
.ai-model-dialog__search { display: flex; align-items: center; gap: 9px; margin: 0 20px 13px; padding: 0 12px; border: 1px solid var(--ai-line-strong); border-radius: 8px; color: var(--ai-muted); background: var(--ai-surface); }
.ai-model-dialog__search:focus-within { border-color: #dba5b1; box-shadow: 0 0 0 3px rgb(207 63 95 / 9%); }
.ai-model-dialog__search input { width: 100%; min-height: 44px; border: 0; outline: 0; color: var(--ai-ink); background: transparent; font-size: 15px; }
.ai-model-dialog__search input:focus-visible { outline: 0; }
.ai-model-dialog__list { display: grid; max-height: 470px; overflow-y: auto; padding: 2px 10px 14px; }
.ai-model-option { display: grid; width: 100%; min-height: 62px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--ai-ink); background: transparent; text-align: left; transition: border-color 160ms var(--ai-ease), background-color 160ms var(--ai-ease); }
.ai-model-option:hover { background: var(--ai-surface-soft); }
.ai-model-option.is-selected { border-color: #efcbd3; background: var(--ai-accent-soft); }
.ai-model-option__name { overflow: hidden; font-size: 15px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.ai-model-option__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; color: var(--ai-muted); font-size: 12px; }
.ai-model-option__meta span { padding: 3px 6px; border-radius: 5px; background: #edf0f3; }
.ai-model-option.is-selected .ai-model-option__meta span { color: var(--ai-accent-strong); background: #f9dfe5; }
.ai-model-dialog__empty { margin: 0; padding: 20px 24px 28px; color: var(--ai-muted); font-size: 15px; text-align: center; }
.ai-context-dialog { position: fixed; inset: 0; width: min(560px, calc(100% - 32px)); max-height: min(680px, calc(100dvh - 32px)); margin: auto; padding: 0; border: 1px solid var(--ai-line); border-radius: 12px; color: var(--ai-ink); background: var(--ai-surface); box-shadow: 0 24px 70px rgb(25 32 40 / 22%); }
.ai-context-dialog::backdrop { background: rgb(24 30 37 / 42%); backdrop-filter: blur(2px); }
.ai-context-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 20px 13px; }
.ai-context-dialog header > div { display: grid; gap: 2px; }
.ai-context-dialog header span { color: var(--ai-muted); font-size: 13px; font-weight: 680; }
.ai-context-dialog h2 { margin: 0; font-size: 20px; font-weight: 760; line-height: 1.35; }
.ai-context-meter { margin: 5px 20px 18px; padding: 14px; border: 1px solid var(--ai-line); border-radius: 10px; background: var(--ai-surface-soft); }
.ai-context-meter__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-context-meter__top strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ai-context-meter__top span, .ai-context-meter p { color: var(--ai-muted); font-size: 12px; }
.ai-context-meter__track { height: 8px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: var(--ai-line); }
.ai-context-meter__track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ai-info); transition: width 250ms var(--ai-ease), background-color 250ms ease; }
.ai-context-meter__track i.is-warning { background: #d79036; }
.ai-context-meter__track i.is-danger { background: var(--ai-danger); }
.ai-context-meter p { margin: 9px 0 0; }
.ai-context-summary { margin: 0 20px; padding: 14px; border: 1px solid var(--ai-line); border-radius: 10px; background: var(--ai-surface); }
.ai-context-summary > div { display: grid; gap: 3px; }
.ai-context-summary small { color: var(--ai-muted); font-size: 12px; }
.ai-context-summary p { max-height: 210px; margin: 12px 0 0; overflow: auto; color: var(--ai-ink); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.ai-context-status { min-height: 24px; margin: 13px 20px 0; color: var(--ai-muted); font-size: 13px; line-height: 1.5; }
.ai-context-status.is-error { color: var(--ai-danger); }
.ai-context-dialog footer { display: flex; justify-content: flex-end; padding: 13px 20px 20px; }
.ai-context-compress { min-height: 42px; padding: 0 15px; border: 0; border-radius: 8px; color: #fff; background: var(--ai-accent); font-size: 13px; font-weight: 720; }
.ai-context-compress:hover:not(:disabled) { background: var(--ai-accent-strong); }
.ai-context-compress:disabled { cursor: wait; opacity: .5; }

@media (max-width: 1040px) {
  .ai-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .ai-conversation-rail { padding-inline: 10px; }
  .ai-chat__messages { padding-inline: 28px; }
  .ai-composer { padding-inline: 22px; }
}

@media (max-width: 780px) {
  .ai-studio { min-height: 0; }
  .ai-studio__bar { height: 60px; padding: 0 12px; }
  .ai-studio__brand strong { font-size: 16px; }
  .ai-studio__brand span { display: none; }
  .ai-sidebar-toggle { display: inline-grid; }
  .ai-home-button { display: none; }
  .ai-model-trigger { width: 148px; min-width: 0; height: 44px; }
  .ai-shell { display: block; height: calc(100dvh - 60px); border-inline: 0; }
  .ai-conversation-rail {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--ai-line);
    transform: translateX(-102%);
    visibility: hidden;
    box-shadow: 18px 0 44px rgb(26 34 43 / 18%);
    transition: transform 220ms var(--ai-ease), visibility 220ms;
  }
  .ai-studio.is-sidebar-open .ai-conversation-rail { transform: translateX(0); visibility: visible; }
  .ai-conversation-rail__header { padding-top: env(safe-area-inset-top); }
  .ai-conversation-rail__header > button { display: inline-grid; }
  .ai-history-item__remove { min-width: 44px; min-height: 44px; margin-right: 2px; opacity: 1; }
  .ai-sidebar-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    border: 0;
    background: rgb(19 25 32 / 42%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms var(--ai-ease), visibility 200ms;
  }
  .ai-studio.is-sidebar-open .ai-sidebar-backdrop { opacity: 1; visibility: visible; }
  .ai-chat { width: 100%; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
  .ai-chat__messages { gap: 27px; padding: 25px 16px 30px; }
  .ai-message { width: 100%; }
  .ai-message.is-user { width: min(100%, 92%); }
  .ai-message__body { max-width: 100%; font-size: 16.5px; line-height: 1.78; }
  .ai-message.is-user .ai-message__body { font-size: 16px; }
  .ai-message__actions { opacity: 1; }
  .ai-chat__welcome { padding: 32px 18px 48px; }
  .ai-chat__welcome h1 { font-size: 25px; }
  .ai-chat__welcome > p { font-size: 15px; }
  .ai-starters { display: grid; width: min(390px, 100%); margin-top: 22px; }
  .ai-starters button { width: 100%; }
  .ai-access { grid-template-columns: 1fr; padding: 22px; }
  .ai-access button { width: 100%; }
  .ai-composer { padding: 10px 11px calc(11px + env(safe-area-inset-bottom)); }
  .ai-composer__footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ai-composer__status-line { width: 100%; justify-content: space-between; }
  .ai-composer__footer > div:last-child { width: 100%; justify-content: flex-start; }
  .ai-model-dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: 84dvh; margin: auto 0 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 16px 16px 0 0; }
  .ai-model-dialog header { padding: 19px 16px 12px; }
  .ai-model-dialog__search { margin-inline: 16px; }
  .ai-context-dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: 84dvh; margin: auto 0 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 16px 16px 0 0; }
  .ai-context-dialog header { padding: 19px 16px 12px; }
  .ai-context-meter, .ai-context-summary { margin-inline: 16px; }
  .ai-context-status { margin-inline: 16px; }
  .ai-context-dialog footer { padding-inline: 16px; }
}

@media (max-width: 480px) {
  .ai-studio__bar { gap: 7px; }
  .ai-studio__brand { gap: 5px; }
  .ai-model-trigger { width: 126px; padding-inline: 9px; }
  .ai-context-trigger { width: 42px; justify-content: center; padding-inline: 0; }
  .ai-context-trigger span { display: none; }
  .ai-studio__actions { gap: 2px; }
  .ai-icon-button { width: 42px; height: 42px; }
  .ai-clear-button { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .ai-clear-button span { display: none; }
  .ai-chat__mark { width: 52px; height: 52px; }
  .ai-chat__welcome h1 { font-size: 23px; }
  .ai-message__meta { font-size: 12px; }
  .ai-message__avatar { width: 26px; height: 26px; }
  .ai-message.is-user .ai-message__body { padding: 11px 13px; }
  .ai-message__attachment { width: 112px; }
  .ai-message__sources summary { min-height: 36px; }
  .ai-message__source-status strong { font-size: 13px; }
  .ai-message__source-list { padding: 5px; }
  .ai-composer__surface { min-height: 60px; grid-template-columns: 44px minmax(0, 1fr) auto auto; padding: 5px; border-radius: 11px; }
  .ai-composer__attach,
  .ai-composer__send,
  .ai-composer__stop { width: 44px; height: 44px; }
  .ai-composer textarea { min-height: 44px; padding-block: 9px; font-size: 16px; }
  .ai-composer__modes button { min-height: 30px; padding-inline: 8px; font-size: 12px; }
  .ai-access strong { font-size: 19px; }
  .ai-model-dialog h2 { font-size: 18px; }
}

@media (prefers-color-scheme: dark) {
  body:has(.ai-studio) { background: #15191e; }
  .ai-studio {
    --ai-canvas: #15191e;
    --ai-surface: #1d2228;
    --ai-surface-soft: #242a31;
    --ai-sidebar: #191e24;
    --ai-ink: #eef1f4;
    --ai-muted: #b2bac3;
    --ai-faint: #929ba5;
    --ai-line: #343b44;
    --ai-line-strong: #46505b;
    --ai-accent-soft: #422a32;
    --ai-info: #79c0c5;
    --ai-info-soft: #20383b;
    --ai-shadow: 0 18px 50px rgb(0 0 0 / 28%);
  }
  .ai-new-thread { border-color: #6a3c47; background: #3a2830; }
  .ai-new-thread:hover { border-color: #87505d; background: #442c35; }
  .ai-new-thread small { color: #d0aeb6; }
  .ai-agent-picker__list button > i,
  .ai-history-item__open > i { color: #d5d9de; background: #303740; }
  .ai-agent-picker__list button.is-active { border-color: #65404a; }
  .ai-history-item:hover { background: rgb(255 255 255 / 5%); }
  .ai-history-item.is-active { background: #242a31; }
  .ai-history-item__remove:hover { background: #3b252c; }
  .ai-conversation-rail__footer a:hover { background: #242a31; }
  .ai-message.is-user .ai-message__body { border-color: #683e49; }
  .ai-message.is-error .ai-message__body { border-color: #72424e; color: #ffb4c3; background: #3b252c; }
  .ai-message__body em { color: #d6dbe0; }
  .ai-message__body code { color: #ffb2c2; background: #3a2930; }
  .ai-message__body blockquote { border-color: #35565a; color: #b8e0e2; }
  .ai-code-block { border-color: #3b434c; background: #242a31; }
  .ai-code-block figcaption { border-color: #3b434c; }
  .ai-code-block pre { color: #e8ecf0; }
  .ai-code-block figcaption button:hover { background: #303740; }
  .ai-table-wrap th { color: #e4e8ec; }
  .ai-message__source-list > a:hover { background: rgb(255 255 255 / 6%); }
  .ai-message__source-list > a > span:first-child { background: #283f42; }
  .ai-model-option__meta span { background: #303740; }
  .ai-model-option.is-selected .ai-model-option__meta span { background: #53323b; }
  .ai-attachment-queue__item span { background: rgb(9 13 17 / 68%); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-studio *,
  .ai-studio *::before,
  .ai-studio *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
