/* 议事殿 council page —— 全部走皮肤变量，随主题联动 */
/* 必须带 .page + .active：本文件在 styles.css 之后加载，同优先级的
   `.council-page{display:flex}` 会盖掉 `.page{display:none}`，
   导致议事殿在所有板块（含登录页）常显。 */
.page.council-page.active { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 0; }

.council-offline {
  flex: none;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-md, 14px);
  background: var(--surface, var(--card));
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.council-offline.hidden { display: none; }
.council-offline-head { display: flex; flex-direction: column; gap: 2px; }
.council-offline-head strong { font-size: 14px; color: var(--text-main, var(--text)); }
.council-offline-head span { font-size: 12px; color: var(--text-muted, var(--sub)); }
.council-offline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.council-offline-row .council-input { flex: 1; min-width: 260px; }

.council-input {
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-sm, 10px);
  background: var(--surface-soft, var(--card));
  color: var(--text-main, var(--text));
  font-size: 12.5px;
  padding: 8px 11px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.council-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-glow, rgba(16,185,129,.25)) 55%, transparent); }
textarea.council-input { resize: vertical; }

.council-workspace {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 248px;
  gap: 12px;
}

/* 专注聊天：左右两栏收起，对话区独占。display:none 直接从栅格拿掉，
   中间栏自然吃满，不留空洞 */
.council-workspace { position: relative; }
.council-workspace.council-focus { grid-template-columns: minmax(0, 1fr); }
/* 边签点开后单边恢复：栏回到栅格，另一边仍收着 */
.council-workspace.council-focus.focus-rail-open { grid-template-columns: 218px minmax(0, 1fr); }
.council-workspace.council-focus.focus-side-open { grid-template-columns: minmax(0, 1fr) 248px; }
.council-workspace.council-focus.focus-rail-open.focus-side-open { grid-template-columns: 218px minmax(0, 1fr) 248px; }
.council-workspace.council-focus .council-rail,
.council-workspace.council-focus .council-side { display: none; }
.council-workspace.council-focus.focus-rail-open .council-rail,
.council-workspace.council-focus.focus-side-open .council-side { display: flex; }
#councilFocus.on { color: var(--primary); border-color: var(--primary); }

/* 专注模式下的左右"搜索边签"：贴在聊天区两缘，点开对应栏并把焦点送进搜索框 */
.council-edge-tab {
  display: none; position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 24px; height: 72px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--panel-bg, var(--card)); color: var(--sub);
}
.council-edge-tab:hover { color: var(--primary); border-color: var(--primary); }
.council-edge-tab.left { left: 0; border-left: 0; border-radius: 0 12px 12px 0; }
.council-edge-tab.right { right: 0; border-right: 0; border-radius: 12px 0 0 12px; }
.council-workspace.council-focus .council-edge-tab { display: flex; }
/* 栏已展开的一侧不再显示对应边签 */
.council-workspace.council-focus.focus-rail-open .council-edge-tab.left,
.council-workspace.council-focus.focus-side-open .council-edge-tab.right { display: none; }

/* 左右栏各自的搜索框：贴着栏顶，不抢正文 */
.council-rail-search { padding: 8px 10px 4px; }
.council-rail-search .council-input,
.council-side-search .council-input {
  width: 100%; box-sizing: border-box; height: 28px; font-size: 12px;
}
.council-side-search { padding: 0; display: flex; gap: 7px; align-items: center; flex: 1; min-width: 0; }
.council-side-search .council-input { flex: 1; min-width: 0; }
/* 坞条「悬浮小助」钮：只在小助手视图出现，锚定同一套三选浮层 */
.ach-float {
  display: none; align-items: center; gap: 5px; padding: 4px 10px; flex: none;
  border: 1px solid var(--border-subtle, var(--line)); border-radius: 9px;
  background: transparent; color: var(--text-muted, var(--sub));
  font-size: 12px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s;
}
.ach-float:hover { color: var(--primary); border-color: var(--primary); }
.council-page.is-aide-view #achFloat { display: inline-flex; }
.council-item.filtered-out,
.council-session-row.filtered-out { display: none; }
.council-panel {
  border: 1px solid var(--border-subtle, var(--line));
  border-radius: var(--radius-md, 14px);
  background: var(--panel-bg, var(--card));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── 左栏 ── */
.council-rail { padding: 12px 10px; gap: 6px; overflow-y: auto; }
.council-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 6px; flex: none; }
.council-rail-head h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted, var(--sub)); }
.council-rail-members { margin-top: 14px; }
.council-rail-tip { font-size: 10.5px; color: var(--text-muted, var(--sub)); opacity: .8; }
.council-list { display: flex; flex-direction: column; gap: 4px; }
.council-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: var(--radius-sm, 10px);
  border: 1px solid transparent;
  cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.council-item:hover { background: var(--surface-soft, rgba(148,163,184,.08)); }
.council-item.active { background: var(--primary-gradient-soft, rgba(16,185,129,.1)); border-color: color-mix(in srgb, var(--primary) 32%, transparent); }
.council-item .c-avatar {
  position: relative;
  width: 28px; height: 28px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--on-primary, #fff);
  background: var(--primary-gradient, linear-gradient(135deg,#10b981,#06b6d4));
}
/* 忙闲角标：成员正在干活时头像右下角亮呼吸绿点（busy.memberIds 真值驱动，
 * 跟会话列表绿灯/悬浮窗信号灯同一语义——绿=在跑） */
.council-item.is-busy .c-avatar::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary, #10b981);
  border: 2px solid var(--panel-bg, var(--card, var(--bg, #1b1f24)));
  box-sizing: border-box;
  animation: councilRunPulse 1.2s ease-in-out infinite;
}
.council-item .c-avatar.is-group { background: var(--surface-muted, rgba(148,163,184,.16)); color: var(--text-secondary, var(--sub)); }
.council-item .c-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text-main, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.council-item .c-tag { flex: none; font-size: 10px; color: var(--text-muted, var(--sub)); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }

/* ── 中栏 ── */
.council-main { overflow: hidden; }
.council-chat-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--border-subtle, var(--line));
}
/* 没给规则时它是默认 flex 子项：中文标题的 min-content 只有一个字宽，
   会被右侧按钮组挤成竖条。给个 200px 的保底宽，不够就让按钮换行。 */
.council-chat-titles { flex: 1 1 200px; min-width: 0; }
.council-chat-title { font-size: 14.5px; font-weight: 700; color: var(--text-strong, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.council-chat-badge { font-size: 11px; color: var(--text-muted, var(--sub)); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.council-chat-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }

/* 右栏双分页：会话列表 / 成员设置 */
.council-side { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.council-side-tabs {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle, var(--line));
}
.council-side-tab {
  flex: none; padding: 5px 2px; border: none; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted, var(--sub));
  border-bottom: 2px solid transparent; transition: all .15s ease;
}
.council-side-tab:hover { color: var(--text-main, var(--text)); }
.council-side-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.council-side-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.council-side-pane.hidden { display: none; }
.council-side-pane > .council-empty { margin: auto; }

.council-session-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 9px;
  font-size: 12px; color: var(--text-secondary, var(--sub));
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s ease;
}
.council-session-row:hover { background: var(--surface-soft, rgba(148,163,184,.08)); color: var(--text-main, var(--text)); }
.council-session-row.active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--text-main, var(--text)); font-weight: 600;
}
.council-session-row .s-title {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 4px;
}
.council-session-row .pin-mark { flex: none; opacity: .8; }
/* 会话在跑标记：列表里一眼看出哪条还在生成 */
.council-session-row .s-run-dot {
  flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary, #10b981);
  animation: councilRunPulse 1.2s ease-in-out infinite;
}
@keyframes councilRunPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
/* 断线红灯：上次回合被重启/断线打断——常亮不呼吸，一眼认出"没跑完"；发消息继续即消 */
.council-session-row .s-run-dot.is-broken,
.aide-float-panel .af-session .af-run-dot.is-broken { background: var(--danger, #ef4444); animation: none; }
.council-session-row .s-del {
  flex: none; display: none; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: none; border-radius: 6px;
  background: none; color: var(--text-muted, var(--sub)); cursor: pointer; padding: 0;
}
.council-session-row:hover .s-del { display: inline-flex; }
.council-session-row .s-del:hover { background: color-mix(in srgb, var(--danger, #ef4444) 15%, transparent); color: var(--danger, #ef4444); }

.council-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.council-empty { margin: auto; padding: 30px 16px; text-align: center; font-size: 12.5px; color: var(--text-muted, var(--sub)); }

.cmsg { display: flex; gap: 10px; max-width: 100%; }
.cmsg .m-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 10px; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface-muted, rgba(148,163,184,.16)); color: var(--text-secondary, var(--sub));
}
.cmsg .m-avatar.is-member { background: var(--primary-gradient, linear-gradient(135deg,#10b981,#06b6d4)); color: var(--on-primary, #fff); }
/* 用户消息不带头像（ChatGPT/Codex 惯例）：自己的消息只靠气泡区分，头像列整列去掉——
 * 之前皮肤预览圆在深色皮肤下只剩两粒暗点，用户看成一条细灰竖线，不如没有。 */
.cmsg .m-avatar.is-user { display: none; }
.u-skin { display: block; width: 100%; height: 100%; }
.u-skin .skin-preview { width: 100%; height: 100%; box-sizing: border-box; border-width: 2px; }
/* skins.css 里有未嵌套的 .skin-ink/.skin-cyber/... 卡片样式（带 !important），不能让它糊到头像壳上 */
.u-skin.skin-ink, .u-skin.skin-cyber, .u-skin.skin-midnight,
.u-skin.skin-sakura, .u-skin.skin-simon-star {
  background: none !important; border: none !important; box-shadow: none !important;
}
.cmsg .m-body { min-width: 0; max-width: min(78%, 640px); }
.cmsg .m-who { font-size: 11px; font-weight: 600; color: var(--text-muted, var(--sub)); margin-bottom: 4px; display: flex; gap: 6px; align-items: baseline; }
.cmsg .m-who .m-model { font-weight: 400; opacity: .75; font-size: 10px; }
.cmsg .m-content {
  font-size: 13px; line-height: 1.65; color: var(--text-main, var(--text));
  background: var(--surface-soft, rgba(148,163,184,.07));
  border: 1px solid var(--border-subtle, var(--line));
  border-radius: var(--radius-sm, 10px); border-top-left-radius: 4px;
  padding: 9px 13px; white-space: pre-wrap; word-break: break-word;
}
/* Devin 真件全复刻：议事殿助手正文同去泡（成员名头保留——多成员语境要认人） */
.cmsg:not(.is-user):not(.is-system):not(.is-error) .m-content {
  background: transparent; border-color: transparent; padding: 0; border-radius: 0;
}
.cmsg.is-user { flex-direction: row-reverse; }
.cmsg.is-user .m-body { display: flex; flex-direction: column; align-items: flex-end; }
.cmsg.is-user .m-content {
  background: var(--primary-gradient, linear-gradient(135deg,#10b981,#06b6d4));
  border-color: transparent; color: var(--on-primary, #fff);
  border-radius: var(--radius-sm, 10px); border-top-right-radius: 4px;
}
.cmsg.is-user .m-who { flex-direction: row-reverse; }
.cmsg.is-error .m-content { border-color: color-mix(in srgb, var(--danger, #ef4444) 45%, transparent); color: var(--danger, #ef4444); }
.cmsg.is-system .m-content {
  background: var(--surface-muted, rgba(148,163,184,.1));
  border-style: dashed; font-size: 12.5px;
}
/* 大账尾窗：历史没到头的会话顶部一枚「加载更早」入口 */
.council-earlier { display: flex; justify-content: center; padding: 4px 0 10px; }
.council-earlier .btn { opacity: .75; }
.council-earlier .btn:hover { opacity: 1; }

.cmsg .m-phase {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--primary-deep, var(--primary)); background: var(--primary-gradient-soft, rgba(16,185,129,.1));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 999px; padding: 1px 8px; margin-bottom: 5px;
}
.cmsg .m-decision { font-size: 10.5px; color: var(--text-muted, var(--sub)); margin-top: 5px; font-style: italic; }
/* 三人行任务卡：派工/汇报消息上的活状态条——状态从 tasks[] 活值取，跑完自动翻面 */
.cmsg .m-task {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 2px 0 6px; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-soft, rgba(148,163,184,.08));
  font-size: 11px; line-height: 1.4;
}
.m-task-tag {
  flex: none; font-size: 10px; font-weight: 700; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 999px; padding: 0 6px;
}
.m-task-who { font-weight: 700; color: var(--text-main, var(--text)); }
.m-task-status { color: var(--text-secondary, var(--sub)); }
.cmsg .m-task.is-running .m-task-status { color: var(--primary); animation: councilRunPulse 1.4s ease-in-out infinite; }
.cmsg .m-task.is-done .m-task-status { color: var(--primary); }
.cmsg .m-task.is-failed .m-task-status,
.cmsg .m-task.is-interrupted .m-task-status { color: var(--danger, #ef4444); }
.m-task-time { color: var(--text-muted, var(--sub)); }
.m-task-note { flex-basis: 100%; color: var(--text-muted, var(--sub)); }
.m-task-open {
  margin-left: auto; flex: none; border: 0; background: none; cursor: pointer;
  color: var(--primary); font-size: 11px; padding: 0 2px;
}
.m-task-open:hover { text-decoration: underline; }
.cmsg .m-approve { margin-top: 8px; }
.cmsg.typing .m-content { color: var(--text-muted, var(--sub)); font-style: italic; }

/* composer=一体式圆角卡（Codex/Devin 同款）：输入区在上（大）、工具行在下（细），
   整卡描边聚焦加深；textarea 透明无边——框是卡的，不是输入框的 */
.council-composer {
  flex: none; display: flex; gap: 4px; align-items: stretch;
  margin: 2px 14px 12px; padding: 10px 12px 6px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-soft, var(--card));
  transition: border-color .18s ease;
}
.council-composer:focus-within { border-color: var(--line-strong, var(--line)); }
.council-composer textarea {
  width: 100%; resize: none; flex: none;
  border: 0; border-radius: 0;
  background: transparent;
  color: var(--text-main, var(--text));
  font-size: 13px; line-height: 1.5; padding: 4px 6px;
  min-height: 56px;
  font-family: inherit; outline: none;
}
.council-composer textarea:disabled { opacity: .55; }
.council-send { width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center; flex: none; border-radius: 12px; }
/* 运行中：发送键变停止键（圆圈里一个实心方块），点了就停。
 * 配色不变红——对齐 Codex/Devin：同一只键，只换图标。 */
.council-send .cs-ic-stop, .af-send .cs-ic-stop { display: none; }
.council-send.is-running .cs-ic-send, .af-send.is-running .cs-ic-send { display: none; }
.council-send.is-running .cs-ic-stop, .af-send.is-running .cs-ic-stop { display: block; }

/* ── 语音输入（议事殿 + 悬浮小助通用）── */
/* 录音时整条输入行被接管：隐藏 textarea 和各路按钮，只留下音浪条。 */
.council-composer.vi-recording > *:not(.vi-strip):not(.council-queue-strip):not(.council-att-strip),
.aide-float-panel .af-composer.vi-recording > *:not(.vi-strip) { display: none !important; }

.vi-mic {
  width: 36px; height: 36px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 10px;
  background: var(--surface-soft, var(--card));
  color: var(--text-muted, var(--sub)); cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.vi-mic:hover { color: var(--primary); border-color: var(--primary); }
.vi-mic.vi-busy { color: var(--primary); }

.vi-strip {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 4px;
}
.vi-strip.hidden { display: none !important; }
/* 停止钮：主色实底 + 主题色方块——录音里唯一的彩色实体，一眼就是"点我停" */
.vi-stop {
  width: 34px; height: 34px; flex: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: var(--card);
  position: relative;
}
.vi-strip[data-phase="recording"] .vi-stop { animation: vi-pulse 1.6s ease-out infinite; }
.vi-stop:hover { filter: brightness(1.12); }
@keyframes vi-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.vi-time {
  flex: none; min-width: 40px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.vi-wave { flex: 1; min-width: 40px; height: 30px; color: var(--primary); }
.vi-label {
  flex: none; font-size: 12px; color: var(--text-muted, var(--sub));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%;
}
.vi-strip[data-phase="recording"] .vi-label { color: var(--primary); }
.vi-cancel {
  width: 26px; height: 26px; flex: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent;
  color: var(--text-muted, var(--sub)); cursor: pointer;
}
.vi-cancel:hover { color: var(--danger, #ef4444); background: var(--surface-soft, var(--card)); }

/* ── composer 工具行（Devin 式底栏：+ / 权限 / 模型 / 截图 / … / 发送）──
   一条到底：控件无框幽灵化；芯片标签 .cc-chip-txt 可塌缩——
   窗窄时文字渐隐只剩图标，永不折行不裁件（管理员令·参照 Codex/Devin composer）。 */
.council-composer { flex-direction: column; align-items: stretch; gap: 4px; }
.aide-float-panel .af-composer { flex-direction: column; align-items: stretch; gap: 4px; }
.cc-tools, .aide-float-panel .af-tools {
  display: flex; align-items: center; gap: 6px; min-height: 32px; min-width: 0;
  position: relative; /* 行内弹层（cc-pop）锚这里 */
}
.cc-spacer { flex: 1; min-width: 6px; }
.cc-kit { display: flex; align-items: center; gap: 6px; position: relative; flex: 0 1 auto; min-width: 0; }
.cc-icon {
  width: 28px; height: 28px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--text-muted, var(--sub)); cursor: pointer;
  transition: color .15s ease, background .18s ease;
}
.cc-icon:hover { color: var(--text-main, var(--text)); background: var(--surface-muted, rgba(148,163,184,.15)); }
.cc-chip {
  height: 28px; padding: 0 8px; flex: 0 1 auto; min-width: 0;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: var(--text-muted, var(--sub)); font-size: 11.5px; cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.cc-chip:hover { color: var(--text-main, var(--text)); background: var(--surface-muted, rgba(148,163,184,.15)); }
/* 芯片标签塌缩位：窗窄先裁字后留图标——flex 收缩+overflow 渐隐 */
/* 塌缩不是截断：标签右缘渐变隐去（左实右虚），窄了看着是"淡出"不是"切断" */
.cc-chip-txt { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
/* Devin 真件行为：工具行装得下就全显；**挤不下才**逐字渐变塌缩（2026-11-05 实测校正） */
.af-tools.is-tight .cc-chip-txt {
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 96%);
  mask-image: linear-gradient(to right, #000 62%, transparent 96%); }
.cc-chip-ic { flex: none; }
.cc-chip-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-muted, var(--sub)); }
.cc-perm[data-mode="auto"] .cc-chip-dot { background: var(--primary); }
.cc-perm[data-mode="confirm"] .cc-chip-dot { background: var(--danger, #ef4444); }
.cc-pop-item.dis { opacity: .45; cursor: default; }
select.cc-chip { appearance: none; -webkit-appearance: none; padding-right: 22px;
  max-width: 170px; text-overflow: ellipsis; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='10' height='10' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
select.cc-chip option { background: var(--card); color: var(--text-main, var(--text)); }
/* 权限选择弹层：往上开，不遮输入框 */
.cc-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 240px; padding: 6px;
  background: var(--panel-bg, var(--card));
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.cc-pop.hidden { display: none; }
.cc-pop-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 8px 10px; border: none; border-radius: 8px; background: transparent;
  text-align: left; cursor: pointer; color: var(--text-main, var(--text));
}
.cc-pop-item.hidden { display: none; }
.cc-pop-item:hover { background: var(--surface-soft, var(--card)); }
.cc-pop-item.on { outline: 1px solid var(--primary); }
.cc-pop-name { font-size: 13px; font-weight: 600; }
.cc-pop-desc { font-size: 11px; color: var(--text-muted, var(--sub)); }

/* tierbar 已撤销（2026-11-01 管理员令·一体式 composer）：截图组并入工具行，
   芯片标签塌缩机制保证一条排得下。本段仅留弹层宽度基线。 */
.cc-tools .cc-pop, .aide-float-panel .af-tools .cc-pop { min-width: 220px; }
/* 待审批板：后台回合确认闸的弹卡坞，钉在输入框上方 */
.af-pend-dock { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.af-pend-dock .cc-confirm-card { margin: 0; }
.af-pend-dock .cc-confirm-args { max-height: 90px; }
/* 浮窗窄（~356px）：模型框收窄给档位让位 */
.aide-float-panel .cc-model { max-width: 118px; }
/* 输入条模型 chip（model-picker 的 compact 按钮）：长名省略号→更窄时文字渐隐留图标 */
button.cc-chip.cc-model { appearance: none; -webkit-appearance: none; position: relative; padding-right: 20px; max-width: 170px; text-align: left; }
button.cc-chip.cc-model .cmsel-val { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 92%);
  mask-image: linear-gradient(to right, #000 55%, transparent 92%); }
button.cc-chip.cc-model .cmsel-caret { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; color: #888; }

/* ── 右栏 ── */
.council-side { padding: 13px 13px 14px; gap: 14px; overflow-y: auto; }
.council-side h4 { margin: 0 0 7px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted, var(--sub)); }
.council-side .g-name { font-size: 14px; font-weight: 700; color: var(--text-strong, var(--text)); }
.council-side .g-desc { font-size: 11.5px; color: var(--text-muted, var(--sub)); margin-top: 3px; line-height: 1.5; }
.council-side .g-type-badge {
  display: inline-block; font-size: 10px; font-weight: 700; margin-top: 6px;
  color: var(--primary-deep, var(--primary)); background: var(--primary-gradient-soft, rgba(16,185,129,.1));
  border-radius: 999px; padding: 2px 9px;
}
.council-seg { display: flex; gap: 4px; background: var(--surface-soft, rgba(148,163,184,.08)); border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); padding: 3px; }
.council-seg button {
  flex: 1; border: none; border-radius: 7px; padding: 6px 4px; font-size: 11px; font-weight: 600;
  background: transparent; color: var(--text-muted, var(--sub)); cursor: pointer; transition: all .18s ease; font-family: inherit;
}
.council-seg button.on { background: var(--panel-bg, var(--card)); color: var(--primary-deep, var(--primary)); box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.council-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.council-picks .pick {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-soft, transparent); color: var(--text-secondary, var(--sub));
  /* transition 只放绘属性：font-weight 变化会触发文字重排（选中瞬间字变宽→整排换行→
     弹窗高度变→大阴影整面重绘=点一下卡半拍）。勾选态用颜色+边框+勾选符表达，不动字重。 */
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
  user-select: none;
}
.council-picks .pick:hover { border-color: var(--primary); }
.council-picks .pick.on { background: var(--primary-gradient-soft, rgba(16,185,129,.12)); border-color: var(--primary); color: var(--primary-deep, var(--primary)); }
.council-picks .pick.muted { opacity: .45; text-decoration: line-through; }
.council-side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-secondary, var(--sub)); }
.council-side-row select { max-width: 120px; }
.council-assign-box .council-side-row select { max-width: none; }
.council-assign-box .council-side-row { align-items: flex-end; }
.council-assign-box .council-side-row .btn { flex: none; }
.council-side .council-input { width: 100%; box-sizing: border-box; }
.council-side .danger { width: 100%; margin-top: 2px; }
.council-hint { font-size: 10.5px; color: var(--text-muted, var(--sub)); line-height: 1.5; }

/* 成员设置表单（右栏）——分组成卡片，别再是一张裸表单 */
.cms-card {
  background: var(--surface-soft, rgba(148,163,184,.06));
  border: 1px solid var(--border-subtle, var(--line));
  border-radius: 14px; padding: 12px 13px;
  display: flex; flex-direction: column; gap: 9px;
}
.cms-sec {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted, var(--sub));
}
.cms-profile { flex-direction: row; align-items: center; gap: 11px; padding: 13px; }
.cms-profile .c-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 15px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--on-primary, #fff);
  box-shadow: 0 4px 14px rgba(2, 8, 23, .25);
}
.cms-head-meta { min-width: 0; }
.cms-head-meta .g-name { font-size: 14.5px; }
.cms-head-meta .g-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.council-side .council-field { display: flex; flex-direction: column; gap: 5px; }
.council-side .council-field > span { font-size: 11px; font-weight: 600; color: var(--text-muted, var(--sub)); }
.council-side .council-input {
  height: 34px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--card, var(--panel-bg));
  transition: border-color .15s ease, box-shadow .15s ease;
}
.council-side .council-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.council-side .council-field textarea.council-input { height: auto; min-height: 84px; font-size: 12px; line-height: 1.6; padding: 9px 11px; resize: vertical; }
.council-side .council-form-row { display: flex; gap: 9px; }
.council-side .council-form-row .council-field { flex: 1; min-width: 0; }
.cms-memory-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cms-memory-row > span { font-size: 12px; font-weight: 600; color: var(--text-main, #e5edf5); }
.cms-memory-hint { font-size: 11px; line-height: 1.6; color: var(--text-muted, var(--sub)); }
.cms-actions { display: flex; gap: 8px; }
.cms-actions .btn { flex: 1; height: 34px; border-radius: 10px; }
.cms-note { padding: 0 2px; }
.cms-danger { padding: 8px; align-items: stretch; border-color: color-mix(in srgb, var(--danger, #ef4444) 30%, transparent); }
.cms-danger .danger { margin: 0; }
.cms-preview {
  font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  border: 1px dashed var(--line-strong, var(--line)); border-radius: var(--radius-sm, 10px);
  background: var(--surface-soft, rgba(148,163,184,.07));
  color: var(--text-main, var(--text)); padding: 9px 11px;
}
.cms-preview.is-error { border-color: color-mix(in srgb, var(--danger, #ef4444) 45%, transparent); color: var(--danger, #ef4444); }

/* 流式发言中的气泡：光标呼吸（等待阶段三点在时不出光标块，不然三点后面吊个白块） */
.cmsg.streaming .m-content { min-height: 1.4em; }
.cmsg.streaming .m-content::after {
  content: ""; display: inline-block; width: 7px; height: 13px; margin-left: 3px;
  vertical-align: -2px; border-radius: 2px; background: var(--primary);
  animation: council-caret 0.9s steps(2) infinite;
}
.cmsg.streaming .m-content:has(.m-dots)::after,
.cmsg.streaming .m-content:has(.run-status)::after { display: none; }
@keyframes council-caret { 50% { opacity: 0; } }

/* 成员气泡顶的「思考过程」折叠块：工具调用一步一行，默认收起细节 */
/* 思考链：淡灰折叠块——默认收起，点开才展开内心戏 */
.cmsg .m-think {
  margin: 3px 0 4px; border-left: 2.5px solid var(--line-strong, var(--line));
  padding-left: 9px; font-size: 11px; color: var(--text-muted, var(--sub));
}
.cmsg .m-think > summary {
  cursor: pointer; list-style: none; font-size: 10.5px; opacity: .85;
  display: inline-flex; align-items: center; gap: 5px;
}
.cmsg .m-think > summary::before {
  content: ""; width: 0; height: 0; border: 4px solid transparent;
  border-left-color: currentColor; opacity: .7; transition: transform .15s ease;
}
.cmsg .m-think[open] > summary::before { transform: rotate(90deg); }
.cmsg .m-think > summary::-webkit-details-marker { display: none; }
.cmsg .m-think-body {
  padding: 4px 0 3px; line-height: 1.55; opacity: .82; white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow-y: auto;
}
.cmsg .m-steps {
  margin-bottom: 6px; font-size: 11px;
  color: var(--text-muted, var(--sub));
}
.cmsg .m-steps > summary {
  cursor: pointer; user-select: none; list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 0; opacity: .85;
}
.cmsg .m-steps > summary::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid var(--text-muted, var(--sub));
  transition: transform .15s;
}
.cmsg .m-steps[open] > summary::before { transform: rotate(90deg); border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.cmsg .m-steps-list { padding: 2px 0 4px 12px; display: flex; flex-direction: column; gap: 3px; }
.cmsg .m-step {
  display: flex; align-items: center; gap: 7px;
  padding: 2px 6px; border-radius: 6px;
}
.cmsg .m-step-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-muted, var(--sub));
}
.cmsg .m-step.running .m-step-dot { background: var(--primary); animation: council-step-pulse 1s ease-in-out infinite; }
.cmsg .m-step.wait .m-step-dot { background: var(--warn, var(--warning, var(--primary))); animation: council-step-pulse 1s ease-in-out infinite; }
.cmsg .m-step.ok .m-step-dot { background: var(--success, var(--primary)); }
.cmsg .m-step.bad .m-step-dot { background: var(--danger, #ef4444); }
.cmsg .m-step-name { font-size: 10.5px; }
.cmsg .m-step-detail {
  font-size: 10px; opacity: .72; font-family: ui-monospace, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%;
}
.cmsg .m-step-status { margin-left: auto; font-size: 10px; opacity: .8; }
.cmsg .m-step.bad .m-step-status { color: var(--danger, #ef4444); }

/* ── 小助手一轮（council-turn.js）：活状态行 · 终端卡 · 报错卡 · 系统通知 ── */
.cmsg .m-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted, var(--sub)); padding: 2px 0 6px; }
.cmsg .m-status.is-done { padding: 0 0 4px; font-size: 11px; opacity: .8; }
.cmsg .m-status .m-dots { margin-right: 0; }
.cmsg .m-status-sec, .cmsg .m-elapsed { font-variant-numeric: tabular-nums; }
.cmsg .m-elapsed { margin-left: 8px; font-size: 11px; color: var(--text-muted, var(--sub)); }
.cmsg .m-step-icon { display: inline-flex; color: var(--text-muted, var(--sub)); }
.cmsg .m-term { border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; margin: 4px 0; background: color-mix(in srgb, var(--card) 88%, #000 12%); }
.cmsg .m-term pre, .cmsg .m-err-card pre { background: transparent; border: 0; padding: 0; min-height: 0; height: auto; }
.cmsg .m-term-wait { font-size: 11px; color: var(--text-muted, var(--sub)); padding: 2px 0; }
.cmsg .m-term-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted, var(--sub)); }
.cmsg .m-term-name { font-weight: 600; font-family: ui-monospace, Consolas, monospace; }
.cmsg .m-term-chip { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); }
.cmsg .m-term.is-running .m-term-chip, .cmsg .m-term.is-wait .m-term-chip { color: var(--primary); border-color: var(--primary); }
.cmsg .m-term.is-ok .m-term-chip { color: var(--success, #22c55e); }
.cmsg .m-term.is-bad .m-term-chip { color: var(--danger, #ef4444); border-color: color-mix(in srgb, var(--danger, #ef4444) 50%, transparent); }
.cmsg .m-term-cmd { margin: 5px 0 0; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; white-space: pre-wrap; word-break: break-all; color: var(--text); }
.cmsg .m-term-out { margin-top: 4px; font-size: 11px; }
.cmsg .m-term-out > summary { cursor: pointer; color: var(--text-muted, var(--sub)); }
.cmsg .m-step-out { margin: 4px 0 0; max-height: 240px; overflow: auto; font-family: ui-monospace, Consolas, monospace; font-size: 11px; white-space: pre-wrap; word-break: break-all; color: var(--text-muted, var(--sub)); }
.cmsg .m-err-card { border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 40%, transparent); border-left: 3px solid var(--danger, #ef4444); background: color-mix(in srgb, var(--danger, #ef4444) 8%, var(--card)); border-radius: 10px; padding: 9px 11px; }
/* .m-content 的 pre-wrap 会把 renderErrorCard 模板串里的标签间换行渲染成空行，卡片被撑高三倍——卡片内部不许继承 */
.cmsg .m-err-card { white-space: normal; }
/* 用户主动停止不是故障：中性色、无重试 */
.cmsg .m-err-card.is-stopped { border-color: var(--line, rgba(148,163,184,.25)); border-left-color: var(--text-muted, #8aa); background: var(--card, rgba(148,163,184,.06)); color: var(--text-secondary, var(--sub)); padding: 7px 11px; }
.cmsg .m-err-head { display: flex; align-items: center; gap: 7px; color: var(--danger, #ef4444); font-weight: 600; font-size: 13px; }
.cmsg .m-err-icon { display: inline-flex; }
.cmsg .m-err-detail { margin-top: 6px; font-size: 11px; color: var(--text-muted, var(--sub)); }
.cmsg .m-err-detail pre { white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; max-height: 200px; overflow: auto; font-family: ui-monospace, Consolas, monospace; }
.cmsg .m-err-actions { display: flex; gap: 6px; margin-top: 8px; }
.cmsg .m-err-actions button { font-size: 11.5px; padding: 3px 10px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.cmsg .m-err-actions .m-err-retry { border-color: var(--danger, #ef4444); color: var(--danger, #ef4444); }
.cmsg.is-notice .m-avatar { display: none; }
.cmsg.is-notice .m-body { max-width: 100%; width: 100%; text-align: center; }
.cmsg.is-notice .m-who, .cmsg.is-notice .m-acts { display: none; }
.cmsg.is-notice .m-content { display: inline-block; padding: 0 10px; font-size: 11.5px; color: var(--text-muted, var(--sub)); background: none; border: none; }
@keyframes council-step-pulse { 50% { opacity: .3; } }

/* 等待中的呼吸圆点（转圈圈的答案）。
 * <i> 默认是 inline，transform 不生效——必须 display:block 弹跳才看得出来。 */
.m-dots { display: inline-flex; gap: 5px; margin-right: 7px; vertical-align: 1px; align-items: center; }
.m-dots i {
  display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted, var(--sub));
  animation: council-dot-bounce 1.2s ease-in-out infinite;
}
.m-dots i:nth-child(2) { animation-delay: .15s; }
.m-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes council-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* @ 点名补全弹层 */
.council-composer { position: relative; }
.council-mention-pop {
  position: absolute; left: 14px; bottom: calc(100% - 4px); z-index: 30;
  min-width: 210px; max-width: 320px; max-height: 264px; overflow-y: auto;
  background: var(--panel-bg, var(--card));
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-sm, 10px);
  box-shadow: 0 10px 30px rgba(2, 8, 23, .22);
  padding: 4px;
}
.council-mention-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
}
.council-mention-item:hover, .council-mention-item.on { background: var(--primary-gradient-soft, rgba(16,185,129,.12)); }
.council-mention-item .c-avatar {
  width: 22px; height: 22px; flex: none; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--on-primary, #fff);
}
.council-mention-item .cm-name { font-size: 12.5px; font-weight: 600; color: var(--text-main, var(--text)); }
.council-mention-item .cm-model { margin-left: auto; font-size: 10.5px; color: var(--text-muted, var(--sub)); }

/* 分配模型弹窗 */
.council-assign-box { max-width: 560px; width: min(560px, calc(100vw - 60px)); }
.cma-rows { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
/* 成员行给一层浅卡面：裸行贴着飘，头像名字下拉都像没对齐；
   有了行底，头像居左、名字定宽、下拉占满的秩序才看得出来 */
.cma-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--surface-soft, rgba(148, 163, 184, .07));
  border: 1px solid var(--border-subtle, var(--line));
  border-radius: 12px;
}
.cma-row .c-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--on-primary, #fff);
}
.cma-row .c-name { width: 70px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-main, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cma-row select, .cma-row .cmsel { flex: 1; min-width: 0; }

/* ── 自定义模型下拉：密钥/聚合组头色条区分，模型行正常色 ── */
.cmsel { position: relative; }
.cmsel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
}
.cmsel-btn.is-empty .cmsel-val { color: var(--text-muted, var(--sub)); }
.cmsel-btn .cmsel-caret { flex: none; opacity: .55; }
/* z-index 必须高于 .modal 的 12000（styles.css 末尾统一抬的），否则浮层压在弹窗遮罩后面——
   看得见按钮、点开却没反应的真实事故 */
.cmsel-pop {
  position: fixed; z-index: 12050; max-height: 340px;
  display: flex; flex-direction: column;
  background: var(--panel-bg, var(--card)); border: 1px solid var(--line-strong, var(--line));
  border-radius: 12px; box-shadow: 0 18px 50px rgba(2, 8, 23, .5);
  overflow: hidden;
}
.cmsel-search { padding: 8px; border-bottom: 1px solid var(--border-subtle, var(--line)); display: flex; gap: 6px; align-items: center; }
.cmsel-search input {
  flex: 1; min-width: 0; padding: 6px 10px; font-size: 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,.04));
  color: var(--text-main, var(--text)); outline: none;
}
/* 批量管理入口：搜索行右侧小按钮，不占展开区 */
.cmsel-manage {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--line); border-radius: 7px; background: transparent;
  color: var(--text-sub, inherit); font-size: 10px; padding: 4px 7px; cursor: pointer; opacity: .75;
}
.cmsel-manage:hover { opacity: 1; border-color: var(--primary); }
.cmsel-pop.is-batch .cmsel-manage { color: var(--primary); border-color: var(--primary); opacity: 1; }
/* 勾选框：组头最左，独立点击域——点它不展开 */
.cmsel-check { flex: none; margin: 0; width: 13px; height: 13px; accent-color: var(--primary, #7fb685); cursor: pointer; }
.cmsel-check:disabled { opacity: .35; cursor: not-allowed; }
/* 批量底栏：只在批量模式显示 */
.cmsel-batchbar {
  display: none; align-items: center; gap: 8px; padding: 7px 10px;
  border-top: 1px solid var(--border-subtle, var(--line));
}
.cmsel-pop.is-batch .cmsel-batchbar { display: flex; }
.cmsel-batchbar button {
  border: 1px solid var(--line); border-radius: 7px; background: transparent;
  color: inherit; font-size: 11px; padding: 4px 10px; cursor: pointer;
}
.cmsel-batchbar button:hover:not(:disabled) { border-color: var(--primary); }
.cmsel-batchbar button:disabled { opacity: .4; cursor: default; }
.cmsel-bdel { color: #e0705a; margin-left: auto; }
.cmsel-bdel.is-armed { border-color: #e0705a; font-weight: 700; }
.cmsel-bout { opacity: .7; }
.cmsel-search input:focus { border-color: var(--primary); }
.cmsel-list { overflow-y: auto; padding: 5px; }
/* 组头=渠道/密钥：色条+图标+类型标签，一眼认出"这是密钥不是模型"；点组头展开/收起
   两行式：上行渠道名，下行类型·数量(不通数)，右栏刷新/删除/展开固定对齐，行宽不一也不显乱 */
.cmsel-ghead {
  display: flex; align-items: center; gap: 8px; margin: 6px 4px 3px;
  padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 700;
  border-left: 3px solid transparent;
  cursor: pointer; user-select: none;
}
.cmsel-gmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cmsel-gname { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmsel-gmeta { font-style: normal; font-weight: 400; opacity: .65; font-size: 10px; }
.cmsel-gacts { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
/* 模型组默认收起，只留组头；open/搜索命中时摊开 */
.cmsel-group .cmsel-glist { display: none; }
.cmsel-group.open .cmsel-glist { display: block; }
.cmsel-gchev { flex: none; opacity: .5; transition: transform .15s ease; }
.cmsel-group.open > .cmsel-ghead .cmsel-gchev { transform: rotate(180deg); }
/* 刷新图标钮：一点=拉清单+逐模型实测，省字省位 */
.cmsel-refresh {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: inherit; opacity: .55;
  cursor: pointer; padding: 1px 2px; flex: none;
}
.cmsel-refresh:hover { opacity: 1; }
.cmsel-refresh:disabled { opacity: .35; cursor: default; }
.cmsel-refresh.is-spinning svg { animation: cmsel-spin .8s linear infinite; }
@keyframes cmsel-spin { to { transform: rotate(360deg); } }
/* 死线灰显：看得到"不通"标但点不动——选了必报错，不如拦在选择器里 */
.cmsel-opt.is-dead { opacity: .45; cursor: default; }
.cmsel-opt.is-dead:hover { background: transparent; }
.cmsel-badge.is-dead { color: #e0705a; border-color: color-mix(in srgb, #e0705a 40%, transparent); background: rgba(224,112,90,.1); }
/* 质量分徽标：真流量口碑一眼分档——高绿、中琥珀、低红；不通灰行不显示分 */
.cmsel-badge.is-score { font-variant-numeric: tabular-nums; min-width: 20px; text-align: center; }
.cmsel-badge.is-score.is-hi { color: var(--success, #22c55e); border-color: color-mix(in srgb, var(--success, #22c55e) 40%, transparent); background: color-mix(in srgb, var(--success, #22c55e) 12%, transparent); }
.cmsel-badge.is-score.is-mid { color: var(--warning, var(--warn, #d9a03f)); border-color: color-mix(in srgb, var(--warning, var(--warn, #d9a03f)) 40%, transparent); background: color-mix(in srgb, var(--warning, var(--warn, #d9a03f)) 12%, transparent); }
.cmsel-badge.is-score.is-lo { color: #e0705a; border-color: color-mix(in srgb, #e0705a 40%, transparent); background: rgba(224,112,90,.1); }
/* 自动路由开关行：钉在搜索框下面，模式先于清单读 */
.cmsel-route {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; border-bottom: 1px solid var(--border-subtle, var(--line));
  font-size: 11px; color: var(--sub);
}
/* E38·路由池入口行：按钮 + 计数徽标；单锁中（自动路由关）按钮灰显 */
.cmsel-poolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-bottom: 1px solid var(--border-subtle, var(--line));
}
.cmsel-pool-btn {
  border: 1px solid var(--line-strong, var(--line)); background: transparent; color: var(--sub);
  font-size: 11px; padding: 2px 10px; border-radius: 999px; cursor: pointer;
}
.cmsel-pool-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.cmsel-pool-btn.on { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.cmsel-pool-btn:disabled { opacity: .4; cursor: default; }
.cmsel-pool-count { font-size: 10px; color: var(--sub); opacity: .8; }
/* 池面板：按渠道分组的多选树，内部滚动（弹窗 max-height 兜底） */
.cmsel-pool {
  max-height: 220px; overflow-y: auto;
  padding: 6px 10px 8px; border-bottom: 1px solid var(--border-subtle, var(--line));
}
.cmsel-pool.hidden { display: none; }
.cmsel-pool-empty { font-size: 11px; color: var(--sub); padding: 6px 0; }
.cmsel-pool-g { margin-bottom: 6px; }
.cmsel-pool-gh { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--text-main, var(--text)); cursor: pointer; padding: 2px 0; }
.cmsel-pool-part { font-size: 9.5px; font-weight: 400; color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); border-radius: 999px; padding: 0 6px; line-height: 14px; }
.cmsel-pool-ms { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 2px 0 2px 20px; }
.cmsel-pool-m { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--sub); cursor: pointer; }
.cmsel-pool-m input:disabled { cursor: default; }
.cmsel-pool-m:has(input:disabled) { opacity: .55; }
.cmsel-del {
  border: none; background: transparent; color: inherit; opacity: .45;
  font-size: 10px; cursor: pointer; padding: 0 2px; flex: none;
}
.cmsel-del:hover { opacity: 1; color: #e0705a; text-decoration: underline; }
.cmsel-del.is-armed { opacity: 1; color: #e0705a; font-weight: 700; }
.cmsel-del:disabled { opacity: .35; cursor: default; text-decoration: none; }
.cmsel-ghead.is-key { color: #d9a45b; background: rgba(217, 164, 91, .1); border-left-color: #d9a45b; }
.cmsel-ghead.is-card { color: var(--primary, #7fb685); background: color-mix(in srgb, var(--primary, #7fb685) 12%, transparent); border-left-color: var(--primary, #7fb685); }
.cmsel-ghead.is-agg { color: #a78bfa; background: rgba(167, 139, 250, .12); border-left-color: #a78bfa; }
/* 组内模型跟着渠道色走——一眼看出这模型走的是聚合还是密钥，不会上下看混 */
.cmsel-group.is-agg .cmsel-opt { color: #c4b5fd; }
.cmsel-group.is-agg .cmsel-opt.on { background: rgba(167, 139, 250, .16); color: #d9cdff; }
.cmsel-group.is-key .cmsel-opt { color: #dfb87d; }
.cmsel-group.is-key .cmsel-opt.on { background: rgba(217, 164, 91, .14); color: #ecc78c; }
.cmsel-group.is-card .cmsel-opt { color: var(--primary); }
.cmsel-opt {
  display: flex; align-items: center; width: 100%; text-align: left;
  padding: 5px 8px 5px 22px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--text-main, var(--text)); font-size: 12.5px;
}
.cmsel-opt:hover { background: var(--primary-gradient-soft, rgba(148,163,184,.12)); }
.cmsel-opt.on { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); font-weight: 700; }
.cmsel-opt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmsel-badge { flex: none; margin-left: auto; padding: 0 6px; border-radius: 999px; font-size: 9.5px; font-style: normal; font-weight: 700; line-height: 16px; color: var(--sub); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--sub) 10%, transparent); white-space: nowrap; }

/* ── 弹窗 ── */
.council-modal-box { max-width: 580px; width: min(580px, calc(100vw - 60px)); }
/* 表单体补横 padding 与头(28px)/尾(28px)对齐——原来 0 横 padding，所有字段裸贴左右边 */
.council-modal-box .council-form { padding: 6px 28px 14px; }
/* 弹窗重排隔离：pick 勾选/清单变化只重排盒内，不撬动整页（点一下卡半拍的另一半根因） */
.council-modal-box { contain: layout; }
/* 下拉框皮肤化：系统默认灰箭头在暗色皮上发灰发旧——自绘箭头+留出箭体位 */
select.council-input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12' fill='none' stroke='%23888f9f' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
select.council-input option { background: var(--surface-raised, #1e222b); color: var(--text, #e8eaf0); }
.council-form { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.council-form-row { display: flex; gap: 10px; }
.council-form-row.hidden { display: none; }
.council-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.council-field > span { font-size: 11px; font-weight: 600; color: var(--text-muted, var(--sub)); }
.council-field .council-input { width: 100%; box-sizing: border-box; }

@media (max-width: 1180px) {
  .council-workspace { grid-template-columns: 190px minmax(0,1fr) 210px; }
}
@media (max-width: 980px) {
  .council-workspace { grid-template-columns: 180px minmax(0,1fr); }
  .council-side { display: none; }
  /* 专注模式下点右边签仍可展开右栏（覆盖上面的隐藏） */
  .council-workspace.council-focus.focus-side-open { grid-template-columns: minmax(0,1fr) 210px; }
  .council-workspace.council-focus.focus-side-open .council-side { display: flex; }
}

/* ── 限宽居中：三栏比例不随窗口宽度改变 ──
   拉大窗口后右栏原本会贴到窗口最右缘。与 .api-hub-shell 同一策略：
   内容轴限宽居中，三栏布局与窄窗口时保持一致。 */
.page.council-page.active :is(.council-offline, .council-view-tabs, .council-workspace) {
  width: min(1240px, 100%);
  margin-inline: auto;
}

/* ── 附件：输入框预览条 + 消息内图片 ── */
/* 排队消息条：运行中再发会先排进来，可立即发送/取回编辑/删除（对齐 Devin queued pill） */
.council-queue-strip { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 4px; }
.council-queue-strip.hidden { display: none; }
.cq-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-muted, rgba(148, 163, 184, .08));
  padding: 6px 8px 6px 12px; font-size: 12.5px;
}
.cq-text { flex: 1; min-width: 0; color: var(--text-main, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-atts { flex: none; font-size: 11px; color: var(--text-muted, var(--sub)); }
.cq-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted, var(--sub)); cursor: pointer;
}
.cq-btn:hover { background: var(--surface-muted, rgba(148, 163, 184, .18)); color: var(--text-main, var(--text)); }
.cq-btn.cq-now { color: var(--primary); }
.cq-btn.cq-del:hover { color: var(--danger, #f87171); }
.council-att-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 2px; }
.council-att-strip.hidden { display: none; }
.att-chip { position: relative; display: inline-flex; }
.att-chip img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.att-chip.is-loading { width: 56px; height: 56px; border-radius: 8px; border: 1px dashed var(--line); align-items: center; justify-content: center; }
.att-chip .att-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--primary);
  animation: att-spin .7s linear infinite;
}
@keyframes att-spin { to { transform: rotate(360deg); } }
.att-chip .att-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-bg, var(--card)); color: var(--text-muted, var(--sub));
  font-size: 12px; line-height: 1; cursor: pointer;
}
.m-atts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.m-att-img { max-width: 240px; max-height: 180px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.m-att-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--text-muted, var(--sub)); }
.m-att-file .m-att-ic { font-size: 14px; }
.m-att-file a { color: var(--primary); text-decoration: none; }

/* 非图附件待发 chip：图标+截断文件名（图片照旧缩略图） */
.att-chip .att-filebox {
  width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--bg-deep, var(--panel-bg, var(--card))); padding: 3px; box-sizing: border-box;
}
.att-chip .att-file-ic { font-size: 18px; line-height: 1; }
.att-chip .att-file-name { font-size: 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted, var(--sub)); }

/* 文件拖入会话区：整区亮边提示可放 */
.council-workspace.is-drop { outline: 2px dashed var(--primary); outline-offset: -4px; border-radius: 12px; }

/* 区头「＋」钮（军团频道新建入口） */
.council-rail-members .council-rail-new {
  border: 1px solid var(--line); background: transparent; color: var(--primary);
  width: 20px; height: 20px; border-radius: 6px; font-size: 13px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.council-rail-members .council-rail-new:hover { background: var(--primary); color: var(--on-primary, #fff); }
.council-lightbox {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 23, .72); cursor: zoom-out;
}
.council-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; }

/* 消息内联 markdown-lite */
.m-content strong { font-weight: 700; }
.m-content em { font-style: italic; }
.m-content .m-h, .af-text .m-h {
  display: block; font-weight: 800; font-size: 13.5px; margin: 4px 0 1px;
  color: var(--text-main, var(--text));
}
/* 列表项 flex 布局：圆点/序号是固定件，正文必须包进 .m-li-t 单件占满剩余宽——
   裸文本+内联标签会被 flex 各分一格，挤成竖条（真实事故：一条回复全碎成列） */
.m-content .m-li, .af-text .m-li { display: flex; gap: 6px; align-items: baseline; padding-left: 2px; }
.m-content .m-li-t, .af-text .m-li-t { flex: 1; min-width: 0; }
.m-content .m-li-dot, .af-text .m-li-dot {
  flex: none; width: 4px; height: 4px; border-radius: 50%;
  background: var(--primary); transform: translateY(-1px); display: inline-block;
}
.m-content .m-li-num, .af-text .m-li-num { flex: none; font-weight: 700; color: var(--primary); }
.m-content .m-quote, .af-text .m-quote {
  display: block; padding-left: 9px; border-left: 2.5px solid var(--primary);
  color: var(--text-muted, var(--sub)); font-style: italic; margin: 1px 0;
}
/* markdown --- 分隔线（Devin 同件：细线淡色不吃行高） */
.m-content .m-hr, .af-text .m-hr {
  display: block; border: 0; height: 0; margin: 3px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
/* 段落矮隔条（2026-11-08 正文段距实案）：mdLite 空行→.m-gap——pre-wrap 空行是
   1.65em 大白缝，Devin 段距只有 ~0.4em；块级撑高即够，前后换行已在 mdLite 吃掉。
   全域放开：.m-content/.af-text/.af-think-full 一切 mdLite 落点通吃。 */
.m-gap { display: block; height: .42em; }
/* file.grep/file.glob 结果卡（Devin search 同构）：命中/文件清单，行号点开预览 */
.af-grep { font-family: var(--mono-font, ui-monospace, Consolas, monospace); font-size: 11.5px; line-height: 1.6; }
.af-grep-row { display: flex; gap: 8px; align-items: baseline; padding: 1px 0; min-width: 0; }
.af-grep-f { flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); }
.af-grep-ln { font-style: normal; color: var(--text-muted, var(--sub)); }
.af-grep-t { flex: 1; min-width: 0; color: var(--text-main, var(--text)); word-break: break-all; }
.af-glob-f { max-width: 100%; white-space: normal; word-break: break-all; }
.af-grep-more { color: var(--text-muted, var(--sub)); font-size: 10.5px; padding-top: 3px; }
/* 行头内文件路径链接：basename 亮色可点，全路径托 title */
.af-ar-path { color: var(--primary); word-break: break-all; }
.m-content .m-pre, .af-text .m-pre {
  display: block; margin: 5px 0; padding: 8px 10px; border-radius: 8px; height: auto;
  background: var(--surface-2, rgba(0,0,0,.28)); border: 1px solid var(--line);
  overflow-x: auto; white-space: pre; font-size: 11.5px; line-height: 1.5;
}
.m-content .m-pre code, .af-text .m-pre code { background: none; border: none; padding: 0; color: inherit; }
/* code-highlight.js 令牌色（VS Code Dark+ 系）：正文代码块 .m-pre 与 file.read 结果卡 .af-code-out 共用 */
.m-content .tok-k, .af-text .tok-k { color: #569cd6; }
.m-content .tok-s, .af-text .tok-s { color: #ce9178; }
.m-content .tok-c, .af-text .tok-c { color: #6a9955; font-style: italic; }
.m-content .tok-n, .af-text .tok-n { color: #b5cea8; }
.m-content .tok-f, .af-text .tok-f { color: #dcdcaa; }
.m-content .tok-t, .af-text .tok-t { color: #4ec9b0; }
.m-content .tok-a, .af-text .tok-a { color: #9cdcfe; }
.m-content .tok-p, .af-text .tok-p { color: #d4d4d4; }
.m-content .tok-ln, .af-text .tok-ln { color: #7a8299; user-select: none; }
.m-content .tok-dim, .af-text .tok-dim { color: #6e7681; font-style: italic; }
.m-content code, .af-text code {
  font-family: var(--mono-font, monospace); font-size: .92em;
  background: var(--primary-gradient-soft, rgba(16,185,129,.12));
  border-radius: 4px; padding: 1px 5px;
}
.m-content .m-link, .af-text .m-link { color: var(--primary); word-break: break-all; }
/* markdown 表格：真表格不是管道符——圆角卡壳、表头底色、斑马纹、窄屏横滚 */
.m-content .m-table-wrap, .af-text .m-table-wrap {
  display: block; margin: 7px 0; max-width: 100%; overflow-x: auto;
  border: 1px solid var(--border-subtle, var(--line)); border-radius: 9px;
}
.m-content .m-table, .af-text .m-table {
  border-collapse: collapse; font-size: 12px; line-height: 1.5; min-width: 100%;
}
.m-content .m-table th, .af-text .m-table th {
  text-align: left; font-weight: 700; white-space: nowrap;
  padding: 5px 10px; color: var(--text-secondary, var(--sub));
  background: var(--surface-2, rgba(148,163,184,.1));
  border-bottom: 1px solid var(--line-strong, var(--line));
}
.m-content .m-table td, .af-text .m-table td {
  padding: 4px 10px; border-bottom: 1px solid var(--border-subtle, var(--line));
  color: var(--text-main, var(--text));
}
.m-content .m-table tbody tr:last-child td, .af-text .m-table tbody tr:last-child td { border-bottom: none; }
.m-content .m-table tbody tr:nth-child(even), .af-text .m-table tbody tr:nth-child(even) {
  background: var(--surface-soft, rgba(148,163,184,.05));
}

/* 中断续跑条 */
.council-resume-bar {
  display: flex; align-items: center; gap: 10px; margin: 6px auto; padding: 8px 12px;
  width: fit-content; border: 1px dashed var(--line-strong, var(--line));
  border-radius: 10px; background: var(--panel-bg, var(--card));
}
.council-resume-bar .r-text { font-size: 12px; color: var(--text-muted, var(--sub)); }

/* ── 悬浮小助 ── */
.aide-float-bubble {
  position: fixed; right: 22px; bottom: 26px; z-index: 850;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary-gradient, linear-gradient(135deg, var(--primary), var(--primary-2, var(--primary))));
  color: var(--on-primary, #fff); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(2, 8, 23, .35); cursor: grab; user-select: none;
  touch-action: none;
}
.aide-float-bubble:active { cursor: grabbing; }
.aide-float-bubble.hidden { display: none; }
.aide-float-bubble .af-hide {
  position: absolute; top: -5px; right: -5px; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-bg, var(--card)); color: var(--text-muted, var(--sub));
  font-size: 11px; line-height: 1; cursor: pointer; display: none;
}
.aide-float-bubble .af-todesk {
  position: absolute; top: -5px; left: -5px; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-bg, var(--card)); color: var(--text-muted, var(--sub));
  font-size: 11px; line-height: 1; cursor: pointer; display: none;
}
.aide-float-bubble:hover .af-hide,
.aide-float-bubble:hover .af-todesk { display: block; }
.aide-float-bubble .af-hide:hover, .aide-float-bubble .af-todesk:hover { color: var(--primary); }
/* 悬浮球思考角标：三点小胶囊贴在球右上角，忙=亮，闲=灭 */
.aide-float-bubble .af-think {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 3px; padding: 3px 6px;
  border-radius: 999px; background: var(--panel-bg, var(--card));
  border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 4px 12px rgba(2, 8, 23, .3);
}
.aide-float-bubble.af-busy .af-think { display: inline-flex; }
.aide-float-bubble .af-think i {
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted, var(--sub)); /* 帝令：三点跟字色走，换浅皮不隐身 */
  animation: council-dot-bounce 1.2s ease-in-out infinite;
}
.aide-float-bubble .af-think i:nth-child(2) { animation-delay: .15s; }
.aide-float-bubble .af-think i:nth-child(3) { animation-delay: .3s; }
/* 忙碌时球本体轻微呼吸——不动位置只动光晕 */
.aide-float-bubble.af-busy .aide-orb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #8fb) 45%, transparent), 0 10px 30px var(--primary-glow, rgba(180,140,115,.35)); }
/* 低功耗模式（performance.css 用 !important 掐所有动画）下的豁免：
   三点是“它在干活”的状态信号不是装饰——双类选择器 (0,2,x) 压过 (0,1,1) 才豁免得动 */
html[data-low-power="true"] .aide-float-bubble .af-think i,
html[data-low-power="true"] .cmsg .m-dots i,
html[data-low-power="true"] .af-msg .m-dots i {
  animation: council-dot-bounce 1.2s ease-in-out infinite !important;
}
@media (prefers-reduced-motion: reduce) {
  html[data-low-power="true"] .aide-float-bubble .af-think i,
  html[data-low-power="true"] .cmsg .m-dots i,
  html[data-low-power="true"] .af-msg .m-dots i { animation: none !important; }
}
.aide-float-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 849;
  width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  background: var(--panel-bg, var(--card));
  border: 1px solid color-mix(in srgb, var(--line-strong, var(--line)) 55%, transparent);
  border-radius: 22px;
  box-shadow: 0 28px 72px rgba(2, 8, 23, .46), 0 6px 18px rgba(2, 8, 23, .2),
    inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
  overflow: hidden;
}
/* 滚动条全部皮肤化：弹层/消息区的原生白轨道是默认壳漏出来的，不许露 */
.aide-float-panel ::-webkit-scrollbar,
.af-mem-pop::-webkit-scrollbar { width: 8px; height: 8px; }
.aide-float-panel ::-webkit-scrollbar-track,
.af-mem-pop::-webkit-scrollbar-track { background: transparent; }
.aide-float-panel ::-webkit-scrollbar-thumb,
.af-mem-pop::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted, var(--sub)) 32%, transparent);
  border-radius: 99px; border: 2px solid transparent; background-clip: padding-box;
}
.aide-float-panel ::-webkit-scrollbar-thumb:hover,
.af-mem-pop::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text-muted, var(--sub)) 52%, transparent);
  border: 2px solid transparent; background-clip: padding-box;
}
.aide-float-panel, .af-mem-pop { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-muted, var(--sub)) 35%, transparent) transparent; }
.aide-float-panel.hidden { display: none; }
/* 桌面对话框窗变体（aide-panel.html）：透明窗里浮一张圆角卡——
   外圈 12px 透明带=自绘阴影区+八向拉伸条命中区，四角圆润、层次浮起 */
.aide-float-panel.is-window {
  inset: 12px; width: auto; height: auto;
  border: 1px solid color-mix(in srgb, var(--line-strong, var(--line)) 55%, transparent);
  border-radius: 22px;
  /* 外圈只留一口气的浮起感——之前双层重影会在桌面透出方形轮廓 */
  box-shadow: 0 10px 30px rgba(2, 8, 23, .22),
    inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
}
.aide-float-panel.is-window .af-head { cursor: move; }
/* 八向拉伸条：钉在窗口边缘的透明命中带（在外圈透明区，不遮卡片内容） */
.af-rz { position: fixed; z-index: 999; }
.af-rz-north { top: 0; left: 14px; right: 14px; height: 12px; cursor: n-resize; }
.af-rz-south { bottom: 0; left: 14px; right: 14px; height: 12px; cursor: s-resize; }
.af-rz-west { left: 0; top: 14px; bottom: 14px; width: 12px; cursor: w-resize; }
.af-rz-east { right: 0; top: 14px; bottom: 14px; width: 12px; cursor: e-resize; }
.af-rz-northeast { top: 0; right: 0; width: 16px; height: 16px; cursor: ne-resize; }
.af-rz-northwest { top: 0; left: 0; width: 16px; height: 16px; cursor: nw-resize; }
.af-rz-southeast { bottom: 0; right: 0; width: 16px; height: 16px; cursor: se-resize; }
.af-rz-southwest { bottom: 0; left: 0; width: 16px; height: 16px; cursor: sw-resize; }
/* 桌面面板窗里的小提示（主窗的侧边 toast 在独立窗里不存在） */
.af-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 30; max-width: calc(100% - 40px);
  background: var(--panel-bg, var(--card)); color: var(--text-main, var(--text));
  border: 1px solid var(--line-strong, var(--line)); border-radius: 9px;
  padding: 7px 12px; font-size: 12px; box-shadow: 0 10px 28px rgba(2, 8, 23, .35);
}
.aide-float-panel .af-head {
  display: flex; align-items: center; gap: 7px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
/* 信号灯（用户定稿·极简两灯）：绿=有分身干活(角标计数+呼吸) 灰=全闲/断线 红=刚出过错 */
.aide-float-panel .af-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--success, #22c55e); transition: background .2s ease, box-shadow .2s ease; }
.aide-float-panel .af-dot[data-st="idle"], .aide-float-panel .af-dot[data-st="off"] { background: var(--text-muted, #94a3b8); opacity: .45; }
.aide-float-panel .af-dot[data-st="busy"] {
  background: var(--success, #22c55e);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success, #22c55e) 25%, transparent);
  animation: af-dot-breathe 1.8s ease-in-out infinite;
}
.aide-float-panel .af-dot[data-st="err"] { background: var(--danger, #f05252); }
@keyframes af-dot-breathe { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--success, #22c55e) 10%, transparent); } }
/* 在跑计数角标：数字贴在灯右上 */
.aide-float-panel .af-dot-n {
  position: absolute; top: -8px; left: 9px; min-width: 13px; height: 13px;
  padding: 0 3px; border-radius: 999px; font-size: 9px; font-weight: 800; line-height: 13px;
  text-align: center; color: #fff; background: var(--success, #22c55e);
  box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none;
}
.aide-float-panel .af-dot-n:empty { display: none; }
/* 成员/群聊小卡片的每行状态灯：红=这条线有断头会话 绿=在跑 灰=闲着 */
.af-mem-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none; margin-right: 7px;
  background: var(--text-muted, #94a3b8); opacity: .35; transition: background .2s ease, opacity .2s ease;
}
.af-mem-dot[data-st="busy"] {
  background: var(--success, #22c55e); opacity: 1;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--success, #22c55e) 22%, transparent);
  animation: af-dot-breathe 1.8s ease-in-out infinite;
}
.af-mem-dot[data-st="err"] {
  background: var(--danger, #f05252); opacity: 1;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--danger, #f05252) 22%, transparent);
}
/* 名后状态行（帝旨 2026-11-04：不抄 Devin 状态词，还原自家三点）：三个小圆点在名后轮流跳
   到回合落定——浮窗/议事殿/AIRPA 同款。灰白跟字色走（--text-muted），不是最早写死红色那版 */
.run-status {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: 1px;
}
.run-status i {
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted, var(--sub));
  animation: council-dot-bounce 1.2s ease-in-out infinite;
}
.run-status i:nth-child(2) { animation-delay: .15s; }
.run-status i:nth-child(3) { animation-delay: .3s; }
/* Devin 工作词位（真件 Jh/Zh：Navigating→Thinking→Exploring… 每 5s 随机换，
   挂三点之后；字色跟皮肤次级文字，比名字更淡——词是节奏装饰非主信号） */
.run-status .rs-verb {
  margin-left: 5px; font-size: 11px; font-style: normal; white-space: nowrap;
  color: var(--text-muted, var(--sub)); opacity: .85;
}
/* 旧 af-work-dots 原样还原：常跳不息，不加停跳闸（运行中指示是主信号） */
/* 左栏红角标：这条线的会话断了头（重启/断线没跑完）——红压绿，先让人看见 */
.council-item.is-broken .c-avatar::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger, #f05252);
  border: 2px solid var(--panel-bg, var(--card, var(--bg, #1b1f24)));
  box-sizing: border-box;
}
/* 会话头灯：当前聊的这条线有断头会话=红、有成员在跑=绿、全闲=不亮（与浮窗同真值） */
.council-chat-title { display: inline-flex; align-items: center; gap: 6px; }
.council-chat-title[data-st]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
}
.council-chat-title[data-st="busy"]::before {
  background: var(--success, #22c55e); animation: councilRunPulse 1.2s ease-in-out infinite;
}
.council-chat-title[data-st="err"]::before { background: var(--danger, #f05252); }
.cmsel-opt { display: flex; align-items: center; }
.aide-float-panel .af-title { font-size: 13px; font-weight: 700; color: var(--text-main, var(--text)); flex: 1; }
.aide-float-panel .af-dead {
  margin: 4px 8px 0; padding: 6px 10px; border-radius: 8px; border: 1px dashed var(--warn, #d97706);
  background: color-mix(in srgb, var(--warn, #d97706) 8%, transparent); color: var(--warn, #d97706);
  font-size: 12px; text-align: center; cursor: pointer; flex: 0 0 auto;
}
.aide-float-panel .af-dead:hover { background: color-mix(in srgb, var(--warn, #d97706) 16%, transparent); }
.aide-float-panel .af-dead:disabled { opacity: .6; cursor: default; }
.aide-float-panel .af-dead.hidden { display: none; }
.aide-float-panel .af-btn {
  border: 1px solid var(--line); background: transparent; color: var(--text-muted, var(--sub));
  border-radius: 9px; padding: 2px 9px; font-size: 11px; cursor: pointer;
}
.aide-float-panel .af-btn:hover { color: var(--text-main, var(--text)); border-color: var(--line-strong, var(--line)); }
.aide-float-panel .af-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
/* composer 永不可被顶出面板：长回合挤压时它必须是 flex 里不缩的那块（2026-11-01 管理员：输入框消失事故） */
.aide-float-panel .af-composer { flex: none; }
.aide-float-panel .af-empty { color: var(--text-muted, var(--sub)); font-size: 12px; text-align: center; margin-top: 30px; }
.af-msg .af-who { font-size: 10.5px; color: var(--text-muted, var(--sub)); margin-bottom: 3px; }
/* 悬浮面板用户头像同样去掉：深色皮肤下渲染成细灰条（用户实测反馈），自己的消息不需要头像 */
.af-msg .af-uava { display: none; }
.af-msg .af-text {
  font-size: 13px; line-height: 1.65; color: var(--text-main, var(--text)); /* 对齐议事殿 m-content 阅读手感 */
  background: var(--surface-2, rgba(255,255,255,.04)); border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 1px 3px rgba(2, 8, 23, .12);
  padding: 9px 13px; white-space: pre-wrap; word-break: break-word;
}
/* Devin 真件全复刻（2026-11-08 帝令"那就抄全"）：助手正文无气泡——纯文本满宽段落，
 * 无底色无边框无阴影无内距；只有用户侧保留实底泡。特殊态（报错/中断/停条）补回框。 */
.af-msg:not(.is-user):not(.is-sys) .af-text:not(.af-stopped) {
  background: transparent; border-color: transparent; box-shadow: none;
  border-radius: 0; padding: 0;
}
.af-msg.is-error .af-text { padding-left: 9px; } /* 红左条别贴字 */
.af-msg.is-interrupted .af-text { border-color: var(--line); padding: 6px 10px; border-radius: 10px; }
/* 单聊无名字头（Devin 每条消息没有署名行）；群聊 is-group 保留成员名 */
.aide-float-panel:not(.is-group) .af-msg:not(.is-user):not(.is-sys) .af-who:not(:has(.run-status)) { display: none; }
/* 活态插话正文块（顶在 .af-msgs 下的 af-text.af-mid）：无 .af-msg 父级，自己补正文字号 */
.af-msgs > .af-mid { font-size: 13px; line-height: 1.65; color: var(--text-main, var(--text)); }
/* 用户消息：右对齐实底渐变泡（Devin 式——助手纯文本、用户保留气泡） */
.af-msg.is-user { align-self: flex-end; max-width: 88%; }
.af-msg.is-user .af-who { text-align: right; }
.af-msg.is-user .af-text {
  background: var(--primary-gradient, var(--primary)); color: var(--on-primary, #fff);
  border-color: transparent; border-radius: 14px; border-top-right-radius: 5px;
}
.af-msg.is-member .af-text, .af-msg:not(.is-user):not(.is-sys) .af-text { border-top-left-radius: 6px; }
.af-msg.is-sys .af-text { font-size: 11.5px; color: var(--text-muted, var(--sub)); background: transparent; border: 1px dashed var(--line); }
.af-msg .af-img { max-width: 180px; border-radius: 8px; display: block; margin-bottom: 4px; cursor: zoom-in; }
.af-msg .af-att-file { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--text-muted, var(--sub)); margin-bottom: 4px; }
.af-msg .af-att-file a { color: var(--primary); text-decoration: none; }
.aide-float-panel.is-drop { outline: 2px dashed var(--primary); outline-offset: -4px; border-radius: 14px; }
.af-msg .af-step { font-size: 10.5px; color: var(--text-muted, var(--sub)); margin-top: 2px; }
.af-msg .af-step.is-bad { color: var(--danger, #ef4444); }
/* ── 过程步卡(Devin式):命令类渲小终端,其余渲参数/结果卡——过程摊开有内容可看 ── */
.af-scards { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.af-scard { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface-2, rgba(148,163,184,.06)); }
.af-scard.is-bad { border-color: color-mix(in srgb, var(--danger, #ef4444) 45%, transparent); }
.af-scard-h { display: flex; align-items: center; gap: 6px; padding: 4px 9px; font-size: 11px; color: var(--text-muted, var(--sub)); background: var(--surface-muted, rgba(148,163,184,.08)); }
.af-scard-h .af-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.af-dot.ok { background: var(--success, #22c55e); }
.af-dot.bad { background: var(--danger, #ef4444); }
.af-scard-t { font-weight: 600; color: var(--text-main, var(--text)); }
.af-scard-ms { margin-left: auto; font-size: 10px; opacity: .75; }
.af-bad { color: var(--danger, #ef4444); font-size: 10px; }
.af-scard-b { padding: 5px 9px; display: flex; flex-direction: column; gap: 4px; }
.af-scard-pre { margin: 0; font-size: 10.5px; line-height: 1.5; color: var(--text-muted, var(--sub)); white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.af-scard-pre.is-out { border-left: 2px solid var(--line-strong, var(--line)); padding-left: 7px; }
/* 终端黑盒:命令行+输出。配色走皮肤变量(--card/--primary),不硬编码——换肤不脱节。
   styles.css 有个无作用域 pre{height:240px;浅底}会垫进面板所有 pre,先就地复位 */
.aide-float-panel .af-msg pre, #airpaChatLog pre {
  height: auto; min-height: 0; border: 0; border-radius: 0; padding: 0; background: transparent;
}
.af-msg .af-step .af-scard { margin-top: 0; }
/* 交织思考行:脑泳道 steps 里想↔跑按真实先后排,思考以细线隔开 */
/* 交织时间线里的思考行：细引条+斜体+💭，与终端卡一眼分清（帝令 2026-10-30：思考不许长成灰盒子/终端样） */
.af-s-think { font-size: 10.5px; color: var(--text-muted, var(--sub)); font-style: italic; line-height: 1.55; padding: 2px 8px 2px 10px; border-left: 2.5px solid color-mix(in srgb, var(--primary) 45%, transparent); white-space: pre-wrap; word-break: break-word; opacity: .8; }
.af-s-think::before { content: "💭 "; font-style: normal; opacity: .75; }
.af-s-think.af-s-think-live::before { content: none; } /* 活思考头行自带💭,不叠 */
/* Devin 同款活时间线三件套（2026-10-30）：想=💭计时+全文滚动块；工具=动作行+灰字实参行；说=正文块 */
.af-s-think-h { font-style: normal; font-weight: 600; font-size: 10px; color: color-mix(in srgb, var(--primary) 70%, var(--text-muted, var(--sub)) 30%); letter-spacing: .2px; }
.af-s-think-h b { font-weight: 600; }
.af-s-think-b { max-height: 150px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; margin-top: 1px; }
.af-s-think-b::-webkit-scrollbar { width: 6px; }
.af-s-think-b::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 22%, transparent); border-radius: 3px; }
.af-s-text { font-size: 11.5px; color: var(--text-main, var(--text)); line-height: 1.6; padding: 2px 8px 2px 10px; border-left: 2.5px solid color-mix(in srgb, var(--text-muted, var(--sub)) 30%, transparent); white-space: pre-wrap; word-break: break-word; }
.af-s-cmd { padding: 2px 9px 6px 22px; font-size: 10px; color: var(--text-muted, var(--sub)); font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; opacity: .85; }
.af-scard-live .af-s-cmd { border-top: 1px dashed color-mix(in srgb, var(--line-strong, var(--line)) 60%, transparent); }
/* ── Codex 活动流（app.asar 拆解真值，2026-10-31 帝令换装）──
 * cot 头行=图标+标签+时长(等宽数字)+悬停才现的旋转箭头；
 * 体=height 0⇄auto 250ms cubic-bezier(.16,1,.3,1)；行=icon+action+mono detail。 */
/* 节奏分层·真件刻度（2026-11-08 帝令"抄全"再校）：正文↔折叠块 14px（真件段间距≈一行），
   块↔块 8px，插话↔插话 12px（段落感），正文↔译文贴 3px。 */
.af-msg .af-steps, .aide-float-panel .af-steps-live, .cmsg .af-steps { margin-top: 14px; }
.af-msg .af-steps + .af-steps, .af-msg .af-steps-live + .af-steps { margin-top: 8px; }
.af-msg .af-steps + .af-text, .af-msg .af-text + .af-steps, .af-msg .af-mid + .af-steps,
.af-msg .af-steps + .af-mid, .af-msg .af-changes + .af-text, .af-msg .af-ar-list + .af-text,
.cmsg .af-steps + .af-text, .m-body .af-steps + .m-content, .m-body .m-content + .af-steps,
.m-body .af-steps + .af-mid, .m-body .af-mid + .af-steps { margin-top: 14px; }
.af-msg .af-text + .af-text, .af-msg .af-text + .af-trans { margin-top: 3px; }
.af-msg .af-mid + .af-mid, .m-body .af-mid + .m-content, .m-body .m-content + .af-mid { margin-top: 12px; }
.af-mid { white-space: pre-wrap; }
/* Worked 块内交错 "思考" 分折叠（Devin Thoughts 子 chip 与工具行同列）：
   不吃顶层 .af-steps 的 14px 块距——嵌在行列里就是一枚行件 */
.af-ar-list > .af-steps.af-cot-sub { margin-top: 1px; }
.af-ar-list > .af-steps.af-cot-sub > .af-cot-body .af-think-full { padding-left: 20px; max-height: 220px; }
.af-cot > summary {
  cursor: pointer; user-select: none; list-style: none;
  display: flex; align-items: center; gap: 6px; padding: 3px 0;
  font-size: 12px; color: var(--text-muted, var(--sub)); width: 100%;
}
.af-cot > summary::-webkit-details-marker { display: none; }
.af-cot-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-cot-label b { font-weight: 600; }
.af-cot-dur { font-variant-numeric: tabular-nums; flex: none; opacity: .8; }
/* 展开箭头恒显贴左（Devin 式 > 前导·真件恒显不是悬停才现）：右端推位只交给时长；
   增删徽紧跟标签后（真件 "Worked for 9s  +52 −32" 内联位）。 */
.af-cot-chev {
  width: 12px; height: 12px; flex: none; opacity: .55;
  transition: transform .3s ease, opacity .18s ease;
}
.af-cot > summary .af-cot-dur { margin-left: auto; }
.af-cot > summary:hover .af-cot-chev, .af-cot[open] > summary .af-cot-chev { opacity: .85; }
.af-cot[open] > summary .af-cot-chev { transform: rotate(90deg); }
.af-cot-body { overflow: hidden; transition: height 250ms cubic-bezier(.16, 1, .3, 1), opacity .18s ease;
  /* Devin ChatCollapsible showCollapseBar：展开体左缘 1px 竖轨线（不是框），
     线位对齐 summary 文字列（chev12+gap6≈18px） */
  margin-left: 5px; padding-left: 13px;
  border-left: 1px solid color-mix(in srgb, var(--text-dim, var(--sub)) 24%, transparent); }
.af-ar-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 6px; }
/* 迟到步二级降落点：折块不在时的落定单行——缩进对齐折块行列，实态展示不扫光 */
.af-ar-settled { margin: 2px 0 4px 14px; }
/* styles.css 全局 pre{height:240px;border;padding;background} 会把我们的 pre 体统一撑成 240px 高
   空壳——这里先收回高/边/圆角/底色（各自的 padding/左边条规则在下方仍生效） */
.af-fcard-b, .af-ar-ful, .af-ar-out, .af-tcmd-full, .af-tout, .af-think-full { height: auto; border: 0; border-radius: 0; background: transparent; }
/* 皮肤 pre 盒复活洞（2026-11-11 实证）：skin-aida `html[data-theme] pre` 与
   skins.css `[data-theme=*] pre` 特异度 (0,1,2)/(0,1,1) 压过裸类 (0,1,0)，
   af-* transcript pre 全被涂成玻璃盒——加 [data-theme] 前缀提到 (0,2,0) 压住。
   transcript 行体永远裸文，任何皮肤都不许框。 */
[data-theme] .af-fcard-b, [data-theme] .af-ar-ful, [data-theme] .af-ar-out,
[data-theme] .af-tcmd-full, [data-theme] .af-tout, [data-theme] .af-think-full {
  height: auto; border: 0; border-radius: 0; background: transparent; }
.cc-confirm-args, .cc-confirm-edit { height: auto; }
/* ── 活动行（Devin kd/TC 逆向真件 2026-11-04）：裸 16px 图标 + 文本 + 行尾 chevron；
   无文字标签——图标即语义；逐条入场 220ms ── */
.af-ar { min-width: 0; }
.af-ar > .af-ar-row {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 0;
  font-size: 12px; color: var(--text-muted, var(--sub));
  animation: af-ar-enter 220ms cubic-bezier(.23, 1, .32, 1) both;
}
@keyframes af-ar-enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* 零图标（管理员令 2026-11-01·Devin 件行本无图标位）：af-ar-ic/af-tdot/afIcon 全摘 */
/* 可展开行（Devin event-header 真件 2026-11-05）：默认灰字，悬停整行放亮——
   不是垫灰底，是字从灰亮到白。 */
.af-ar.has-body > .af-ar-row { border-radius: 7px; margin: 0 -6px; padding: 2px 6px;
  cursor: pointer; }
.af-ar > .af-ar-row { transition: color .14s ease; }
.af-ar > .af-ar-row:hover { color: var(--text-main, var(--text)); }
.af-ar > .af-ar-row:hover .af-ar-detail,
.af-ar > .af-ar-row:hover .af-ar-thinktxt,
.af-ar > .af-ar-row:hover .af-tcmd { opacity: 1; }
.af-ar-detail {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  color: var(--text-main, var(--text)); opacity: .85;
}
.af-ar-detail.is-name { font-family: inherit; opacity: .7; }
/* Thoughts 折叠层（Devin devin_thoughts）：整段思想流灰字，与 Working 层并排两枚 */
.af-cot-think + .af-cot-work, .af-cot-think + .af-steps.af-cot { margin-top: 4px; }
.af-think-full { margin: 0; padding: 4px 2px 6px; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: 12px; line-height: 1.55; color: var(--text-muted, var(--sub)); max-height: 320px; overflow: auto; }
/* 核验批注条（独立核验等账注，非执行步）：虚线左条灰字，与 af-interrupt-tag 同语 */
.af-ver-note { margin: 6px 0 2px 4px; font-size: 10.5px; line-height: 1.5; color: var(--text-muted, var(--sub));
  border-left: 2px dashed var(--line); padding: 2px 8px; white-space: pre-wrap; word-break: break-word; }
/* 工具行头=动作名·对象（Devin "file_att_read · att_x.png" 式）：动作名正文色、对象等宽 */
.af-ar-tn { font-family: inherit; font-weight: 500; color: var(--text-main, var(--text)); }
.af-ar-ms { margin-left: 8px; font-size: 10px; opacity: .7; font-variant-numeric: tabular-nums; flex: none; } /* Devin：耗时挨文本，chevron 才在最右 */
/* B0 行解剖（真件取证 2026-11-08 devin-工具行渲染真件）：icon16 轨+行尾时刻+标节体 */
.af-ar-ico { width: 13px; height: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted, var(--sub)); opacity: .8; }
.af-ar-ico svg { width: 13px; height: 13px; }
.af-ar.is-bad .af-ar-ico, .af-ar-ico.is-bad { color: var(--danger, #ef4444); opacity: .9; }
.af-ar-time { margin-left: auto; flex: none; font-size: 10px; color: var(--text-muted, var(--sub)); opacity: .75; font-variant-numeric: tabular-nums; }
.af-ar-sec { margin: 3px 0 5px; }
.af-ar-sec-t { font-size: 10px; color: var(--text-muted, var(--sub)); margin: 0 0 2px; }
.af-ar-err { font-size: 11px; line-height: 1.5; color: var(--danger, #ef4444); padding: 2px 0 4px; word-break: break-word; }
.af-ar .af-bad { font-size: 10px; flex: none; }
/* 行首 chevron（Devin 真件：左缘一排 > 与块头箭头同列平行；收起右指→展开旋 90° 向下） */
.af-ar-chev { width: 12px; height: 12px; flex: none; order: -1; margin-left: 0; opacity: .45;
  transition: transform .2s ease, opacity .14s ease; }
.af-ar.has-body > .af-ar-row:hover .af-ar-chev { opacity: .85; }
.af-ar.is-open > .af-ar-row .af-ar-chev { transform: rotate(90deg); opacity: .75; }
/* 不可展开行补缩进——文本列与可展开行（chev12+gap8=20px）对齐，整列平行 */
.af-ar:not(.has-body) > .af-ar-row { padding-left: 20px; }
/* 展开体（Devin DC+collapse-bar 逆向）：左 16px 轨线列（1px 线、点线收起）+右内容列 */
.af-ar-body { display: none; }
.af-ar.is-open > .af-ar-body { display: flex; align-items: stretch; }
.af-rail { width: 16px; flex: none; cursor: pointer; position: relative; }
.af-rail::before { content: ""; position: absolute; left: 8px; top: 3px; bottom: 3px; width: 1px;
  background: color-mix(in srgb, var(--text-dim, var(--sub)) 28%, transparent); transition: background .14s ease; }
.af-rail:hover::before { background: var(--text-muted, var(--sub)); }
.af-ar-body-c { flex: 1; min-width: 0; padding: 2px 10px 8px 8px; } /* 展开体左右都让开：卡片/终端盒不贴缘 */
.af-ar-out {
  margin: 0; font-size: 10.5px; line-height: 1.55; max-height: 160px; overflow-y: auto;
  color: var(--text-muted, var(--sub)); white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
}
/* 思考行：灯泡+灰斜小行；正文行：对话泡+正文字色（图标即语义，零文字标签） */
.af-ar-think .af-ar-thinktxt {
  font-size: 11px; font-style: italic; line-height: 1.55; opacity: .8;
  white-space: pre-wrap; word-break: break-word; min-width: 0;
}
.af-ar-say .af-ar-saytxt {
  font-size: 11.5px; line-height: 1.6; color: var(--text-main, var(--text));
  white-space: pre-wrap; word-break: break-word; min-width: 0; opacity: .92;
}
/* 行展开去复读（帝令 2026-11-08 实案）：say/think 行预览与展开体是同一份全文，
 * 以前预览不截断+展开再灌一份=同文双显"发了两次"。改成 Devin preview→detail：
 * 收起预览截 3 行，展开预览放全文、展开体让位（同文不再第二份）。 */
.af-ar-say:not(.is-open) .af-ar-saytxt,
.af-ar-think:not(.is-open) .af-ar-thinktxt {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.af-ar-say.is-open > .af-ar-body,
.af-ar-think.is-open > .af-ar-body { display: none; }
/* 本条统计面板（Devin RESPONSE STATISTICS 式）：操作条下方就地展开 */
.af-stat-pane { margin-top: 4px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  font-size: 10.5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: color-mix(in srgb, var(--card, #14161c) 60%, transparent); }
.af-stat-pane b { font-weight: 500; color: var(--text-dim); }
.af-stat-pane span { color: var(--text-muted, var(--sub)); font-variant-numeric: tabular-nums; }
.af-ar.is-bad .af-tcmd { color: var(--danger, #ef4444); } /* 败令以字色示意，不挂红圈 */
/* 思考/正文行展开全文（轨线右侧） */
.af-ar-ful { margin: 0; font-size: 10.5px; line-height: 1.6; max-height: 220px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; color: var(--text-muted, var(--sub)); font-family: inherit; }
/* ── 终端行（Devin transcript-shell-card 双节真件 2026-11-08）：收起=裸 mono 行无框；
   展开=左轨线 + 双节卡——「命令」节(复制命令钮+mono 全文) 与「终端输出」节(复制输出/exit 徽)，
   节间 1px 皮肤线分隔。外框=diff 卡同款半透明皮肤线色细边、底透肤——框随皮肤联动，
   不再是一块独立灰蓝板（管理员 2026-11-11 灰蓝实底拆除令）。 ── */
.af-ar.af-tcard { margin: 2px 0; }
.af-tcmd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--text-muted, var(--sub)); }
.af-tcard .af-ar-body-c { padding: 2px 10px 6px 8px; } /* 终端卡同律：左右都留缝，不许贴缘（管理员 2026-11-05 亲点） */
.af-twin { margin: 2px 0 4px; border: 1px solid color-mix(in srgb, var(--line-strong, var(--line)) 80%, transparent); border-radius: 8px;
  overflow: hidden; position: relative; }
/* Devin pulseBorder 降维：跑着的终端卡框吃皮肤主色（静态染色不闪，低功耗友好） */
.af-ar.is-run .af-twin { border-color: color-mix(in srgb, var(--primary, #58a6ff) 45%, transparent); }
.af-twin-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 2px; }
.af-twin-h.is-out { border-top: 1px solid var(--line, color-mix(in srgb, #fff 6%, transparent)); }
.af-twin-l { font-size: 10px; color: var(--text-dim, var(--sub)); letter-spacing: .02em; }
.af-tcopy { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border: 0; border-radius: 5px; background: transparent; color: var(--text-dim, var(--sub)); cursor: pointer; }
.af-tcopy:hover { color: var(--text-main, var(--text)); background: color-mix(in srgb, #fff 6%, transparent); }
.af-tcopy.is-ok { color: var(--ok, #22c55e); }
.af-tcmd-full { margin: 0; padding: 2px 10px 8px; font-size: 12px; line-height: 1.55;
  font-family: ui-monospace, Consolas, monospace; color: var(--text-main, var(--text));
  white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow-y: auto; }
.af-tcmd-full .tk-b { color: var(--primary, #58a6ff); } /* argv[0] 吃皮肤主色（Devin Kf shiki-colors 降维） */
.af-tout { margin: 0; padding: 4px 10px 8px; font-size: 12px; line-height: 1.55;
  font-family: ui-monospace, Consolas, monospace; max-height: 300px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all; }
.af-tout .tk-c, .af-ar-out .tk-c { color: #7ee787; }
.af-tout .tk-o, .af-ar-out .tk-o, .af-fcard-b .tk-ctx, .af-tout .tk-ctx { color: #9aa4b5; }
.af-tout .tk-e, .af-ar-out .tk-e { color: #ff7b72; }
/* Devin 式滚动沿渐变：超出方向淡出（can-up/can-down 由 bindCot 按滚位打） */
.af-fade.can-up { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px); mask-image: linear-gradient(to bottom, transparent, #000 14px); }
.af-fade.can-down { -webkit-mask-image: linear-gradient(to top, transparent, #000 14px); mask-image: linear-gradient(to top, transparent, #000 14px); }
.af-fade.can-up.can-down { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.af-tempty { font-size: 11px; font-style: italic; color: var(--text-dim, var(--sub)); padding: 4px 10px 8px; }
/* 文件卡：📄路径头 + diff 体；删红增绿上下文灰（计数徽记已入行尾，working-set 式） */
.af-fcard { border-radius: 8px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line-strong, var(--line)) 80%, transparent);
  background: var(--card, rgba(148,163,184,.06)); margin: 2px 0 4px; } /* 与 twin 同距，不再贴死右缘 */
.af-fcard-h { display: flex; align-items: center; gap: 7px; padding: 4px 9px;
  border-bottom: 1px solid var(--line); font-size: 10.5px; }
.af-fcard-p { font-family: ui-monospace, Consolas, monospace; color: var(--text-main, var(--text));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-diff-badge { margin-left: auto; flex: none; font-size: 9.5px; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; }
.af-diff-badge .neg { color: #f87171; } .af-diff-badge .pos { color: #34d399; }
.af-plan-chip { margin-left: 8px; flex: none; font-size: 9.5px; color: var(--primary, #10b981); }
/* 计划步骤卡（Devin PlanDetailUI 位：过程块下常显清单，无框——左轨线一族） */
.af-plan { margin: 6px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line-strong, rgba(255,255,255,.14)); }
.af-plan-head { display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; letter-spacing: .12em;
  color: var(--text-muted, var(--sub)); padding: 2px 0 4px; }
.af-plan-head em { font-style: normal; font-variant-numeric: tabular-nums; opacity: .75; }
.af-plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.af-plan-list li { display: flex; gap: 7px; align-items: baseline; font-size: 12px; line-height: 1.5;
  color: var(--text-main, var(--text)); }
.af-plan-list li i { font-style: normal; flex: none; width: 12px; text-align: center; font-size: 10px; }
.af-plan-list li.is-todo { color: var(--text-muted, var(--sub)); }
.af-plan-list li.is-todo i { color: var(--text-muted, var(--sub)); }
.af-plan-list li.is-run i { color: var(--primary, #10b981); }
.af-plan-list li.is-done i { color: var(--ok, #22c55e); }
.af-plan-list li.is-done span { color: var(--text-muted, var(--sub)); text-decoration: line-through; text-decoration-color: rgba(148,163,184,.4); }
/* G-D 会话变更带（Devin Changes 窄面板形）：折叠列文件+增删徽，点开走产物栏 */
.af-changes { margin: 4px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line-strong, rgba(255,255,255,.14)); }
.af-changes > summary { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer;
  font-size: 10.5px; letter-spacing: .12em; color: var(--text-muted, var(--sub)); user-select: none; list-style: none; }
.af-changes > summary::-webkit-details-marker { display: none; }
.af-changes > summary .af-ops-chev { transition: transform .15s ease; }
.af-changes[open] > summary .af-ops-chev { transform: rotate(90deg); }
.af-changes > summary:hover { color: var(--text-main, var(--text)); }
.af-chg-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
.af-chg-file { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px;
  font-size: 11.5px; text-decoration: none; cursor: pointer; min-width: 0; }
.af-chg-file:hover { background: color-mix(in srgb, var(--card, rgba(255,255,255,.04)) 88%, transparent); }
.af-chg-name { color: #79b8ff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-chg-file .af-diff-badge { margin-left: auto; }
.af-fcard-b { margin: 0; padding: 6px 10px; font-size: 10.5px; line-height: 1.6; max-height: 220px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.af-fcard-b .tk-del { color: #f87171; background: rgba(248,113,113,.09); display: block; margin: 0 -10px; padding: 0 10px; }
.af-fcard-b .tk-add { color: #34d399; background: rgba(52,211,153,.07); display: block; margin: 0 -10px; padding: 0 10px; }
/* Devin editor_update 钉外卡（2026-11-08·信封画面分家）：文件改动恒钉折叠外——
   头=图标+basename+ +N -N；体=行号槽+整行染色+左竖条，不写 -/+ 字符。 */
.af-dfcard { margin: 2px 0 6px; border: 1px solid color-mix(in srgb, var(--line-strong, var(--line)) 80%, transparent);
  border-radius: 8px; overflow: hidden; }
.af-dfcard-h { display: flex; align-items: center; gap: 7px; padding: 4px 9px;
  border-bottom: 1px solid var(--line); font-size: 11px; color: var(--text-dim, var(--text-secondary, #9aa4b5)); }
.af-dfcard-h svg { flex: none; }
.af-dfcard-p { font-family: ui-monospace, Consolas, monospace; color: var(--text-main, var(--text)); }
.af-dfcard-b { margin: 0; padding: 6px 0; font-size: 10.5px; line-height: 1.6; max-height: 300px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.af-dfcard-b .tk-del { color: #f87171; background: rgba(248,113,113,.09); display: block; padding: 0 10px; box-shadow: inset 3px 0 0 rgba(248,113,113,.55); }
.af-dfcard-b .tk-add { color: #34d399; background: rgba(52,211,153,.07); display: block; padding: 0 10px; box-shadow: inset 3px 0 0 rgba(52,211,153,.5); }
.af-dfcard-b .tk-ctx { color: #9aa4b5; display: block; padding: 0 10px; }
.tk-del .ln, .tk-add .ln, .tk-ctx .ln { display: inline-block; min-width: 2.6em; margin-right: 8px;
  text-align: right; color: #5b6472; font-style: normal; user-select: none; }
/* ── Devin Q9o/YVl/$Vl 行级 diff 真件（sessions.desktop.main.js 逐字移植·暗色令牌）：
   行=表格式两列（gutter 行号+内容），del/add 整行 tint 底+左 3px 色条，
   gutter 右缘 1px 分隔；context 长 run 折叠成"全部 N 行"蓝条；
   卡体 preview 100px 渐隐，点开摊开出"收起"。 ── */
.dv-pv-b { font-family: ui-monospace, Consolas, monospace; font-size: 11px; line-height: 18px; }
/* .dv-t=diff 行组真表壳（dvDiffTable 产出）：table-row 子元素挂真表才不吃匿名盒缩排，
   行底色随容器满宽；pre-wrap 内容自然换行，宽行靠 .dv-c word-break 收住。 */
.dv-t { display: table; border-collapse: collapse; min-width: 100%; }
.dv-l { display: table-row; }
.dv-l > .dv-g, .dv-l > .dv-c { display: table-cell; vertical-align: top; }
.dv-g { position: relative; border-right: 1px solid rgba(255,255,255,.06); padding: 0 1ch 0 2ch;
  text-align: right; user-select: none; white-space: nowrap; }
.dv-g::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.dv-n { font-size: 11px; }
.dv-c { padding: 0 8px 0 4px; min-width: 0; width: 99%; }
.dv-c code { font-family: inherit; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; }
.dv-l.dv-del { background: linear-gradient(rgba(245,59,58,.14),rgba(245,59,58,.14)), linear-gradient(var(--card,#1f1f1f),var(--card,#1f1f1f)); }
.dv-l.dv-del .dv-g::before { background: var(--dv-gutter-del, #f53b3a); }
.dv-l.dv-add { background: linear-gradient(rgba(0,236,126,.10),rgba(0,236,126,.10)), linear-gradient(var(--card,#1f1f1f),var(--card,#1f1f1f)); }
.dv-l.dv-add .dv-g::before { background: var(--dv-gutter-add, #00ec7e); }
.dv-l.dv-ctx { color: var(--text-secondary,#9aa4b5); }
.dv-l.dv-ctx .dv-n { color: var(--text-tertiary,#9aa4b5); }
.dv-l.dv-del .dv-n, .dv-l.dv-add .dv-n { color: var(--text-primary,#e6e6e6); }
.dv-hidden:not([hidden]) { display: contents; }
.dv-collapsed { padding: 3px 0; background: linear-gradient(rgba(51,125,244,.10),rgba(51,125,244,.10)), linear-gradient(var(--card,#1f1f1f),var(--card,#1f1f1f)); }
.dv-more { display: inline-flex; align-items: center; gap: 4px; margin-left: 2ch; padding: 1px 4px;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 11px;
  color: rgba(62,184,237,.9); }
.dv-more:hover { text-decoration: underline; }
.dv-more::before { content: "…"; color: var(--text-tertiary,#888); }
/* preview 折叠（Devin XHl/smi：previewHeight 100px+short fade+点击展开+展开出收起钮） */
.dv-pv.is-clip:not(.is-open) .dv-pv-b { max-height: 100px; overflow: hidden; position: relative; }
.dv-pv.is-clip:not(.is-open) .dv-pv-b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: linear-gradient(to bottom, transparent, var(--card,#161b22)); pointer-events: none; }
.dv-pv-less { display: block; margin: 6px auto 2px; padding: 3px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line-strong,var(--line)); background: var(--surface-muted,rgba(255,255,255,.05));
  color: var(--text-secondary,#9aa4b5); font-size: 11px; }
.dv-pv-less:hover { color: var(--text-main,var(--text)); }
/* ANSI SGR 调色板（Devin 内嵌样式块真值：xterm 16 色+bright+属性类） */
.ansi-black-fg{color:#000}.ansi-red-fg{color:#cd3131}.ansi-green-fg{color:#0dbc79}.ansi-yellow-fg{color:#e5e510}
.ansi-blue-fg{color:#2472c8}.ansi-magenta-fg{color:#bc3fbc}.ansi-cyan-fg{color:#11a8cd}.ansi-white-fg{color:#e5e5e5}
.ansi-bright-black-fg{color:#666}.ansi-bright-red-fg{color:#f14c4c}.ansi-bright-green-fg{color:#23d18b}.ansi-bright-yellow-fg{color:#f5f543}
.ansi-bright-blue-fg{color:#3b8eea}.ansi-bright-magenta-fg{color:#d670d6}.ansi-bright-cyan-fg{color:#29b8db}.ansi-bright-white-fg{color:#fff}
.ansi-black-bg{background-color:#000}.ansi-red-bg{background-color:#cd3131}.ansi-green-bg{background-color:#0dbc79}.ansi-yellow-bg{background-color:#e5e510}
.ansi-blue-bg{background-color:#2472c8}.ansi-magenta-bg{background-color:#bc3fbc}.ansi-cyan-bg{background-color:#11a8cd}.ansi-white-bg{background-color:#e5e5e5}
.ansi-bright-black-bg{background-color:#666}.ansi-bright-red-bg{background-color:#f14c4c}.ansi-bright-green-bg{background-color:#23d18b}.ansi-bright-yellow-bg{background-color:#f5f543}
.ansi-bright-blue-bg{background-color:#3b8eea}.ansi-bright-magenta-bg{background-color:#d670d6}.ansi-bright-cyan-bg{background-color:#29b8db}.ansi-bright-white-bg{background-color:#fff}
.ansi-bold{font-weight:700}.ansi-dim{opacity:.5}.ansi-italic{font-style:italic}.ansi-underline{text-decoration:underline}
.ansi-blink{animation:dv-ansi-blink 1s step-end infinite}.ansi-reverse{filter:invert(1)}
.ansi-hidden{visibility:hidden}.ansi-strikethrough{text-decoration:line-through}
@keyframes dv-ansi-blink{50%{opacity:0}}
.af-twin-r { display: inline-flex; align-items: center; gap: 8px; }
.af-texit { font-size: 10px; color: var(--text-dim,#9aa4b5); font-variant-numeric: tabular-nums; }
/* 可点开的产物链接：蓝字微光，点了外侧抽屉展开详情 */
a.af-open { color: #58a6ff; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, #58a6ff 55%, transparent);
  cursor: pointer; word-break: break-all; text-shadow: 0 0 8px rgba(88,166,255,.25); }
a.af-open:hover { color: #79b8ff; border-bottom-style: solid; }
/* 附件 chip（span 非 a）：与 af-open 同族可点样式，点开走产物预览编辑器 */
.af-att-open { color: #58a6ff; cursor: pointer; word-break: break-all; }
.af-att-open:hover { color: #79b8ff; text-decoration: underline; }
/* 预览覆盖层（旧 exe / 浏览器调试的同窗退化容器：挂同一 aide-preview.html 页，
   单一实现不并存——新 exe 走独立悬浮窗 aide_preview_open） */
#af-pvov { position: fixed; inset: 0; z-index: 20000; opacity: 0; pointer-events: none;
  transition: opacity .18s ease; background: transparent; }
#af-pvov.on { opacity: 1; pointer-events: auto; background: rgba(10,13,18,.82); }
#af-pvov .af-pvov-fr { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--surface, #14181f); }

/* 头行标签扫光（Codex loading-shimmer 真值：双层背景/steps(48)/50%宽/-100%→250%）
   Devin KR 真件：跑着的行 detail/命令文同扫 */
.af-shimmer, .af-ar.is-run .af-ar-detail, .af-ar.is-run .af-tcmd, .af-ar.is-run .af-bad {
  background-color: currentColor;
  background-image: linear-gradient(to right, transparent 0%, var(--text-main, var(--text)) 40%, var(--text-main, var(--text)) 60%, transparent 100%);
  background-repeat: no-repeat; background-size: 50% 200%; background-position: -100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: af-shimmer 2s steps(48, end) infinite;
}
/* "执行中"徽标不吃 danger 红——跑态走主题正文色+扫光（红系皮肤下红字消失实案；
   失败徽标仍红——.af-ar.is-bad 的 .af-bad 不在此列） */
.af-ar.is-run .af-bad { color: var(--text-main, var(--text)); }
@keyframes af-shimmer { 0% { background-position: -100% 0; } 100% { background-position: 250% 0; } }
@media (prefers-reduced-motion: reduce) {
  .af-shimmer, .af-ar.is-run .af-ar-detail, .af-ar.is-run .af-tcmd, .af-ar.is-run .af-bad, .af-ar > .af-ar-row { animation: none !important; }
  .af-shimmer, .af-ar.is-run .af-ar-detail, .af-ar.is-run .af-tcmd, .af-ar.is-run .af-bad { -webkit-text-fill-color: currentColor; }
}
/* 旧的独立"思考过程"区样式留档（markup 已废，2026-10-31 并入时间线） */
.af-msg { position: relative; border-radius: 9px; transition: background .12s ease; }
/* Devin 式悬停（2026-11-02 帝令三勘）：正文=一整块不拆行；翻译片只长在非中文单元上——
   过程正文行是外文才带片，中文不带；思考行永远没有悬浮件。消息不再整体扣高亮框。 */
.af-msg .af-ar-say > .af-ar-row { border-radius: 6px; transition: background .12s ease; }
.af-msg .af-ar-say:hover > .af-ar-row { background: var(--surface-muted, rgba(148, 163, 184, .08)); }
/* 消息级动作行：正文下沿一条小行——用户泡右下、助手泡左下（第一版几何），悬停浮出 */
.af-msg .af-acts {
  display: flex; align-items: center; gap: 1px;
  margin: 2px 0 0; padding: 0 2px; min-height: 18px;
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.af-msg.is-user .af-acts { justify-content: flex-end; }
.af-msg:hover > .af-acts, .af-msg .af-acts:focus-within { opacity: 1; pointer-events: auto; }
/* 过程正文行：翻译片嵌行尾（chevron 前），不遮字；中文行压根不渲染 */
.af-ar-say .af-line-tr {
  flex: none; width: 18px; height: 16px; padding: 0; margin-left: 4px;
  border: 1px solid var(--line); border-radius: 5px; background: transparent;
  color: var(--text-muted, var(--sub)); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.af-ar-say:hover .af-line-tr { opacity: 1; pointer-events: auto; }
/* 行级译文迷你块：嵌本行下方，只带目标语标签（原文就在上面） */
.af-ar .af-trans-mini, .af-msg .af-trans-mini {
  margin: 4px 0 2px; padding: 1px 0 1px 8px; border-left: 2px solid var(--line);
  font-size: 12px; line-height: 1.55; white-space: normal;
}
.af-trans-mini .af-trans-lab { display: block; font-size: 9.5px; letter-spacing: .5px; color: var(--text-muted, var(--sub)); }
.af-trans-mini .af-trans-dst { color: var(--text-main, var(--text)); }
.af-msg .af-ts {
  font-size: 10px; color: var(--text-muted, var(--sub));
  padding: 0 3px; font-variant-numeric: tabular-nums; user-select: none;
}
.af-msg .af-act {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 17px;
  border: none; background: transparent; color: var(--text-muted, var(--sub)); border-radius: 5px; padding: 0; cursor: pointer;
}
.af-msg .af-act:hover { color: var(--text-main, var(--text)); background: var(--surface-muted, rgba(148,163,184,.15)); }
.af-msg .af-act.af-recall:hover { color: var(--danger, #ef4444); }
/* B1 断链错误卡：人话原因 + 原始报错小字 + 重试/自愈状态行 */
.af-msg.is-error .af-text { border-left: 2.5px solid var(--danger, #ef4444); }
.af-msg .af-err { display: flex; flex-direction: column; gap: 4px; }
.af-msg .af-err-reason { font-size: 12.5px; font-weight: 600; color: var(--text-main, var(--text)); }
.af-msg .af-err-raw {
  font-size: 10.5px; color: var(--text-muted, var(--sub)); line-height: 1.4; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.af-msg .af-err-acts { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.af-msg .af-retry {
  border: 1px solid var(--line-strong, var(--line)); background: var(--surface-2, transparent);
  color: var(--text-main, var(--text)); font-size: 11px; border-radius: 7px; padding: 2px 10px; cursor: pointer;
}
.af-msg .af-retry:hover { color: var(--primary); border-color: var(--primary); }
.af-msg .af-err-note { font-size: 10.5px; color: var(--text-muted, var(--sub)); }
.af-msg .af-text.af-stopped {
  font-size: 11px; color: var(--text-muted, var(--sub)); background: transparent;
  border: 1px dashed var(--line); padding: 4px 9px;
}
/* 被中断的半截回合：虚线框起来——内容还在，只是没跑完 */
.af-msg.is-interrupted { opacity: .92; }
.af-msg.is-interrupted .af-text { border-style: dashed; }
.af-interrupt-tag {
  margin: 2px 12px 0; font-size: 10.5px; color: var(--text-muted, var(--sub));
  border-left: 2px dashed var(--line); padding: 1px 8px;
}
.af-interrupt-tag .af-tag-btn {
  border: 1px solid var(--line); border-radius: 6px; background: none;
  color: var(--accent, #3b82f6); font-size: 10.5px; padding: 0 6px; margin-left: 6px; cursor: pointer;
}
.af-interrupt-tag .af-tag-btn:hover { border-color: var(--accent, #3b82f6); }
.aide-float-panel .af-att { padding: 0 12px; display: flex; gap: 6px; flex-wrap: wrap; }
/* Devin 式附件瓦片（2026-11-05）：左分类型图标/缩略图 + 右两行（名/大小） */
.af-att-tile { display: inline-flex; align-items: center; gap: 8px; max-width: 200px;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2, rgba(148,163,184,.08)); font-size: 11px; }
.af-att-tile .af-att-ic { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; color: var(--text-muted, var(--sub)); background: color-mix(in srgb, #fff 5%, transparent); }
.af-att-tile .af-att-ic.k-image { color: #58a6ff; } .af-att-tile .af-att-ic.k-doc { color: #79b8ff; }
.af-att-tile .af-att-ic.k-sheet { color: #3fb950; } .af-att-tile .af-att-ic.k-video { color: #d2a8ff; }
.af-att-tile .af-att-ic.k-audio { color: #f0b72f; } .af-att-tile .af-att-ic.k-zip { color: #db8a55; }
.af-att-tile .af-att-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; flex: none; }
.af-att-tile .af-att-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.af-att-tile .af-att-tx b { font-weight: 500; font-size: 11px; color: var(--text-main, var(--text));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-att-tile .af-att-tx i { font-style: normal; font-size: 10px; color: var(--text-dim, var(--sub)); }
.af-att-tile button { flex: none; border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 13px; padding: 0 2px; }
.af-att-tile button:hover { color: var(--danger, #ef4444); }
.aide-float-panel .af-chip {
  font-size: 11px; border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px;
  color: var(--text-muted, var(--sub)); display: inline-flex; align-items: center; gap: 4px;
}
.aide-float-panel .af-chip button { border: none; background: none; color: var(--danger, #ef4444); cursor: pointer; font-size: 12px; }
/* 截图结果卡：缩略图 + 复制/提字/翻译/发会话 */
.af-snip {
  margin: 6px 12px 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2, rgba(255,255,255,.03));
}
.af-snip.hidden { display: none; }
/* 发送模式弹层（截图旁⌄）：沿用 .cc-pop 通用定位 */
#afModeMenu { min-width: 230px; }
.af-snip-thumb {
  max-width: 120px; max-height: 84px; border-radius: 6px; display: block;
  border: 1px solid var(--line); object-fit: contain; background: var(--snip-void, #000);
}
.af-snip-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.af-snip-meta { font-size: 10.5px; color: var(--text-muted, var(--sub)); }
.af-snip-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.af-snip-btns button {
  font-size: 11px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,.05));
  color: var(--text-main, var(--text));
}
.af-snip-btns button:hover { border-color: var(--accent, #4da3ff); }
.af-snip-btns button:disabled { opacity: .5; cursor: wait; }
.af-snip-btns .af-snip-x { margin-left: auto; color: var(--danger, #ef4444); }
/* 截图卡可聚焦（空格=复制图）：聚焦给个可见圈，别让焦点隐身 */
.af-snip:focus-visible { outline: 1.5px solid var(--accent, #4da3ff); outline-offset: 1px; }
/* ▾ 快捷键档位钮：贴着「截图」芯片的窄角标 */
.af-mode-opt { padding: 0 5px !important; margin-left: -4px; font-size: 10px !important; }
.af-snip-out {
  font-size: 11.5px; line-height: 1.55; color: var(--text-main, var(--text));
  white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow-y: auto;
  border-top: 1px dashed var(--line); padding-top: 5px;
}
.af-snip-out.hidden { display: none; }
/* composer=Codex 圆角卡：整卡描边+22px 圆角，textarea 透明无边，聚焦时卡边加深 */
.aide-float-panel .af-composer {
  display: flex; gap: 6px; margin: 6px 10px 10px; padding: 8px 10px 6px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface-2, rgba(148,163,184,.06));
  transition: border-color .18s ease;
}
.aide-float-panel .af-composer:focus-within { border-color: var(--line-strong, var(--line)); }
.aide-float-panel .af-composer textarea {
  width: 100%; resize: none; border: 0; border-radius: 0;
  background: transparent; color: var(--text-main, var(--text));
  padding: 4px 6px; font-size: 12.5px; font-family: inherit; outline: none;
  min-height: 46px;
}
/* 全局 styles.css 给 input/textarea 强刷深色底+边框（!important）——composer 里要整卡一色，
   内框即卡框，textarea 不许再有自己的底/边/影 */
.aide-float-panel .af-composer textarea,
.council-composer textarea,
.aide-float-panel .af-composer textarea:focus,
.council-composer textarea:focus {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.aide-float-panel .af-send {
  width: 30px; height: 30px; align-self: center; border: none; border-radius: 50%; flex: none;
  background: var(--primary); color: var(--on-primary, #fff); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s cubic-bezier(.23,1,.32,1), opacity .18s ease;
}
.aide-float-panel .af-send:active { transform: scale(.94); }
/* 发送区双钮（管理员旨 2026-11-05）：左=直发/停实心圆；右=排队发送幽灵圆，
   一点直接进队——只在跑着时现身，闲时纯发送钮 */
.af-send-grp { display: inline-flex; align-items: center; gap: 6px; flex: none; align-self: center; }
.af-send-q {
  width: 30px; height: 30px; align-self: center; flex: none; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line, rgba(255,255,255,.18)); background: transparent;
  color: var(--text-main, var(--text));
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s cubic-bezier(.23,1,.32,1), border-color .15s ease, color .15s ease;
}
.af-send-q:hover { border-color: var(--primary); color: var(--primary); }
.af-send-q:active { transform: scale(.94); }
.af-send-q.hidden { display: none; }
/* 悬浮面板排队条：复用主面板 cq-row 那一套 */
.aide-float-panel .af-queue { display: flex; flex-direction: column; gap: 4px; padding: 0 12px 6px; }
.aide-float-panel .af-queue.hidden { display: none; }
.aide-float-panel .af-queue .cq-row { padding: 4px 6px 4px 10px; font-size: 11.5px; }
/* 悬浮面板活过程块：cod 系样式在上方 .af-cot 段（跑着的块默认展开，边跑边看） */
.aide-float-panel .af-steps-live { margin: 0; }
.aide-float-panel .af-steps-live .af-ar-list { padding-bottom: 4px; }
/* 步骤里的命令/参数摘要：等宽小字，单行省略（旧 .af-step-detail 兼容位） */
.af-msg .af-step-detail, .aide-float-panel .af-steps-live .af-step-detail {
  font-size: 9.5px; opacity: .68; font-family: ui-monospace, Consolas, monospace;
  display: inline-block; max-width: 70%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
}
/* 消息区滚动条整体隐藏（iPhone 式）：滚动照滚，滑轮不画。
   消息地图的横条已经承担了"看位置/跳消息"的职责，再挂一根滑轮纯属占位。 */
.aide-float-panel .af-msgs, .council-messages, .council-rail { scrollbar-width: none; }
.aide-float-panel .af-msgs::-webkit-scrollbar, .council-messages::-webkit-scrollbar,
.council-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* 浮窗全域藏滚动条（帝令 2026-10-30：滑轮块易误点，刻度尺已能导航——功能保留，条不显示） */
.aide-float-panel *, .aide-float-panel { scrollbar-width: none !important; }
.aide-float-panel *::-webkit-scrollbar, .aide-float-panel::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* ── 聊天滚动三件套（议事殿/悬浮小助共用，JS 在 chat-scroll-ux.js） ── */
/* 定位+弹性容器：包住消息区，是回底钮和消息地图的定位父级 */
.chat-scroll-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-scroll-wrap.hidden { display: none; }
.chat-scroll-wrap > .council-messages, .chat-scroll-wrap > .af-msgs { flex: 1; min-height: 0; }
/* 回到底部悬浮钮：离开底部才浮现；离开期间来了新内容右上角亮个小点 */
.chat-jump-bottom {
  position: absolute; left: 50%; margin-left: -15px; bottom: 14px; z-index: 6;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--card); color: var(--text-muted, var(--sub));
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 8, 23, .28);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, color .18s ease;
}
.chat-jump-bottom.is-show { opacity: 1; transform: none; pointer-events: auto; }
.chat-jump-bottom:hover { color: var(--text-main, var(--text)); border-color: var(--primary); }
.chat-jump-dot {
  position: absolute; top: -2px; right: -1px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary); display: none;
}
.chat-jump-bottom.has-new .chat-jump-dot { display: block; }
/* 消息地图轨：右缘一条刻度尺，平时若隐若现，鼠标进消息区才实显 */
.chat-scrollmap {
  position: absolute; top: 10px; bottom: 10px; right: 6px; width: 16px; z-index: 5;
  opacity: 0; transition: opacity .18s ease;
}
.chat-scrollmap.is-empty { display: none; }
/* 刻度尺整条隐藏（帝令 2026-10-30 二令：要功能不要显示——视口光带看着像滑轮还会误点；
   滚动照滚、回底钮照跳，尺子不画也不吃点击） */
.chat-scrollmap { display: none !important; }
/* 轨道中央一条细基线，撑起"尺子"感 */
.chat-scrollmap::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 7px; width: 1px;
  background: var(--line); opacity: .7;
}
/* 视口光带：当前看到的区间，跟着滚动滑 */
.chat-map-view {
  position: absolute; left: 0; right: 0; border-radius: 5px;
  background: color-mix(in srgb, var(--text-muted, #94a3b8) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-muted, #94a3b8) 26%, transparent);
  pointer-events: none;
}
/* 刻度线：一条消息一根，越长越宽；自己发的用主色 */
.chat-map-tick {
  position: absolute; right: 0; height: 2px; border-radius: 1px;
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--text-muted, #94a3b8) 52%, transparent);
  cursor: pointer;
  transition: background .12s ease, width .12s ease, box-shadow .12s ease;
}
/* 2px 太难点：透明热区上下各扩 4px */
.chat-map-tick::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.chat-map-tick.is-user { background: color-mix(in srgb, var(--primary) 72%, transparent); }
.chat-map-tick:hover {
  background: var(--primary); width: 100% !important;
  box-shadow: 0 0 7px color-mix(in srgb, var(--primary) 75%, transparent);
}
/* 地图悬停摘要：谁说的 + 开头一句 */
.chat-map-tip {
  position: absolute; right: 22px; z-index: 7; max-width: 230px;
  padding: 4px 9px; font-size: 11px; line-height: 1.4;
  color: var(--text-main, var(--text)); background: var(--card);
  border: 1px solid var(--line-strong, var(--line)); border-radius: 7px;
  box-shadow: 0 8px 22px rgba(2, 8, 23, .32);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translateY(-50%); pointer-events: none;
  opacity: 0; transition: opacity .12s ease;
}
.chat-map-tip.is-show { opacity: 1; }

/* 悬浮小助模式弹层（议事殿页头「悬浮小助」按钮） */
.council-float-pop {
  position: fixed; z-index: 900; min-width: 150px; padding: 5px;
  background: var(--panel-bg, var(--card));
  border: 1px solid var(--line-strong, var(--line)); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(2, 8, 23, .4);
  display: flex; flex-direction: column; gap: 2px;
}
.council-float-pop-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: none; background: transparent; border-radius: 7px;
  color: var(--text-main, var(--text)); font-size: 12.5px; cursor: pointer; text-align: left;
}
.council-float-pop-item:hover { background: var(--surface-muted, rgba(148, 163, 184, .15)); }
.council-float-pop-item.on { color: var(--primary); font-weight: 600; }
.council-float-pop-item.danger { color: var(--danger, #f87171); }
.council-float-pop-check { width: 14px; flex: none; text-align: center; }

/* ── 珠子/角色头像容器：透明底——容器是圆角方、里面是圆珠，带底色会在四角
 * 露出一块怪斑（「头像像没弄好」的来源）。overflow 仍要留着裁图。 ── */
.c-avatar.is-pal, .m-avatar.is-pal {
  background: transparent;
  overflow: hidden; font-size: 0;
  border-radius: 50%; /* 容器也圆——珠子在方壳里会露方角 */
}
.c-avatar.is-pal svg, .m-avatar.is-pal svg { width: 100%; height: 100%; display: block; }

/* ── 页面双分页：小助手 / 议事殿（复用 .api-hub-view-tabs 分段式标签，与其他页统一） ── */
.council-view-tabs {
  flex: none; display: flex; gap: 6px; padding: 10px 14px 0;
}
.council-view-tabs .api-hub-view-tab { min-width: 108px; }
/* ── 小助手页：Devin/Codex 式布局——左侧会话列表常驻、消息居中列、迎宾 hero、大输入框 ── */
.council-page.is-aide-view .council-rail { display: none; }
.council-page.is-aide-view .council-workspace { grid-template-columns: 252px minmax(0, 1fr); }
.council-page.is-aide-view .council-side { display: flex; grid-column: 1; grid-row: 1; }
.council-page.is-aide-view .council-main { grid-column: 2; grid-row: 1; }
.council-page.is-aide-view #councilSideToggle { display: none; }
.council-page.is-aide-view #councilNewMember,
.council-page.is-aide-view #councilNewGroup,
.council-page.is-aide-view #councilAssign,
.council-page.is-aide-view #councilRefresh { display: none; }

/* Aida 欢迎 Hero 只在小助手视图出场（2026-11-05 移入聊天列内） */
.council-page:not(.is-aide-view) .aida-council-hero { display: none; }
/* 通用皮肤：坞条只留页签行——COSMIC hero 展示体是 aida 专属件，其他皮肤不渲染（aida 有更高优先级的 display:flex 顶回）；
   聊天头整排在坞里与 achFloat/会话列重复，全皮肤隐藏（原先只 aida 隐藏，换肤就露重） */
.council-page.is-aide-view .ach-body { display: none; }
.council-page.is-aide-view .ach-dock .council-chat-head { display: none; }

/* Codex 侧栏大新会话钮：侧栏顶部的第一动作（等价转发 newSession） */
.cdx-newchat {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 10px 10px 4px; padding: 9px 0; flex: none;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: var(--on-primary, #fff);
  font-size: 13px; font-weight: 600;
  transition: transform .12s ease, filter .15s ease;
}
.cdx-newchat:hover { filter: brightness(1.08); }
.cdx-newchat:active { transform: scale(.98); }
/* 迷你款：挪进搜索行的小 ＋ 钮，只取文字色不要实心底（管理员旨：放下面、颜色按字体的来） */
.cdx-newchat--mini {
  margin: 0; padding: 0; width: 28px; height: 28px;
  border: 1px solid var(--border-subtle, var(--line)); border-radius: 9px;
  background: transparent; color: var(--text, inherit); font-size: 15px; line-height: 1;
}
.cdx-newchat--mini:hover { filter: none; color: var(--primary); border-color: var(--primary); }

/* 消息列：居中限宽，阅读宽度对齐 ChatGPT */
.council-page.is-aide-view .council-messages { padding: 22px 20px 10px; }
.council-page.is-aide-view .council-messages > .cmsg {
  width: 100%; max-width: 820px; margin-left: auto; margin-right: auto;
}
.council-page.is-aide-view .cmsg .m-body { max-width: 92%; }

/* 大输入框：胶囊感、留白足、字号大一号 */
.council-page.is-aide-view .council-composer {
  border-top: none; width: 100%; max-width: 864px; margin: 0 auto;
  padding: 6px 20px 20px; gap: 10px;
}
.council-page.is-aide-view .council-composer textarea {
  border-radius: 18px; min-height: 54px; font-size: 14px; line-height: 1.55;
  padding: 15px 18px; border-color: var(--line-strong, var(--line));
  background: var(--surface-soft, var(--card));
  box-shadow: 0 6px 24px rgba(2, 8, 23, .14);
}
.council-page.is-aide-view .council-send { width: 42px; height: 42px; border-radius: 14px; }
.council-page.is-aide-view .council-att-strip { left: 2px; }

/* 迎宾 hero：空会话时垂直居中 */
.aide-hero {
  margin: auto; max-width: 560px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 20px;
}
.aide-hero-title { font-size: 22px; font-weight: 700; color: var(--text-strong, var(--text)); letter-spacing: .01em; margin-top: 4px; }
.aide-hero-sub { font-size: 12.5px; color: var(--text-muted, var(--sub)); }
.aide-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.aide-chip {
  border: 1px solid var(--line-strong, var(--line)); background: var(--surface-soft, var(--card));
  color: var(--text-secondary, var(--sub)); border-radius: 999px;
  font-size: 12px; padding: 7px 14px; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, color .15s ease, transform .12s ease;
}
.aide-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* 头像静态图：成员形象色保留为内描边（容器 overflow:hidden 会裁掉外阴影，用内阴影画环） */
.c-avatar .av-img, .m-avatar .av-img, .af-face .av-img {
  width: 100%; height: 100%; display: block; border-radius: 28%;
}
.av-img[style*="--av-ring"] { box-shadow: inset 0 0 0 3px var(--av-ring); }
.af-av { width: 100%; height: 100%; }

/* ── 星核守护珠（用户钦定款）：暗夜珠体裹一颗呼吸暖核——
 *  不吵不闪、默默陪着你的小助手。皮肤色染核光，换肤即变色；
 *  常态刻「助」字，悬停露脸。 ── */
.aide-orb {
  position: relative; display: inline-block; border-radius: 50%; overflow: hidden; flex: none;
  background:
    radial-gradient(ellipse 40% 28% at 34% 20%, rgba(255, 255, 255, .5), transparent 55%),
    radial-gradient(circle at 50% 62%,
      color-mix(in srgb, var(--primary-light, #ffc46e) 78%, #ffc46e) 0%,
      color-mix(in srgb, var(--primary, #e68c46) 45%, transparent) 32%, transparent 60%),
    linear-gradient(160deg, #3a4152, #15181f 78%);
  box-shadow:
    inset 0 -20% 34% rgba(0, 0, 0, .6),
    inset 0 8% 18% rgba(255, 255, 255, .14),
    inset 0 0 0 1.5px rgba(255, 255, 255, .1),
    0 14px 30px rgba(0, 0, 0, .5),
    0 0 34px color-mix(in srgb, var(--primary, #ffb464) 32%, transparent);
}
/* 呼吸暖核：3.4s 一呼一吸，像一颗慢心跳 */
.aide-orb i {
  position: absolute; left: 50%; top: 56%; width: 34%; height: 34%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--primary-light, #ffd68c) 88%, #ffd68c),
    color-mix(in srgb, var(--primary, #ffaa5a) 45%, transparent) 62%, transparent);
  animation: aide-core-breath 3.4s ease-in-out infinite;
}
@keyframes aide-core-breath {
  50% { transform: translate(-50%, -50%) scale(1.22); opacity: .72; }
}
/* 暗夜珠体上字要暖——原来珍珠底的深色刻字在星核上不可读 */
.aide-orb .orb-glyph {
  color: color-mix(in srgb, var(--primary-light, #ffd9a0) 88%, #ffe9c8);
  text-shadow: 0 0 8px color-mix(in srgb, var(--primary, #e9b46a) 65%, transparent);
}
.aide-orb .orb-face {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  background: url("./assets/avatars/face-aide.svg") center / contain no-repeat;
}
.aide-orb::after {
  content: ""; position: absolute; left: 17%; top: 9%; width: 46%; height: 22%;
  background: var(--orb-shine, #fff); opacity: .7; border-radius: 50%;
  transform: rotate(-24deg); filter: blur(3px);
}
.aide-orb.av-orb { width: 100%; height: 100%; }
.aide-orb[style*="--av-ring"] { outline: 3px solid var(--av-ring); outline-offset: -3px; }
@keyframes aide-orb-swirl { to { transform: rotate(360deg); } }
.aide-hero-orb { width: 86px; height: 86px; }
.af-orb { width: 100%; height: 100%; }

/* ── 珠子刻字 + 悬停露脸 ─────────────────────────────
 * 身份标识永远是字（一眼认出谁是谁），表情只是 hover 彩蛋。
 * 字号用容器查询 cqw——头像容器多小字就跟着小，免逐处配。 */
.av-orb, .aide-orb { container-type: inline-size; }
.orb-glyph {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 800; font-size: 42cqw; line-height: 1;
  color: rgba(64, 56, 48, .82); text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  transition: opacity .18s ease;
  pointer-events: none; user-select: none;
}
.aide-orb .orb-glyph { color: rgba(80, 62, 46, .86); }
.orb-face { transition: opacity .18s ease; }
.av-orb:hover .orb-glyph, .aide-orb:hover .orb-glyph { opacity: 0; }
.av-orb:hover .orb-face, .aide-orb:hover .orb-face { opacity: 1; }

/* 成员珠 = v2 过审质感：深漆珠 + --orb-a 亮晕色 + --orb-b 主色（双色由 memberOrbColors 内联注入）。
 * 每颗分身珠色相不同=一眼认人；深珠底深浅皮肤下都不走样。 */
.m-orb {
  position: relative; display: inline-block; border-radius: 50%; overflow: hidden; flex: none;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 42% 28% at 34% 18%, rgba(255, 255, 255, .42), transparent 56%),
    radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--orb-a, #8fb) 30%, transparent) 0%, transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--orb-b, #3d4354) 30%, #2e3442), #171a21 80%);
  box-shadow:
    inset 0 -18% 30% rgba(0, 0, 0, .55),
    inset 0 8% 16% rgba(255, 255, 255, .12),
    inset 0 0 0 1.5px color-mix(in srgb, var(--orb-a, #8fb) 30%, rgba(255, 255, 255, .08)),
    0 12px 26px rgba(0, 0, 0, .5),
    0 0 26px color-mix(in srgb, var(--orb-a, #8fb) 26%, transparent);
}
/* 玉皮高光：左上椭圆亮斑，把"玻璃珠"立体感钉出来 */
.m-orb::before {
  content: ""; position: absolute; left: 14%; top: 8%; width: 40%; height: 20%;
  border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(2.5px);
  transform: rotate(-16deg); pointer-events: none;
}
/* 深漆珠上的刻字：身份色提亮+同色光晕，深皮浅皮都读得清 */
.m-orb .orb-glyph {
  color: color-mix(in srgb, var(--orb-a, #cfe0ff) 80%, #fff);
  text-shadow: 0 0 10px color-mix(in srgb, var(--orb-a, #8fb) 70%, transparent), 0 1px 2px rgba(0, 0, 0, .5);
}

/* ── 群珠：浅霜星子珠——奶白霜面 + 星子散布 = 众分身共处一珠（用户定稿：白球）── */
.g-orb {
  position: relative; display: inline-block; border-radius: 50%; overflow: hidden; flex: none;
  width: 100%; height: 100%;
  background:
    radial-gradient(circle 3.5cqw at 26% 30%, #fff 96%, transparent),
    radial-gradient(circle 2.5cqw at 70% 24%, color-mix(in srgb, var(--primary-light, #cfe2ff) 90%, #fff) 96%, transparent),
    radial-gradient(circle 3cqw at 62% 68%, color-mix(in srgb, var(--primary, #9fc0f0) 70%, #fff) 96%, transparent),
    radial-gradient(circle 2cqw at 34% 74%, rgba(255, 255, 255, .75) 96%, transparent),
    radial-gradient(ellipse 42% 28% at 34% 16%, rgba(255, 255, 255, .5), transparent 56%),
    linear-gradient(160deg, #e9edf5, #b9c3d6 78%);
  box-shadow:
    inset 0 -18% 30% rgba(80, 95, 125, .28),
    inset 0 8% 18% rgba(255, 255, 255, .5),
    inset 0 0 0 1.5px rgba(255, 255, 255, .55),
    0 12px 26px rgba(0, 0, 0, .4),
    0 0 24px color-mix(in srgb, var(--primary, #8fb0ff) 24%, transparent);
}
/* 玉皮高光 */
.g-orb::before {
  content: ""; position: absolute; left: 14%; top: 8%; width: 40%; height: 20%;
  border-radius: 50%; background: rgba(255, 255, 255, .6); filter: blur(2.5px);
  transform: rotate(-16deg); pointer-events: none;
}
.g-orb .orb-glyph {
  color: #3d4a63; /* 浅霜珠上字要深才读得出 */
  /* 字号继承 .orb-glyph 基准 42cqw——和分身珠等大 */
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 0 8px rgba(255, 255, 255, .5);
}
/* 成员珠的 hover 表情：脸是 JS 注入的专属 SVG（一人一相），这里只管显隐和占满 */
.m-orb .orb-face {
  position: absolute; inset: 0; opacity: 0;
}
.m-orb .orb-face svg { width: 100%; height: 100%; display: block; }
/* 群珠不要脸：markup 里本就没有 .orb-face，浮球复用节点时也被清空——双保险 */
.g-orb .orb-face { display: none; }

.council-page.is-aide-view .council-view-tabs { padding-top: 6px; }

/* 悬浮球脸 = 小助手角色 SVG */
.aide-float-bubble .af-face { display: flex; align-items: center; justify-content: center; }
.aide-float-bubble .af-face.is-svg { width: 74%; height: 74%; }
.aide-float-bubble .af-face.is-svg svg { width: 100%; height: 100%; display: block; }

/* 消息操作条：复制 / 撤回。
 * 放在消息内容下方正常排版（不再绝对定位浮在气泡上方），
 * 平时淡显不抢眼、悬停变实；不占位闪烁也没有悬停布局跳。 */
.cmsg { position: relative; }
.cmsg .m-acts {
  display: flex; gap: 2px; align-items: center;
  justify-content: flex-start; margin-top: 4px; padding: 0 2px;
  opacity: .45; transition: opacity .15s ease;
}
.cmsg:hover .m-acts, .cmsg .m-acts:focus-within { opacity: 1; }
/* 一键翻译结果：嵌在原气泡下方，虚线分隔区一眼看出"上面原文·下面中文" */
.cmsg .m-trans {
  margin-top: 4px; padding: 7px 12px 7px 26px; position: relative;
  font-size: 12.5px; line-height: 1.6; color: var(--text-main, var(--text));
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  white-space: pre-wrap; word-break: break-word;
}
.cmsg .m-trans::before {
  content: "译"; position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 700;
  color: var(--primary, #22c55e); opacity: .8;
}
/* 浮窗同款译文块：Original/目标语 双标签分段（Devin 式） */
.af-msg .af-trans {
  margin-top: 5px; padding: 7px 10px; position: relative;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-muted, rgba(148, 163, 184, .07));
}
.af-msg .af-trans-lab {
  font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-muted, var(--sub)); margin: 2px 0 2px;
}
.af-msg .af-trans-src {
  font-size: 11px; line-height: 1.5; color: var(--text-muted, var(--sub));
  white-space: pre-wrap; word-break: break-word;
  max-height: 5.4em; overflow: hidden;
}
.af-msg .af-trans-dst {
  font-size: 12.5px; line-height: 1.55; color: var(--text-main, var(--text));
  white-space: pre-wrap; word-break: break-word;
}
.af-msg .af-act[disabled] { opacity: .4; cursor: default; }
.cmsg .m-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 20px; padding: 0;
  border: none; background: transparent; border-radius: 6px;
  color: var(--text-muted, var(--sub)); cursor: pointer;
}
.cmsg .m-act:hover { color: var(--text-main, var(--text)); background: var(--surface-muted, rgba(148,163,184,.14)); }
.cmsg .m-act.m-recall:hover { color: var(--danger, #ef4444); background: color-mix(in srgb, var(--danger, #ef4444) 12%, transparent); }
.cmsg.is-user .m-acts { justify-content: flex-end; }

/* 内置助手置顶入口（左栏最上方，群组之上） */
.council-aide-top {
  margin-bottom: 10px;
  background: var(--primary-gradient-soft, rgba(16, 185, 129, .1));
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 12px;
}
.council-aide-top .c-tag { font-size: 10px; opacity: .75; }

/* 消息里的图片附件 */
.cmsg .m-atts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.cmsg .m-att-img {
  max-width: min(320px, 100%); max-height: 220px; object-fit: contain;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2, rgba(255, 255, 255, .03)); cursor: zoom-in; display: block;
}
.cmsg .m-att-file {
  font-size: 11.5px; color: var(--text-muted, var(--sub));
  border: 1px dashed var(--line); border-radius: 8px; padding: 4px 9px;
}

/* 成员设置里的形象颜色选择点 */
.cms-hues { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.cms-hue {
  width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 2px solid transparent; border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
}
.cms-hue.on { border-color: var(--text-main, var(--text)); box-shadow: 0 0 0 2px var(--panel-bg, var(--card)); }
.cms-hue-pick {
  width: 26px; height: 24px; padding: 0; margin-left: 2px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 7px; background: transparent;
}

/* 悬浮窗：聊天 / 会话 双分页 */
.aide-float-panel .af-msgs.hidden, .aide-float-panel .af-sessions.hidden,
.aide-float-panel .af-ops.hidden,
.aide-float-panel .af-composer.hidden, .aide-float-panel .af-att.hidden { display: none; }
/* 层次感分层：头栏浮起（亮一点+底下微阴影），页签行内陷成一条凹槽带，
   消息区沉在最底——三段材质不再糊在一个平面上 */
.aide-float-panel .af-head {
  background: color-mix(in srgb, var(--card, var(--panel-bg)) 6%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent) inset,
    0 6px 14px -10px rgba(2, 8, 23, .5);
  position: relative; z-index: 2;
}
.aide-float-panel .af-tabs {
  display: flex; gap: 2px; padding: 5px 12px 0; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--text, var(--sub)) 3%, transparent);
  box-shadow: inset 0 1px 3px rgba(2, 8, 23, .18);
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.aide-float-panel .af-tabs::-webkit-scrollbar { display: none; }
.aide-float-panel .af-tab {
  flex: none; white-space: nowrap;
  border: none; background: transparent; color: var(--text-muted, var(--sub));
  font-size: 12px; padding: 4px 10px 7px; cursor: pointer; border-bottom: 2px solid transparent;
}
.aide-float-panel .af-tab.on { color: var(--text-main, var(--text)); border-bottom-color: var(--primary); font-weight: 600; }
.aide-float-panel .af-tab-new { margin-left: auto; }
.aide-float-panel .af-member {
  flex: none; max-width: 92px; margin-bottom: 3px; border: none; background: transparent;
  color: var(--text-muted, var(--sub)); font-size: 11px; cursor: pointer; outline: none;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.aide-float-panel .af-member:hover { color: var(--text-main, var(--text)); }
/* 聊天对象分组弹层：壳用 cmsel-pop（跟随皮肤），这里只补分组小节样式 */
.af-mem-pop { min-width: 150px; max-width: 220px; overflow-y: auto; padding: 4px 0; }
.af-mem-grp:not(:first-child) { border-top: 1px solid var(--border-subtle, var(--line)); margin-top: 3px; }
/* 分组段名是折叠开关：点一下收、再点一下开，状态记本地 */
.af-mem-sec {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 7px 12px 3px; font-size: 10px; letter-spacing: .08em; text-align: left;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted, var(--sub)); user-select: none;
}
.af-mem-sec:hover { color: var(--text-main, var(--text)); }
.af-mem-arrow { font-style: normal; font-size: 9px; opacity: .6; transition: transform .15s ease; }
.af-mem-grp.folded .af-mem-arrow { transform: rotate(-90deg); }
.af-mem-grp.folded .af-mem-items { display: none; }
.af-mem-sub { float: right; font-style: normal; font-size: 10px; color: var(--text-muted, var(--sub)); margin-top: 1px; }
.af-mem-empty { padding: 4px 12px 8px; font-size: 11px; color: var(--text-muted, var(--sub)); }
/* 成员项复用 cmsel-opt 样式；弹层里的 af-mem-sub 不靠右浮动，改成自动推开 */
.af-mem-pop .cmsel-opt .af-mem-sub { float: none; margin-left: auto; }
/* 分身=小助手全能复制（公用肌肉一样）：权限/强度/上下文/截图全套 chip 都亮着，
   模型 chip 绑到分身自己的模型（各自一个坑位，供应商池同源）。
   只有群聊没有单模型——模型 chip 整颗藏。 */
.aide-float-panel.is-group .cc-model { display: none; }
/* 军团视图（2026-10-18 客户令）：频道事件流 + 三档发送。
 * 2026-10-19 改：页签条永不藏——客户明令「位置不能发生变化」，会话页签=退出军团视图的天然出口；
 * 新建会话在军团视图由 JS 拦截提示（aide-float.js afNewSession），不藏不挪。 */
.af-ctx { position: relative; display: inline-flex; align-items: center; flex: none; margin-left: 1px; cursor: default; }
.af-ctx .af-ctx-bg { stroke: rgba(148,163,184,.4); }
.af-ctx .af-ctx-fg { stroke: #e6edf3; transition: stroke-dashoffset .4s, stroke .3s; }
/* 降智预警分档（2026-11-11）：is-warn=业界有效上下文衰减区（琥珀），is-hot=建议立刻换会话（红） */
.af-ctx.is-warn .af-ctx-fg { stroke: #e8a33d; }
.af-ctx.is-hot .af-ctx-fg { stroke: #e05c5c; }
.af-ctx::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); background: var(--surface, #242a30); border: 1px solid rgba(148,163,184,.25); border-radius: 7px; padding: 5px 10px; font-size: 10.5px; color: #e6edf3; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 80; }
.af-ctx:hover::after { opacity: 1; }
.aide-float-panel .af-leg-kinds { display: none; align-items: center; gap: 4px; }
.aide-float-panel.is-legion .af-leg-kinds { display: inline-flex; }
.aide-float-panel .af-leg-kind { font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border-subtle, rgba(148,163,184,.45)); background: transparent; color: inherit; cursor: pointer; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
/* 选中态改边框高亮（客户 2026-10-19：满铺底色盖住白字看不清）——描边+同色字+外晕 */
.aide-float-panel .af-leg-kind.on { border-color: var(--primary, #4f7cff); color: var(--primary, #4f7cff); box-shadow: inset 0 0 0 1px var(--primary, #4f7cff), 0 0 8px -3px var(--primary, #4f7cff); background: transparent; font-weight: 600; }
/* 军团频道=文字军令台：语音录入/贴图/截图对军令无意义，藏（只在小助/分身/群聊面板出现） */
.aide-float-panel.is-legion .af-attach, .aide-float-panel.is-legion #afSnip, .aide-float-panel.is-legion #afModeBtn { display: none; }
/* 军团频道档筛选条 */
.aide-float-panel .af-leg-filter { display: flex; gap: 4px; flex-wrap: wrap; padding: 5px 0 2px; }
.aide-float-panel .af-leg-fchip { font-size: 10px; line-height: 1; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-subtle, rgba(148,163,184,.4)); background: transparent; color: var(--text-muted, #94a3b8); cursor: pointer; }
.aide-float-panel .af-leg-fchip.on { border-color: var(--primary, #4f7cff); color: var(--primary, #4f7cff); box-shadow: inset 0 0 0 1px var(--primary, #4f7cff); }
.aide-float-panel .af-leg-head { font-size: 12px; font-weight: 600; padding: 6px 2px; opacity: .9; }
.aide-float-panel .af-leg-mems { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 2px 8px; font-size: 12px; }
.aide-float-panel .af-leg-mem { display: inline-flex; align-items: center; gap: 5px; opacity: .85; }
.aide-float-panel .af-leg-mem .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted, #94a3b8); display: inline-block; }
.aide-float-panel .af-leg-mem.busy .dot { background: var(--ok, #22c55e); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.aide-float-panel .af-leg-mem.off { opacity: .45; }
.aide-float-panel .af-leg-ev { padding: 7px 10px; border-radius: 10px; background: var(--surface-muted, rgba(148,163,184,.12)); font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.aide-float-panel .af-leg-ev .k { display: inline-block; font-size: 10px; padding: 0 6px; margin-right: 6px; border-radius: 999px; border: 1px solid currentColor; opacity: .85; }
.aide-float-panel .af-leg-ev.k-announce .k { color: #64748b; }
.aide-float-panel .af-leg-ev.k-task .k { color: #d97706; }
.aide-float-panel .af-leg-ev.k-command .k { color: #dc2626; }
.aide-float-panel .af-leg-ev.k-claim { background: none; font-size: 12px; opacity: .75; padding: 2px 10px; }

/* 议事殿·军团频道视图（左栏「军团频道」点开的主区军情板）——与浮窗 af-leg-* 同一口径 */
.council-leg-head { font-size: 13px; font-weight: 600; padding: 8px 2px 4px; opacity: .9; }
.council-leg-mems { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 0 2px 10px; font-size: 12px; }
.council-leg-mem { display: inline-flex; align-items: center; gap: 5px; opacity: .85; }
.council-leg-mem.off { opacity: .45; }
.council-leg-mem.busy { color: var(--ok, #22c55e); }
.council-leg-kinds { display: flex; gap: 6px; padding: 2px 0 10px; }
.council-leg-kind { font-size: 11px; line-height: 1; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-subtle, rgba(148,163,184,.4)); background: transparent; color: var(--text-muted, #94a3b8); cursor: pointer; }
.council-leg-kind.on { border-color: var(--primary, #4f7cff); color: var(--primary, #4f7cff); box-shadow: inset 0 0 0 1px var(--primary, #4f7cff); }
.council-leg-ev { padding: 8px 12px; border-radius: 10px; background: var(--surface-muted, rgba(148,163,184,.12)); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin-bottom: 6px; }
.council-leg-ev .k { display: inline-block; font-size: 10px; padding: 1px 7px; margin-right: 7px; border-radius: 999px; border: 1px solid currentColor; opacity: .85; }
.council-leg-ev .t { float: right; font-size: 10px; color: var(--text-muted, #94a3b8); margin-left: 8px; }
.council-leg-ev.k-announce .k { color: #64748b; }
.council-leg-ev.k-task .k { color: #d97706; }
.council-leg-ev.k-command .k { color: #dc2626; }
.council-leg-ev.k-claim { background: none; font-size: 12px; opacity: .75; padding: 2px 10px; }
.aide-float-panel .af-sessions { flex: 1; overflow-y: auto; padding: 8px 10px; }
.aide-float-panel .af-session {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border-radius: 8px; cursor: pointer;
}
.aide-float-panel .af-session:hover { background: var(--surface-2, rgba(255, 255, 255, .05)); }
.aide-float-panel .af-session.on { background: var(--primary-gradient-soft, rgba(16, 185, 129, .12)); }
.aide-float-panel .af-session-title { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aide-float-panel .af-session-time { font-size: 10px; color: var(--text-muted, var(--sub)); }
.aide-float-panel .af-session-del {
  flex: none; display: none; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: none; border-radius: 5px;
  background: none; color: var(--text-muted, var(--sub)); cursor: pointer;
  padding: 0; font-size: 13px; line-height: 1;
}
.aide-float-panel .af-session:hover .af-session-del { display: inline-flex; }
.aide-float-panel .af-session-del:hover { background: color-mix(in srgb, var(--danger, #ef4444) 15%, transparent); color: var(--danger, #ef4444); }
/* 会话在跑标记：列表里一眼看出哪条还在生成 */
.aide-float-panel .af-session .af-run-dot {
  display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%;
  background: var(--primary, #10b981); vertical-align: middle;
  animation: afRunPulse 1.2s ease-in-out infinite;
}
@keyframes afRunPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── 总控页：任务看板（管理员令 2026-11-04）——待做｜进行中｜已完成。
 *  窄面板（默认浮窗 ~380px）竖排三段分组；桌面窗拉宽到 ≥640px 自动转三列横排。── */
.aide-float-panel .af-ops {
  flex: 1; overflow-y: auto; padding: 8px 10px;
  container-type: inline-size;
}
/* 任务页：Linear 式分组折叠列表（2026-11-05 调研定案——窄面板成熟件全是
   「分组+折叠+计数」列表：Linear list view、TickTick sections、Things 分区。
   不横排泳道。组：进行中→受阻→待做→已完成，后者默认折叠。） */
.af-ops-groups { display: flex; flex-direction: column; gap: 2px; }
.af-ops-sec { min-width: 0; }
.af-ops-sec summary {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px; cursor: pointer;
  font-size: 10px; letter-spacing: .14em; user-select: none; list-style: none;
  color: var(--text-muted, var(--sub)); border-radius: 8px;
}
.af-ops-sec summary::-webkit-details-marker { display: none; }
.af-ops-sec summary:hover { color: var(--text-main, var(--text)); }
.af-ops-chev {
  width: 10px; height: 10px; flex: none; opacity: .6;
  transition: transform .15s ease;
}
.af-ops-sec[open] .af-ops-chev { transform: rotate(90deg); }
.af-ops-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--text-muted, var(--sub)); }
.af-ops-sec.is-todo .af-ops-dot { background: var(--warn, #f59e0b); }
.af-ops-sec.is-doing .af-ops-dot { background: var(--primary, #10b981); box-shadow: 0 0 6px color-mix(in srgb, var(--primary, #10b981) 60%, transparent); }
.af-ops-sec.is-stall .af-ops-dot { background: var(--danger, #ef4444); box-shadow: 0 0 6px color-mix(in srgb, var(--danger, #ef4444) 50%, transparent); }
.af-ops-sec.is-done .af-ops-dot { background: var(--ok, #22c55e); }
.af-ops-sec summary em { font-style: normal; font-variant-numeric: tabular-nums; opacity: .75; }
.af-ops-rows { display: flex; flex-direction: column; gap: 2px; padding: 1px 0 6px; }
.af-ops-row {
  display: flex; flex-direction: column; gap: 3px; padding: 7px 9px 7px 22px; text-align: left; cursor: pointer;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--text-main, var(--text)); font-family: inherit;
  transition: background .15s;
}
.af-ops-row:hover { background: color-mix(in srgb, var(--card, rgba(255,255,255,.04)) 88%, transparent); }
.af-ops-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.af-ops-who b {
  font-size: 11px; font-weight: 600; color: var(--text-muted, var(--sub)); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.af-ops-who em { margin-left: auto; flex: none; font-style: normal; font-size: 10px; color: var(--text-muted, var(--sub)); }
.af-ops-text {
  font-size: 12px; line-height: 1.5; color: var(--text-main, var(--text));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.af-ops-prog {
  font-size: 10.5px; color: var(--primary, #10b981);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.af-ops-tag {
  flex: none; font-style: normal; font-size: 9.5px; line-height: 1.5; padding: 0 5px;
  border-radius: 6px; border: 1px solid var(--line-strong, var(--line));
  color: var(--text-muted, var(--sub));
}
.af-ops-tag.is-stall { color: var(--danger, #ef4444); border-color: color-mix(in srgb, var(--danger, #ef4444) 45%, transparent); }
.af-ops-sec.is-done .af-ops-row { opacity: .66; }
.af-ops-sec.is-done .af-ops-row:hover { opacity: 1; }
.af-ops-why {
  font-size: 10px; line-height: 1.45; color: var(--danger, #ef4444);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── 生态指挥台（2026-11-12 管理员令：看板→可交互可视化面板）──
 * 五层投影：健康度条 / 主线T表 / 分线成员道 / 受阻白话原因 / 分组明细。
 * 终端风：等宽数字、密排行、左色条状态编码。 */
.af-deck { display: flex; flex-direction: column; gap: 2px; }
.af-deck-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 9px; margin-bottom: 4px; border-radius: 9px;
  background: color-mix(in srgb, var(--card, rgba(255,255,255,.04)) 72%, transparent);
  border: 1px solid var(--line, rgba(255,255,255,.07));
}
.af-hc {
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 1px 8px; border-radius: 7px; letter-spacing: .02em;
}
.af-hc.is-ok { color: var(--ok, #22c55e); background: color-mix(in srgb, var(--ok, #22c55e) 14%, transparent); }
.af-hc.is-warn { color: var(--warn, #f59e0b); background: color-mix(in srgb, var(--warn, #f59e0b) 14%, transparent); }
.af-hc.is-bad { color: var(--danger, #ef4444); background: color-mix(in srgb, var(--danger, #ef4444) 16%, transparent); }
.af-hc-it { font-size: 10px; color: var(--text-muted, var(--sub)); font-variant-numeric: tabular-nums; }
.af-hc-it.is-bad { color: var(--danger, #ef4444); }
.af-ops-sec.is-main .af-ops-dot { background: var(--primary, #6366f1); box-shadow: 0 0 6px color-mix(in srgb, var(--primary, #6366f1) 55%, transparent); }
.af-ops-sec.is-lane .af-ops-dot { background: var(--accent, #38bdf8); }
.af-ml-row {
  display: flex; align-items: baseline; gap: 6px; padding: 3px 8px;
  font-size: 11px; line-height: 1.5; border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
}
.af-ml-row.is-done { opacity: .55; }
.af-ml-row.is-active { border-left-color: var(--primary, #10b981); }
.af-ml-row.is-waiting { border-left-color: var(--warn, #f59e0b); }
.af-ml-row.is-blocked { border-left-color: var(--danger, #ef4444); }
.af-ml-ic { font-style: normal; font-size: 10px; width: 12px; text-align: center; flex: none; }
.af-ml-row.is-done .af-ml-ic { color: var(--ok, #22c55e); }
.af-ml-row.is-active .af-ml-ic { color: var(--primary, #10b981); }
.af-ml-row.is-waiting .af-ml-ic { color: var(--warn, #f59e0b); }
.af-ml-row.is-blocked .af-ml-ic { color: var(--danger, #ef4444); }
.af-ml-row.is-todo .af-ml-ic { color: var(--text-muted, var(--sub)); }
.af-ml-row b { font-size: 10px; color: var(--text-muted, var(--sub)); font-variant-numeric: tabular-nums; flex: none; }
.af-ml-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main, var(--text)); }
.af-ml-row.is-done .af-ml-t { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.af-ml-s { font-style: normal; font-size: 9.5px; color: var(--text-muted, var(--sub)); flex: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-ml-n { font-size: 9.5px; color: var(--text-muted, var(--sub)); flex: none; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-lane {
  display: flex; align-items: center; gap: 6px; padding: 5px 9px; text-align: left; cursor: pointer;
  border: 0; border-radius: 8px; background: transparent; width: 100%;
  color: var(--text-main, var(--text)); font-family: inherit; font-size: 11px;
  border-left: 2px solid transparent; transition: background .15s;
}
.af-lane:hover { background: color-mix(in srgb, var(--card, rgba(255,255,255,.04)) 88%, transparent); }
.af-lane.is-doing { border-left-color: var(--primary, #10b981); }
.af-lane.is-stall { border-left-color: var(--danger, #ef4444); }
.af-lane.is-todo { border-left-color: var(--warn, #f59e0b); }
.af-lane-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.af-lane-dot.is-alive { background: var(--ok, #22c55e); box-shadow: 0 0 5px color-mix(in srgb, var(--ok, #22c55e) 60%, transparent); }
.af-lane-dot.is-dead { background: var(--danger, #ef4444); box-shadow: 0 0 5px color-mix(in srgb, var(--danger, #ef4444) 60%, transparent); }
.af-lane-dot.is-unk { background: var(--text-muted, var(--sub)); opacity: .5; }
.af-lane b { font-size: 11px; font-weight: 600; flex: none; }
.af-lane-brain { font-size: 9.5px; color: var(--text-muted, var(--sub)); flex: none; font-variant-numeric: tabular-nums; }
.af-lane-act { flex: 1; min-width: 0; font-size: 10px; color: var(--text-muted, var(--sub)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-lane em { font-style: normal; font-size: 9.5px; color: var(--text-muted, var(--sub)); flex: none; font-variant-numeric: tabular-nums; }

/* ── 生态指挥台 v2·HUD 化（2026-11-12 管理员令：列表≠可视化，要图表要科幻面板感）──
 * 数据源全实测：/api/drives 五维驱动弧表、待处理台、成员体征点阵。
 * 视觉语：深空底+琥珀数据+青活性+红警，细发光线、微数字、密度即指挥。 */
.af-deck-hud .af-ops-sec summary { letter-spacing: .18em; }
.af-vitals {
  display: flex; align-items: flex-end; gap: 4px; flex-wrap: wrap;
  padding: 8px 10px; margin: 2px 0 4px; border-radius: 9px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary, #38bdf8) 5%, transparent), transparent 70%),
    color-mix(in srgb, var(--card, rgba(255,255,255,.04)) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, #38bdf8) 18%, transparent);
}
.af-gauge { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 44px; }
.af-gauge-svg { width: 40px; height: 26px; overflow: visible; }
.af-gauge-v { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-main, var(--text)); margin-top: -4px; }
.af-gauge-l { font-size: 9px; color: var(--text-muted, var(--sub)); letter-spacing: .08em; }
.af-posture {
  margin-left: auto; font-size: 9.5px; color: var(--text-muted, var(--sub));
  padding: 4px 7px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--line, rgba(255,255,255,.08)); font-variant-numeric: tabular-nums;
}
.af-posture b { color: var(--primary, #38bdf8); font-weight: 600; }
.af-ops-sec.is-pend .af-ops-dot { background: var(--warn, #f59e0b); box-shadow: 0 0 7px color-mix(in srgb, var(--warn, #f59e0b) 65%, transparent); }
.af-pend-badge {
  font-style: normal; font-size: 10px; font-weight: 700; min-width: 16px; text-align: center;
  padding: 0 5px; border-radius: 8px; margin-left: 2px;
  color: #1a1206; background: var(--warn, #f59e0b);
  box-shadow: 0 0 8px color-mix(in srgb, var(--warn, #f59e0b) 55%, transparent);
}
.af-pend-row {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; cursor: pointer;
  padding: 6px 9px; border: 0; border-radius: 8px; background: transparent;
  border-left: 2px solid var(--warn, #f59e0b);
  color: var(--text-main, var(--text)); font-family: inherit; font-size: 11px;
  transition: background .15s;
}
.af-pend-row:hover { background: color-mix(in srgb, var(--card, rgba(255,255,255,.05)) 90%, transparent); }
.af-pend-ic { font-style: normal; font-size: 12px; flex: none; width: 16px; text-align: center; }
.af-pend-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-pend-row em { font-style: normal; font-size: 9.5px; color: var(--text-muted, var(--sub)); flex: none; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-ops-sec.is-mdot .af-ops-dot { background: var(--ok, #22c55e); }
.af-mdot-grid { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 4px; }
.af-mdot {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.af-mdot:hover { transform: scale(1.5); }
.af-mdot.is-ok { background: var(--ok, #22c55e); box-shadow: 0 0 4px color-mix(in srgb, var(--ok, #22c55e) 55%, transparent); }
.af-mdot.is-busy { background: var(--primary, #38bdf8); box-shadow: 0 0 5px color-mix(in srgb, var(--primary, #38bdf8) 65%, transparent); }
.af-mdot.is-stall { background: var(--warn, #f59e0b); box-shadow: 0 0 5px color-mix(in srgb, var(--warn, #f59e0b) 60%, transparent); }
.af-mdot.is-dead { background: var(--danger, #ef4444); box-shadow: 0 0 5px color-mix(in srgb, var(--danger, #ef4444) 60%, transparent); }
.af-mdot.is-unk { background: var(--text-muted, var(--sub)); opacity: .4; }
.af-mdot-legend { display: flex; align-items: center; gap: 5px; padding: 0 8px 6px; font-size: 9px; color: var(--text-muted, var(--sub)); }
.af-mdot-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin: 0 1px 0 6px; }
.af-mdot-legend i:first-child { margin-left: 0; }
.af-mdot-legend i.is-ok { background: var(--ok, #22c55e); }
.af-mdot-legend i.is-busy { background: var(--primary, #38bdf8); }
.af-mdot-legend i.is-stall { background: var(--warn, #f59e0b); }
.af-mdot-legend i.is-dead { background: var(--danger, #ef4444); }
.af-mdot-legend i.is-unk { background: var(--text-muted, var(--sub)); }

/* ── 军团频道页：一军团一卡（长官+编制+频道近况），点卡进 leg: 频道视图 ── */
.aide-float-panel .af-legions {
  flex: 1; overflow-y: auto; padding: 6px 8px 10px;
  display: flex; flex-direction: column; gap: 7px;
}
.aide-float-panel .af-legions.hidden { display: none; }
.aide-float-panel .af-legions .af-ops-sec { padding: 8px 4px 1px; }
.af-leg-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 9px 11px 8px; text-align: left; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--primary, #10b981) 22%, var(--line, rgba(255,255,255,.08)));
  border-radius: 10px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--primary, #10b981) 7%, var(--card, rgba(255,255,255,.03))),
    transparent 70%);
  color: var(--text-main, var(--text));
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.af-leg-tile::before, .af-leg-tile::after {
  content: ""; position: absolute; width: 9px; height: 9px; opacity: .75;
  border: 0 solid color-mix(in srgb, var(--primary, #10b981) 80%, transparent);
}
.af-leg-tile::before { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 10px; }
.af-leg-tile::after { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 10px; }
.af-leg-tile:hover {
  border-color: color-mix(in srgb, var(--primary, #10b981) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary, #10b981) 18%, transparent);
  transform: translateY(-1px);
}
.af-leg-tile[data-st="busy"] {
  border-color: color-mix(in srgb, var(--primary, #10b981) 55%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary, #10b981) 20%, transparent);
}
/* 卡片功能钮（循环令/换IP令·客户令：军令开关明处按，不藏） */
.af-leg-acts { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.af-leg-act {
  font-style: normal; font-size: 10px; line-height: 1; padding: 4px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary, #10b981) 35%, transparent);
  color: var(--text-muted, var(--sub)); cursor: pointer; white-space: nowrap;
}
.af-leg-act:hover { border-color: var(--primary, #10b981); color: var(--primary, #10b981); }
.af-leg-act.on {
  border-color: var(--primary, #10b981); color: var(--primary, #10b981); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary, #10b981), 0 0 8px -3px var(--primary, #10b981);
}
/* 全军总令条：军团频道顶栏——循环总令 + 换IP手法 + 换一下 */
.af-leg-glob { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; flex-wrap: wrap; }
.af-leg-sel {
  font-size: 10px; line-height: 1; padding: 4px 6px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--primary, #10b981) 35%, transparent);
  background: transparent; color: var(--text-muted, var(--sub)); appearance: auto; max-width: 108px;
}
.af-leg-sel:hover, .af-leg-sel:focus { border-color: var(--primary, #10b981); color: var(--primary, #10b981); outline: none; }
.af-leg-sel:disabled { opacity: .45; cursor: not-allowed; }
.af-leg-sel option { background: var(--panel, #0f172a); color: var(--text, #e2e8f0); }
/* 议事殿军团频道档位条上的同款：换IP手法下拉 */
.council-leg-sel {
  font-size: 11px; line-height: 1.2; padding: 4px 6px; border-radius: 8px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--primary, #10b981) 35%, transparent);
  background: transparent; color: var(--sub); max-width: 104px;
}
.council-leg-sel:hover, .council-leg-sel:focus { border-color: var(--primary, #10b981); color: var(--primary, #10b981); outline: none; }
.council-leg-sel:disabled { opacity: .45; cursor: not-allowed; }
.council-leg-sel option { background: var(--panel, #0f172a); color: var(--text, #e2e8f0); }
.af-leg-tl { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.af-leg-tl b { font-size: 13px; font-weight: 700; white-space: nowrap; }
.af-leg-tl em {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-style: normal; font-size: 10.5px; color: var(--text-muted, var(--sub));
}
.af-leg-roster { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11.5px; }
.af-leg-roster .af-mem-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 3px; vertical-align: 0; }
.af-leg-roster .af-mem-dot[data-st="busy"] { background: var(--ok, #22c55e); box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.af-leg-ft { font-size: 10px; color: var(--text-muted, var(--sub)); }

/* ── 确认卡（Devin 式权限卡）：聊天流里的审批卡 ── */
.cc-confirm-card {
  margin: 8px 4px; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary, #10b981) 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary, #10b981) 7%, var(--card));
  box-shadow: 0 8px 24px rgba(2, 8, 23, .18), inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent);
}
.cc-confirm-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); }
.cc-confirm-head strong { font-weight: 600; }
.cc-confirm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #10b981); animation: afRunPulse 1.2s ease-in-out infinite; flex: none; }
.cc-confirm-sub { margin-left: auto; font-size: 11px; color: var(--sub); }
.cc-confirm-args {
  margin: 8px 0 0; padding: 8px 10px; max-height: 140px; overflow: auto;
  font: 11px/1.5 ui-monospace, Consolas, monospace; color: var(--sub);
  background: var(--card-soft, rgba(148,163,184,.08));
  border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; word-break: break-word;
}
.cc-confirm-row { display: flex; gap: 8px; margin-top: 10px; }
.cc-confirm-btn {
  height: 28px; padding: 0 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
  transition: all .15s;
}
.cc-confirm-btn:hover { transform: translateY(-1px); }
.cc-confirm-btn.cc-ok { background: var(--primary, #10b981); border-color: var(--primary, #10b981); color: var(--on-primary, #fff); }
.cc-confirm-btn.cc-no { color: var(--danger, #ef4444); }
.cc-confirm-btn.cc-grant { margin-left: auto; color: var(--sub); }
.cc-confirm-card.cc-decided { opacity: .72; box-shadow: none; border-color: var(--line); }
.cc-confirm-card.cc-decided .cc-confirm-dot { animation: none; background: var(--primary, #10b981); }
.cc-confirm-card.cc-denied .cc-confirm-dot { background: var(--danger, #ef4444); }
.cc-confirm-card.cc-denied { border-color: color-mix(in srgb, var(--danger, #ef4444) 40%, var(--line)); }
.cc-confirm-edit {
  margin-top: 8px; width: 100%; min-height: 90px; max-height: 240px; resize: vertical;
  font: 11px/1.5 ui-monospace, Consolas, monospace; color: var(--text);
  background: var(--card-soft, rgba(148,163,184,.08));
  border: 1px solid var(--primary, #10b981); border-radius: 8px; padding: 8px 10px;
}
.cc-confirm-edit:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.cc-confirm-err { margin-top: 6px; font-size: 11px; color: var(--danger, #ef4444); }
.cc-confirm-card .hidden { display: none; }

/* ── 会话切换骨架屏（浮窗）：点了就该立刻有回应——
   泡泡形占位+呼吸扫光+底部小转圈。全走皮肤变量，深浅皮都服帖。 */
.af-sk { display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; flex: 1; min-height: 100%; box-sizing: border-box; }
.af-sk-row { display: flex; align-items: flex-start; gap: 8px; }
.af-sk-row.is-me { justify-content: flex-end; }
.af-sk-av, .af-sk-b {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--text-muted, var(--sub)) 9%, transparent) 25%,
    color-mix(in srgb, var(--text-muted, var(--sub)) 21%, transparent) 50%,
    color-mix(in srgb, var(--text-muted, var(--sub)) 9%, transparent) 75%);
  background-size: 200% 100%;
  animation: afSkSweep 1.5s ease-in-out infinite;
}
.af-sk-av { flex: none; width: 22px; height: 22px; border-radius: 50%; }
.af-sk-b { height: 30px; border-radius: 12px; }
.af-sk-row:nth-child(2) .af-sk-b { animation-delay: .12s; }
.af-sk-row:nth-child(3) .af-sk-av, .af-sk-row:nth-child(3) .af-sk-b { animation-delay: .24s; }
@keyframes afSkSweep { 0% { background-position: 130% 0; } 100% { background-position: -70% 0; } }
.af-sk-hint { margin-top: auto; align-self: center; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted, var(--sub)); }
.af-sk-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--primary, #7c5cf0) 28%, transparent); border-top-color: var(--primary, #7c5cf0); animation: afSkSpin .75s linear infinite; }
@keyframes afSkSpin { to { transform: rotate(360deg); } }

/* ===== 弹窗翻新（添加成员/新建群/组建军团）：导语+高级折叠+挑人副标 ===== */
.council-modal-box .cf-lead { margin: 0 0 2px; font-size: 12px; line-height: 1.7; color: var(--sub); }
.council-field > span small { display: block; margin-top: 1px; font-size: 10px; font-weight: 400; color: var(--text-muted, var(--sub)); opacity: .8; }
.council-field > span { display: flex; flex-direction: column; }
.council-picks-col { flex-direction: column; display: flex; gap: 5px; max-height: 220px; overflow-y: auto; }
.council-picks .pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; text-align: left; }
.council-picks .pick-name { font-size: 12px; }
.council-picks .pick-sub { font-size: 10px; opacity: .65; font-weight: 400; }
.council-picks .cf-empty-hint, .cf-empty-hint { font-size: 11px; color: var(--sub); padding: 8px 2px; }

/* ===== 「＋创建」三选一弹窗：角色/群聊/军团三个入口卡片 ===== */
.council-modal-create { max-width: 430px; }
.cmc-list { gap: 8px; padding-top: 6px; }
.cmc-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-raised, rgba(255,255,255,.03)) 60%, transparent);
  color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, background .15s, transform .12s; }
.cmc-item:hover { border-color: var(--primary, #8fb0ff); background: color-mix(in srgb, var(--primary, #8fb0ff) 8%, transparent); transform: translateY(-1px); }
.cmc-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: var(--primary, #8fb0ff); background: color-mix(in srgb, var(--primary, #8fb0ff) 14%, transparent); }
.cmc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmc-tx b { font-size: 13.5px; }
.cmc-tx small { font-size: 11px; color: var(--sub); line-height: 1.5; }
.cmc-go { flex: none; font-size: 18px; color: var(--sub); opacity: .7; }

/* ===== 分身申请单（plugin.request 审批条，应用插件页插件区上沿） ===== */
.plg-reqs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.plg-req { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary, #8fb0ff) 30%, var(--line)); background: color-mix(in srgb, var(--primary, #8fb0ff) 7%, transparent); }
.plg-req-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: var(--primary, #8fb0ff); background: color-mix(in srgb, var(--primary, #8fb0ff) 14%, transparent); }
.plg-req-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plg-req-tx b { font-size: 12.5px; }
.plg-req-tx small { font-size: 11px; color: var(--sub); line-height: 1.5; word-break: break-all; }
.plg-req-url { opacity: .75; }
.plg-req-btns { flex: none; display: flex; gap: 8px; }
