.assistant-dock {
  --assistant-parking-top: 66px;
  --assistant-parking-bottom: 49px;
  --assistant-launcher-width: 132px;
  --assistant-launcher-height: 38px;
  --assistant-launcher-rise: calc(max(0px, 100dvh - var(--assistant-parking-top) - var(--assistant-parking-bottom) - var(--assistant-launcher-height)) * var(--assistant-anchor-y, 0));
  --assistant-open-rise: min(var(--assistant-launcher-rise), max(0px, 100dvh - 425px));
  --assistant-dock-rise: var(--assistant-launcher-rise);
  position: absolute; inset-inline: 18px; bottom: calc(var(--assistant-parking-bottom) + var(--assistant-dock-rise)); z-index: 8;
  display: grid; grid-template-columns: minmax(0, 1fr); pointer-events: none;
  --agent-surface: var(--surface); --agent-subtle: var(--surface-subtle); --agent-line: var(--line); --agent-muted: var(--muted);
}
.assistant-dock[data-open] { --assistant-dock-rise: var(--assistant-open-rise); }
.assistant-shell { position: relative; }
.assistant-dock:not([data-fullscreen]) .assistant-shell {
  --assistant-compact-width: min(100%, var(--assistant-launcher-width));
  --assistant-placed-width: var(--assistant-compact-width);
  justify-self: start; width: var(--assistant-placed-width);
  left: clamp(0px, calc((100% - var(--assistant-compact-width)) * var(--assistant-anchor-x, .5) +
    (var(--assistant-compact-width) - var(--assistant-placed-width)) / 2), calc(100% - var(--assistant-placed-width)));
}
.assistant-dock[data-open]:not([data-fullscreen]) .assistant-shell { --assistant-placed-width: min(100%, var(--assistant-width, 660px)); }
.assistant-form, .assistant-panel { pointer-events: auto; }
.assistant-dock:not([data-open]) .assistant-form { padding: 0; }
.assistant-dock:not([data-open]) .assistant-input-row,
.assistant-dock[data-open] .assistant-launcher { display: none; }
.assistant-launcher {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: calc(var(--assistant-launcher-height) - 2px); padding: 0 10px;
  border-radius: 16px; color: var(--ink); font-size: 12px; font-weight: 650; text-align: start;
  touch-action: none; user-select: none;
}
.assistant-launcher:not(:disabled) { cursor: grab; }
.assistant-dock[data-launcher-dragging] .assistant-launcher { cursor: grabbing; }
.assistant-launcher:not(:disabled):hover { color: var(--accent); }
.assistant-dock:not([data-open]) .assistant-form:hover .assistant-form-surface { border-color: var(--accent); }
.assistant-launcher-orb {
  position: relative; display: grid; flex: none; place-items: center; width: 26px; height: 26px;
  border-radius: 9px; background: var(--surface-tinted);
}
#assistant-launcher-orb { display: block; width: 20px; height: 20px; }
#assistant-launcher-clover { display: grid; width: 22px; height: 22px; place-items: center; }
.assistant-launcher-unread {
  position: absolute; right: 0; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #e84059; box-shadow: 0 0 0 1.5px var(--surface-raised);
}
.assistant-launcher-copy { display: grid; gap: 1px; min-width: 0; line-height: 14px; }
.assistant-launcher-detail {
  overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 11px;
  text-overflow: ellipsis; white-space: nowrap;
}
.assistant-panel {
  position: absolute; bottom: calc(100% + 10px); inset-inline: 0; display: flex; flex-direction: column;
  height: var(--assistant-height, 550px);
  max-height: calc(100dvh - 195px - var(--assistant-open-rise) - var(--assistant-draft-files-height, 0px));
  border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface-raised);
  box-shadow: 0 20px 52px -15px rgb(var(--shadow-color) / 0.271), 0 3px 12px rgb(var(--shadow-color) / 0.063);
  overflow: hidden; transform-origin: center bottom;
}
.assistant-dock[data-opening] .assistant-panel {
  animation: assistant-panel-enter .23s cubic-bezier(.2,.8,.25,1) both;
}
.assistant-panel:has(.assistant-welcome) { height: var(--assistant-height, auto); }
.assistant-dock:not([data-fullscreen]) .assistant-panel:has(.assistant-welcome):has(.assistant-history:not([hidden])) {
  height: var(--assistant-height, 340px);
}
.assistant-dock[data-fullscreen] {
  position: fixed; inset: 0; z-index: 11; background: var(--surface-raised);
}
.assistant-dock[data-fullscreen] .assistant-shell {
  width: 100%; min-width: 0; min-height: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
}
.assistant-dock[data-fullscreen] .assistant-panel {
  position: relative; inset: auto; height: auto; max-height: none;
  border: 0; border-radius: 0; box-shadow: none; animation: none;
}
.assistant-dock[data-fullscreen] .assistant-form { width: 100%; }
.assistant-dock[data-open][data-fullscreen] .assistant-form-surface {
  inset: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
}
.assistant-dock[data-fullscreen] .assistant-beam rect { rx: 0; }
:is(#assistant-global-close, .assistant-global-minimize) { display: none; flex: none; }
:root[data-global-assistant] { background: transparent; }
#assistant-global-controls { display: none; }
[data-global-assistant] .app { height: 100dvh; display: block; background: transparent; }
[data-global-assistant] .app > :not(.workspace),
[data-global-assistant] .workspace > :not(.assistant-dock),
[data-global-assistant] :is(#tray-count, #file-tray, #tray-glow, #tray-drop-zone),
[data-global-assistant] #assistant-fullscreen,
[data-global-assistant] [data-assistant-resize] { display: none; }
[data-global-assistant] .workspace { display: block; position: static; margin: 0; background: transparent; }
[data-global-assistant] .assistant-dock { position: fixed; inset: 0; }
[data-global-assistant] .assistant-dock:not([data-fullscreen]) .assistant-shell {
  left: 0; width: 100%; height: 100%; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--surface);
}
[data-global-assistant] .assistant-panel {
  position: relative; inset: auto; height: auto; max-height: none; min-height: 0; flex: 0 1 400px;
  animation: none; border: 0; box-shadow: none;
}
[data-global-assistant] .assistant-dock[data-open] #assistant-global-controls {
  display: block; flex: 0 0 18px; pointer-events: none;
  position: relative; z-index: 1;
}
#assistant-global-thread-toggle {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  display: grid; place-items: center; width: 38px; height: 16px; padding: 0;
  border-radius: 8px 8px 0 0; color: var(--secondary-ink);
  background: var(--surface); pointer-events: auto;
}
#assistant-global-thread-toggle:hover { color: var(--accent); }
#assistant-global-thread-toggle svg { width: 12px; height: 12px; transform: rotate(180deg); }
#assistant-global-thread-toggle[aria-expanded="true"] svg { transform: none; }
[data-global-assistant] .assistant-dock:not([data-global-thread]) .assistant-panel { pointer-events: none; }
[data-global-assistant] .assistant-dock:not([data-global-thread]) .assistant-panel > :is(.assistant-head,.assistant-body) { opacity: 0; }
[data-global-assistant] .assistant-dock[data-global-minimized] .assistant-form {
  width: 100%; height: var(--assistant-launcher-height); display: grid; place-items: center;
}
[data-global-assistant] .assistant-dock[data-global-minimized] .assistant-launcher {
  width: min(100%, calc(var(--assistant-launcher-width) - 2px));
}
@media (prefers-reduced-motion: no-preference) {
  [data-global-assistant] .assistant-panel > :is(.assistant-head,.assistant-body) {
    transition: opacity .20s cubic-bezier(.22,.61,.36,1);
  }
  #assistant-global-thread-toggle svg { transition: transform .24s cubic-bezier(.22,.61,.36,1); }
  [data-global-assistant] [data-global-collapsing] :is(.assistant-head,.assistant-body,.assistant-input-row,.assistant-form-footer,.assistant-draft-files) {
    animation: assistant-global-content-out .075s ease-in both;
  }
  [data-global-assistant] [data-global-capsule-entering] .assistant-launcher {
    animation: assistant-global-content-in .13s .13s cubic-bezier(.22,.61,.36,1) both;
  }
  [data-global-assistant] [data-global-restoring] :is(.assistant-input-row,.assistant-form-footer,.assistant-draft-files,.assistant-panel > .assistant-head,.assistant-panel > .assistant-body) {
    animation: assistant-global-content-in .17s .09s cubic-bezier(.22,.61,.36,1) both;
  }
}
@keyframes assistant-global-content-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes assistant-global-content-out { from { opacity: 1; } to { opacity: 0; } }
[data-global-assistant] #assistant-global-minimize-thread,
[data-global-assistant] .assistant-dock:not([data-global-thread]) :is(#assistant-global-close, #assistant-global-minimize-composer) {
  display: inline-grid;
}
.assistant-global-title-grip { display: none; }
[data-global-assistant] .assistant-global-title-grip {
  display: grid; place-items: center; align-self: stretch; flex: 1; min-width: 24px;
}
[data-global-assistant] .assistant-global-title-grip::after {
  content: ''; width: 24px; height: 4px; border-radius: 2px; background: var(--line-strong);
}
[data-global-assistant] :is(.assistant-global-title-grip,.assistant-global-scope-grip,.assistant-input-icon,.assistant-launcher:not(:disabled)) {
  cursor: grab; user-select: none; touch-action: none;
}
[data-global-assistant] #assistant-input { cursor: text; user-select: text; }
[data-global-assistant] .assistant-form { flex: none; }
:root[data-global-assistant] .assistant-dock .assistant-form-surface { border: 0; box-shadow: none; }
.assistant-shortcut-settings { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 12px; }
.summary-settings .assistant-shortcut-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 43px; padding: 7px 11px; margin: 0; border: 0;
}
.summary-settings .assistant-shortcut-row + .assistant-shortcut-row { border-top: 1px solid var(--line); }
.summary-settings .assistant-shortcut-row > label { margin: 0; }
.assistant-shortcut-row input[role="switch"] { flex: none; margin: 0; }
#assistant-shortcut-record {
  flex: none; min-width: 92px; justify-content: center; padding-inline: 11px;
  border: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums;
}
#assistant-shortcut-record:hover:not(:disabled) { background: var(--selected); }
#assistant-shortcut-record[data-recording] { outline: 2px solid var(--focus); }
#assistant-shortcut-status:empty { display: none; }
.assistant-dock[data-fullscreen-transition] { z-index: 11; background: transparent; }
.assistant-dock[data-fullscreen-transition] :is(.assistant-panel, .assistant-form) {
  position: fixed; inset: auto; max-height: none;
}
[data-assistant-resize] {
  position: absolute; z-index: 2; touch-action: none; user-select: none;
}
.assistant-dock:is([data-fullscreen], [data-fullscreen-transition], [data-opening]) [data-assistant-resize] {
  display: none;
}
[data-assistant-resize="n"] { inset: 0 16px auto; height: 8px; cursor: ns-resize; }
[data-assistant-resize="e"], [data-assistant-resize="w"] { inset-block: 16px 10px; width: 8px; cursor: ew-resize; }
[data-assistant-resize="e"] { right: 0; }
[data-assistant-resize="w"] { left: 0; }
[data-assistant-resize="nw"], [data-assistant-resize="ne"] { top: 0; width: 16px; height: 16px; }
[data-assistant-resize="nw"] { left: 0; cursor: nwse-resize; }
[data-assistant-resize="ne"] { right: 0; cursor: nesw-resize; }
[data-assistant-resize]:focus-visible { outline-offset: -2px; border-radius: 6px; }
[data-assistant-resize]:is(:hover, [data-dragging])::after {
  content: ''; position: absolute; inset: 33%; border-radius: 3px; background: var(--accent); opacity: .55;
}
@keyframes assistant-panel-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.assistant-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 13px; border-bottom: 1px solid var(--agent-line); background: var(--surface-raised);
}
.assistant-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.assistant-identity > div { min-width: 0; }
.assistant-avatar, .assistant-welcome-mark, .assistant-bubble-avatar {
  display: grid; place-items: center; flex: none; padding: 0;
  border-radius: 10px; background: var(--surface-tinted);
}
.assistant-avatar, .assistant-bubble-avatar { width: 34px; height: 34px; }
.assistant-dock [data-bot-size] canvas { pointer-events: none; }
.assistant-head h2 { margin: 0 0 2px; font-size: 14px; font-weight: 650; }
.assistant-head p { margin: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-head-actions { display: flex; flex: none; }
#assistant-history-toggle { flex: none; }
#assistant-history-toggle[aria-expanded="true"] { color: var(--accent); background: var(--selected); }
.assistant-body { display: flex; flex: 1; min-height: 0; position: relative; container-type: inline-size; }
.assistant-conversation { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.assistant-history {
  display: flex; flex: 0 0 174px; flex-direction: column; min-height: 0;
  padding: 10px 7px; border-inline-end: 1px solid var(--line); background: var(--surface-tinted);
}
.assistant-history h3 { margin: 0 7px 8px; font-size: 12px; font-weight: 650; }
.assistant-history-list { display: grid; gap: 3px; min-height: 0; overflow: auto; scrollbar-width: thin; }
.assistant-history-list button { display: grid; gap: 3px; min-width: 0; padding: 7px; border-radius: 7px; text-align: start; }
.assistant-history-list button:focus-visible { outline-offset: -2px; }
.assistant-history-list button:not(:disabled):hover { background: var(--hover); }
.assistant-history-list button[aria-current] { color: var(--accent); background: var(--selected); }
.assistant-history-list strong, .assistant-history-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-history-list strong { font-size: 12px; font-weight: 610; }
.assistant-history-list small, .assistant-history-empty { font-size: 11px; color: var(--muted); }
.assistant-history-empty { margin: 0 7px; }
@container (max-width: 490px) {
  .assistant-history { position: absolute; z-index: 1; inset: 0 auto 0 0; width: min(174px, 72%); box-shadow: 4px 0 16px rgb(var(--shadow-color) / .16); }
}
.assistant-switch-folder { align-self: flex-start; padding: 6px 15px; color: var(--accent); font-size: 12px; }
.assistant-switch-folder:hover { text-decoration: underline; }
.assistant-thread { flex: 1; min-height: 0; overflow: auto; padding: 17px 18px; scrollbar-width: thin; }
.assistant-dock:not([data-fullscreen]) .assistant-thread {
  margin-right: 8px; padding-right: 10px;
}
.assistant-thread > * { max-width: 860px; margin-inline: auto; }
.assistant-turn { margin-bottom: 20px; }
.assistant-message { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: start; }
.assistant-message-body { min-width: 0; }
.assistant-question { display: grid; justify-items: end; gap: 4px; margin: 0 0 12px 32px; }
.assistant-message-label { padding-right: 2px; color: var(--agent-muted); font-size: 10px; font-weight: 600; }
.assistant-question p {
  margin: 0; max-width: 92%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px 10px 3px 10px;
  background: var(--surface-tinted); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text;
}
.assistant-answer {
  margin: 0 0 9px; padding: 10px 13px 13px;
  border: 1px solid var(--line-strong); border-inline-start: 3px solid var(--accent);
  border-radius: 10px; background: var(--surface);
}
.assistant-answer-head { display: flex; align-items: center; justify-content: space-between; min-height: 27px; margin-bottom: 8px; }
.assistant-answer-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; margin: 0; color: var(--ink); font-size: 12px; font-weight: 650; }
.assistant-answer-model { color: var(--agent-muted); font-size: 10px; font-weight: 450; overflow-wrap: anywhere; }
.assistant-copy-answer { display: grid; place-items: center; width: 26px; height: 25px; border-radius: 6px; color: var(--agent-muted); }
.assistant-copy-answer:hover, .assistant-copy-answer.is-copied { color: var(--accent); background: var(--hover); }
.assistant-copy-answer svg { width: 13px; height: 13px; }
.markdown { color: var(--ink); font-size: 13px; line-height: 1.62; overflow-wrap: anywhere; user-select: text; }
.markdown :is(p, ul, ol, blockquote, pre, .markdown-table-wrap) { margin: 0 0 .8em; }
.markdown > :last-child, .markdown blockquote > :last-child { margin-bottom: 0; }
.markdown :is(h1,h2,h3,h4,h5,h6) { margin: 1.05em 0 .38em; line-height: 1.3; }
.markdown > :first-child { margin-top: 0; }
.markdown h1 { font-size: 1.48em; }
.markdown h2 { font-size: 1.3em; }
.markdown h3 { font-size: 1.17em; }
.markdown :is(h4,h5,h6) { font-size: 1em; }
.markdown h6 { color: var(--agent-muted); }
.markdown :is(ul,ol) { padding-inline-start: 1.7em; }
.markdown li + li { margin-top: .23em; }
.markdown li :is(ul,ol), .markdown li p { margin: .23em 0 0; }
.markdown .markdown-task { list-style: none; }
.markdown-task input { margin: 0 .25em 0 -.2em; vertical-align: -.15em; }
.markdown a[href] { color: var(--accent); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.markdown a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.markdown .markdown-image-link::before { content: '图片 · '; color: var(--agent-muted); }
.markdown img { max-width: 100%; height: auto; }
.markdown blockquote {
  padding: .2em .75em; border-inline-start: 3px solid var(--line-strong); color: var(--secondary-ink);
  background: var(--surface-subtle); border-radius: 0 6px 6px 0;
}
.markdown hr { margin: 1em 0; border: 0; border-top: 1px solid var(--line); }
.markdown code, .markdown pre, .assistant-draft-plain { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown :not(pre) > code { padding: .13em .35em; border-radius: 4px; background: var(--hover); color: var(--accent); font-size: .91em; }
.markdown pre {
  max-height: 230px; padding: 9px 11px; overflow: auto; border: 1px solid var(--agent-line);
  border-radius: 8px; background: var(--surface-subtle); font-size: 11px; line-height: 1.55;
}
.markdown-table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--agent-line); border-radius: 8px; background: var(--surface); }
.markdown table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
.markdown :is(th,td) { padding: 7px 9px; border-right: 1px solid var(--agent-line); border-bottom: 1px solid var(--agent-line); text-align: left; vertical-align: top; }
.markdown :is(th,td):last-child { border-right: 0; }
.markdown tr:last-child td { border-bottom: 0; }
.markdown th { min-width: 5em; color: var(--secondary-ink); background: var(--surface-subtle); font-weight: 650; }
.markdown tbody tr:nth-child(even) { background: var(--surface-raised); }
.assistant-error { color: var(--danger); font-size: 12px; }
.assistant-welcome { display: grid; justify-items: start; align-content: center; min-height: 100%; padding: 10px 5px 7px; }
.assistant-welcome-mark { width: 60px; height: 60px; margin-bottom: 10px; border-radius: 16px; }
.assistant-welcome h3 { margin: 0 0 5px; font-size: 15px; }
.assistant-welcome > p { margin: 0 0 16px; max-width: 340px; color: var(--agent-muted); line-height: 1.55; }
.assistant-suggestions { display: grid; width: min(100%, 392px); gap: 6px; }
.assistant-suggestion {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px;
  padding: 7px 10px; border: 1px solid var(--agent-line); border-radius: 9px; background: var(--agent-surface); text-align: left;
}
.assistant-suggestion:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.assistant-suggestion span { color: var(--muted); }
.assistant-suggestion svg { width: 13px; height: 13px; }
.assistant-activity, .assistant-draft, .assistant-attachments { margin: 8px 0; border: 1px solid var(--agent-line); border-radius: 10px; background: var(--agent-surface); }
:is(.assistant-activity, .assistant-draft, .assistant-attachments) > summary { padding: 8px 10px; cursor: pointer; overflow-wrap: anywhere; color: var(--secondary-ink); font-size: 11px; font-weight: 600; }
.assistant-tool-list { display: grid; gap: 1px; padding: 2px 6px 7px; }
.assistant-tool-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 38px; padding: 5px 6px; border-radius: 7px; }
.assistant-tool-row:hover { background: var(--agent-subtle); }
.assistant-tool-icon, .assistant-tool-spinner { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); background: var(--surface-tinted); }
.assistant-tool-icon svg { width: 12px; height: 12px; }
.assistant-tool-spinner::before, .assistant-working-orb::before { content: ''; width: 8px; height: 8px; border: 1.5px solid var(--switch-off); border-top-color: var(--accent); border-radius: 50%; animation: assistant-spin .8s linear infinite; }
.assistant-tool-copy { display: grid; gap: 1px; min-width: 0; }
.assistant-tool-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.assistant-tool-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--agent-muted); font-size: 10px; }
.assistant-tool-state { color: var(--muted); font-size: 9px; }
.assistant-tool-row[data-state="failed"] :is(.assistant-tool-icon,.assistant-tool-state) { color: var(--danger); }
.assistant-attachment-items { display: grid; gap: 8px; padding: 0 8px 8px; }
.assistant-inline-file { width: min(100%, 340px); margin-block: .7em; }
.assistant-inline-file:has(.assistant-file-card[data-image]) { width: min(100%, 285px); }
.assistant-image-gallery, .assistant-document-list {
  display: grid; align-items: start; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}
.assistant-document-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
.assistant-file-card {
  position: relative; min-width: 0; border: 1px solid var(--agent-line); border-radius: 10px;
  background: var(--agent-surface);
}
.assistant-file-card:hover, .assistant-file-card:focus-within { border-color: var(--line-strong); }
.assistant-file-preview {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 8px 38px 8px 8px; border-radius: 9px; text-align: left;
}
.assistant-file-preview:hover:not(:disabled) { background: var(--agent-subtle); }
.assistant-file-preview:disabled { opacity: 1; color: var(--agent-muted); }
.assistant-file-stage {
  display: grid; flex: none; place-items: center; width: 30px; height: 30px; overflow: hidden;
  border-radius: 7px; background: var(--surface-tinted); color: var(--agent-muted);
}
.assistant-file-icon { display: grid; place-items: center; }
.assistant-file-icon svg, .assistant-file-more svg { width: 15px; height: 15px; }
.assistant-file-label { display: grid; gap: 2px; min-width: 0; }
.assistant-file-label > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-file-label strong { font-size: 12px; font-weight: 600; }
.assistant-file-label small { color: var(--agent-muted); font-size: 10px; }
.assistant-file-more {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--secondary-ink);
}
.assistant-file-more:hover { color: var(--ink); background: var(--hover); }
.assistant-file-preview:focus-visible, .assistant-file-more:focus-visible {
  outline: 2px solid var(--focus); outline-offset: -2px;
}
.assistant-file-card[data-image] .assistant-file-preview {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden;
}
.assistant-file-card[data-image] .assistant-file-stage {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; background: var(--surface-subtle);
}
.assistant-file-card[data-image] .assistant-file-stage svg { width: 25px; height: 25px; }
.assistant-file-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.assistant-file-card[data-image] .assistant-file-label { padding: 8px 38px 8px 9px; }
.assistant-file-card[data-image] .assistant-file-more { top: auto; bottom: 9px; transform: none; }
.assistant-draft { border-color: var(--line-strong); box-shadow: 0 6px 20px rgb(var(--shadow-color) / 0.051); }
.assistant-draft-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.assistant-draft-title strong { overflow-wrap: anywhere; color: var(--ink); font-size: 11px; }
.assistant-draft-badge { flex: none; padding: 2px 5px; border-radius: 5px; color: var(--accent); background: var(--hover); font-size: 9px; }
.assistant-draft-note { margin: 0; padding: 0 10px 7px; color: var(--agent-muted); font-size: 10px; }
.assistant-draft-preview, .assistant-draft-plain {
  max-height: 250px; margin: 0 7px 7px; padding: 10px 11px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised);
}
.assistant-draft-plain { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.55; user-select: text; }
.assistant-draft-actions { display: flex; align-items: center; gap: 7px; padding: 0 8px 8px; }
.assistant-draft-actions .settings-reset { order: 1; }
.assistant-draft-actions .assistant-draft-feedback { order: 2; margin-right: auto; }
.assistant-draft-actions .settings-done { order: 3; }
.assistant-draft-feedback { color: var(--muted); font-size: 11px; }
.assistant-progress { margin: 0 12px 8px; padding: 7px; border: 1px solid var(--agent-line); border-radius: 9px; background: var(--surface-subtle); color: var(--agent-muted); }
.assistant-working { display: flex; align-items: center; gap: 7px; min-height: 24px; padding: 0 4px; font-size: 11px; }
.assistant-working-orb { display: grid; place-items: center; width: 16px; height: 16px; }
.assistant-progress .assistant-tool-list { padding-bottom: 0; }
.assistant-form {
  position: relative; isolation: isolate; padding: 7px 9px; border: 1px solid transparent;
}
.assistant-form-surface {
  position: absolute; inset: -1px; z-index: -1; border: 1px solid var(--line-strong); border-radius: 17px;
  transform-origin: center bottom; pointer-events: none;
  background: linear-gradient(170deg, var(--surface), var(--surface-raised)); box-shadow: 0 4px 14px rgb(var(--shadow-color) / 0.11), inset 0 1px var(--shine);
}
.assistant-dock[data-open] .assistant-form { padding: 9px 10px 8px; }
.assistant-dock[data-open] .assistant-form-surface {
  border-color: var(--line-strong); background: linear-gradient(155deg, var(--surface) 45%, var(--surface-raised) 100%);
  box-shadow: 0 9px 26px -12px rgb(var(--shadow-color) / 0.275), inset 0 1px var(--shine);
}
.assistant-shockwave {
  position: fixed; inset: 0; z-index: 7; width: 100vw; height: 100vh; pointer-events: none; contain: strict;
}
.assistant-beam {
  position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px);
  overflow: visible; pointer-events: none; opacity: 0;
}
.assistant-dock[data-running]:not([data-opening]) .assistant-beam { opacity: .56; transition: opacity .18s ease-out; }
.assistant-beam rect { x: 1px; y: 1px; width: calc(100% - 2px); height: calc(100% - 2px); rx: 16px; }
.assistant-beam-bloom rect { stroke-width: 6px; opacity: .36; }
.assistant-beam-edge rect { stroke-width: 1.1px; }
.assistant-input-row { position: relative; display: flex; align-items: flex-start; gap: 9px; }
.assistant-draft-files, .assistant-question-files {
  display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; max-width: 100%;
}
.assistant-draft-files { max-height: 83px; overflow-y: auto; padding-bottom: 7px; }
.assistant-dock:not([data-open]) .assistant-draft-files, .assistant-draft-files[hidden] { display: none; }
.assistant-question-files { justify-content: flex-end; }
.assistant-attachment-chip {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: min(100%, 300px);
  padding: 3px 6px; border: 1px solid var(--agent-line); border-radius: 7px;
  color: var(--secondary-ink); background: var(--surface-tinted); font-size: 11px;
}
.assistant-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-attachment-icon, .assistant-attachment-remove { display: grid; place-items: center; flex: none; }
.assistant-attachment-icon svg, .assistant-attachment-remove svg { width: 12px; height: 12px; }
.assistant-attachment-remove { width: 20px; height: 20px; border-radius: 4px; color: var(--muted); }
.assistant-attachment-remove:hover { background: var(--hover); color: var(--ink); }
.assistant-input-icon {
  display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 9px;
  color: var(--accent); background: var(--hover);
}
.assistant-input-icon svg { width: 14px; height: 14px; }
#assistant-input {
  display: block; width: 100%; min-width: 0; height: 27px; padding: 3px 0; resize: none;
  border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; line-height: 21px;
  overflow: hidden;
}
#assistant-input::placeholder { color: var(--muted); }
.assistant-dock[data-open] #assistant-input { height: 69px; overflow: auto; }
.assistant-form-footer { position: relative; display: flex; align-items: center; gap: 7px; margin-top: 5px; container-type: inline-size; }
.assistant-context { display: flex; flex: 1; min-width: 0; gap: 4px; overflow: hidden; }
.assistant-context-chip {
  display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 180px; padding: 4px 7px;
  border-radius: 7px; color: var(--muted); background: var(--line-soft); font-size: 10px; white-space: nowrap;
}
.assistant-context-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.assistant-choose-folder { border: 0; cursor: pointer; }
.assistant-choose-folder:not(:disabled):hover { color: var(--accent); background: var(--hover); }
.assistant-choose-folder > [data-icon] { flex: none; }
#assistant-folder-label { overflow: hidden; text-overflow: ellipsis; }
.assistant-context-chip-accent { flex: none; color: var(--accent); background: var(--hover); }
.assistant-context-chip svg { width: 11px; height: 11px; }
.assistant-disclosure { color: var(--muted); font-size: 10px; }
.assistant-model-controls { display: flex; align-items: center; gap: 4px; min-width: 0; }
select[data-ai-select] { display: none; }
.ai-select-trigger {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; min-height: 32px;
  padding: 0 11px; border: 0; border-radius: 999px; background: var(--line-soft);
  color: var(--ink); font-size: 12px; font-weight: 550; text-align: left;
}
.ai-select-trigger:hover, .ai-select-trigger[aria-expanded="true"] { background: var(--hover); }
.ai-select-trigger[data-composer] { max-width: min(217px, 37vw); font-size: 11px; }
:root:not([data-global-assistant]) .ai-select-trigger[data-composer][aria-expanded="true"] { opacity: 0; }
.ai-select-trigger svg { width: 12px; height: 12px; color: var(--muted); }
.ai-select-symbol, .ai-select-chevron { flex: none; }
.ai-select-chevron { margin-left: 2px; }
.ai-select-chevron svg { width: 10px; height: 10px; }
.ai-select-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-select-depth { flex: none; color: var(--muted); font-weight: 450; }

.ai-select-menu {
  position: fixed; z-index: 45; inset: auto; max-height: calc(100dvh - 16px); margin: 0; padding: 8px 10px 9px;
  border: 1px solid var(--line); border-radius: 15px; overflow: auto; color: var(--ink);
  background: var(--surface-raised); box-shadow: 0 12px 28px rgb(var(--shadow-color) / .18);
}
.ai-menu-heading { padding: 4px 2px 5px; font-size: 12px; font-weight: 600; }
.ai-menu-scroll { max-height: min(164px, 35dvh); overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.ai-menu-list { position: relative; }
.ai-menu-group-label { padding: 5px 8px 3px; color: var(--muted); font-size: 10px; }
.ai-menu-highlight {
  position: absolute; inset: 0 0 auto; border-radius: 8px; background: var(--hover); pointer-events: none;
  transition: transform .22s cubic-bezier(.22,.8,.3,1), height .22s cubic-bezier(.22,.8,.3,1);
}
.ai-menu-option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 9px;
  width: 100%; min-height: 32px; padding: 5px 9px; border-radius: 8px; color: var(--muted); font-size: 12px; text-align: left;
}
.ai-menu-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ai-menu-option:is(:hover, [aria-selected="true"]) { color: var(--ink); }
.ai-menu-option:focus-visible { outline-offset: -2px; }
.ai-menu-option svg { width: 11px; height: 11px; }
.ai-menu-effort { margin: 7px 2px 0; padding-top: 6px; border-top: 1px solid var(--line); }
.ai-menu-effort .ai-menu-heading { padding: 3px 0 8px; }
.ai-effort-track {
  --ai-effort-size: 30px; --ai-effort-duration: .26s; --ai-effort-easing: cubic-bezier(.22,.74,.25,1);
  position: relative; height: var(--ai-effort-size); overflow: clip; border-radius: 999px; background: var(--line-soft);
}
.ai-effort-track:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.ai-effort-track input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab;
  appearance: none; touch-action: none;
}
.ai-effort-track[data-dragging] input { cursor: grabbing; }
.ai-effort-track input::-webkit-slider-thumb { appearance: none; width: 30px; height: 30px; }
.ai-effort-fill {
  position: absolute; inset: 0; background: linear-gradient(100deg, #9dcdfb, #6975ed 69%, #ae65ed);
  clip-path: inset(0 calc((100% - var(--ai-effort-size)) * (1 - var(--ai-effort-ratio))) 0 0 round 999px);
  transition: clip-path var(--ai-effort-duration) var(--ai-effort-easing);
}
.ai-effort-dots { position: absolute; inset: 0 15px; display: flex; align-items: center; justify-content: space-between; }
.ai-effort-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .49; }
.ai-effort-thumb {
  position: absolute; inset: 0 var(--ai-effort-size) 0 0;
  transform: translateX(calc(100% * var(--ai-effort-ratio)));
  transition: transform var(--ai-effort-duration) var(--ai-effort-easing);
}
.ai-effort-knob {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fafafa; box-shadow: 0 1px 4px #0003;
}
.ai-effort-track[data-dragging] :is(.ai-effort-thumb, .ai-effort-fill) { transition: none; }
.ai-effort-ticks { display: flex; justify-content: space-between; gap: 1px; margin-top: 5px; }
.ai-effort-ticks button { flex: 1; min-width: 0; padding: 3px 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ai-effort-ticks button:first-child { text-align: left; }
.ai-effort-ticks button:last-child { text-align: right; }
.ai-effort-ticks button[aria-pressed="true"] { color: var(--accent); font-weight: 650; }
.ai-select-menu[data-reduced-motion] :is(.ai-menu-highlight, .ai-effort-fill, .ai-effort-thumb) { transition: none; }
@container (max-width: 545px) {
  .assistant-disclosure { display: none; }
}
.assistant-send {
  display: grid; place-items: center; flex: none; width: 29px; height: 29px; padding: 0;
  border-radius: 9px; color: var(--on-primary); background: var(--primary);
}
.assistant-send:not(:disabled):hover { background: var(--primary-hover); }
.assistant-send svg { width: 15px; height: 15px; }
@keyframes assistant-spin { to { transform: rotate(360deg); } }
.assistant-dock[data-reduced-motion][data-running] .assistant-beam { transition: none; }
.assistant-dock[data-reduced-motion][data-opening] .assistant-panel,
.assistant-dock[data-reduced-motion] .assistant-tool-spinner::before,
.assistant-dock[data-reduced-motion] .assistant-working-orb::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .assistant-dock[data-running] .assistant-beam { transition: none; }
  .assistant-dock[data-opening] .assistant-panel,
  .assistant-tool-spinner::before, .assistant-working-orb::before { animation: none; }
}

.assistant-edit-diff { display: grid; gap: 6px; margin: 0 8px 8px; }
.assistant-edit-diff section { min-width: 0; border: 1px solid var(--agent-line); border-radius: 7px; }
.assistant-edit-diff section > strong { display: block; padding: 5px 8px 0; font-size: 10px; }
.assistant-edit-diff .assistant-draft-plain { background: transparent; border: 0; margin: 0; }
.assistant-edit-removed { background: var(--danger-surface); color: var(--danger); }
.assistant-edit-added { background: var(--success-surface); color: var(--success); }

.assistant-inline-trace { display: grid; gap: 3px; margin: 0 6px 7px; }
.assistant-finished-trace:not([open]) > summary { color: var(--agent-muted); }
.assistant-turn .assistant-progress { margin: 0 0 8px; }
.assistant-live-reasoning { margin: 4px 4px 6px; }
.assistant-stream-answer { padding: 7px 8px 5px; border-top: 1px solid var(--line); }
.assistant-reasoning, .assistant-tool-output { min-width: 0; border: 1px solid var(--agent-line); border-radius: 8px; background: var(--surface-subtle); }
.assistant-reasoning > summary { cursor: pointer; padding: 6px 8px; font-size: 11px; font-weight: 650; }
.assistant-tool-output > summary { cursor: pointer; }
.assistant-trace-output {
  margin: 0; padding: 7px 9px; max-height: 165px; overflow: auto;
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: text;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  border-top: 1px solid var(--agent-line);
}

.assistant-beam [data-wave-color="0"] { stop-color: var(--wave-0); }
.assistant-beam [data-wave-color="1"] { stop-color: var(--wave-1); }
.assistant-beam [data-wave-color="2"] { stop-color: var(--wave-2); }
.assistant-beam [data-wave-color="3"] { stop-color: var(--wave-3); }

