/* Cipher 模块 (static/js/cipher/*)。只用 app.css 的 token; 类名前缀 chat- / cite- / src- / dict- / hist-。
   骨架 (照 Takit, 20261027): 固定外框 .chat-page = [.chat-scroll 消息区, 唯一滚动][输入框]; 文档不滚 (html.chat-shell)。
   没有顶栏 (20261028): 新对话 / Aa+历史 是两枚半透明胶囊, 悬浮在消息区左上 / 右上, 消息区一直延伸到顶。
   外框底部给 tab 栏留位; 键盘弹起时改留键盘高度 (--kb-inset, composer.js), 消息区变矮、输入框被托到键盘上方。 */

/* ── 固定外框 ── */
html.chat-shell, html.chat-shell body { height: 100%; overflow: hidden; }
.chat-page {
  position: fixed; top: 0; bottom: 0; left: 50%;
  width: min(100%, var(--col));
  min-height: 0;                                   /* 覆盖 .page 的 min-height: 100vh */
  display: flex; flex-direction: column;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  background: var(--bg);
  transform: translate(-50%, var(--vv-offset-top, 0px));   /* iOS 浏览器把可视区上推时跟着走 */
  transition: padding-bottom .18s ease;
}
html.kb-open .chat-page { padding-bottom: var(--kb-inset, 0px); }
.chat-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* 顶端 10px 渐隐: 滚上去的文字不在胶囊旁边硬切 */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px);
}
.chat-page.is-welcome .chat-scroll { display: flex; flex-direction: column; }

/* ── 欢迎态背景: 黑 → 绿 (浅色: 白 → 薄荷) 渐变铺满到屏幕最底 (tab 栏 / home 横条下也是渐变, 不露黑块) ──
   html 底色 = 渐变末端色 (超出 / 回弹区域也不露黑); body 画渐变; tab 根容器与页面透明。 */
html.chat-welcome-bg { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
html.chat-welcome-bg body[data-tab="cipher"] {
  background:
    radial-gradient(120% 55% at 50% 100%, color-mix(in srgb, var(--accent) 24%, transparent) 0%, transparent 72%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 38%, color-mix(in srgb, var(--accent) 14%, var(--bg)) 100%);
}
html.chat-welcome-bg body[data-tab="cipher"] #tab-cipher { background: transparent; }
.chat-page.is-welcome { background: transparent; }

/* ── 悬浮胶囊 (代替顶栏): 左 新对话, 右 Aa + 历史; 半透明 + 毛玻璃, 下面的消息透出来 ── */
.chat-float {
  position: absolute; z-index: 5;
  top: calc(var(--safe-top) + 6px); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;                            /* 胶囊之间的空白不挡消息区滚动 / 点击 */
}
.chat-pill {
  pointer-events: auto;
  display: flex; align-items: center; height: 40px; padding: 0 2px;
  border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 68%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.chat-pill-btn {
  display: grid; place-items: center; width: 38px; height: 36px; padding: 0;
  border: 0; border-radius: 11px; background: none; color: var(--text);
}
.chat-pill-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-pill-btn:active { background: var(--surface-3); }
:root[data-theme="light"] .chat-welcome-mark.is-dark,
:root:not([data-theme="light"]) .chat-welcome-mark.is-light { display: none; }

/* ── 欢迎 ── */
.chat-welcome { display: none; }
.chat-page.is-welcome .chat-welcome {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 24px 8vh;
  text-align: center;
}
.chat-welcome-mark { width: 56px; height: 66px; object-fit: contain; animation: chatFloat 5s ease-in-out infinite; }
.chat-welcome-text {
  margin: 0;
  max-width: 14em;
  font-size: clamp(30px, 8.4vw, 42px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--text) 20%, var(--accent) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes chatFloat { 50% { transform: translateY(-5px); } }

/* ── 消息 (间距 / 气泡照 Takit) ── */
.chat-log { padding: 52px 16px 12px; }   /* 顶部让出胶囊高度 (40 + 上下间距) */
.chat-log:empty { display: none; }
.chat-turn { display: flex; flex-direction: column; gap: 16px; padding: 16px 0 12px; }
.chat-turn.is-new .chat-user { animation: chatReveal .3s ease-out; }
@keyframes chatReveal { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .chat-turn.is-new .chat-user { animation: none; } }
.chat-turn + .chat-turn { border-top: 1px solid transparent; }
.chat-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
/* 提问里的图片 (缩略图, Takit 同款: 气泡上方一排, 靠右) */
.chat-imgs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 86%; }
.chat-imgs img { width: 104px; height: 104px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px 4px 16px 16px;
  background: var(--accent);       /* 荧光绿实底 (品牌色), 字用 accent-ink */
  color: var(--accent-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: calc(16px * var(--chat-scale, 1.2));
}
.chat-asst { min-width: 0; color: var(--text); font-size: calc(16px * var(--chat-scale, 1.2)); line-height: 1.7; overflow-wrap: anywhere; }
.chat-activity + .chat-md:not(:empty) { margin-top: 8px; }

/* Markdown */
.chat-block + .chat-block { margin-top: .8em; }
.chat-md :is(p, ul, ol, pre, blockquote, table, h1, h2, h3, h4, h5, h6, hr) { margin: 0 0 .6em; }
.chat-block > :last-child { margin-bottom: 0; }
.chat-md :is(h1, h2, h3, h4, h5, h6) { font-weight: 700; line-height: 1.35; }
.chat-md h1 { font-size: 1.3em; }
.chat-md h2 { font-size: 1.18em; }
.chat-md h3 { font-size: 1.06em; }
.chat-md :is(h4, h5, h6) { font-size: 1em; }
.chat-md strong { font-weight: 700; color: var(--text); }
.chat-md :is(ul, ol) { padding-left: 1.35em; }
.chat-md li + li { margin-top: .25em; }
.chat-md li > :is(ul, ol) { margin: .25em 0 0; }
.chat-md li::marker { color: var(--muted); }
.chat-md blockquote { padding: 2px 0 2px 12px; border-left: 3px solid var(--line-2); color: var(--text-2); }
.chat-md hr { border: 0; border-top: 1px solid var(--line-2); }
.chat-md code { padding: .1em .35em; border-radius: 5px; background: var(--surface-2); font: .9em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.chat-md pre { overflow-x: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.chat-md pre code { padding: 0; background: none; }
.chat-md table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .92em; }
.chat-md :is(th, td) { padding: 6px 10px; border: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.chat-md th { background: var(--surface); font-weight: 700; }
.chat-caret {
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: .05em;
  animation: chatPulse 1s ease-in-out infinite;
}
@keyframes chatPulse { 50% { opacity: .25; transform: scale(.7); } }
.chat-note { margin: 0; color: var(--muted); font-size: 14px; }

/* 出错 */
.chat-error {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px 10px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger);
  font-size: 14px; line-height: 1.45;
}
.chat-error > span { flex: 1 1 180px; }
.chat-retry { height: 32px; padding: 0 12px; font-size: 13px; }
.chat-retry svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 思考 / 搜索进度行 (照搬 Takit style.css 的 stream-activity / rose-thinking / labelSweep); 字号跟 Aa (默认 120% → 18px) ── */
.chat-activity { display: flex; align-items: center; gap: 8px; max-width: 100%; min-height: 1.6em; color: var(--muted); font-size: calc(15px * var(--chat-scale, 1.2)); line-height: 1.4; }
.chat-activity-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 64px 画框内部本身留有空白, 用负边距抵消, 让动画与文字靠近 */
.rose-thinking { display: inline-block; width: 64px; height: 64px; flex: 0 0 64px; margin: -8px -16px -8px -10px; color: var(--accent); overflow: visible; }
/* 状态文字: 主题色底上一道高光从左向右循环扫过 (背景 3 倍宽, 高光带居中约占文字 60%; 扫完在文字外短暂停顿) */
.chat-activity.is-busy .chat-activity-label {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent) 40%, color-mix(in srgb, var(--accent) 15%, #ffffff) 50%, var(--accent) 60%);
  background-size: 300% 100%;
  background-position: 80% 0;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: labelSweep 2s ease-in-out infinite;
}
@keyframes labelSweep {
  0% { background-position: 80% 0; }
  85%, 100% { background-position: 20% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-activity.is-busy .chat-activity-label { animation: none; -webkit-text-fill-color: currentColor; }
}

/* ── 引用角标 / 来源 ── */
.cite-chip {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 11em; height: 20px;
  margin: 0 1px; padding: 0 7px 0 5px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px; font-weight: 600; line-height: 1;
  vertical-align: .12em;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.cite-chip:active { background: var(--surface-3); }
.cite-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cite-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cite-more { color: var(--muted); }
.src-fav { flex: none; width: 12px; height: 12px; border-radius: 3px; object-fit: cover; }

.chat-foot { display: flex; gap: 8px; margin-top: 12px; }
.src-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 6px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 600;
}
.src-btn:active { background: var(--surface-3); }
.src-count { color: var(--muted); font-weight: 500; }
.src-stack { display: inline-flex; }
.src-stack .src-icon + .src-icon { margin-left: -7px; }
.src-icon {
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  overflow: hidden;
  border: 1.5px solid var(--surface);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2); font-size: 10px; font-weight: 700;
}
.src-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: var(--surface-2); }
.src-icon.has-img img { opacity: 1; }

/* 弹层 (app.css .sheet 之上) */
.chat-sheet-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 4px 20px; touch-action: none; }
.chat-sheet-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; }
.chat-sheet .sheet-handle { touch-action: none; }
.chat-sheet .sheet-panel { transition: transform .2s var(--ease); }
.chat-sheet.is-closing .sheet-panel { transform: translateY(100%); }
.chat-sheet.is-closing .sheet-backdrop { opacity: 0; transition: opacity .2s; }
/* 右侧抽屉 (历史, Takit 侧栏同款): 整高面板从右滑入, 左侧圆角; 关闭向右滑出 */
.chat-sheet.is-drawer { flex-direction: row; justify-content: flex-end; }
.chat-sheet.is-drawer .sheet-panel {
  display: flex; flex-direction: column;
  width: min(84vw, 360px); height: 100%; max-height: none; margin: 0; overflow: hidden;
  padding: calc(var(--safe-top) + 12px) 0 calc(var(--safe-bottom) + 12px);
  border-radius: 20px 0 0 20px;
  touch-action: pan-y;
  animation: drawerIn .26s var(--ease);
}
.chat-sheet.is-drawer .sheet-handle { display: none; }
.chat-sheet.is-drawer .chat-sheet-head { padding: 4px 8px 8px 20px; touch-action: pan-y; }
.chat-sheet.is-drawer .chat-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.chat-sheet.is-drawer.is-closing .sheet-panel { transform: translateX(100%); }
@keyframes drawerIn { from { transform: translateX(100%); } }

.src-list { margin: 0; padding: 0 8px 8px; list-style: none; }
.src-item { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; }
.src-item:active { background: var(--surface-3); }
.src-site { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); font-size: 13px; font-weight: 600; }
.src-host { color: var(--muted); font-weight: 400; }
.src-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--text); font-size: 15px; line-height: 1.4; }
.src-date { color: var(--muted); font-size: 12px; }

/* 历史 */
.hist-list { padding: 0 0 4px; }
.hist-row { display: flex; align-items: center; gap: 2px; padding-right: 8px; border-bottom: 1px solid var(--line); }
.hist-pick {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 8px 12px 20px;
  border: 0; background: none; text-align: left;
}
.hist-pick:active { background: var(--surface-3); }
.hist-title { max-width: 100%; font-weight: 600; }
.hist-time { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.hist-time .pill { height: 18px; font-size: 11px; }
.hist-row.is-current .hist-title { color: var(--accent); }
.hist-del { color: var(--muted); }
.hist-foot { display: flex; justify-content: center; padding: 16px; }
.hist-clear.is-confirm { border-color: var(--danger); color: var(--danger); }
.hist-empty { padding: 36px 24px 44px; }

/* ── 输入框: 外框里排在消息区下面 (不 fixed); 上方一小段渐隐盖住滚到边缘的消息; 欢迎态背景是渐变, 改透明 ── */
.chat-composer {
  position: relative;
  flex: none;
  z-index: 2;
  padding: 8px 12px;
  background: var(--bg);
}
html.kb-open .chat-composer { padding-bottom: 6px; }   /* 键盘开着: 贴近键盘 (Takit 2px) */
.chat-composer::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.chat-page.is-welcome .chat-composer { background: transparent; }
.chat-page.is-welcome .chat-composer::before { display: none; }
/* 回到底部 (Takit 同款): 输入框正上方居中的圆形 ↓ (挂在 composer 里, 浮在消息区底边上) */
.chat-to-bottom {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface-2); color: var(--text);
  box-shadow: var(--shadow); touch-action: manipulation;
}
.chat-to-bottom[hidden] { display: none; }
.chat-to-bottom:active { transform: translateX(-50%) scale(.92); }
.chat-to-bottom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 输入栏照搬 Takit 手机版 (style.css 末尾几段, 2026-10-28), 颜色换成我们的荧光绿:
   一行三格 [麦克风][输入框][最右一格 ＋ / 发送 / 停止]; 选了图片时缩略图在上面一行; 听写时输入框下面多一行录音条。
   输入框只有一行时按钮上下居中, 多行时贴底 (composer.js resize 加 is-multiline)。 */
.chat-box {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  grid-template-areas: "strip strip strip" "voice input right";
  align-items: end;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 30px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.chat-box:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.chat-atts { grid-area: strip; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chat-atts[hidden] { display: none; }
.chat-att { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-3); }
.chat-att img { width: 100%; height: 100%; object-fit: cover; }
.chat-att.is-processing img { opacity: .45; }
.chat-att.is-processing::after {
  content: ""; position: absolute; inset: 22px; border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.chat-att.is-error { border-color: var(--danger); }
.chat-att-del {
  position: absolute; top: 3px; right: 3px; display: grid; place-items: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; line-height: 1;
}
.chat-input {
  grid-area: input;
  align-self: center;
  width: 100%;
  min-width: 0;
  margin: 0;
  /* 一行时高 40px, 和两边按钮一样高、上下居中 (行高 1.45em, 上下留白补齐到 40px; 字很大时留白为 0) */
  padding: max(0px, calc((40px - 1.45em) / 2)) 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: max(16px, calc(16px * var(--chat-scale, 1.2)));   /* 跟 Aa; 不小于 16px, 否则 iOS 聚焦会放大页面 */
  line-height: 1.45;
  resize: none;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.chat-input::placeholder { color: var(--muted); }
.chat-input[readonly] { caret-color: transparent; }
.chat-ibtn, .chat-act {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0; border: 0; border-radius: 50%;
  touch-action: manipulation;
}
.chat-box:not(.is-multiline) :is(.chat-mic, .chat-plus, .chat-act) { align-self: center; }
.chat-ibtn { background: none; color: var(--text); }
.chat-ibtn:disabled { opacity: .4; }
.chat-ibtn svg, .chat-act svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
/* 麦克风: 品牌色 (Takit 是标志蓝, 我们是荧光绿), 不加底色, 图标几乎占满按钮 */
.chat-mic { grid-area: voice; color: var(--accent); }
.chat-mic svg { width: 36px; height: 36px; stroke-width: 2.6; }
/* ＋: 文字色圆圈 (深色主题白) */
.chat-plus { grid-area: right; border: 1px solid var(--text); }
.chat-plus:active { background: var(--surface-3); }
.chat-plus svg { width: 20px; height: 20px; stroke-width: 2.2; }
/* 发送 / 停止: 品牌色实心圆, 26px 箭头 */
.chat-act { grid-area: right; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 21%, transparent); transition: transform .15s; }
.chat-act:active { transform: scale(.92); }
.chat-act svg { width: 26px; height: 26px; stroke-width: 2.5; animation: sendIconIn .15s ease-out; }
.ci-fill { fill: currentColor; stroke: none; }
.chat-composer.is-empty .chat-act:not(.dict-stop), .chat-composer:not(.is-empty) .chat-plus { display: none; }   /* 最右一格: 空着显示 ＋, 否则发送 / 停止 */
@keyframes sendIconIn { from { opacity: 0; transform: scale(.8); } }

/* 听写: 输入框照常显示实时文字, 两边按钮藏起; 下面一行录音条 [× 取消][波形 (居中)][状态][发送 ↑] */
.dict-bar { display: none; grid-column: 1 / -1; grid-row: 3; align-items: center; gap: 10px; min-height: 38px; margin-top: 6px; animation: dictationIn .15s ease-out; }
.chat-composer.is-dictating .dict-bar { display: flex; }
.chat-composer.is-dictating :is(.chat-mic, .chat-plus, .chat-act:not(.dict-stop)) { display: none; }
.dict-cancel { flex: 0 0 auto; width: 36px; height: 36px; background: var(--surface-3); }
.dict-cancel svg { width: 20px; height: 20px; stroke-width: 2; }
.dict-stop { flex: 0 0 auto; }
.dict-stop svg { stroke-width: 2.6; }
.chat-composer[data-dict="starting"] .dict-stop, .chat-composer[data-dict="transcribing"] .dict-stop { opacity: .45; }
/* 波形固定宽度, 居中放在取消和发送之间; 窄屏放不下时缩小 */
.dict-wave { flex: 0 1 180px; min-width: 0; height: 32px; margin: 0 auto; color: var(--text); --muted: var(--muted); }
.dict-note { flex: 0 0 auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dict-note:empty { display: none; }
@keyframes dictationIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dict-bar, .chat-act svg { animation: none; }
}

/* ── 右上胶囊「Aa」字号 (Takit 同款): 浮层里「小 A | 大 A」步进 + 当前百分比 ── */
.chat-font { color: var(--accent); font-size: 15px; font-weight: 700; }
.chat-font-panel {
  pointer-events: auto;
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; width: 200px; padding: 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.chat-font-picker { display: flex; height: 40px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.chat-font-picker button { flex: 1; border: 0; background: none; color: var(--accent); font-weight: 700; line-height: 1; }
.chat-font-picker button:active { background: var(--surface-3); }
.chat-font-picker button:disabled { opacity: .3; }
.chat-font-dec { font-size: 12px; border-right: 1px solid var(--line) !important; }
.chat-font-inc { font-size: 20px; }
.chat-font-pct { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: center; }
