/* Editor chrome from the approved compact prototype. No document typography. */
html:has(> body.udoc-editor-shell) { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; }
body.udoc-editor-shell {
  --editor-rail-width: 48px; --editor-left: var(--editor-rail-width); --editor-right: 0px;
  width: 100%; height: 100dvh; min-width: 0; max-width: none;
  margin: 0; border: 0; border-radius: 0;
}
body.udoc-editor-shell #ribbon { width: 100%; max-width: none; border-radius: 0; }
body.udoc-editor-shell #ribbon .rb-titlebar {
  height: 52px; padding: 6px 12px 6px 11px; gap: 8px; align-items: center;
}
body.udoc-editor-shell #ribbon :is(.rb-app, .rb-app img) { width: 26px; height: 26px; }
body.udoc-editor-shell #ribbon .rb-app { align-self: center; margin-right: 6px; }
body.udoc-editor-shell #ribbon .rb-product-name { display: none; }
body.udoc-editor-shell #ribbon .rb-document-access-slot { position: absolute; top: 8px; right: 240px; max-width: 180px; }
body.udoc-editor-shell #ribbon .rb-titlebar:has(.rb-document-access-slot:not(:empty)) .rb-doc-name { width: min(42vw, calc(100vw - 440px)); }
body.udoc-editor-shell #ribbon .rb-doc-name {
  left: 52px; top: 2px; transform: none; width: min(42vw, 640px); max-width: min(42vw, 640px);
  height: 24px; padding: 1px 7px; text-align: left; font-size: 14px; font-weight: 600;
}
/* The tab row sits at 27-49px, clear of the title (2-26px) and the bar's 52px hairline;
   every item in it, including 操作说明, keeps the 22px tab height so none pushes the row down. */
body.udoc-editor-shell #ribbon .ribbon-tabs {
  top: 27px; left: 52px; right: 260px; min-height: 22px; gap: 0;
}
body.udoc-editor-shell #ribbon .rb-tab {
  min-height: 22px; height: 22px; padding: 2px 7px; font-size: 12px; line-height: 18px; border-radius: 6px;
}
/* Phones (760px and below) keep their 42px touch targets from app-docs-theme.css. */
@media (min-width: 761px) {
  body.udoc-editor-shell #ribbon .udoc-help-link {
    min-height: 22px; height: 22px; padding: 0 8px; gap: 4px; font-size: 13px; line-height: 18px; border-radius: 6px;
  }
  body.udoc-editor-shell #ribbon .udoc-help-link svg { width: 16px; height: 16px; }
  body.udoc-editor-shell #ribbon #btn-ribbon-toggle { min-width: 22px; width: 22px; height: 22px; }
}
body.udoc-editor-shell #ribbon .rb-titlebar-right { align-self: center; height: 34px; margin-left: auto; gap: 6px; }
body.udoc-editor-shell #ribbon .rb-quick { height: 32px; border-radius: 8px; font-size: 12px; }
body.udoc-editor-shell #ribbon #btn-ai { border-radius: 8px; background: var(--ui-accent-weak); }
body.udoc-editor-shell #ribbon .rb-ai-logo { width: 18px; height: 18px; }
body.udoc-editor-shell #ribbon .ribbon-panels {
  margin: 0; padding: 6px 8px; min-height: 44px; border-radius: 0;
  border-top: .5px solid var(--ui-line-soft); border-bottom: .5px solid var(--ui-line); background: var(--ui-surface);
}
body.udoc-editor-shell #ribbon :is(.rb-group, .rb-home-grid .rb-group) { height: 30px; padding: 0 5px; }
body.udoc-editor-shell #ribbon .rb-home-grid .rb-group-quick { padding-left: 0; }
body.udoc-editor-shell #ribbon :is(.rb-tools button, .rb-home-grid .rb-tools button, .rb-home-grid .fs-step, .rb-home-grid .color-btn, .rb-table-tools button, .rb-object-tools button) {
  flex: 0 0 auto; border-radius: 7px; min-width: 28px; width: auto; height: 30px;
  padding: 0 7px; font-size: 13px; white-space: nowrap; overflow-wrap: normal; word-break: normal;
}
body.udoc-editor-shell #ribbon .rb-tools button .rb-txt { flex: none; white-space: nowrap; line-height: 18px; }
body.udoc-editor-shell #ribbon :is(.rb-tools .ri, .rb-quick .ri) { flex: none; width: 17px; height: 17px; stroke-width: 1.7; }
body.udoc-editor-shell #ribbon .ribbon-panel { min-width: max-content; min-height: 30px; }
body.udoc-editor-shell #ribbon :is(.rb-group, .rb-tools, .page-setup-col) { flex-shrink: 0; }
body.udoc-editor-shell #ribbon .rb-tools :is(select, input, label) { flex-shrink: 0; }
body.udoc-editor-shell #ribbon .rb-home-grid :is(.fs-step, .color-btn) { width: 28px; padding-inline: 4px; }
body.udoc-editor-shell #ribbon .page-grid-controls button { min-width: 42px; }
body.udoc-editor-shell #ribbon .rb-table-style-gallery { grid-template-columns: repeat(4, 34px); }
body.udoc-editor-shell #ribbon .tbl-style-card { width: 34px; height: 28px; }
body.udoc-editor-shell #ribbon :is(select, .fs-num, .fs-caret, .fs-unit) { background-color: var(--ui-fill); font-size: 12px; border-radius: 7px; }
body.udoc-editor-shell #ribbon .rb-font-top #sel-fontfamily { width: 142px; }
body.udoc-editor-shell #ribbon .rb-paragraph-style #sel-block { width: 100px; }
body.udoc-editor-shell #ribbon .fs-box { gap: 0; }
/* 48px fits five-character sizes such as 11.25 and 100.5 at the ribbon's 12px. */
body.udoc-editor-shell #ribbon .rb-home-grid .fs-box .fs-num { width: 48px; }
body.udoc-editor-shell #ribbon .rb-home-grid #btn-numbering { width: 32px; min-width: 32px; }
body.udoc-editor-shell #ribbon .rb-tools button:hover { background: var(--ui-hover); }
body.udoc-editor-shell #ribbon .rb-tools button.active { background: var(--ui-accent-weak); }
#editor-density { display: inline-grid; place-items: center; margin-left: 6px; }
#editor-density svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
body.udoc-editor-shell[data-editor-density="full"] #ribbon .ribbon-panels { padding: 7px 8px 3px; }
body.udoc-editor-shell[data-editor-density="full"] #ribbon .rb-home-grid .rb-group { height: 74px; flex-direction: column; align-items: flex-start; gap: 3px; padding-inline: 10px; }
body.udoc-editor-shell[data-editor-density="full"] #ribbon .rb-home-grid :is(.rb-tools-font, .rb-tools-paragraph) { height: 60px; flex-direction: column; align-items: flex-start; gap: 4px; }
body.udoc-editor-shell[data-editor-density="full"] #ribbon .rb-home-grid .rb-glabel { display: block; font-size: 10px; color: var(--ui-ink-2); line-height: 12px; }
#editor-rail {
  position: fixed; left: 0; top: var(--ribbon-h); bottom: 28px; width: 48px; z-index: 35;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  background: var(--ui-surface-2); box-shadow: inset -.5px 0 0 var(--ui-line); user-select: none;
}
#editor-rail button {
  display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 7px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ui-ink-2); cursor: pointer;
}
#editor-rail button:hover { background: var(--ui-hover); color: var(--ui-ink); }
#editor-rail button:disabled { opacity: .4; cursor: default; background: transparent; }
#editor-rail button[aria-pressed="true"] { background: var(--ui-accent-weak); color: var(--ui-accent); }
#editor-rail button:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 1px; }
#editor-rail svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#editor-rail .editor-rail-spacer { flex: 1; }
#editor-rail-actions { display: contents; }
/* 最近文件：侧栏常驻，顶部按钮在侧栏旁展开这一栏（与目录共用左侧停靠位）。 */
#files-panel {
  position: fixed; left: var(--editor-rail-width); top: var(--ribbon-h); bottom: 28px; width: 264px; z-index: 34;
  display: flex; flex-direction: column; background: var(--ui-surface-2);
  border-right: .5px solid var(--ui-line); color: var(--ui-ink);
}
#files-panel[hidden] { display: none; }
#files-panel header { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 16px; flex: none; }
#files-panel h2 { margin: 0; font-size: 13px; font-weight: 600; }
#files-panel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#files-panel .files-close {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--ui-ink-2); cursor: pointer;
}
#files-panel .files-close:hover { background: var(--ui-hover); color: var(--ui-ink); }
#files-panel .files-actions { display: flex; gap: 8px; padding: 0 12px 10px; flex: none; }
#files-panel .files-actions button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px;
  border: 0; border-radius: 8px; background: var(--ui-surface); color: var(--ui-ink);
  font-family: inherit; font-size: 12.5px; font-weight: 500; line-height: 1; box-shadow: 0 0 0 .5px var(--ui-line); cursor: pointer;
}
#files-panel .files-actions button:hover { background: var(--ui-hover); }
#files-panel .files-actions button[data-files="new"] { background: var(--ui-accent-strong); color: var(--ui-accent-ink); box-shadow: none; }
#files-panel .files-actions button[data-files="new"]:hover { background: var(--ui-accent-strong-hover); }
#files-panel .files-list { flex: 1; overflow-y: auto; padding: 4px 8px 16px; border-top: .5px solid var(--ui-line-soft); }
#files-panel .files-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin: 1px 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; cursor: pointer;
}
#files-panel .files-row:hover { background: var(--ui-hover); }
#files-panel .files-row:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
#files-panel .files-kind {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  font-family: inherit; font-size: 9.5px; font-weight: 700; line-height: 1; letter-spacing: .02em; color: #fff; background: #8e8e93;
}
#files-panel .files-kind[data-kind="UDOC"] { background: var(--ui-accent); }
#files-panel .files-kind[data-kind="Word"] { background: #2b579a; }
#files-panel .files-kind[data-kind="PDF"] { background: #e5484d; }
#files-panel .files-kind[data-kind="HTML"] { background: #f08a24; }
#files-panel .files-kind[data-kind="MD"] { background: #5e5ce6; }
#files-panel .files-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#files-panel .files-text strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#files-panel .files-text small { font-size: 11px; color: var(--ui-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#files-panel .files-missing { opacity: .55; }
#files-panel .files-empty { margin: 16px 8px; font-size: 12px; line-height: 1.6; color: var(--ui-ink-2); }
@media (max-width: 899px) {
  #files-panel { box-shadow: 0 8px 28px rgba(20, 40, 80, .16); }
}
@media (max-width: 640px) {
  #files-panel { left: 0; width: min(320px, 100vw); z-index: 62; }
}
body.udoc-editor-shell #canvas {
  margin-left: var(--editor-left); margin-right: var(--editor-right) !important;
  padding: 32px 24px 96px; scrollbar-gutter: stable both-edges;
  background: linear-gradient(180deg, #f1f1f5, #e8e8ed);
  min-width: 0;
}
body.udoc-editor-shell #toc-panel {
  left: var(--editor-rail-width); right: auto; top: var(--ribbon-h); bottom: 28px; width: 216px;
  border: 0; border-right: .5px solid var(--ui-line); border-radius: 0; box-shadow: none;
  background: var(--ui-surface-2);
}
body.udoc-editor-shell #toc-panel header { height: 44px; padding: 0 12px; font-size: 13px; }
body.udoc-editor-shell #toc-panel .toc-body { padding: 4px 8px 16px; }
body.udoc-editor-shell #toc-panel .toc-item { border-radius: 7px; font-size: 12px; padding-block: 7px; }
body.udoc-editor-shell #ai-panel:not(.ai-floating):not(.ai-full) {
  top: var(--ribbon-h) !important; bottom: 28px; width: 380px; min-width: 320px;
  border-radius: 0; box-shadow: none; border-left: .5px solid var(--ui-line);
}
body.udoc-editor-shell #ud-comments-panel {
  top: var(--ribbon-h); right: 0; bottom: 28px; width: 296px;
  border: 0; border-left: .5px solid var(--ui-line); border-radius: 0; box-shadow: none;
  background: var(--ui-surface-2); backdrop-filter: none;
}
body.udoc-editor-shell #statusbar { box-shadow: none; padding-inline: 12px; font-size: 11px; }
body.udoc-editor-shell #statusbar button { font-size: 11px; }
body.udoc-editor-shell:is(.udoc-embed-mode, .udoc-html-immersive, [data-document-view="reading"]) #editor-rail { display: none; }
body.udoc-editor-shell:is(.udoc-embed-mode, .udoc-html-immersive, [data-document-view="reading"]) #canvas { margin-left: 0; margin-right: 0 !important; }
@media (max-width: 900px) {
  body.udoc-editor-shell #ribbon .rb-titlebar-right { gap: 2px; }
  body.udoc-editor-shell #ribbon .ribbon-tabs { right: 145px; }
  body.udoc-editor-shell #ribbon #btn-present span { display: none; }
  body.udoc-editor-shell #ribbon .rb-doc-name { width: calc(100vw - 230px); max-width: none; }
}
@media (max-width: 640px) {
  body.udoc-editor-shell { --editor-left: 0px; }
  #editor-rail { display: none; }
  body.udoc-editor-shell #canvas { padding-inline: 8px; padding-top: 16px; }
  body.udoc-editor-shell #toc-panel { left: 0; width: min(216px, 80vw); }
  body.udoc-editor-shell #ribbon .rb-titlebar { height: 54px; }
  body.udoc-editor-shell #ribbon .rb-doc-name { font-size: 13px; }
}
@media print { #editor-rail, #editor-density { display: none !important; } body.udoc-editor-shell #canvas { margin: 0 !important; padding: 0; } }

/* ===== U AI conversation (Claude / ChatGPT style on UniDoc's iOS tokens) =====
 * The answer reads as a page, not a chat bubble: full width, no avatar column. The user's
 * own turn is a quiet grey bubble on the right. Greeting and suggestions belong to an
 * empty conversation only; the composer is one rounded card. Structure and bindings are
 * unchanged: this layer only restyles. */
body.udoc-editor-shell #ai-panel { background: var(--ui-surface); color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-head { height: 48px; padding: 0 10px 0 16px; border-bottom: .5px solid var(--ui-line-soft); background: var(--ui-surface); }
body.udoc-editor-shell #ai-panel .ai-head .ai-name { font-size: 14.5px; font-weight: 600; letter-spacing: 0; }
body.udoc-editor-shell #ai-panel .ai-head button { width: 30px; height: 30px; border-radius: 8px; color: var(--ui-ink-2); }
body.udoc-editor-shell #ai-panel .ai-head button:hover { background: var(--ui-hover); color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-msgs { padding: 20px 20px 8px; scroll-padding-bottom: 24px; }

/* Empty conversation: a centred greeting and a short list of starting points. */
body.udoc-editor-shell #ai-panel .ai-msgs:not(:has(.ai-msg)) { display: flex; flex-direction: column; justify-content: center; }
body.udoc-editor-shell #ai-panel .ai-msgs:has(.ai-msg) :is(.ai-hello, .ai-chips) { display: none; }
body.udoc-editor-shell #ai-panel .ai-hello { align-items: flex-start; gap: 8px; margin: 0 4px 18px; }
body.udoc-editor-shell #ai-panel .ai-hello-logo { width: 36px; height: 36px; margin-bottom: 6px; }
body.udoc-editor-shell #ai-panel .ai-hello-h { font-size: 22px; font-weight: 600; letter-spacing: 0; color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-hello-sub { font-size: 13px; line-height: 1.6; color: var(--ui-ink-2); }
body.udoc-editor-shell #ai-panel .ai-chips { flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 0; }
body.udoc-editor-shell #ai-panel .ai-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 11px 14px; border: .5px solid var(--ui-line); border-radius: 12px;
  background: var(--ui-surface); color: var(--ui-ink); text-align: left; box-shadow: none;
}
body.udoc-editor-shell #ai-panel .ai-chip:hover { background: var(--ui-surface-2); border-color: var(--ui-line); box-shadow: none; }
body.udoc-editor-shell #ai-panel .ai-chip-title { font-size: 13px; font-weight: 600; }
body.udoc-editor-shell #ai-panel .ai-chip-desc { font-size: 12px; color: var(--ui-ink-2); }

/* Turns. */
body.udoc-editor-shell #ai-panel .ai-msg { margin: 0 0 22px; gap: 0; }
body.udoc-editor-shell #ai-panel .ai-user { justify-content: flex-start; }
body.udoc-editor-shell #ai-panel .ai-user .ai-avatar { display: none; }
body.udoc-editor-shell #ai-panel .ai-user .ai-bubble {
  max-width: 86%; padding: 9px 14px; border-radius: 18px 18px 6px 18px;
  background: var(--ui-surface-2); color: var(--ui-ink); font-size: 14px; line-height: 1.6; box-shadow: none; border: 0;
}
body.udoc-editor-shell #ai-panel .ai-assistant { flex-direction: column; align-items: stretch; }
body.udoc-editor-shell #ai-panel .ai-assistant .ai-avatar {
  width: auto; height: 20px; margin: 0 0 6px; border-radius: 0; justify-content: flex-start; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ui-ink-2); background: transparent;
}
body.udoc-editor-shell #ai-panel .ai-assistant .ai-avatar img { width: 18px; height: 18px; }
body.udoc-editor-shell #ai-panel .ai-assistant .ai-avatar::after { content: "U AI"; }
body.udoc-editor-shell #ai-panel .ai-assistant .ai-bubble {
  max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font-size: 14.5px; line-height: 1.72; color: var(--ui-ink);
}

/* Answer typography. */
body.udoc-editor-shell #ai-panel .ai-md p { margin: 0 0 10px; }
body.udoc-editor-shell #ai-panel .ai-md :is(h1, h2, h3) { margin: 16px 0 8px; font-size: 15.5px; font-weight: 600; line-height: 1.45; }
body.udoc-editor-shell #ai-panel .ai-md > :is(h1, h2, h3):first-child { margin-top: 0; }
body.udoc-editor-shell #ai-panel .ai-md :is(ul, ol) { margin: 0 0 10px; padding-left: 1.4em; }
body.udoc-editor-shell #ai-panel .ai-md li { margin: 4px 0; }
body.udoc-editor-shell #ai-panel .ai-md li::marker { color: var(--ui-ink-2); }
body.udoc-editor-shell #ai-panel .ai-md :not(pre) > code {
  padding: 1px 5px; border-radius: 5px; background: var(--ui-fill); font-size: .9em;
  font-family: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
}
body.udoc-editor-shell #ai-panel .ai-md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--ui-line); color: var(--ui-ink-2); }
body.udoc-editor-shell #ai-panel .ai-md pre {
  margin: 8px 0 12px; padding: 14px 14px 14px; border-radius: 12px;
  background: #f6f7f9; color: #1f2329; border: .5px solid var(--ui-line);
  font: 12.5px/1.6 "Cascadia Code", Consolas, "SFMono-Regular", monospace; white-space: pre; overflow-x: auto;
}
body.udoc-editor-shell #ai-panel .ai-md pre[data-ai-copy-ready="1"] { padding-top: 36px; }
body.udoc-editor-shell #ai-panel .ai-code-copy {
  top: 6px; right: 6px; height: 24px; padding: 0 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ui-ink-2); font-size: 11.5px; box-shadow: none;
}
body.udoc-editor-shell #ai-panel .ai-code-copy:hover { background: var(--ui-hover); color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-md table { border-collapse: collapse; margin: 6px 0 12px; font-size: 13px; }
body.udoc-editor-shell #ai-panel .ai-md :is(th, td) { padding: 6px 10px; border-bottom: .5px solid var(--ui-line); text-align: left; }
body.udoc-editor-shell #ai-panel .ai-copy-row { justify-content: flex-start; gap: 2px; margin-top: 2px; opacity: .85; }
body.udoc-editor-shell #ai-panel :is(.ai-copy-answer, .ai-report-answer) { width: 28px; height: 28px; border-radius: 7px; color: var(--ui-ink-3); background: transparent; }
body.udoc-editor-shell #ai-panel :is(.ai-copy-answer, .ai-report-answer):hover { color: var(--ui-ink); background: var(--ui-hover); }
body.udoc-editor-shell #ai-panel .ai-think { border-radius: 10px; background: var(--ui-surface-2); border: 0; font-size: 12.5px; }

/* Waiting: the label shimmers instead of three dots. */
body.udoc-editor-shell #ai-panel .ai-pending { color: var(--ui-ink-2); font-size: 13.5px; }
body.udoc-editor-shell #ai-panel .ai-pending .ai-dots { display: none; }
body.udoc-editor-shell #ai-panel .ai-pending .ai-pending-text {
  background: linear-gradient(90deg, var(--ui-ink-3) 0%, var(--ui-ink) 45%, var(--ui-ink-3) 90%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: ai-shimmer 1.6s linear infinite;
}
@keyframes ai-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
  body.udoc-editor-shell #ai-panel .ai-pending .ai-pending-text { animation: none; color: var(--ui-ink-2); background: none; }
}

/* Composer: one rounded card, quiet until focused. */
body.udoc-editor-shell #ai-panel .ai-dock { padding: 8px 14px 10px; background: linear-gradient(180deg, rgba(255,255,255,0), var(--ui-surface) 24%); }
body.udoc-editor-shell #ai-panel .ai-dock::after {
  content: "U AI 可能会出错，重要内容请核对"; display: block; margin-top: 7px;
  font-size: 11px; color: var(--ui-ink-3); text-align: center;
}
body.udoc-editor-shell #ai-panel .ai-composer {
  padding: 10px 10px 8px 14px; border: .5px solid var(--ui-line); border-radius: 22px;
  background: var(--ui-surface); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
}
body.udoc-editor-shell #ai-panel .ai-composer:focus-within { border-color: color-mix(in srgb, var(--ui-accent) 55%, var(--ui-line)); box-shadow: 0 0 0 3px var(--ui-accent-weak), 0 6px 20px rgba(0,0,0,.06); }
body.udoc-editor-shell #ai-panel .ai-input { font-size: 14.5px; line-height: 1.55; padding: 2px 2px 8px; color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-input::placeholder { color: var(--ui-ink-3); }
body.udoc-editor-shell #ai-panel .ai-composer-tools { gap: 4px; }
body.udoc-editor-shell #ai-panel :is(.ai-clip, .ai-shot) { height: 30px; min-width: 30px; border-radius: 15px; color: var(--ui-ink-2); background: transparent; }
body.udoc-editor-shell #ai-panel :is(.ai-clip, .ai-shot):hover { background: var(--ui-hover); color: var(--ui-ink); }
body.udoc-editor-shell #ai-panel .ai-modes { background: var(--ui-fill); border-radius: 15px; padding: 2px; }
body.udoc-editor-shell #ai-panel .ai-modes label { padding: 4px 11px; border-radius: 13px; color: var(--ui-ink-2); font-size: 12px; }
body.udoc-editor-shell #ai-panel .ai-modes label:has(input:checked) { background: var(--ui-surface); color: var(--ui-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
body.udoc-editor-shell #ai-panel .ai-send { width: 32px; height: 32px; background-color: var(--ui-accent); }
body.udoc-editor-shell #ai-panel .ai-send:hover { transform: none; filter: brightness(1.06); }
body.udoc-editor-shell #ai-panel .ai-send:disabled { background-color: var(--ui-ink-3); }
