/* ═══════════════════════════════════════════════════════════════════════════
 * 大王山 Design Tokens · 全局视觉规范（基于北极星卡基准 · v1.2）
 *
 * 层级口诀：hero (焦点大字) → kpi (次级大字) → strong (主数值) →
 *           primary (正文) → label (卡片标题/标签) → micro (最小字)
 *
 * 颜色层级：hero → strong → primary → secondary → muted → faint
 * ═══════════════════════════════════════════════════════════════════════════ */
/* ── CSS 变量定义（2026-04-20 P0b · 从 #dws-fullscreen 提升到 :root · body 下弹窗可达） ── */
:root {
    /* 字号 · 6 档（全页统一）*/
    --fs-hero: 32px;       /* 焦点大字 · 效率综合 Hero */
    --fs-kpi: 20px;        /* 次级大字 · 北极星 ⭐ / 图标强调 */
    --fs-strong: 14px;     /* 主数值 · north-state / mini-val */
    --fs-primary: 12px;    /* 正文 · card body */
    --fs-label: 10px;      /* 卡片标题 / 标签 / hint */
    --fs-micro: 9px;       /* gauge label / 最小字 / 时间戳 */

    /* z-index 分层 · 弹窗三柜契约（2026-04-20 大王口述 · P4 Token 冻结）
       口诀：tooltip (瞬态悬浮) < popover-overlay < popover (浮层) < modal (全屏遮罩)
       页内布局层保持 20-50 · 卡片层保持 30-200 · 本 token 仅管弹窗体系 */
    --dws-z-tooltip: 900;           /* 4 个 hover/detail card · 瞬态悬浮 */
    --dws-z-popover-overlay: 1099;  /* galaxy-card-overlay 轻遮罩 */
    --dws-z-popover: 1100;          /* galaxy-floating-card · kf-eff-fallback-popover */
    --dws-z-modal: 1200;            /* mind-full-drawer · 全屏 modal */

    /* 圆角 · 三柜规范（2026-04-20 大王口述 · P4b · 五档收敛到三档） */
    --dws-tooltip-radius: 10px;     /* hover/detail card · 瞬态卡 */
    --dws-popover-radius: 14px;     /* galaxy/eff/chat popover · 浮层卡 */
    --dws-modal-radius: 16px;       /* mind-full-card · 全屏 modal */

    /* 字重 · 3 档 */
    --fw-strong: 700;
    --fw-medium: 600;
    --fw-normal: 400;

    /* 文本颜色 · 6 级层次（由亮到暗） */
    --text-hero: #c084fc;        /* 主紫 · 焦点 */
    --text-strong: #e2e8f0;      /* 近白 · 主数值 */
    --text-primary: #cbd5e1;     /* 亮灰 · 正文 */
    --text-secondary: #94a3b8;   /* 中灰 · 标签/hint */
    --text-muted: #64748b;       /* 深灰 · 次要 */
    --text-faint: #475569;       /* 最弱 · 时间戳/编号 */
    --text-title: #c4b5fd;       /* 卡片标题紫（柔） */
    --text-title-muted: #8b82a8; /* 卡片标题紫灰（北极星基准） */
    --text-badge: #d8ccff;       /* 标题 badge 浅紫 */

    /* 强调色 · 语义色板 */
    --ac-purple: #c084fc;
    --ac-violet: #a78bfa;
    --ac-green: #4ade80;
    --ac-amber: #f59e0b;
    --ac-red: #f87171;
    --ac-blue: #60a5fa;
    --ac-cyan: #06b6d4;
    --ac-pink: #f472b6;
    --ac-emerald: #10b981;

    /* 卡片容器（北极星基准） */
    --card-bg: rgba(18,14,34,0.78);
    --card-border: 1px solid rgba(139,92,246,0.14);
    --card-radius: 10px;
    --card-padding: 10px;

    /* 子卡 / chip / gauge 容器 */
    --chip-bg: rgba(255,255,255,0.03);
    --chip-border: 1px solid rgba(139,92,246,0.08);
    --chip-radius: 8px;
    --chip-padding: 8px 6px;

    /* 分隔线 */
    --divider: 1px solid rgba(255,255,255,0.06);
    --divider-soft: 1px solid rgba(148,163,184,0.08);

}

/* 规范化 typography 工具类（2026-04-20 P6a 扩作用域覆盖 body 下弹窗） */
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-hero    { font-size: var(--fs-hero);    font-weight: var(--fw-strong); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-kpi     { font-size: var(--fs-kpi);     font-weight: var(--fw-strong); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-strong  { font-size: var(--fs-strong);  font-weight: var(--fw-strong); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-primary { font-size: var(--fs-primary); font-weight: var(--fw-normal); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-label   { font-size: var(--fs-label);   font-weight: var(--fw-medium); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-fs-micro   { font-size: var(--fs-micro);   font-weight: var(--fw-normal); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-hero      { color: var(--text-hero); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-strong    { color: var(--text-strong); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-primary   { color: var(--text-primary); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-secondary { color: var(--text-secondary); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-muted     { color: var(--text-muted); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-faint     { color: var(--text-faint); }
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover) .dws-tx-title     { color: var(--text-title); }

/* 大王山全屏模式：禁止浏览器级滚动条，页面自适应 */
html, body { overflow: hidden !important; height: 100vh !important; }
.main-content { padding: 0 !important; margin: 0 !important; min-height: auto !important; overflow: hidden !important; }
#dazhi-float-wrap { display: none !important; }
/* 全局禁止文本选中，输入区域放行 */
#dws-fullscreen, #dws-fullscreen * { user-select: none; -webkit-user-select: none; }
#dws-fullscreen input, #dws-fullscreen textarea, #dws-fullscreen code,
#dws-fullscreen pre, #dws-fullscreen .selectable { user-select: text; -webkit-user-select: text; }
/* 大王山页内滚动条：只约束 #dws-fullscreen 内部，避免影响全局浮窗 */
#dws-fullscreen,
#dws-fullscreen * { scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.2) transparent; }
#dws-fullscreen::-webkit-scrollbar,
#dws-fullscreen *::-webkit-scrollbar { width: 5px; height: 5px; }
#dws-fullscreen::-webkit-scrollbar-thumb,
#dws-fullscreen *::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 3px; }
#dws-fullscreen::-webkit-scrollbar-thumb:hover,
#dws-fullscreen *::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.4); }
#dws-fullscreen::-webkit-scrollbar-track,
#dws-fullscreen *::-webkit-scrollbar-track { background: transparent; }

#dws-fullscreen {
    width: 100%;
    height: calc(100vh - 56px);
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, #0f0a1a 0%, #080810 60%, #050508 100%);
}

/* ── HUD 标题叠加（3s 渐隐，hover 再现） ── */
#dws-hud-title {
    position: absolute;
    top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 25;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease;
    text-align: center;
}
#dws-hud-title.faded { opacity: 0; }
#dws-fullscreen:hover #dws-hud-title.faded { opacity: 0.7; }
#dws-hud-title h1 {
    margin: 0; font-size: var(--fs-kpi); font-weight: 600;
    color: rgba(196, 181, 253, 0.85);
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}
#dws-hud-title p {
    margin: 4px 0 0; font-size: var(--fs-primary);
    color: rgba(160, 160, 180, 0.6);
    letter-spacing: 0.5px;
}
/* 左上功能按钮（天观 + 全屏） */
#dws-celestial-btn,
#dws-fs-btn {
    position: absolute;
    top: 14px;
    z-index: 35;
    background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.25);
    border-radius: 8px; padding: 6px 10px; color:var(--text-title);
    cursor: pointer; font-size: var(--fs-strong); line-height: 1;
    backdrop-filter: blur(8px); transition: all 0.2s;
}
#dws-celestial-btn { left: 14px; }
#dws-fs-btn { left: 84px; }
#dws-celestial-btn:hover,
#dws-fs-btn:hover { background: rgba(139,92,246,0.3); }

/* ── 旧图例样式已迁移至 #capability-overview ── */

/* ── 效率仪表行 ── */
.kf-eff-row { border-bottom: none !important; }
.kf-trend { font-size: var(--fs-primary); margin-left: 3px; }
.kf-maturity-val { font-size: var(--fs-strong) !important; letter-spacing: 1px; }

/* ── 能力总览 Tab 面板（替代旧九链+技能树） ── */
#capability-overview {
    position: absolute;
    bottom: 16px; left: 16px;
    z-index: 25;
    width: 280px;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: var(--fs-primary);
    transition: all 0.3s ease;
    user-select: none;
    overflow: hidden;
}
#capability-overview.collapsed { max-height: 36px; }
#capability-overview .co-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
#capability-overview .co-header span:first-child { color:var(--text-title); font-weight: 600; font-size: var(--fs-primary); }
#capability-overview .co-toggle { color:var(--text-muted); font-size: var(--fs-label); transition: transform 0.2s; }
#capability-overview.collapsed .co-toggle { transform: rotate(-90deg); }
#capability-overview .co-tabs {
    display: none; border-bottom: 1px solid rgba(255,255,255,0.06);
}
#capability-overview .co-tabs.visible {
    display: flex;
}
#capability-overview .co-tab {
    flex: 1; text-align: center; padding: 6px 0; font-size: var(--fs-primary);
    color:var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
#capability-overview .co-tab.active { color:var(--text-title); border-bottom-color: #a855f7; }
#capability-overview .co-body {
    max-height: 360px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.2) transparent;
}
#capability-overview .co-body::-webkit-scrollbar { width: 3px; }
#capability-overview .co-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }
.co-pane { display: none; padding: 10px 14px; }
.co-pane.active { display: block; }

/* 九链 Tab 内容 */
.co-chain-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px;
}
.co-chain-row {
    display: flex; align-items: center; gap: 6px; font-size: var(--fs-primary); white-space: nowrap; padding: 2px 4px;
    border-radius: 4px; transition: background 0.15s;
}
.co-chain-row[data-chain] { cursor: pointer; }
.co-chain-row[data-chain]:hover { background: rgba(139,92,246,0.15); }
.co-chain-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.co-chain-score { margin-left: auto; font-size: var(--fs-label); font-weight: 600; color:var(--text-muted); font-family: monospace; }
.co-section-label {
    grid-column: 1 / -1; font-size: var(--fs-label); color:var(--text-secondary);
    margin-top: 4px; padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.co-stats-row {
    display: flex; gap: 10px; margin-bottom: 8px; font-size: var(--fs-primary);
}
.co-stats-row .s-m { color: #22c55e; } .co-stats-row .s-e { color: var(--ac-amber); } .co-stats-row .s-v { color:var(--text-muted); }
.co-stats-row b { font-weight: 700; margin-right: 1px; }

/* 技能树 Tab 内容 */
.sr-total { font-size: var(--fs-primary); font-weight: 600; color: var(--text-hero); margin-bottom: 8px; text-align: center; }
.sr-canvas-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
.sr-dim-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sr-dim-label { font-size: var(--fs-primary); font-weight: 500; }
.sr-dim-score { font-size: var(--fs-label); font-weight: 600; }

/* ── 页面中下方 stack · 收纳 kernel-feed 详情五件套 + 态势胶囊条 ── */
#dws-bottom-stack {
    position: absolute;
    /* 底部居中 · 不再左锚定（避免 left:452+right:416 在窄屏下把卡片挤到 <640 触发单列回退） */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 12px;
    width: min(760px, calc(100vw - 48px));
    max-width: 760px;
    z-index: 20;
    max-height: 36vh;
    min-height: 96px;
    display: flex; flex-direction: column;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
    overflow: hidden;
    pointer-events: auto;
    color: #c8c8d0;
    font-size: var(--fs-primary);
    transition: opacity 0.3s ease;
    /* 容器查询：布局只看卡片自身宽度 · 不被视口误触发单列回退 */
    container-type: inline-size;
    container-name: dws-stack;
}
#dws-bottom-stack-header {
    padding: 5px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(15,10,25,0.55);
    flex: 0 0 auto;
}
#dws-bottom-stack-body {
    padding: 0;
    overflow-y: auto;
    flex: 1 1 auto;
}
/* 原先这里有 `#dws-bottom-stack-body > #kf-kernel-details { display:block; padding:0 }`
 * 2 id 特异度会碾压下方 `.kf-details-grid` 的 display:grid/padding · 导致双列失效、
 * 巡检掉到第三行。整条移除 · 让 `.kf-details-grid` 自己的 grid + padding 生效。 */
/* #kf-kernel-details · 双列 grid：
 *   左列 ── 行1：5 指数（2×3）· 行2：记分附注 + 群生命（纵向叠）
 *   右列 ── 守护进程巡检（跨两行 · 顶到底贯通）
 *
 * 选择器特异度必须 ≥ `:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-details`
 * （101）· 否则后者 display:flex 会碾压本 grid。这里用双 class 把特异度提到 102。
 */
/* bottom-stack · 1 行 3 列（终端下线 · 与天体仪星盘执行节点重叠）
 * 左 2 列：[记分附注] [群生命]（obs-split 的 2 个活跃子元素 · 终端 hidden sink 不占位）
 * 右 1 列：[守护进程巡检]（摘要行 + 全高滚动列表）
 * obs-split 本身 display: contents · 其子元素直接进入 grid · 各占一格。
 * 行高：minmax(auto, 160px) · 冻结整卡高度 · 巡检内容变多时内部滚动 · 不再撑高整卡（2026-04-18 大王钦点） */
#dws-bottom-stack .kf-kernel-details.kf-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 240px;
    /* 2026-04-19 · 大王钦点迭代：
     *   I 160 → 128 → 100 硬锁 · 结果群生命 pill 3 行内部出滚条
     *   II 再次钦点："向下扩展群生命边界框，滚动条不要"
     * 改为 minmax(0, max-content) · row 按内容自然长；
     * 配合 pill-strip 放开 max-height、patrol-items 自限 max-height 96，
     * 左侧群生命不再内滚，右侧巡检仍在自己窗内滚，整卡按左侧定高。 */
    grid-template-rows: minmax(0, max-content);
    gap: 8px 12px;
    padding: 8px 12px;
    align-items: stretch;
}
/* obs-split 透传为 contents · 活跃子栏各占一格 · term-facts 已 hidden sink 不占位 */
#dws-bottom-stack .kf-kernel-details.kf-details-grid > .kf-kernel-obs-split.kf-details-left-bottom {
    display: contents;
}
#dws-bottom-stack .kf-kernel-obs-split > .kf-eff-annex          { grid-column: 1; grid-row: 1; border-right: none; padding: 0; }
#dws-bottom-stack .kf-kernel-obs-split > .kf-group-life-section { grid-column: 2; grid-row: 1; border-right: none; padding: 0; }
#dws-bottom-stack .kf-kernel-details.kf-details-grid > .kf-details-right-fullheight {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid rgba(148,163,184,0.08);
    padding-left: 12px;
    align-self: stretch;
}
/* 巡检摘要行已合并进 .kf-patrol-title 内（2026-04-19 大王钦点 · 压整卡高）
 * 原独立摘要行 hidden sink · 不占高度 */
#dws-bottom-stack .kf-patrol-summary-row[hidden] {
    display: none !important;
}
/* title 变 inline-flex · 标题 + summary-l0 同一行 · baseline 对齐 */
#dws-bottom-stack .kf-patrol-section .kf-patrol-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 2px;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px dashed rgba(148,163,184,0.08);
}
/* 标题主文字保持 fs-primary（已由下方 bottom-stack 通用规则给到） */
#dws-bottom-stack .kf-patrol-section .kf-patrol-title-lead {
    flex: 0 0 auto;
}
/* 合并后 summary-l0 位于标题行右侧 · 小字次级 · 单行 ellipsis 兜底防溢出 */
#dws-bottom-stack .kf-patrol-section #kf-patrol-summary-l0 {
    font-size: var(--fs-micro);
    font-weight: var(--fw-normal);
    color: var(--text-muted);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* bottom-stack 里的卡标题层级提升 · 让 pill（fs-micro/fs-label）之间有 2 级落差
 * 北极星/监护仪/mind monitor 的 kf-section-title 仍保持 fs-label · 只在 bottom-stack 里强化 */
#dws-bottom-stack .kf-patrol-title,
#dws-bottom-stack .kf-eff-annex-title,
#dws-bottom-stack .kf-group-life-section .kf-patrol-title,
#dws-bottom-stack .kf-term-facts-section .kf-patrol-title {
    font-size: var(--fs-primary);
    color: var(--text-title);
    font-weight: var(--fw-strong);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
/* 标题右侧的时间戳/补充小字保持 micro 等级 */
#dws-bottom-stack .kf-patrol-title > span {
    font-size: var(--fs-micro);
    font-weight: var(--fw-normal);
}
/* 巡检滚动区 · flex: 1 1 0 吃父容器剩余空间 · 不再自撑
 * 2026-04-19 大王钦点最新版：row 改 max-content 后由左侧群生命定高，
 * 右侧 patrol-items 必须限 max-height 防止把 row 拉得比群生命还高。
 * 96px 覆盖通用规则 1842 行的 120px（特异度 1,2,0 > 1,1,0）。
 * 内容行再多 · 也只在这个窗口里上下滚动 · bottom-stack 整卡由左侧决定。 */
#dws-bottom-stack .kf-details-right-fullheight .kf-patrol-items {
    flex: 1 1 0;
    min-height: 0;
    max-height: 96px;
    overflow-y: auto;
}
/* #kf-gl-l0 已降级为 hidden sink（信息已由下方 pill 行 + kf-gl-pill-strip 完整覆盖）
 * 原 .kf-gl-l0-line 视觉样式保留占位备忘 · 若将来恢复显式摘要行可直接复用 */
/* 兼容 sink 强制隐藏 · 防 display: flex/grid 覆盖 [hidden] 的默认 display:none
 * 涉及三处曾被 CSS display 覆盖 · 导致 sink 元素残留可见的锚点：
 *   1) #kf-eff-hero (原效率综合 Hero · 已降级 sink)
 *   2) #kf-l0-eff-line-wrap (原 L0 效率综合小字行 · 已降级 sink)
 *   3) #kf-eff-gauges (原兼容占位 · 含 #kf-e-overall-hero sink)
 *   4) #kf-gl-hero (本轮整合后从 Hero 降级 sink) */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-hero[hidden],
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-eff-line[hidden],
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauges.kf-eff-row[hidden],
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-hero[hidden],
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-term-facts-section[hidden],
#dws-bottom-stack #kf-gl-l0[hidden] {
    display: none !important;
}
/* 容器查询：窄到放不下 3 列就回退单列纵向堆叠 */
@container dws-stack (max-width: 640px) {
    #dws-bottom-stack .kf-kernel-details.kf-details-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }
    #dws-bottom-stack .kf-kernel-obs-split > .kf-eff-annex          { grid-column: 1; grid-row: 1; }
    #dws-bottom-stack .kf-kernel-obs-split > .kf-group-life-section { grid-column: 1; grid-row: 2; }
    #dws-bottom-stack .kf-kernel-details.kf-details-grid > .kf-details-right-fullheight {
        grid-column: 1; grid-row: 3;
        border-left: none; padding-left: 0;
        border-top: 1px solid rgba(148,163,184,0.08); padding-top: 8px;
    }
    #dws-bottom-stack .kf-details-right-fullheight .kf-patrol-items {
        max-height: 110px;
    }
}
/* 态势胶囊条 · 融入 bottom-stack header · 保持原 id 让 signals.js 无缝 */
#genome-tooltip.dws-bottom-genome-tip {
    position: static;
    transform: none;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: rgba(224, 224, 224, 0.7);
    font-size: var(--fs-primary);
    text-align: center;
    pointer-events: none;
    max-width: none;
    line-height: 1.45;
    transition: opacity 0.6s ease;
}
#genome-tooltip.dws-bottom-genome-tip.faded { opacity: 0.4; }
#dws-fullscreen:hover #dws-bottom-stack { opacity: 0.95; }

/* ── 3D 容器 ── */
#genome-container {
    width: 100%; height: 100%;
}

/* ── Floating Card (Phase 1b, replaces drawer) ── */
#galaxy-card-overlay {
    position: fixed; inset: 0; z-index: var(--dws-z-popover-overlay);
    background: transparent;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s ease;
}
#galaxy-card-overlay.active { opacity: 1; pointer-events: auto; }
#galaxy-floating-card {
    position: fixed; z-index: var(--dws-z-popover);
    width: 480px; max-height: 80vh;
    display: flex; flex-direction: column;
    background: rgba(15, 10, 30, 0.85);
    backdrop-filter: blur(12px) saturate(1.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--dws-popover-radius);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 40px rgba(139, 92, 246, 0.15);
    color: var(--text-strong); overflow: hidden;
    perspective: 1000px;
    transform: scale(0.3) rotateY(-15deg) rotateX(10deg);
    opacity: 0; pointer-events: none;
    will-change: transform, opacity;
    transition: transform 0.2s cubic-bezier(0.2,0,0,1), opacity 0.15s ease;
}
#galaxy-floating-card.active {
    transform: scale(1) rotateY(0) rotateX(0);
    opacity: 1; pointer-events: auto;
}
#galaxy-floating-card.closing {
    transform: scale(0.3) rotateY(15deg) rotateX(-10deg);
    opacity: 0;
}
/* ADR-0153 T2-4: prefers-reduced-motion 降级 */
@media (prefers-reduced-motion: reduce) {
    #galaxy-floating-card {
        backdrop-filter: saturate(1.2);
        transition: opacity 0.15s ease;
    }
    #galaxy-floating-card.active { transform: scale(1); }
    #galaxy-floating-card.closing { transform: scale(1); }
}
/* R1 2026-04-20: header + title 合并单栏 · title flex:1 · tabs/close 右贴 */
#galaxy-floating-card .card-header {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    flex-shrink: 0;
}
#galaxy-floating-card .card-tabs { display: flex; gap: 4px; flex-shrink: 0; }
#galaxy-floating-card .card-close {
    background: none; border: none; color:var(--text-secondary); font-size: var(--fs-kpi);
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}
#galaxy-floating-card .card-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
#galaxy-floating-card .card-title {
    flex: 1; min-width: 0;
    font-size: var(--fs-strong); font-weight: 600; color:var(--text-title);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#galaxy-floating-card .card-body {
    padding: 12px 16px 16px;
    flex: 1; min-height: 0;
    overflow-y: auto;
}
#galaxy-floating-card[data-card-size="map"] .card-body {
    overflow-y: auto;
    min-height: 0;
}
#galaxy-floating-card[style*="1040px"] .card-body {
    padding: 12px 14px 16px;
}
/* #galaxy-floating-card .card-body scrollbar 已合并到 P1 统一规则（下方 :is() 块）· 2026-04-20
   原独立 6 行规则只覆盖 .card-body 自身滚动条，不级联子 div（chain_panels.js 动态 innerHTML
   的 max-height + overflow:auto 子容器无覆盖 → 浏览器回退浅色默认条）—— SSOT 统一到 P1 */
#galaxy-floating-card .card-pulse-border {
    position: absolute; inset: -2px; border-radius: 18px; pointer-events: none;
    border: 2px solid transparent;
    animation: cardPulse var(--pulse-speed, 2s) ease-in-out infinite;
}
@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 8px var(--pulse-color, #8b5cf6), inset 0 0 8px var(--pulse-color, #8b5cf6); opacity: 0.6; }
    50% { box-shadow: 0 0 20px var(--pulse-color, #8b5cf6), inset 0 0 20px var(--pulse-color, #8b5cf6); opacity: 1; }
}

/* ── Legacy Drawer 已清理（2026-04-20 P5 · panels/core.js Phase 1b 已弃用）
     #galaxy-drawer / #galaxy-drawer-overlay / .drawer-header / .drawer-close / .drawer-body
     getDrawer/getOverlay 返回 null · DOM 和 CSS 一并下线
     面板内容层（.dw-stat-card / .dw-source-meta / .dw-module-list 等）chain_panels.js 仍在用 · 保留 ── */

/* ── 面板内容组件（floating card body 内复用） ── */
.dw-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.dw-stat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(139,92,246,0.1); border-radius: 10px; padding: 12px 14px; }
.dw-stat-card .val { font-size: var(--fs-kpi); font-weight: 700; color: var(--text-hero); }
.dw-stat-card .lbl { font-size: var(--fs-primary); color:var(--text-muted); margin-top: 2px; }
.dw-stat-card.green .val { color: #22c55e; }
.dw-stat-card.yellow .val { color: var(--ac-amber); }
.dw-stat-card.red .val { color: #ef4444; }
.dw-think-popcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dw-think-hero {
    border: 1px solid rgba(167,139,250,0.22);
    border-radius: 14px;
    padding: 10px;
    background: radial-gradient(circle at 50% 35%, rgba(124,58,237,0.16), rgba(15,10,30,0.38) 48%, rgba(2,6,23,0.28));
}
.dw-think-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}
.dw-think-kicker {
    color: var(--text-muted);
    font-size: var(--fs-label);
    letter-spacing: 0.08em;
}
.dw-think-title {
    color: var(--text-title);
    font-size: var(--fs-strong);
    font-weight: 700;
}
.dw-think-window {
    color: var(--text-secondary);
    font-size: var(--fs-label);
    white-space: nowrap;
}
.dw-think-hero-graph {
    width: 100%;
    min-height: 440px;
    height: 440px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(2,6,23,0.28);
}
.dw-think-console {
    align-items: center;
    margin: 0;
}
.dw-think-console-msg {
    margin-left: auto;
    color: #a78bfa;
    font-size: var(--fs-label);
}
.dw-think-relation-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: var(--fs-label);
}
.dw-think-relation-filter label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.dw-think-score-line {
    color: var(--text-muted);
    font-size: var(--fs-label);
    margin: 4px 0 8px;
}
.dw-think-score-line b {
    color: #c084fc;
}
.dw-think-hero .dw-think-diagnostics {
    margin: 0 0 8px;
}
.dw-think-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}
.dw-think-kpi-grid .dw-stat-card {
    padding: 6px 7px;
    min-width: 0;
}
.dw-think-kpi-grid .dw-stat-card .val {
    font-size: var(--fs-strong);
    line-height: 1.05;
}
.dw-think-kpi-grid .dw-stat-card .lbl {
    font-size: var(--fs-micro);
    white-space: nowrap;
    letter-spacing: -0.02em;
}
.dw-think-node {
    cursor: pointer;
}
.dw-think-node:hover circle {
    filter: drop-shadow(0 0 8px rgba(192,132,252,0.8));
}
@media (max-width: 860px) {
    .dw-think-hero-graph { min-height: 370px; height: 370px; }
    .dw-think-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
    .dw-think-console-msg { width: 100%; margin-left: 0; }
}
.dw-agent-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(139,92,246,0.08); border-radius: 8px; transition: all 0.2s; }
.dw-agent-card.active { border-color: rgba(139,92,246,0.35); background: rgba(139,92,246,0.08); }
.dw-agent-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex-shrink: 0; }
.dw-agent-dot.active { background: #a855f7; box-shadow: 0 0 6px #a855f7; }
.dw-agent-name { font-weight: 600; color: #e0e0e0; font-size: var(--fs-primary); }
.dw-agent-desc { font-size: var(--fs-primary); color:var(--text-muted); }
.dw-agent-badge { margin-left: auto; font-size: var(--fs-primary); padding: 2px 8px; border-radius: 4px; background: rgba(139,92,246,0.12); color: var(--text-hero); }
.dw-timeline-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.dw-timeline-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--fs-primary); flex-shrink: 0; background: rgba(139,92,246,0.12); }
.dw-timeline-icon.route { background: rgba(59,130,246,0.15); }
.dw-timeline-icon.alert { background: rgba(239,68,68,0.15); }
.dw-timeline-icon.review { background: rgba(34,197,94,0.15); }
.dw-timeline-text { flex: 1; }
.dw-timeline-text .title { font-size: var(--fs-primary); color: #e0e0e0; }
.dw-timeline-text .time { font-size: var(--fs-primary); color:var(--text-muted); }
.dw-session-table { width: 100%; border-collapse: collapse; font-size: var(--fs-primary); }
.dw-session-table th { text-align: left; padding: 6px 8px; color:var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 500; }
.dw-session-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #ccc; }
.dw-source-meta { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(148,163,184,0.12); }
.dw-source-meta-title { font-size: var(--fs-primary); color:var(--text-secondary); margin-bottom: 8px; }
.dw-source-meta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dw-meta-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.16); color:var(--text-primary); font-size: var(--fs-label); }
.dw-progress-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.dw-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a855f7, #6366f1); transition: width 0.5s ease; }
.dw-radar-wrap {
    display: flex; align-items: center; justify-content: center;
    height: 220px; max-height: 220px; flex-shrink: 0;
    margin: 10px 0; padding: 4px; box-sizing: border-box;
}
.dw-radar-wrap canvas { max-width: 100%; max-height: 100%; width: auto !important; height: auto !important; }
.dw-radar-fallback {
    font-size: var(--fs-primary); color:var(--text-muted); margin: 8px 0; padding: 8px 10px;
    background: rgba(255,255,255,0.03); border-radius: 8px; flex-shrink: 0;
}
.dw-module-list { list-style: none; padding: 0; margin: 8px 0; }
.dw-module-list li {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dw-module-list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dw-module-list-title { font-size: var(--fs-primary); color: var(--text-strong); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-module-list-id { font-size: var(--fs-label); color:var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-module-list .rating-badge { flex-shrink: 0; font-size: var(--fs-primary); padding: 2px 10px; border-radius: 4px; font-weight: 600; }
.dw-module-list .rating-A { background: rgba(34,197,94,0.15); color: #22c55e; }
.dw-module-list .rating-B { background: rgba(59,130,246,0.15); color: #3b82f6; }
.dw-module-list .rating-C { background: rgba(245,158,11,0.15); color: var(--ac-amber); }
.dw-module-list .rating-D { background: rgba(239,68,68,0.15); color: #ef4444; }
.dw-control-bar { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-wrap: wrap; gap: 8px; }
.dw-ctrl-btn { background: rgba(139,92,246,0.12); color: var(--text-hero); border: 1px solid rgba(139,92,246,0.25); border-radius: 6px; padding: 6px 14px; font-size: var(--fs-primary); cursor: pointer; transition: all 0.2s; }
.dw-ctrl-btn:hover { background: rgba(139,92,246,0.25); color: #e0e0e0; }
.dw-ctrl-btn:disabled { opacity: 0.5; cursor: wait; }
.dw-ctrl-btn.dw-ctrl-refresh { background: rgba(34,197,94,0.1); color: #22c55e; border-color: rgba(34,197,94,0.25); }
.kf-events-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(148,163,184,0.08); }
.kf-events-list { display: flex; flex-direction: column; gap: 6px; }
.kf-event-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: var(--fs-primary); color:var(--text-primary); }
.kf-event-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: #64748b; }
.kf-event-dot.ok { background: #22c55e; }
.kf-event-dot.info { background: #38bdf8; }
.kf-event-dot.warn { background: #f59e0b; }
.kf-event-time { color:var(--text-secondary); font-size: var(--fs-label); }
.dw-ctrl-select { background: rgba(139,92,246,0.1); color: var(--text-hero); border: 1px solid rgba(139,92,246,0.25); border-radius: 5px; padding: 4px 8px; font-size: var(--fs-primary); cursor: pointer; outline: none; }
.dw-ctrl-select option { background: #1a1428; color: #e0e0e0; }
.dw-ctrl-slider { -webkit-appearance: none; appearance: none; width: 100px; height: 4px; background: rgba(139,92,246,0.2); border-radius: 2px; outline: none; }
.dw-ctrl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #a855f7; cursor: pointer; border: 2px solid rgba(255,255,255,0.2); }
.dw-ctrl-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.dw-ctrl-toggle input { opacity: 0; width: 0; height: 0; }
.dw-ctrl-toggle .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.1); border-radius: 10px; transition: 0.3s; }
.dw-ctrl-toggle .slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; bottom: 2px; background: #888; border-radius: 50%; transition: 0.3s; }
.dw-ctrl-toggle input:checked + .slider { background: rgba(168,85,247,0.4); }
.dw-ctrl-toggle input:checked + .slider::before { transform: translateX(16px); background: #a855f7; }
.dw-action-btn {
    display: inline-block; padding: 8px 20px; border-radius: 8px;
    background: rgba(139,92,246,0.15); color: var(--text-hero);
    border: 1px solid rgba(139,92,246,0.3);
    font-size: var(--fs-primary); cursor: pointer; transition: all 0.2s;
}
.dw-action-btn:hover { background: rgba(139,92,246,0.3); color: #e0e0e0; }

/* ── 调试面板 ── */
#dws-tune-panel { display: none; position: absolute; top: 8px; right: 8px; z-index: 200; width: 320px; max-height: calc(100% - 24px); overflow-y: auto; background: rgba(16,12,30,0.95); border: 1px solid rgba(139,92,246,0.25); border-radius: 10px; padding: 12px; backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
#dws-tune-panel.open { display: block; }
#dws-tune-panel h3 { font-size: var(--fs-strong); color:var(--text-title); margin: 0 0 4px; font-weight: 600; }
#dws-tune-panel .subtitle { font-size: var(--fs-primary); color: #6b6280; margin-bottom: 10px; }
#dws-tune-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
#dws-tune-actions button { flex: 1; min-width: 70px; padding: 6px 0; border-radius: 5px; border: 1px solid rgba(139,92,246,0.3); font-size: var(--fs-primary); cursor: pointer; transition: background 0.2s; }
#dws-tune-actions .save-btn { background: rgba(109,40,217,0.6); color: #fff; border: none; }
#dws-tune-actions .save-btn:hover { background: rgba(109,40,217,0.85); }
#dws-tune-actions .reset-btn { background: rgba(45,37,72,0.8); color: #a89cc8; }
#dws-tune-actions .reset-btn:hover { background: rgba(61,50,96,0.9); color: #d4c4ff; }
#dws-tune-actions .export-btn { background: rgba(30,24,54,0.8); color: #8b82a8; }
#dws-tune-actions .export-btn:hover { background: rgba(45,37,72,0.9); color:var(--text-title); }
#dws-tune-status { font-size: var(--fs-primary); color: var(--ac-green); margin-top: 6px; min-height: 16px; transition: opacity 0.3s; }
#dws-tune-hint { position: absolute; bottom: 8px; right: 8px; z-index: 50; font-size: var(--fs-label); color: rgba(139,92,246,0.35); pointer-events: none; transition: opacity 2s; }

/* ── 左侧栏：系统内核(含本体感知/无明) + 演化待决策（纵向堆叠，待决策下沉）
     2026-04-22 大王口述：卡片上下间距统一 10px · 与右列 12→10 对齐 · 形成一致节律
     2026-04-22 · top 44→46px，与右栈 proprioceptive-card top:46px 对齐，左右同一水平面 ── */
.dws-left-stack {
    position: absolute; top: 46px; left: 16px; z-index: 30;
    width: 420px;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: auto;
}
#dws-evolution-pending.dws-evolution-pending-root {
    flex: 0 0 auto;
    max-height: 240px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(8,8,16,0.92); backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15); border-radius: 12px;
    font-size: var(--fs-primary); color: #c8c8d0;
}
#dws-evolution-pending .dws-evo-inner { padding: 8px 10px 10px; overflow-y: auto; max-height: 220px; }
#dws-evolution-pending .dws-evo-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px; padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
#dws-evolution-pending .dws-evo-title { font-weight: 600; color: var(--text-title); font-size: var(--fs-primary); }
#dws-evolution-pending .dws-evo-refresh {
    font-size: var(--fs-primary); padding: 3px 8px; border-radius: 6px;
    border: 1px solid rgba(139,92,246,0.35); background: rgba(45,37,72,0.6); color:var(--text-title); cursor: pointer;
}
#dws-evolution-pending .dws-evo-card {
    background: rgba(30,24,54,0.55); border-radius: 8px; padding: 8px; margin-bottom: 8px;
    border: 1px solid rgba(139,92,246,0.12);
}
#dws-evolution-pending .dws-evo-card:last-child { margin-bottom: 0; }
#dws-evolution-pending .dws-evo-meta { font-size: var(--fs-label); color:var(--text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
#dws-evolution-pending .dws-evo-body { line-height: 1.45; color: var(--text-strong); margin-top: 4px; word-break: break-word; }
#dws-evolution-pending .dws-evo-actions { display: flex; gap: 6px; margin-top: 8px; }
#dws-evolution-pending .dws-evo-actions button {
    flex: 1; font-size: var(--fs-primary); padding: 5px 0; border-radius: 6px; cursor: pointer; border: none;
}
#dws-evolution-pending .dws-evo-accept { background: rgba(34,197,94,0.35); color: #bbf7d0; }
#dws-evolution-pending .dws-evo-reject { background: rgba(239,68,68,0.25); color: #fecaca; }
#dws-evolution-pending .dws-evo-empty { color:var(--text-muted); font-size: var(--fs-primary); padding: 4px 0; }
#dws-evolution-pending .dws-evo-msg { font-size: var(--fs-primary); margin-top: 6px; color: #86efac; }
#dws-evolution-pending .dws-obs-pill { font-size: var(--fs-label); }

/* ── 系统内核实时面板（左上角） ── */
#dws-kernel-feed {
    position: relative; top: auto; left: auto;
    width: 100%;
    background: rgba(8,8,16,0.88); backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15); border-radius: 12px;
    font-size: var(--fs-primary); color: #c8c8d0; overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s;
    display: flex; flex-direction: column;
}

/* 左栈结构卡统一：结构容器用系统内核深紫玻璃；强语义色只留给枝叶/状态文本。 */
#dws-kernel-feed,
#dws-north-card,
#dws-evolution-pending.dws-evolution-pending-root,
.dws-kg-gate-capsule {
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15);
    box-shadow: inset 0 0 18px rgba(99, 102, 241, 0.06), 0 0 12px rgba(139, 92, 246, 0.04);
}

#kf-wuming-section [id^="kf-wm-"] {
    font-size: var(--fs-primary) !important;
}
#kf-793-governance-stack {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#kf-793-root-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#kf-793-root-section .dws-793-root-note {
    color: rgba(148, 163, 184, 0.88);
    font-size: var(--fs-label);
    line-height: 1.35;
    padding-left: 2px;
}
#kf-wuming-section,
#kf-kg-section {
    margin: 0;
    padding: 0;
    border-top: none;
}
#kf-wuming-section > div:first-child > span:first-child {
    color: var(--text-title) !important;
}
#dw-thinking-quick {
    background: rgba(30, 27, 75, 0.42) !important;
    border-color: rgba(244, 114, 182, 0.32) !important;
    color: rgba(226, 232, 240, 0.94) !important;
    box-shadow: none !important;
}
/* 弹窗入口统一为圆角矩形；纯状态短标签才继续使用胶囊。 */
#dw-firewall-quick,
#dw-thinking-quick,
#dws-north-card .dws-context-gain-title-pill,
#server-pulse-settings-anchor .sp-chip {
    border-radius: 8px !important;
}
#server-pulse-settings-anchor .sp-chip {
    min-height: 24px;
}

/* ── 右上角独立北极星卡片 ── */
#dws-north-card {
    position: absolute;
    top: 46px;
    right: 16px;
    z-index: 31;
    width: 360px;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
    padding: 10px 12px;
}
#dws-north-card .kf-star-section {
    /* 2026-04-22 · 节律统一：北极星→北斗分隔统一 10px
       border-top 前后各 5px，视觉总 10px，与左栈/右栈卡间距 10px 形成一致节律 */
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#dws-north-card .kf-section-title {
    margin-bottom: 8px;
}
#dws-north-card .dws-north-title-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
#dws-north-card .dws-context-gain-title-pill {
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34,197,94,0.45), rgba(20,184,166,0.35));
    color: #fff;
    border: 1px solid rgba(34,197,94,0.32);
    font-size: var(--fs-label);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
#dws-north-card .dws-context-gain-title-pill:hover {
    border-color: rgba(34,197,94,0.56);
    box-shadow: 0 0 10px rgba(34,197,94,0.18);
}
#dws-north-card .dws-context-gain-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 4px rgba(148,163,184,0.8);
}
#dws-north-card .dws-north-l1 {
    margin: 6px 0 0;
}
#dws-north-card .dws-north-pill-toggle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
#dws-north-card .dws-north-pill-toggle-row #kf-north-pills.dws-obs-pill-row {
    margin-top: 0;
    flex: 1;
    min-width: 0;
}
#dws-north-card .dws-north-pill-toggle-row .dws-l2-toggle {
    flex-shrink: 0;
}
#dws-north-card .dws-kernel-governance-hint,
#dws-north-card .dws-north-l1-text {
    margin: 0 0 4px;
    font-size: var(--fs-label);
    line-height: 1.4;
    color: rgba(196, 181, 253, 0.58);
    word-break: break-word;
}
#dws-north-card .dws-l2-toggle {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 6px;
    color: rgba(196, 181, 253, 0.85);
    font-size: var(--fs-micro);
    padding: 3px 8px;
    cursor: pointer;
    user-select: none;
}
#dws-north-card .dws-l2-toggle:hover {
    background: rgba(139, 92, 246, 0.2);
}
#dws-north-card .dws-l3-evidence {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(18, 14, 34, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.12);
    font-size: var(--fs-micro);
    line-height: 1.45;
    color: rgba(148, 163, 184, 0.92);
}
#dws-north-card .dws-l3-evidence .dws-evidence-line {
    margin: 0 0 4px;
}
#dws-north-card .dws-l3-evidence .dws-evidence-line:last-child {
    margin-bottom: 0;
}
#dws-north-card .dws-l3-evidence code {
    font-size: var(--fs-micro);
    color: rgba(167, 139, 250, 0.9);
    word-break: break-all;
}

.dws-kg-gate-capsule {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px 6px;
    margin-top: 8px;
    padding: 8px 9px;
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
}
#kf-kg-section .dws-kg-gate-capsule {
    margin-top: 0;
}
.dws-kg-gate-title {
    display: inline-flex;
    align-items: center;
    grid-column: span 2;
    gap: 5px;
    padding: 0 2px;
    color: rgba(191, 219, 254, 0.86);
    font-size: var(--fs-primary);
    font-weight: 700;
    white-space: nowrap;
}
.dws-kg-gate-title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.9);
}
.dws-793-engine-card {
    appearance: none;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(139, 92, 246, 0.12));
    color: rgba(226, 232, 240, 0.94);
    cursor: pointer;
    text-align: left;
}
#kf-793-root-section .dws-793-engine-card {
    width: 100%;
}
.dws-793-engine-card:hover {
    border-color: rgba(147, 197, 253, 0.56);
    box-shadow: 0 0 14px rgba(96, 165, 250, 0.14);
}
.dws-793-engine-name {
    color: #bfdbfe;
    font-size: var(--fs-primary);
    font-weight: 800;
    white-space: nowrap;
}
.dws-793-engine-subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(203, 213, 225, 0.78);
    font-size: var(--fs-label);
}
.dws-kg-gate-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 999px;
    color: rgba(221, 214, 254, 0.9);
    background: rgba(30, 27, 75, 0.42);
    font-size: var(--fs-label);
    font-family: inherit;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.dws-kg-gate-pill--util {
    grid-column: span 2;
    border-radius: 10px;
    padding: 3px 12px;
}
.dws-kg-gate-pill--ok {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.32);
}
.dws-kg-gate-pill--watch {
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.34);
}
.dws-kg-gate-pill--alert {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.38);
}
.dws-kg-gate-pill--muted {
    color: rgba(203, 213, 225, 0.86);
}
@media (max-width: 460px) {
    .dws-kg-gate-capsule {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.dws-kg-gate-badge {
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.92);
    background: rgba(15, 23, 42, 0.56);
    font-size: 10px;
    font-weight: 700;
}
.dws-kg-gate-badge--ok { color: #4ade80; }
.dws-kg-gate-badge--watch { color: #fbbf24; }
.dws-kg-gate-badge--alert { color: #f87171; }
.dws-kg-gate-badge--muted { color: rgba(226, 232, 240, 0.82); }

/* ── KG 利用率浮卡图表样式 ──────────────────────────────── */
.kg-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.kg-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 56px;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.kg-bar-label {
    color: rgba(203, 213, 225, 0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}
.kg-bar-track {
    height: 10px;
    background: rgba(30, 27, 75, 0.5);
    border-radius: 5px;
    overflow: hidden;
}
.kg-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
}
.kg-bar-value {
    color: rgba(203, 213, 225, 0.6);
    font-size: 10px;
    text-align: right;
}
.kg-timeline {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    overflow-x: auto;
    padding-bottom: 4px;
}
.kg-tl-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
    gap: 2px;
}
.kg-tl-bar {
    width: 18px;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}
.kg-tl-label {
    font-size: 9px;
    color: rgba(203, 213, 225, 0.5);
}
.kg-tl-count {
    font-size: 9px;
    color: rgba(203, 213, 225, 0.7);
    font-weight: 600;
}
.dws-kg-gate-pill:hover {
    border-color: rgba(147, 197, 253, 0.62);
    box-shadow: 0 0 10px rgba(147, 197, 253, 0.18);
    transform: translateY(-1px);
}
.dws-kg-gate-pill:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.72);
    outline-offset: 2px;
}

.dw-kg-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: rgba(226, 232, 240, 0.96);
}
.dw-kg-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--kg-accent, #60a5fa) 36%, transparent);
    border-radius: 12px;
    background:
        radial-gradient(circle at 8% 30%, color-mix(in srgb, var(--kg-accent, #60a5fa) 18%, transparent), transparent 34%),
        rgba(15, 23, 42, 0.68);
}
.dw-kg-banner b {
    display: block;
    color: #f8fafc;
    font-size: var(--fs-primary);
}
.dw-kg-banner span,
.dw-kg-banner em {
    display: block;
    margin-top: 3px;
    color: rgba(148, 163, 184, 0.9);
    font-size: var(--fs-label);
    font-style: normal;
}
.dw-kg-hero-graph {
    min-height: 360px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 48%, rgba(59, 130, 246, 0.12), transparent 45%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.9));
    overflow: hidden;
}
.dw-kg-hero-graph--real svg {
    display: block;
}
.dw-kg-edge line {
    stroke: rgba(148, 163, 184, 0.30);
    stroke-width: 1.2;
}
.dw-kg-edge text {
    fill: rgba(148, 163, 184, 0.74);
    font-size: 10px;
}
.dw-kg-node {
    cursor: pointer;
    outline: none;
}
.dw-kg-node circle {
    stroke-width: 2;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.5));
}
.dw-kg-node.active circle,
.dw-kg-node:focus-visible circle {
    stroke-width: 3;
}
.dw-kg-node text {
    fill: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    pointer-events: none;
}
.dw-kg-node .dw-kg-node-type {
    fill: rgba(148, 163, 184, 0.9);
    font-size: 9px;
    font-weight: 600;
}
.dw-kg-console {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.42);
}
.dw-kg-current {
    padding: 3px 9px;
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 999px;
    color: rgba(191, 219, 254, 0.95);
    background: rgba(30, 41, 59, 0.66);
    font-size: var(--fs-label);
    font-weight: 700;
}
.dw-kg-input,
.dw-kg-select {
    min-height: 30px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.88);
    color: #e2e8f0;
    color-scheme: dark;
    font: inherit;
    font-size: var(--fs-label);
}
.dw-kg-input {
    min-width: min(320px, 60vw);
    padding: 5px 9px;
}
.dw-kg-select {
    padding: 5px 28px 5px 9px;
}
.dw-kg-stat-grid {
    margin-bottom: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dw-kg-evidence {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dw-kg-section {
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.48);
}
.dw-kg-section > b {
    display: block;
    margin-bottom: 8px;
    color: rgba(226, 232, 240, 0.96);
    font-size: var(--fs-primary);
}
.dw-kg-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dw-kg-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 999px;
    color: rgba(203, 213, 225, 0.95);
    background: rgba(15, 23, 42, 0.68);
    font-size: var(--fs-label);
}
.dw-kg-chip b {
    color: #93c5fd;
}
.dw-kg-chip.green b {
    color: #4ade80;
}
.dw-kg-chip.yellow b {
    color: #f59e0b;
}
.dw-kg-chip.red b {
    color: #f87171;
}
.dw-kg-focus {
    padding: 10px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.52);
}
.dw-kg-focus-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dw-kg-focus-head b {
    color: #e0f2fe;
    font-size: var(--fs-primary);
}
.dw-kg-focus-head span,
.dw-kg-focus-path {
    color: rgba(148, 163, 184, 0.92);
    font-size: var(--fs-label);
}
.dw-kg-focus-path {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dw-kg-focus-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.dw-kg-focus-edges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.dw-kg-edge-row,
.dw-kg-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 7px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.42);
    color: rgba(203, 213, 225, 0.95);
    font-size: var(--fs-label);
}
.dw-kg-edge-row b,
.dw-kg-action b {
    color: #93c5fd;
    font-weight: 700;
}
.dw-kg-actions {
    border-color: rgba(245, 158, 11, 0.20);
    background: rgba(69, 26, 3, 0.18);
}
.dw-kg-action em {
    color: rgba(148, 163, 184, 0.86);
    font-style: normal;
}
.dw-kg-raw summary {
    cursor: pointer;
    color: #bfdbfe;
    font-size: var(--fs-label);
    font-weight: 700;
}
.dw-kg-raw pre {
    max-height: 280px;
    margin: 8px 0 0;
    overflow: auto;
    color: rgba(203, 213, 225, 0.92);
    white-space: pre-wrap;
    font-size: 11px;
}
.dw-kg-row-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 360px;
    overflow: auto;
}
@media (max-width: 760px) {
    .dw-kg-focus-edges {
        grid-template-columns: 1fr;
    }
}
.dw-kg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    color: rgba(203, 213, 225, 0.94);
    font-size: var(--fs-label);
}
.dw-kg-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dw-kg-row b {
    flex: 0 0 auto;
    color: rgba(167, 139, 250, 0.96);
    font-weight: 700;
}
.dw-kg-empty {
    padding: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    color: rgba(148, 163, 184, 0.95);
    text-align: center;
}

/* ── 右上角独立本体感觉脉搏卡片（2026-04-20 大王口述 · 与北极星位置互换） ── */
#dws-proprioceptive-card {
    position: absolute;
    top: 46px;
    right: 16px;
    z-index: 31;
    width: 360px;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
    padding: 10px 12px;
}
#dws-proprioceptive-card .kf-section-title {
    margin-bottom: 8px;
}

/* ── 右上角体征监护仪卡片（紧贴右上第一张卡下 · 统一卡片语言） ── */
#dws-vitals-monitor {
    position: absolute;
    top: 46px;
    right: 16px;
    z-index: 31;
    width: 360px;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 与系统其他卡片字体保持一致 · 默认 10px/14px 紧凑风 */
    font-size: var(--fs-label);
    color:var(--text-primary);
}
#dws-vitals-monitor b { font-weight: 600; font-size: var(--fs-label); }
#dws-vitals-monitor .vitals-track {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#dws-vitals-monitor .vitals-track:first-child {
    padding-top: 0;
    border-top: none;
}
#dws-vitals-monitor .kf-section-title {
    margin-bottom: 6px;
}
#dws-vitals-monitor .vitals-pill-row {
    margin-top: 0;
    margin-bottom: 6px;
}
#dws-vitals-monitor .vitals-canvas {
    display: block;
    width: 100%;
    height: 52px;
    background: rgba(18,14,34,0.65);
    border: 1px solid rgba(139,92,246,0.12);
    border-radius: 8px;
}
#dws-vitals-monitor .vitals-canvas--us {
    height: 78px;
}
#dws-vitals-monitor .vitals-hotspot-row {
    margin-top: 6px;
}
#dws-vitals-monitor .vitals-pill--dim {
    opacity: 0.7;
    font-family: monospace;
    font-weight: 500;
}
#dws-vitals-monitor .dws-north-l1-text {
    margin: 6px 0 0;
    font-size: var(--fs-label);
    line-height: 1.4;
    color: rgba(196, 181, 253, 0.58);
}

/* ── 右侧心智监护仪卡片（紧贴体征监护仪下 · 统一卡片语言） ── */
#dws-mind-monitor {
    position: absolute;
    right: 16px;
    z-index: 31;
    width: 360px;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(244,114,182,0.18);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 与系统其他卡片字体保持一致 · 默认 10px/14px 紧凑风 */
    font-size: var(--fs-label);
    color:var(--text-primary);
}

#dws-mind-monitor b { font-weight: 600; font-size: var(--fs-label); }
#dws-mind-monitor .vitals-track {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#dws-mind-monitor .vitals-track:first-child {
    padding-top: 0;
    border-top: none;
}
#dws-mind-monitor .kf-section-title {
    margin-bottom: 6px;
}
#dws-mind-monitor .vitals-pill-row {
    margin-top: 0;
    margin-bottom: 6px;
}
#dws-mind-monitor .vitals-canvas {
    display: block;
    width: 100%;
    height: 40px;
    background: rgba(18,14,34,0.65);
    border: 1px solid rgba(244,114,182,0.12);
    border-radius: 8px;
}
#dws-mind-monitor .vitals-pill--dim {
    opacity: 0.7;
    font-family: monospace;
    font-weight: 500;
}
#dws-mind-monitor .dws-north-l1-text {
    margin: 6px 0 0;
    font-size: var(--fs-label);
    line-height: 1.4;
    color: rgba(244, 114, 182, 0.55);
}
#dws-mind-monitor .mind-drawer-trigger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
#dws-mind-monitor #mind-full-drawer-btn {
    font-size: var(--fs-primary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(244,114,182,0.35);
    background: rgba(244,114,182,0.08);
    color: #fbcfe8;
    cursor: pointer;
    transition: all 0.15s ease;
}
#dws-mind-monitor #mind-full-drawer-btn:hover {
    background: rgba(244,114,182,0.18);
    border-color: rgba(244,114,182,0.55);
}
#dws-mind-monitor #mind-full-drawer-btn[aria-expanded="true"] {
    background: rgba(244,114,182,0.25);
}

/* ── 心智监护仪 · 全量弹出抽屉 ── */
#mind-full-drawer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--dws-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}
#mind-full-drawer[hidden] {
    display: none !important;
}
.mind-full-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,3,13,0.72);
    backdrop-filter: blur(6px);
    cursor: pointer;
}
.mind-full-card {
    position: relative;
    width: min(880px, 92vw);
    max-height: 82vh;
    background: rgba(14,10,24,0.96);
    border: 1px solid rgba(244,114,182,0.28);
    border-radius: var(--dws-modal-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.mind-full-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(22,14,36,0.8);
}
.mind-full-head #mind-full-title {
    font-weight: 600;
    color: #fbcfe8;
    font-size: var(--fs-strong);
}
.mind-full-close {
    width: 26px; height: 26px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #e9d5ff;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--fs-strong);
    line-height: 1;
}
.mind-full-close:hover {
    background: rgba(244,114,182,0.12);
    border-color: rgba(244,114,182,0.4);
}
.mind-full-body {
    padding: 14px 18px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.mind-full-section {
    padding: 10px 12px;
    background: rgba(30,20,44,0.55);
    border: 1px solid rgba(139,92,246,0.12);
    border-radius: 10px;
}
.mind-full-section--llm {
    grid-column: 1 / -1;
    border-color: rgba(244,114,182,0.25);
    background: rgba(44,22,40,0.55);
}
/* 代码自省（CAD-FL · ADR-0007.1 §J · routing SSOT §3.8）· 跨两列占位，数值走 grid */
#mindf-code-facts { grid-column: 1 / -1; }
#mindf-code-facts.cf-tone-ok { border-color: rgba(139,92,246,0.12); }
#mindf-code-facts.cf-tone-watch { border-color: rgba(250,204,21,0.45); background: rgba(44,38,20,0.55); }
#mindf-code-facts.cf-tone-alert { border-color: rgba(248,113,113,0.55); background: rgba(52,20,22,0.6); }
#mindf-code-facts.cf-tone-muted { opacity: 0.75; }
.mindf-cf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 10px;
    margin-top: 8px;
}
.mindf-cf-cell {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    min-width: 0;
}
.mindf-cf-label {
    font-size: var(--fs-label);
    color: var(--text-secondary);
    font-family: monospace;
}
.mindf-cf-val {
    font-size: var(--fs-primary);
    color: var(--text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#mindf-code-facts.cf-tone-ok .mindf-cf-grid { opacity: 0.75; }
.mind-full-section .kf-section-title {
    margin-bottom: 8px;
}
.mind-full-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    max-height: 180px;
    overflow-y: auto;
}
.mind-full-list li {
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
    font-size: var(--fs-primary);
    color:var(--text-primary);
    line-height: 1.45;
    word-break: break-word;
}
.mind-full-list li:last-child { border-bottom: none; }
.mind-full-list .mind-li-meta {
    font-size: var(--fs-label);
    color:var(--text-secondary);
    margin-right: 6px;
    font-family: monospace;
}
.mind-full-llm-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
}
.mind-full-llm-cell {
    padding: 8px 10px;
    background: rgba(30,20,44,0.7);
    border: 1px solid rgba(244,114,182,0.18);
    border-radius: 8px;
    text-align: center;
}
.mind-full-llm-label {
    font-size: var(--fs-primary);
    color: #f9a8d4;
    font-weight: 600;
}
.mind-full-llm-score {
    font-size: var(--fs-kpi);
    font-weight: 700;
    color: #fbcfe8;
    margin: 4px 0;
    font-family: monospace;
}
.mind-full-llm-reason {
    font-size: var(--fs-label);
    color:var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}
.mind-full-llm-deep {
    margin: 10px 0 0 !important;
    color: rgba(244,114,182,0.65) !important;
}
@media (max-width: 720px) {
    .mind-full-body { grid-template-columns: 1fr; }
    .mind-full-llm-triple { grid-template-columns: 1fr; }
}

/* 大王山观测药丸（北极星 / 内核附注 / 群生命） */
#dws-fullscreen .dws-obs-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
}
#dws-fullscreen .dws-obs-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: var(--fs-label);
    line-height: 1.35;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.45);
    color:var(--text-primary);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#dws-fullscreen .dws-obs-pill--ok {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
}
#dws-fullscreen .dws-obs-pill--watch {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}
#dws-fullscreen .dws-obs-pill--alert {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}
#dws-fullscreen .dws-obs-pill--muted {
    border-color: rgba(100, 116, 139, 0.35);
    background: rgba(15, 23, 42, 0.5);
    color:var(--text-secondary);
    font-weight: 500;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-pill-row {
    margin-top: 0;
    margin-bottom: 6px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-dash-grid .dws-obs-pill-row {
    margin-top: 0;
    flex-wrap: nowrap;
    gap: 4px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-list .dws-obs-pill-row {
    margin-top: 0;
    gap: 4px;
    flex-wrap: nowrap;
}

#dws-kernel-feed.collapsed { max-height: 32px; }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-header {
    padding: 8px 12px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-header span { color: var(--ac-violet); font-weight: var(--fw-medium); font-size: var(--fs-primary); }
/* L0 一眼态势（默认） */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view {
    padding: 6px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
/* 默认四格：历史别名保留 · 实际被 decatet 覆盖为 5 列 × 2 行 · 10 格 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-strip.kf-l0-strip--quartet {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 6px;
}
/* decatet · 系统内核 L0 十宫格（2 行 × 5 列）· 特异度 = 1 id + 2 class = 102 · 覆盖 quartet(101) */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-strip.kf-l0-strip--decatet {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 5px;
    margin-bottom: 6px;
}
@media (max-width: 380px) {
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-strip.kf-l0-strip--quartet {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-strip.kf-l0-strip--decatet {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip .kf-gauge {
    padding: 5px 4px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip .kf-gauge-val {
    font-size: var(--fs-strong);
}
/* decatet 的 gauge 字号适度收敛 · 容纳 5 列 · 用 primary(12) · label(9 保留) */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip.kf-l0-strip--decatet .kf-gauge {
    padding: 4px 3px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip.kf-l0-strip--decatet .kf-gauge-val {
    font-size: var(--fs-primary);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip.kf-l0-strip--decatet .kf-gauge-label {
    font-size: var(--fs-micro);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-compact-view .kf-l0-strip.kf-l0-strip--decatet .kf-maturity-val {
    font-size: var(--fs-label); /* "第X级" 文字多 · 降到 label 级 */
}
/* decatet · 十宫格满编 5×2 · 行 2 首格无需偏移 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-eff-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: var(--fs-label);
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding: 4px 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-eff-lbl {
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-eff-line .kf-l0-eff-val {
    font-weight: var(--fw-strong);
    font-size: var(--fs-primary);
    color: var(--text-hero);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-l0-trend {
    font-size: var(--fs-label);
    color: var(--ac-violet);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-l0-line {
    font-size: var(--fs-label);
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 6px;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-l0-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-summary-l0 {
    font-size: var(--fs-label);
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-details-toggle {
    flex-shrink: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 6px;
    color: rgba(196, 181, 253, 0.92);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    padding: 5px 10px;
    cursor: pointer;
    line-height: 1.2;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-details-toggle:hover {
    background: rgba(139, 92, 246, 0.22);
    border-color: rgba(167, 139, 250, 0.45);
    color: #e9d5ff;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-details[hidden] {
    display: none !important;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-details {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-events-meta-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 12px 6px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-events-meta-bar .dws-l2-toggle {
    font-size: var(--fs-micro);
    padding: 3px 8px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-events-meta {
    padding: 0 12px 8px;
    font-size: var(--fs-micro);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-events-meta[hidden] {
    display: none !important;
}
#dws-kernel-feed #kf-kernel-feed-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-events-meta .dw-source-meta {
    margin-top: 0;
    padding: 8px 10px;
    font-size: var(--fs-micro);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauges {
    display: flex; gap: 8px; padding: 8px 12px; flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
/* 效率行 5 表盘：宽屏一行五格；窄屏网格 3→2 列，避免 flex 换行参差不齐 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauges.kf-eff-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-row .kf-gauge {
    flex: unset;
    min-width: 0;
}
@media (max-width: 560px) {
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauges.kf-eff-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 400px) {
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauges.kf-eff-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 8px;
    }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-row .kf-gauge-val { font-size: var(--fs-strong); }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-row .kf-gauge-label { font-size: var(--fs-micro); }
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauge {
    flex: 1; text-align: center; padding: 6px 4px;
    background: var(--chip-bg);
    border-radius: var(--chip-radius);
    border: var(--chip-border);
    position: relative; overflow: hidden;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauge-val {
    font-size: var(--fs-kpi);
    font-weight: var(--fw-strong);
    line-height: 1.2;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gauge-label {
    font-size: var(--fs-micro);
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: var(--fw-medium);
}
.kf-progress {
    position: absolute; bottom: 0; left: 0; height: 2px;
    width: 0; background: linear-gradient(90deg, #a855f7, #c084fc);
    border-radius: 0 0 8px 8px;
    transition: width 0.3s ease;
}
.kf-progress.active {
    animation: kf-progress-pulse 1.5s ease-in-out infinite;
}
@keyframes kf-progress-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ── 聊天浮窗（宿主自渲染投影，不再直接操控 8099 iframe） ── */
#dws-chat-wrap {
    position: fixed; bottom: 20px; right: 20px; z-index: 200;
}
#dws-chat-btn {
    width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(139,92,246,0.4);
    background: rgba(15,10,26,0.9); color: var(--ac-violet); font-size: var(--fs-kpi);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(139,92,246,0.15); transition: all 0.3s;
}
#dws-chat-btn:hover { border-color: var(--ac-violet); box-shadow: 0 4px 30px rgba(139,92,246,0.3); }
#dws-chat-panel {
    display: none; position: absolute; bottom: 60px; right: 0;
    width: 428px; height: 560px;
    background: rgba(10,8,18,0.95); backdrop-filter: blur(16px);
    border: 1px solid rgba(139,92,246,0.2); border-radius: var(--dws-popover-radius);
    flex-direction: column; overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    transition: width 0.3s, height 0.3s;
    scrollbar-width: none;
}
#dws-chat-panel::-webkit-scrollbar { display: none; }
#dws-chat-panel.open { display: flex; }
#dws-chat-panel.dws-expanded {
    width: min(760px, calc(100vw - 40px)); height: min(84vh, 900px); bottom: 20px; right: 20px;
}
#dws-chat-panel .ch-header {
    padding: 8px 14px; display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid rgba(139,92,246,0.1); flex-shrink: 0;
}
#dws-chat-panel .ch-header h4 { margin: 0; color:var(--text-title); font-size: var(--fs-strong); flex: 1; }
.dws-expand-btn {
    background: none; border: none; color: var(--ac-violet); font-size: var(--fs-strong);
    cursor: pointer; padding: 2px 6px;
}
#dws-chat-panel .ch-close { background: none; border: none; color:var(--text-muted); font-size: var(--fs-kpi); cursor: pointer; }
.dws-sdk-host-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 7px 14px; border-bottom: 1px solid rgba(139,92,246,0.08);
    background: rgba(15, 23, 42, 0.28);
}
.dws-sdk-host-label { font-size: var(--fs-label); color: var(--text-muted); }
.dws-sdk-host-toggle {
    border: 1px solid rgba(148,163,184,0.16); border-radius: 999px;
    background: rgba(15, 23, 42, 0.48); color: var(--text-secondary);
    font-size: var(--fs-label); padding: 4px 10px; cursor: pointer;
}
.dws-sdk-host-toggle.is-on {
    border-color: rgba(6,182,212,0.38); color: #67e8f9; background: rgba(6,182,212,0.12);
}
.dws-sdk-model-select {
    width: 142px; border: 1px solid rgba(148,163,184,0.16); border-radius: 8px;
    background: rgba(15, 23, 42, 0.48); color: var(--text-secondary);
    font-size: var(--fs-label); padding: 4px 8px; outline: none;
}
.dws-sdk-model-select:focus {
    border-color: rgba(6,182,212,0.38); color: #e2e8f0; background: rgba(15, 23, 42, 0.68);
}
.dws-shadow-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    background: linear-gradient(180deg, rgba(14, 12, 26, 0.98), rgba(9, 8, 18, 0.98));
}
.dws-chat-empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #a3acc0;
    min-height: 0;
    flex: 1;
    padding: 28px 24px 18px;
}
.dws-shadow-chat > [hidden] {
    display: none !important;
}
.dws-chat-empty strong {
    color: #dbe7ff;
    font-size: var(--fs-strong);
}
.dws-chat-empty span {
    max-width: 280px;
    font-size: var(--fs-primary);
    line-height: 1.7;
}
.dws-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dws-chat-bubble-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.dws-chat-bubble-row.role-user { align-items: flex-end; }
.dws-chat-role {
    font-size: var(--fs-primary);
    color: #7f8aa3;
}
.dws-chat-bubble {
    max-width: min(92%, 560px);
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(124, 155, 255, 0.14);
    background: rgba(17, 24, 39, 0.88);
    color: #dbe7ff;
    font-size: var(--fs-primary);
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}
.dws-chat-bubble-row.role-user .dws-chat-bubble {
    background: rgba(26, 40, 62, 0.96);
    border-color: rgba(124, 155, 255, 0.22);
}
.dws-chat-bubble-row.role-system .dws-chat-bubble {
    background: rgba(30, 19, 40, 0.92);
    border-color: rgba(167, 139, 250, 0.18);
    color: #d6c6ff;
}
.dws-chat-bubble.is-streaming::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 14px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(124, 155, 255, 0.9);
    animation: dws-chat-caret 1s ease-in-out infinite;
    vertical-align: middle;
}
.dws-chat-composer {
    flex-shrink: 0;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(124, 155, 255, 0.12);
    background: linear-gradient(180deg, rgba(9, 8, 18, 0), rgba(9, 8, 18, 0.98) 24%, rgba(9, 8, 18, 0.98));
}
.dws-chat-input-shell {
    border: 1px solid rgba(124, 155, 255, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 36, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.dws-chat-input-shell:focus-within {
    border-color: rgba(124, 155, 255, 0.34);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}
.dws-chat-input {
    width: 100%;
    min-height: 88px;
    max-height: 180px;
    padding: 12px 12px 10px;
    border: none;
    outline: none;
    resize: vertical;
    background: transparent;
    color: #dbe7ff;
    font-size: var(--fs-primary);
    line-height: 1.6;
    box-sizing: border-box;
}
.dws-chat-input::placeholder { color: #6f8198; }
.dws-chat-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 0 10px 10px;
}
.dws-chat-tip {
    font-size: var(--fs-primary);
    color: #7084a0;
}
.dws-chat-send {
    border: 1px solid rgba(124, 155, 255, 0.22);
    border-radius: 10px;
    background: #111827;
    color: #cbd8ef;
    padding: 7px 14px;
    font-size: var(--fs-primary);
    font-weight: 600;
    cursor: pointer;
}
.dws-chat-send:hover:not(:disabled) {
    background: #162338;
    border-color: #3a4d6b;
}
.dws-chat-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@keyframes dws-chat-caret {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}

/* 大窗 rich：8099 think-stream 事件分区（与 dawangshan_chat.js 对齐，最小样式集） */
.dws-rich-turn {
    width: 100%;
    max-width: min(92%, 720px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 8px;
}
.dws-rich-section-title {
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.65);
    margin-bottom: 4px;
}
.dws-rich-card {
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.72);
    padding: 8px 10px;
}
.dws-rich-card-body {
    font-size: var(--fs-primary);
    line-height: 1.55;
    color: #dbe7ff;
    white-space: pre-wrap;
    word-break: break-word;
}
.dws-rich-thinking .dws-rich-card-body {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--fs-primary);
    color: rgba(186, 200, 230, 0.92);
    max-height: 200px;
    overflow-y: auto;
}
#dws-chat-panel.dws-expanded .dws-rich-thinking .dws-rich-card-body {
    max-height: min(36vh, 320px);
}
.dws-rich-tools ul {
    margin: 4px 0 0 1.1em;
    padding: 0;
    font-size: var(--fs-primary);
    color: #a5b4fc;
    line-height: 1.5;
}
.dws-rich-reply-body {
    font-size: var(--fs-primary);
    line-height: 1.65;
    color: #e8eef9;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    #dws-chat-wrap { right: 12px; bottom: 12px; }
    #dws-chat-panel {
        width: min(430px, calc(100vw - 24px));
        height: min(68vh, 560px);
    }
    #dws-chat-panel.dws-expanded {
        width: min(680px, calc(100vw - 24px));
        height: min(82vh, 760px);
        right: 0;
        bottom: 56px;
    }
}

/* ── 执行实况面板 ── */
.dws-exec-panel {
    margin: 0 8px 6px; border-radius: 8px; overflow: hidden;
    background: rgba(20,16,40,0.85); border: 1px solid rgba(59,130,246,0.3);
    font-size: var(--fs-primary);
}
.dws-exec-header {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; cursor: pointer;
    background: rgba(59,130,246,0.1);
}
.dws-exec-header:hover { background: rgba(59,130,246,0.18); }
.dws-exec-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.dws-exec-dot.is-running {
    background: #3b82f6;
    animation: dws-pulse 1.2s ease-in-out infinite;
}
.dws-exec-dot.is-done { background: #10b981; }
@keyframes dws-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:0.5; transform:scale(1.3); }
}
.dws-exec-title { font-weight: 600; color: #93c5fd; }
.dws-exec-agent {
    background: rgba(59,130,246,0.2); color: #93c5fd;
    padding: 1px 6px; border-radius: 8px; font-size: var(--fs-label);
}
.dws-exec-progress {
    font-family: 'Courier New', monospace; color:var(--text-muted);
    margin-left: auto; font-size: var(--fs-primary);
}
.dws-exec-arrow { color:var(--text-muted); font-size: var(--fs-micro); }
.dws-exec-body { padding: 4px 10px 8px; }
.dws-exec-steps { display: flex; flex-direction: column; gap: 2px; }
.dws-exec-step {
    display: flex; align-items: flex-start; gap: 4px;
    padding: 2px 6px; border-radius: 4px;
}
.dws-exec-step.step-running { background: rgba(59,130,246,0.08); }
.dws-exec-step.step-done { opacity: 0.6; }
.dws-exec-step.step-failed { background: rgba(239,68,68,0.1); }
.dws-exec-step.step-awaiting_confirmation { background: rgba(245,158,11,0.12); }
.dws-step-icon { flex-shrink: 0; }
.dws-step-desc { color: #d0cce0; flex: 1; }
.dws-step-diff {
    font-size: var(--fs-label); background: rgba(10,8,20,0.9); color: #a0e0a0;
    padding: 4px 8px; border-radius: 4px; margin-top: 2px;
    max-height: 80px; overflow: auto; white-space: pre-wrap; width: 100%;
}
.dws-step-error { color: var(--ac-red); font-size: var(--fs-label); }
.dws-exec-actions {
    display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end;
}
.dws-exec-confirm, .dws-exec-reject {
    padding: 4px 12px; border-radius: 6px; border: none;
    font-size: var(--fs-primary); cursor: pointer;
}
.dws-exec-confirm { background: rgba(59,130,246,0.3); color: #93c5fd; }
.dws-exec-confirm:hover { background: rgba(59,130,246,0.5); }
.dws-exec-reject { background: rgba(239,68,68,0.2); color: var(--ac-red); }
.dws-exec-reject:hover { background: rgba(239,68,68,0.35); }

/* ── 系统内核内嵌巡检区域（合并自原巡检卡） ── */
/* 面板宽约 420px：basis 200px×2+gap 会触发 wrap 变纵排；用 1 1 0 + nowrap 保证双栏并排 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 4px 12px 6px;
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
/* 三栏并列：记分附注 | 群生命主药丸带 | 终端（均匀分配剩余宽度） */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split > .kf-eff-annex {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    border-top: none;
    padding: 0 6px 0 0;
    margin: 0;
    align-self: flex-start;
    box-sizing: border-box;
    border-right: 1px solid rgba(148,163,184,0.08);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split > .kf-group-life-section {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    border-top: none;
    padding: 0 6px;
    margin: 0;
    max-height: none;
    overflow: visible;
    align-self: flex-start;
    border-right: 1px solid rgba(148,163,184,0.08);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split > .kf-term-facts-section {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    border-top: none;
    padding: 0 0 0 6px;
    margin: 0;
    align-self: flex-start;
    box-sizing: border-box;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-term-facts-section .kf-patrol-title {
    margin-bottom: 4px;
    font-size: var(--fs-label);
    color: var(--text-title-muted);
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-term-facts-section #kf-gl-workflow-facts {
    font-size: var(--fs-label);
}
/* 群生命：纵向堆叠 — 上主观测满宽两行 · 侧卡已升级到 L0 decatet 第 5 格 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-patrol-title {
    margin-bottom: 4px;
    font-size: var(--fs-label);
    color: var(--text-title-muted);
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-width: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-stack > .kf-gl-dash-grid {
    width: 100%;
    margin-bottom: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-org-facts-col {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    min-width: 0;
    align-items: stretch;
}
/* 原 .kf-gl-org-facts-col 已升级为第 6 格指数卡 + 独立终端栏；保留 DOM 作 sink · 但强制隐藏 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-org-facts-col[hidden] {
    display: none !important;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-sizing: border-box;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card-title {
    font-size: var(--fs-micro);
    color:var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 3px;
    line-height: 1.2;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card-body.kf-gl-list {
    padding: 0;
    margin: 0;
}
/* 群生命主药丸带：允许折成约两行，避免单行挤截断 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-dash-grid {
    display: block;
    margin-bottom: 0;
    min-width: 0;
    align-self: flex-start;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-dash-grid .kf-gl-pill-strip {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: 4px 5px;
    margin: 0;
    min-height: 38px;
    /* 2026-04-19 · 大王钦点"向下扩展边界框，滚动条不要"
     * 原 max-height:56px + overflow-y:auto 强制 2 行 pill 超出就内滚，
     * 改为不锁高度 · 让 pill 行数自然长（卡片整体由 grid row max-content 承接）。
     * overflow-x:hidden 保留防横溢；overflow-y:visible 让内容跟父卡长。 */
    overflow-x: hidden;
    overflow-y: visible;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-dash-grid .kf-gl-pill-strip .dws-obs-pill {
    flex-shrink: 0;
    font-size: var(--fs-micro);
    padding: 2px 7px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 侧卡内药丸允许换行，约两行高，超出可纵滚 */
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card-body .kf-gl-pill-strip {
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px 5px;
    min-height: 38px;
    max-height: 54px;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card-body .kf-gl-pill-strip .dws-obs-pill {
    font-size: var(--fs-micro);
    padding: 2px 7px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-list {
    font-size: var(--fs-micro);
    line-height: 1.35;
    color:var(--text-primary);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split .kf-gl-list {
    max-height: none;
}
@media (max-width: 520px) {
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split {
        flex-wrap: wrap;
    }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-kernel-obs-split > .kf-eff-annex {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        padding-right: 0;
    }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-group-life-section .kf-gl-org-facts-col {
        flex-wrap: wrap;
    }
    :is(#dws-kernel-feed, #dws-bottom-stack) .kf-gl-side-card {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-section {
    padding: 8px 12px; border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-title {
    font-size: var(--fs-label);
    color: var(--text-title-muted);
    margin-bottom: 6px;
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-items {
    max-height: 120px; overflow-y: auto;
    font-size: var(--fs-label);
    color: var(--text-primary);
    display: flex; flex-direction: column; gap: 0; min-height: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex {
    padding: 0;
    border-top: none;
    flex-shrink: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex-title {
    font-size: var(--fs-label);
    color: var(--text-title-muted);
    font-weight: var(--fw-medium);
    letter-spacing: 0.02em;
    text-transform: none;
    margin-bottom: 4px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    min-width: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-next-action {
    margin: 2px 0 8px;
    padding: 7px 9px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(14, 165, 233, 0.08));
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-next-kicker {
    font-size: var(--fs-micro);
    color: var(--ac-amber);
    font-weight: var(--fw-strong);
    letter-spacing: 0.2px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-next-title {
    margin-top: 2px;
    color: var(--text-strong);
    font-size: var(--fs-label);
    font-weight: var(--fw-strong);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-next-meta {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--fs-micro);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex-stack #kf-eff-pills.dws-obs-pill-row {
    margin: 0;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex .kf-eff-pill-row {
    margin-bottom: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-toggle-row {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-toggle-row .dws-l2-toggle {
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-fallback-l1 {
    font-size: var(--fs-label);
    line-height: 1.45;
    color:var(--text-secondary);
    margin: 0 0 4px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex .dws-l2-toggle {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    color: rgba(196, 181, 253, 0.82);
    font-size: var(--fs-micro);
    padding: 4px 8px;
    cursor: pointer;
    user-select: none;
    margin-top: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-annex .dws-l2-toggle:hover {
    background: rgba(139, 92, 246, 0.18);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-fallback-detail {
    display: none !important;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-eff-fallback-l1 {
    display: none !important;
}
/* 效率记分依据：全页浮层，须挂在 #dws-kernel-feed 外（内核卡片 overflow+backdrop 会裁剪 fixed） */
#kf-eff-fallback-popover.kf-eff-fallback-popover {
    position: fixed;
    inset: 0;
    z-index: var(--dws-z-popover);
    pointer-events: none;
}
#kf-eff-fallback-popover.kf-eff-fallback-popover:not([hidden]) {
    pointer-events: auto;
}
#kf-eff-fallback-popover .kf-eff-fallback-popover-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
}
#kf-eff-fallback-popover .kf-eff-fallback-popover-card {
    position: absolute;
    width: min(420px, calc(100vw - 24px));
    max-height: min(72vh, 480px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--dws-popover-radius);
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(15, 10, 26, 0.98);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
#kf-eff-fallback-popover .kf-eff-fallback-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: var(--fs-primary);
    font-weight: 600;
    color:var(--text-title);
    flex-shrink: 0;
}
#kf-eff-fallback-popover .kf-eff-popover-close {
    border: none;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-strong);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--fs-strong);
    line-height: 1;
}
#kf-eff-fallback-popover .kf-eff-popover-close:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fecaca;
}
#kf-eff-fallback-popover .kf-eff-fallback-popover-body {
    padding: 10px 12px 12px;
    overflow-y: auto;
    font-size: var(--fs-label);
    line-height: 1.5;
    color:var(--text-secondary);
    flex: 1 1 auto;
    min-height: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-rows {
    flex: 1; min-height: 0; font-size: var(--fs-label);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-items::-webkit-scrollbar { width: 3px; }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-items::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 2px; }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-row {
    display: flex; align-items: center; gap: 6px; padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03); color: #b0b0b8;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-row:last-child { border-bottom: none; }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-patrol-row.patrol-7 { font-weight: 600; background: rgba(139,92,246,0.1); margin: 0 -12px; padding: 4px 12px; border-radius: 4px; }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-section {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
:is(#dws-kernel-feed, #dws-bottom-stack, #dws-vitals-monitor, #dws-mind-monitor, #mind-full-drawer) .kf-section-title,
#dws-north-card .kf-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-label);
    color: var(--text-title-muted);
    margin-bottom: 6px;
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack, #dws-vitals-monitor, #dws-mind-monitor, #mind-full-drawer) .kf-section-title b,
#dws-north-card .kf-section-title b {
    color: var(--text-badge);
    font-weight: var(--fw-medium);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-card,
#dws-north-card .kf-north-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(18,14,34,0.78);
    border: 1px solid rgba(139,92,246,0.14);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-core,
#dws-north-card .kf-north-core {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(168,139,250,0.18), rgba(18,14,34,0.2) 70%);
    border: 1px solid rgba(139,92,246,0.12);
    min-height: 72px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-star,
#dws-north-card .kf-north-star {
    font-size: var(--fs-kpi);
    filter: drop-shadow(0 0 8px rgba(196,181,253,0.35));
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-state,
#dws-north-card .kf-north-state {
    font-size: var(--fs-strong);
    font-weight: var(--fw-strong);
    color: var(--text-strong);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-reason,
#dws-north-card .kf-north-reason {
    font-size: var(--fs-label);
    color: var(--text-secondary);
    line-height: 1.45;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-north-metrics,
#dws-north-card .kf-north-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-mini,
#dws-north-card .kf-mini {
    padding: 8px 6px;
    border-radius: 8px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(139,92,246,0.08);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-mini-val,
#dws-north-card .kf-mini-val {
    font-size: var(--fs-strong);
    font-weight: var(--fw-strong);
    color: var(--text-strong);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-mini-lbl,
#dws-north-card .kf-mini-lbl {
    margin-top: 2px;
    font-size: var(--fs-label);
    color: var(--text-muted);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-grid,
#dws-north-card .kf-star-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-chip,
#dws-north-card .kf-star-chip {
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(139,92,246,0.08);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-chip.is-healthy,
#dws-north-card .kf-star-chip.is-healthy { border-color: rgba(74,222,128,0.35); }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-chip.is-watch,
#dws-north-card .kf-star-chip.is-watch { border-color: rgba(245,158,11,0.35); }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-chip.is-alert,
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-chip.is-offline,
#dws-north-card .kf-star-chip.is-alert,
#dws-north-card .kf-star-chip.is-offline { border-color: rgba(248,113,113,0.35); }
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-top,
#dws-north-card .kf-star-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-label);
    color:var(--text-primary);
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-name,
#dws-north-card .kf-star-name {
    color: #d8ccff;
    font-weight: 600;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-score,
#dws-north-card .kf-star-score {
    font-size: var(--fs-primary);
    font-weight: 700;
}
:is(#dws-kernel-feed, #dws-bottom-stack) .kf-star-label,
#dws-north-card .kf-star-label {
    margin-top: 3px;
    font-size: var(--fs-label);
    color: #7c8594;
}

/* ═══ Dawangshan 弹窗统一层（P1 滚动条 · P2 关闭按钮 · P3 字体骨架 · P4 token · 2026-04-20）═══ */

/* ── P1 · 滚动条统一 6px 紫 · 覆盖 fullscreen + body 下四个弹窗根 ── */
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}
#galaxy-floating-card .card-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) ::-webkit-scrollbar,
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel)::-webkit-scrollbar,
#galaxy-floating-card .card-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) ::-webkit-scrollbar-track,
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel)::-webkit-scrollbar-track,
#galaxy-floating-card .card-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) ::-webkit-scrollbar-thumb,
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel)::-webkit-scrollbar-thumb,
#galaxy-floating-card .card-body::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
    transition: background 0.2s;
}
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) ::-webkit-scrollbar-thumb:hover,
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel)::-webkit-scrollbar-thumb:hover,
#galaxy-floating-card .card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.55);
}
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel) ::-webkit-scrollbar-corner,
:is(#dws-fullscreen, #galaxy-floating-card, #mind-full-drawer, #kf-eff-fallback-popover, #dws-tune-panel)::-webkit-scrollbar-corner,
#galaxy-floating-card .card-body::-webkit-scrollbar-corner {
    background: transparent;
}

/* ── P2 · 关闭按钮统一（26×26 · 透明底 · hover 紫光 · 圆角 6px） ── */
:is(
    #galaxy-floating-card .card-close,
    .mind-full-close,
    #kf-eff-fallback-popover .kf-eff-popover-close,
    #dws-chat-panel .ch-close
) {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: var(--fs-strong);
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
:is(
    #galaxy-floating-card .card-close,
    .mind-full-close,
    #kf-eff-fallback-popover .kf-eff-popover-close,
    #dws-chat-panel .ch-close
):hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.45);
    color: var(--text-strong);
}

/* ── P3 · 字体骨架统一（弹窗 header/title/body/close 全部锚到 --fs-* 变量） ── */
:is(
    #galaxy-floating-card .card-title,
    .mind-full-head #mind-full-title,
    #kf-eff-fallback-popover .kf-eff-fallback-popover-head,
    #dws-chat-panel .ch-header h4
) {
    font-size: var(--fs-strong);
    font-weight: 600;
}
:is(
    #galaxy-floating-card .card-body,
    .mind-full-body,
    #kf-eff-fallback-popover .kf-eff-fallback-popover-body
) {
    font-size: var(--fs-primary);
    line-height: 1.55;
    color: var(--text-primary);
}

/* ── P3 补 · 弹窗内 chip/badge 微型字号统一（inline font-size:10px 的收编锚点） ── */
#dws-fullscreen .dws-chip-badge {
    font-size: var(--fs-label);
    padding: 1px 4px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
}

/* ── 演化待决策批量管理弹窗 ── 三层结构：fixed容器→absolute遮罩→relative卡片（与#mind-full-drawer同构） */
#dws-evo-batch-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--dws-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dws-evo-batch-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,3,13,0.72);
    backdrop-filter: blur(6px);
    cursor: pointer;
}
.dws-evo-batch-modal {
    position: relative;
    width: min(700px, 94vw); max-height: 80vh;
    background: rgba(14,10,24,0.96);
    border: 1px solid rgba(167,139,250,0.28);
    border-radius: var(--dws-modal-radius);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dws-evo-batch-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(22,14,36,0.8);
    flex-shrink: 0;
}
.dws-evo-batch-title {
    font-weight: 600; color: #c4b5fd; font-size: var(--fs-strong);
}
.dws-evo-batch-close {
    width: 26px; height: 26px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent; color: #e9d5ff;
    border-radius: 6px; cursor: pointer;
    font-size: var(--fs-strong); line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
}
.dws-evo-batch-close:hover {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.45);
}
.dws-evo-batch-body {
    padding: 14px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.dws-evo-batch-body::-webkit-scrollbar { width: 6px; }
.dws-evo-batch-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 3px; }
.dws-evo-batch-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 3px; }
.dws-evo-batch-body::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.55); }
.dws-evo-batch-summary {
    font-size: var(--fs-label); color: var(--text-secondary);
    margin-bottom: 10px;
}
.dws-evo-batch-summary b {
    color: #c4b5fd; font-weight: 700;
}
.dws-evo-batch-table-wrap { overflow-x: auto; }
.dws-evo-batch-table {
    width: 100%; border-collapse: collapse; font-size: var(--fs-primary);
}
.dws-evo-batch-table th {
    text-align: left; padding: 8px 10px;
    color: var(--text-muted); font-size: var(--fs-label);
    border-bottom: 1px solid rgba(167,139,250,0.2);
    font-weight: 600; white-space: nowrap;
}
.dws-evo-batch-table td {
    padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e9d5ff;
}
.dws-evo-batch-table tbody tr:hover { background: rgba(139,92,246,0.08); }
.dws-evo-batch-table tbody tr.dws-evo-batch-row--selected {
    background: rgba(139,92,246,0.12);
}
.dws-evo-batch-table input[type="checkbox"] {
    cursor: pointer; accent-color: #8b5cf6;
}
.dws-evo-batch-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(22,14,36,0.8);
    flex-shrink: 0;
}
.dws-evo-batch-status {
    font-size: var(--fs-label); color: var(--text-secondary);
}
.dws-evo-batch-accept,
.dws-evo-batch-reject,
.dws-evo-batch-cancel {
    font-size: var(--fs-primary); padding: 6px 14px; border-radius: 6px;
    cursor: pointer; font-weight: 600; border: 1px solid;
}
.dws-evo-batch-accept {
    background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); color: #86efac;
}
.dws-evo-batch-accept:hover:not(:disabled) {
    background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.6);
}
.dws-evo-batch-reject {
    background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); color: #fca5a5;
}
.dws-evo-batch-reject:hover:not(:disabled) {
    background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.55);
}
.dws-evo-batch-cancel {
    background: rgba(100,116,139,0.12); border-color: rgba(100,116,139,0.3); color: #94a3b8;
}
.dws-evo-batch-cancel:hover {
    background: rgba(100,116,139,0.22); border-color: rgba(100,116,139,0.5);
}
.dws-evo-batch-accept:disabled,
.dws-evo-batch-reject:disabled {
    opacity: 0.4; cursor: not-allowed;
}
#dws-evolution-pending .dws-evo-refresh:disabled {
    opacity: 0.4; cursor: not-allowed;
}

/* ── 批量操作确认弹窗 ── 与批量管理弹窗同风格：fixed容器→absolute遮罩→relative卡片 */
.dws-evo-batch-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: calc(var(--dws-z-modal) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dws-evo-batch-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,3,13,0.72);
    backdrop-filter: blur(6px);
}
.dws-evo-batch-confirm-card {
    position: relative;
    width: min(420px, 90vw);
    background: rgba(14,10,24,0.96);
    border: 1px solid rgba(167,139,250,0.28);
    border-radius: var(--dws-modal-radius);
    padding: 28px 28px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    text-align: center;
}
.dws-evo-batch-confirm-icon {
    font-size: 42px;
    margin-bottom: 10px;
}
.dws-evo-batch-confirm-msg {
    font-size: var(--fs-strong);
    color: #e9d5ff;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-wrap;
}
.dws-evo-batch-confirm-msg b {
    color: #fbbf24;
}
.dws-evo-batch-confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.dws-evo-batch-confirm-btns button {
    font-size: var(--fs-primary);
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid;
    transition: background 0.15s, border-color 0.15s;
}
.dws-evo-batch-confirm-cancel {
    background: rgba(100,116,139,0.12);
    border-color: rgba(100,116,139,0.3);
    color: #94a3b8;
}
.dws-evo-batch-confirm-cancel:hover {
    background: rgba(100,116,139,0.22);
    border-color: rgba(100,116,139,0.5);
}
.dws-evo-batch-confirm-ok {
    background: rgba(139,92,246,0.18);
    border-color: rgba(167,139,250,0.4);
    color: #c4b5fd;
}
.dws-evo-batch-confirm-ok:hover {
    background: rgba(139,92,246,0.3);
    border-color: rgba(167,139,250,0.6);
}
