

      .planb-composer[data-lingee-enhanced="true"] {
        position: relative;
        padding: 18px 12px 12px;
        border-radius: 24px;
        border-color: rgba(15, 23, 42, 0.09);
        box-shadow: 0 10px 28px rgba(30, 64, 175, 0.06);
      }
      .planb-composer[data-lingee-enhanced="true"]:focus-within {
        border-color: rgba(37, 99, 235, 0.28);
        box-shadow: 0 12px 34px rgba(30, 64, 175, 0.09), 0 0 0 3px rgba(37, 99, 235, 0.05);
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__input {
        min-height: 104px;
        max-height: 224px;
        padding: 2px 12px 10px;
        overflow-y: auto;
        line-height: 26px;
        resize: none;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar {
        min-height: 38px;
        margin-top: 8px;
        gap: 3px;
      }
      .planb-composer[data-lingee-enhanced="true"] [data-lingee-hidden="true"] {
        display: none !important;
      }
      .lingee-context-row {
        display: none;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 12px 10px;
      }
      .lingee-context-row[data-visible="true"] {
        display: flex;
      }
      .lingee-context-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        max-width: 240px;
        height: 28px;
        padding: 0 7px 0 9px;
        border-radius: 8px;
        background: #f1f5f9;
        color: #334155;
        font-size: 13px;
        font-weight: 500;
        line-height: 1;
      }
      .lingee-context-chip--mode {
        color: #1d4ed8;
        background: #eff6ff;
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
      }
      .lingee-context-chip--folder {
        color: #475569;
        background: #f8fafc;
        box-shadow: inset 0 0 0 1px #e2e8f0;
      }
      .lingee-context-chip--knowledge {
        color: #0f766e;
        background: #f0fdfa;
        box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.16);
      }
      .lingee-context-chip__label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-context-chip__meta {
        color: inherit;
        opacity: 0.62;
        font-size: 11px;
        white-space: nowrap;
      }
      .lingee-context-chip__remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        padding: 0;
        border: 0;
        border-radius: 5px;
        color: currentColor;
        background: transparent;
        cursor: pointer;
        opacity: 0.55;
      }
      .lingee-context-chip__remove:hover {
        background: rgba(15, 23, 42, 0.08);
        opacity: 1;
      }
      .lingee-enhanced-tool {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 9px;
        border: 0;
        border-radius: 8px;
        color: rgba(15, 23, 42, 0.64);
        background: transparent;
        font: inherit;
        font-size: 14px;
        white-space: nowrap;
        cursor: pointer;
        transition: color 160ms ease, background 160ms ease, transform 160ms ease;
      }
      .lingee-enhanced-tool:hover,
      .lingee-enhanced-tool[aria-expanded="true"] {
        color: #1d4ed8;
        background: #eff6ff;
      }
      .lingee-enhanced-tool:active {
        transform: translateY(1px);
      }
      .lingee-enhanced-tool:focus-visible,
      .lingee-panel button:focus-visible,
      .lingee-panel input:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
      }
      .lingee-kb-wrap {
        position: relative;
        display: inline-flex;
        order: 70;
      }
      .lingee-model-wrap {
        position: relative;
        display: inline-flex;
        order: 60;
        margin-left: auto;
      }
      .lingee-enhanced-tool--model {
        padding-right: 6px;
      }
      .lingee-enhanced-tool__chevron {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: -2px;
        color: currentColor;
        opacity: 0.7;
        transition: transform 160ms ease;
      }
      .lingee-enhanced-tool[aria-expanded="true"] .lingee-enhanced-tool__chevron {
        transform: rotate(180deg);
        opacity: 1;
      }
      /* 左侧：选择智能体 + 添加(+) + @（原「快速/Auto」已移到右侧） */
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="agent"] {
        order: 5;
        margin-left: 0;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="add"] {
        order: 10;
        margin-left: 0;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="skill"] {
        order: 20;
        margin-left: 0;
      }
      /* 右侧集群：模型（快速/Auto） → 语音/发送
         margin-left:auto 从「模型」开始，把整组推到右侧 */
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="knowledge"] {
        order: 30;
        margin-left: 0;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="model"] {
        order: 40;
        margin-left: auto;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="right"] {
        order: 60;
        margin-left: 0;
      }
      /* 已隐藏项（图像/网页报告/更多）不参与布局，排序值靠后即可 */
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="image"] {
        order: 91;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="report"] {
        order: 92;
      }
      .planb-composer[data-lingee-enhanced="true"] .planb-composer__toolbar > [data-lingee-slot="more"] {
        order: 93;
      }
      .lingee-kb-count {
        display: none;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 9px;
        color: #fff;
        background: #2563eb;
        font-size: 11px;
        font-variant-numeric: tabular-nums;
      }
      .lingee-kb-count[data-visible="true"] {
        display: inline-flex;
      }
      .lingee-panel {
        position: absolute;
        z-index: 80;
        display: none;
        width: 340px;
        overflow: hidden;
        border: 1px solid rgba(15, 23, 42, 0.1);
        border-radius: 14px;
        color: #0f172a;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
        backdrop-filter: blur(18px);
        transform-origin: top left;
        animation: lingee-panel-in 150ms ease-out;
      }
      .lingee-panel[data-open="true"] {
        display: block;
      }
      .lingee-panel--knowledge {
        width: 390px;
        transform-origin: top right;
      }
      .lingee-panel--folder {
        width: 420px;
      }
      .lingee-panel--model {
        width: 320px;
        transform-origin: top right;
      }
      .lingee-model-list {
        display: grid;
        gap: 2px;
        padding: 6px;
      }
      .lingee-model-option {
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 12px;
        border: 0;
        border-radius: 10px;
        color: #0f172a;
        background: transparent;
        text-align: left;
        cursor: pointer;
        transition: background 140ms ease;
      }
      .lingee-model-option:hover {
        background: #f5f8ff;
      }
      .lingee-model-option[aria-checked="true"] {
        background: #eff6ff;
      }
      .lingee-model-option__body {
        min-width: 0;
        display: block;
      }
      .lingee-model-option__head {
        display: flex;
        align-items: baseline;
        gap: 8px;
      }
      .lingee-model-option__mult {
        margin-left: auto;
        flex: none;
        color: #2970ff;
        background: #eef4ff;
        border-radius: 6px;
        padding: 1px 7px;
        font-size: 11px;
        font-weight: 600;
        line-height: 16px;
        white-space: nowrap;
      }
      .lingee-model-option__name {
        color: #0f172a;
        font-size: 14px;
        font-weight: 620;
        line-height: 20px;
      }
      .lingee-model-option[aria-checked="true"] .lingee-model-option__name {
        color: #1d4ed8;
      }
      .lingee-model-option__meta {
        color: #94a3b8;
        font-size: 11px;
        font-weight: 500;
      }
      .lingee-model-option__desc {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 12px;
        line-height: 17px;
      }
      .lingee-model-option__check {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        color: #2563eb;
        opacity: 0;
        transition: opacity 140ms ease;
      }
      .lingee-model-option[aria-checked="true"] .lingee-model-option__check {
        opacity: 1;
      }
      .lingee-agent-wrap {
        position: relative;
        display: none;
      }
      /* 「选择智能体」仅在「组织」tab 显示；工作 / 对话 tab 不出现（工作仅保留模型选择） */
      body.lingee-org-as-chat .lingee-agent-wrap {
        display: inline-flex;
      }
      body:not(.lingee-org-as-chat) .lingee-panel--agent {
        display: none !important;
      }
      .lingee-enhanced-tool--agent {
        max-width: 168px;
        padding-right: 6px;
      }
      .lingee-enhanced-tool--agent .lingee-enhanced-tool__label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-enhanced-tool--agent.is-selected {
        color: #1d4ed8;
        background: #eff6ff;
      }
      .lingee-agent-list {
        display: grid;
        gap: 2px;
        padding: 6px;
        max-height: 320px;
        overflow-y: auto;
      }
      .lingee-agent-option {
        display: grid;
        grid-template-columns: 30px 1fr 18px;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 12px;
        border: 0;
        border-radius: 10px;
        color: #0f172a;
        background: transparent;
        text-align: left;
        cursor: pointer;
        transition: background 140ms ease;
      }
      .lingee-agent-option:hover {
        background: #f5f8ff;
      }
      .lingee-agent-option[aria-checked="true"] {
        background: #eff6ff;
      }
      .lingee-agent-option__avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 14px;
        font-weight: 650;
        line-height: 1;
      }
      .lingee-agent-option__avatar--auto {
        color: #7c3aed;
        background: #f3e8ff;
      }
      .lingee-agent-option__body {
        min-width: 0;
        display: block;
      }
      .lingee-agent-option__name {
        display: flex;
        align-items: center;
        min-width: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
      }
      .lingee-agent-option__name-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-agent-option[aria-checked="true"] .lingee-agent-option__name {
        color: #1d4ed8;
      }
      /* 待激活状态标签（@ 面板与「选择智能体」下拉共用） */
      .lingee-pending-badge {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        height: 18px;
        margin-left: 6px;
        padding: 0 7px;
        border-radius: 9px;
        color: #b25e09;
        background: #fef3e2;
        font-size: 11px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
        vertical-align: middle;
      }
      .lingee-agent-option__desc {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 12px;
        line-height: 17px;
      }
      .lingee-agent-option__check {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        color: #2563eb;
        opacity: 0;
        transition: opacity 140ms ease;
      }
      .lingee-agent-option[aria-checked="true"] .lingee-agent-option__check {
        opacity: 1;
      }
      @keyframes lingee-panel-in {
        from { opacity: 0; transform: translateY(-4px) scale(0.985); }
        to { opacity: 1; transform: translateY(0) scale(1); }
      }
      .lingee-panel__header {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 16px 12px;
        border-bottom: 1px solid #eef2f7;
      }
      .lingee-panel__header-copy {
        min-width: 0;
        flex: 1;
      }
      .lingee-panel__title {
        margin: 0;
        color: #0f172a;
        font-size: 15px;
        font-weight: 650;
        line-height: 22px;
      }
      .lingee-panel__subtitle {
        margin: 3px 0 0;
        color: #64748b;
        font-size: 12px;
        line-height: 18px;
      }
      .lingee-panel__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        padding: 0;
        border: 0;
        border-radius: 7px;
        color: #64748b;
        background: transparent;
        cursor: pointer;
      }
      .lingee-panel__close:hover {
        color: #0f172a;
        background: #f1f5f9;
      }
      .lingee-panel__body {
        max-height: 390px;
        overflow-y: auto;
        padding: 10px;
      }
      .lingee-panel__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-top: 1px solid #eef2f7;
        background: #fbfdff;
      }
      .lingee-panel__hint {
        color: #64748b;
        font-size: 11px;
        line-height: 16px;
      }
      .lingee-panel__primary,
      .lingee-panel__secondary {
        height: 32px;
        padding: 0 13px;
        border-radius: 8px;
        font: inherit;
        font-size: 13px;
        font-weight: 550;
        cursor: pointer;
      }
      .lingee-panel__primary {
        border: 1px solid #2563eb;
        color: #fff;
        background: #2563eb;
      }
      .lingee-panel__primary:hover {
        background: #1d4ed8;
      }
      .lingee-panel__secondary {
        border: 1px solid #dbe3ee;
        color: #475569;
        background: #fff;
      }
      .lingee-panel__secondary:hover {
        color: #0f172a;
        background: #f8fafc;
      }
      .lingee-action-list {
        display: grid;
        gap: 4px;
        padding: 6px;
      }
      .lingee-action {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px;
        border: 0;
        border-radius: 10px;
        color: #0f172a;
        background: transparent;
        text-align: left;
        cursor: pointer;
      }
      .lingee-action:hover {
        background: #f8fafc;
      }
      .lingee-action__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        color: #2563eb;
        background: #eff6ff;
      }
      .lingee-action__title {
        display: block;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
      }
      .lingee-action__desc {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 12px;
        line-height: 17px;
      }
      .lingee-action__arrow {
        color: #94a3b8;
      }
      .lingee-skill-tabs {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 3px;
        margin: 0 10px;
        padding: 4px;
        border-radius: 10px;
        background: #f1f5f9;
      }
      .lingee-skill-tab {
        height: 32px;
        border: 0;
        border-radius: 7px;
        color: #64748b;
        background: transparent;
        font: inherit;
        font-size: 12.5px;
        font-weight: 550;
        white-space: nowrap;
        cursor: pointer;
      }
      .lingee-skill-tab[aria-selected="true"] {
        color: #0f172a;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
      }
      .lingee-skill-list {
        display: grid;
        gap: 3px;
        padding: 8px 10px 10px;
        height: 320px;
        align-content: start;
        overflow-y: auto;
        overscroll-behavior: contain;
      }
      .lingee-skill-list::-webkit-scrollbar {
        width: 6px;
      }
      .lingee-skill-list::-webkit-scrollbar-thumb {
        border-radius: 6px;
        background: rgba(15, 23, 42, 0.16);
      }
      .lingee-skill-list::-webkit-scrollbar-thumb:hover {
        background: rgba(15, 23, 42, 0.28);
      }
      .lingee-skill-item {
        display: grid;
        grid-template-columns: 36px 1fr;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 10px;
        border: 0;
        border-radius: 9px;
        color: #0f172a;
        background: transparent;
        text-align: left;
        cursor: pointer;
      }
      .lingee-skill-item:hover {
        background: #f8fafc;
      }
      /* 图标容器：与主 "技能" 模块 (.skd-card__icon) 一致 —— 首字 + 品牌色 + 10% alpha 浅底
         color / background 均由 inline style 从数据的 color 计算传入 */
      .lingee-skill-item__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0;
        user-select: none;
      }
      .lingee-skill-item__title {
        display: block;
        font-size: 14px;
        font-weight: 560;
        line-height: 19px;
      }
      .lingee-skill-item__desc {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
        line-height: 16px;
      }
      .lingee-skill-empty {
        padding: 22px 10px;
        color: #94a3b8;
        font-size: 12px;
        text-align: center;
      }
      /* @ 面板底部管理入口：管理技能 / 管理智能体 */
      .lingee-panel--skills .lingee-skill-list {
        height: 272px;
      }
      .lingee-mention-manage {
        display: block;
        padding: 6px;
        border-top: 1px solid #eef2f7;
        background: #fff;
        border-radius: 0 0 13px 13px;
      }
      .lingee-mention-manage__btn {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        border: 0;
        border-radius: 8px;
        color: #475569;
        background: transparent;
        font: inherit;
        font-size: 12.5px;
        font-weight: 550;
        line-height: 18px;
        text-align: left;
        cursor: pointer;
        transition: color 120ms ease, background 120ms ease;
      }
      .lingee-mention-manage__btn:hover {
        color: #0f172a;
        background: #f8fafc;
      }
      .lingee-mention-manage__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: #64748b;
      }
      .lingee-mention-manage__icon svg { width: 15px; height: 15px; }
      .lingee-mention-manage__btn:hover .lingee-mention-manage__icon { color: #2563eb; }
      .lingee-mention-manage__label {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-mention-manage__arrow {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        color: #cbd5e1;
      }
      .lingee-mention-manage__btn:hover .lingee-mention-manage__arrow { color: #94a3b8; }
      .lingee-kb-section + .lingee-kb-section {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #eef2f7;
      }
      .lingee-kb-section__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 6px;
      }
      .lingee-kb-section__title {
        color: #334155;
        font-size: 12px;
        font-weight: 650;
      }
      .lingee-kb-section__all {
        padding: 3px 5px;
        border: 0;
        color: #2563eb;
        background: transparent;
        font: inherit;
        font-size: 11px;
        cursor: pointer;
      }
      .lingee-kb-option {
        display: grid;
        grid-template-columns: 18px 1fr;
        gap: 9px;
        padding: 9px 8px;
        border-radius: 9px;
        cursor: pointer;
      }
      .lingee-kb-option:hover {
        background: #f8fafc;
      }
      .lingee-kb-option input {
        width: 16px;
        height: 16px;
        margin: 2px 0 0;
        accent-color: #2563eb;
      }
      .lingee-kb-option__title {
        display: block;
        color: #1e293b;
        font-size: 13px;
        font-weight: 550;
        line-height: 19px;
      }
      .lingee-kb-option__meta {
        display: block;
        color: #64748b;
        font-size: 11px;
        line-height: 16px;
      }
      .lingee-folder-summary {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding: 11px;
        border-radius: 10px;
        background: #f8fafc;
      }
      .lingee-folder-summary__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        border-radius: 10px;
        color: #b45309;
        background: #fffbeb;
      }
      .lingee-folder-summary__name {
        display: block;
        color: #0f172a;
        font-size: 14px;
        font-weight: 620;
      }
      .lingee-folder-summary__meta {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
      }
      .lingee-permission-list {
        display: grid;
        gap: 7px;
      }
      .lingee-permission {
        display: grid;
        grid-template-columns: 18px 1fr;
        gap: 10px;
        padding: 11px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        cursor: pointer;
      }
      .lingee-permission:has(input:checked) {
        border-color: rgba(37, 99, 235, 0.36);
        background: #eff6ff;
      }
      .lingee-permission input {
        width: 16px;
        height: 16px;
        margin: 2px 0 0;
        accent-color: #2563eb;
      }
      .lingee-permission__title {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #1e293b;
        font-size: 13px;
        font-weight: 620;
      }
      .lingee-permission__badge {
        padding: 2px 5px;
        border-radius: 4px;
        color: #1d4ed8;
        background: #dbeafe;
        font-size: 10px;
        font-weight: 600;
      }
      .lingee-permission__desc {
        display: block;
        margin-top: 3px;
        color: #64748b;
        font-size: 11px;
        line-height: 17px;
      }
      @media (max-width: 820px) {
        .planb-composer[data-lingee-enhanced="true"] .planb-composer__input {
          min-height: 88px;
        }
        .lingee-panel,
        .lingee-panel--knowledge,
        .lingee-panel--folder {
          width: min(390px, calc(100vw - 32px));
        }
        .lingee-enhanced-tool__label {
          display: none;
        }
      }
    

      /* 首页输入框下方的快捷标签：放大两号，保持比例 */
      .chat-quick-tag {
        font-size: 16px;
        padding: 10px 14px;
        border-radius: 14px;
        gap: 8px;
      }
      .chat-quick-tag-lead {
        font-size: 16px;
      }
      .chat-quick-tag-icon svg {
        width: 18px;
        height: 18px;
      }


      /* ============================================================
         + 菜单：工具 / 引用产物 子菜单
         ============================================================ */
      .lingee-action__icon--tools {
        color: #7c3aed;
        background: #f5f3ff;
      }
      .lingee-action__icon--artifacts {
        color: #0891b2;
        background: #ecfeff;
      }
      .lingee-action__icon--knowledge {
        color: #2563eb;
        background: #eff6ff;
      }
      .lingee-action__count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 18px;
        margin-right: 6px;
        padding: 0 6px;
        border-radius: 9px;
        background: #f1f5f9;
        color: #475569;
        font-size: 11px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }

      /* 子菜单 panel 基础（继承 .lingee-panel 的样式） */
      .lingee-subpanel {
        position: absolute;
        z-index: 90;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 130ms ease;
      }
      .lingee-subpanel[data-open="true"] {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
      }
      .lingee-subpanel--tools {
        width: 280px;
      }
      .lingee-subpanel--artifacts {
        width: 320px;
      }
      .lingee-subpanel--knowledge {
        width: 340px;
      }
      .lingee-subpanel--knowledge .lingee-kb-body {
        max-height: 320px;
        overflow-y: auto;
        padding: 4px 6px 6px;
      }
      .lingee-subpanel--knowledge .lingee-kb-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 16px 14px;
      }
      .lingee-subpanel--knowledge .lingee-kb-foot__hint {
        color: #94a3b8;
        font-size: 12px;
      }
      .lingee-subpanel--knowledge .lingee-kb-foot__actions {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .lingee-kb-clear {
        padding: 4px 0;
        border: 0;
        background: transparent;
        color: #475569;
        font: inherit;
        font-size: 13px;
        cursor: pointer;
      }
      .lingee-kb-clear:hover { color: #0f172a; }
      .lingee-kb-done {
        height: 32px;
        padding: 0 16px;
        border: 0;
        border-radius: 8px;
        background: #2563eb;
        color: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: background 120ms ease;
      }
      .lingee-kb-done:hover { background: #1d4ed8; }

      /* ============================================================
         视口内自适应：当弹窗高度超过可用空间时，限制高度并允许滚动，
         头/尾保持吸附，保证任何选择弹窗都不溢出屏幕。
         ============================================================ */
      .lingee-panel.is-vclamped,
      .lingee-subpanel.is-vclamped {
        overflow-y: auto;
        overscroll-behavior: contain;
      }
      .lingee-panel.is-vclamped .lingee-panel__body,
      .lingee-panel.is-vclamped .lingee-agent-list,
      .lingee-panel.is-vclamped .lingee-model-list,
      .lingee-panel.is-vclamped .lingee-skill-list,
      .lingee-panel.is-vclamped .lingee-action-list,
      .lingee-subpanel.is-vclamped .lingee-tool-list,
      .lingee-subpanel.is-vclamped .lingee-artifact-list,
      .lingee-subpanel.is-vclamped .lingee-wf-list {
        max-height: none;
        overflow: visible;
      }
      .lingee-panel.is-vclamped .lingee-panel__header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: rgba(255, 255, 255, 0.98);
      }
      .lingee-panel.is-vclamped.lingee-panel--skills .lingee-skill-list {
        height: auto;
      }
      .lingee-panel.is-vclamped .lingee-mention-manage,
      .lingee-panel.is-vclamped .lingee-panel__footer,
      .lingee-subpanel.is-vclamped .lingee-artifact-foot,
      .lingee-subpanel.is-vclamped .lingee-wf-foot,
      .lingee-subpanel.is-vclamped .lingee-tool-manage {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #fff;
      }

      /* 工具子菜单 */
      .lingee-tool-list {
        padding: 6px;
      }
      .lingee-tool-row {
        display: grid;
        grid-template-columns: 28px 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 120ms ease, box-shadow 120ms ease;
      }
      .lingee-tool-row:hover {
        background: #f8fafc;
      }
      /* 已选中态（点击整条选择该工具） */
      .lingee-tool-row.is-selected {
        background: #eff6ff;
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
      }
      .lingee-tool-row.is-selected:hover {
        background: #e6f0ff;
      }
      .lingee-tool-row__end {
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }
      .lingee-tool-row__check {
        display: none;
        align-items: center;
        justify-content: center;
        color: #2563eb;
      }
      .lingee-tool-row__check svg { width: 15px; height: 15px; }
      .lingee-tool-row.is-selected .lingee-tool-row__check {
        display: inline-flex;
      }
      .lingee-tool-row__avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
      }
      .lingee-tool-row__name {
        color: #0f172a;
        font-size: 13px;
        font-weight: 500;
        line-height: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-tool-toggle {
        position: relative;
        display: inline-block;
        width: 32px;
        height: 18px;
        border-radius: 999px;
        background: #d4d4d4;
        cursor: pointer;
        transition: background 160ms ease;
        flex-shrink: 0;
      }
      .lingee-tool-row.is-on .lingee-tool-toggle {
        background: #2563eb;
      }
      .lingee-tool-toggle__dot {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
        transition: transform 160ms ease;
      }
      .lingee-tool-row.is-on .lingee-tool-toggle__dot {
        transform: translateX(14px);
      }
      .lingee-tool-manage {
        display: flex;
        align-items: center;
        gap: 8px;
        width: calc(100% - 12px);
        margin: 0 6px 6px;
        padding: 9px 10px;
        border: 0;
        border-top: 1px solid #eef2f7;
        border-radius: 0 0 8px 8px;
        background: transparent;
        color: #475569;
        font: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
        transition: color 120ms ease, background 120ms ease;
      }
      .lingee-tool-manage:hover {
        color: #0f172a;
        background: #f8fafc;
      }

      /* 引用产物子菜单 */
      .lingee-artifact-head {
        padding: 14px 16px 8px;
        color: #0f172a;
        font-size: 15px;
        font-weight: 600;
      }
      .lingee-artifact-list {
        max-height: 280px;
        overflow-y: auto;
        padding: 0 6px 6px;
      }
      .lingee-artifact-row {
        display: grid;
        grid-template-columns: 18px 1fr auto;
        align-items: center;
        gap: 12px;
        padding: 8px 10px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 120ms ease;
      }
      .lingee-artifact-row:hover {
        background: #f8fafc;
      }
      .lingee-artifact-check {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        border: 1.4px solid #cbd5e1;
        border-radius: 4px;
        color: transparent;
        background: #fff;
        transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
      }
      .lingee-artifact-row.is-checked .lingee-artifact-check {
        border-color: #2563eb;
        background: #2563eb;
        color: #fff;
      }
      .lingee-artifact-name {
        color: #0f172a;
        font-size: 13px;
        font-weight: 500;
        line-height: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-artifact-date {
        color: #94a3b8;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      .lingee-artifact-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 16px 14px;
      }
      .lingee-artifact-all {
        padding: 4px 0;
        border: 0;
        background: transparent;
        color: #475569;
        font: inherit;
        font-size: 13px;
        cursor: pointer;
      }
      .lingee-artifact-all:hover {
        color: #0f172a;
      }
      .lingee-artifact-confirm {
        height: 32px;
        padding: 0 16px;
        border: 0;
        border-radius: 8px;
        background: #2563eb;
        color: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: background 120ms ease, opacity 120ms ease;
      }
      .lingee-artifact-confirm:hover:not(:disabled) {
        background: #1d4ed8;
      }
      .lingee-artifact-confirm:disabled {
        background: #c7d2fe;
        cursor: not-allowed;
      }

      /* 引用产物 chip 颜色 */
      .lingee-context-chip--artifacts {
        color: #0e7490;
        background: #ecfeff;
        box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.18);
      }

      /* ============================================================
         工作流：入口图标 + 子菜单 + chip
         ============================================================ */
      .lingee-action__icon--workflow {
        color: #7c3aed;
        background: #f5f3ff;
      }
      .lingee-subpanel--workflow {
        width: 328px;
      }
      .lingee-wf-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        padding: 14px 16px 8px;
        color: #0f172a;
        font-size: 15px;
        font-weight: 600;
      }
      .lingee-wf-head__hint {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      .lingee-wf-list {
        max-height: 300px;
        overflow-y: auto;
        padding: 0 6px 6px;
      }
      .lingee-wf-row {
        display: grid;
        grid-template-columns: 30px 1fr 16px;
        align-items: center;
        gap: 11px;
        padding: 9px 10px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 120ms ease;
      }
      .lingee-wf-row:hover {
        background: #f8fafc;
      }
      .lingee-wf-row.is-checked {
        background: #f5f3ff;
      }
      .lingee-wf-row__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        color: #7c3aed;
        background: #f5f3ff;
      }
      .lingee-wf-row__body {
        min-width: 0;
      }
      .lingee-wf-row__name {
        display: block;
        color: #0f172a;
        font-size: 13px;
        font-weight: 500;
        line-height: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-wf-row__desc {
        display: block;
        margin-top: 2px;
        color: #94a3b8;
        font-size: 12px;
        line-height: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-wf-row__check {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        color: #7c3aed;
        opacity: 0;
        transition: opacity 140ms ease;
      }
      .lingee-wf-row.is-checked .lingee-wf-row__check {
        opacity: 1;
      }
      .lingee-wf-foot {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 8px 14px 12px;
        border-top: 1px solid #eef2f7;
      }
      .lingee-wf-all {
        padding: 4px 0;
        border: 0;
        background: transparent;
        color: #475569;
        font: inherit;
        font-size: 13px;
        cursor: pointer;
      }
      .lingee-wf-all:hover {
        color: #0f172a;
      }
      .lingee-context-chip--workflow {
        color: #6d28d9;
        background: #f5f3ff;
        box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
      }

      /* 方案2：智能体 chip + 可选「选择工作流」加挂入口 */
      .lingee-context-chip--agent {
        max-width: none;
        padding-left: 5px;
        color: #334155;
        background: #f1f5f9;
        box-shadow: inset 0 0 0 1px #e2e8f0;
      }
      .lingee-agent-chip__avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        flex: 0 0 20px;
      }
      .lingee-agent-chip__sep {
        display: inline-flex;
        align-items: center;
        color: #cbd5e1;
        margin: 0 -1px;
      }
      .lingee-agent-chip__sep svg { width: 13px; height: 13px; }
      .lingee-agent-chip__addwf {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        height: 22px;
        padding: 0 9px 0 7px;
        border-radius: 7px;
        border: 1px dashed #c4b5fd;
        background: transparent;
        color: #7c3aed;
        font: inherit;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        opacity: 0.92;
        transition: background 120ms ease, opacity 120ms ease;
      }
      .lingee-agent-chip__addwf svg { width: 13px; height: 13px; }
      .lingee-agent-chip__addwf:hover { background: #f5f3ff; opacity: 1; }
      .lingee-agent-chip__wf {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        height: 22px;
        padding: 0 4px 0 8px;
        border-radius: 7px;
        color: #6d28d9;
        background: #f5f3ff;
        box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
        cursor: pointer;
        max-width: 168px;
      }
      .lingee-agent-chip__wf-ic { display: inline-flex; align-items: center; }
      .lingee-agent-chip__wf-ic svg { width: 13px; height: 13px; }
      .lingee-agent-chip__wf .lingee-context-chip__meta {
        opacity: 1;
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-agent-chip__wf .lingee-context-chip__remove {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
      }
      .lingee-wf-head__agent {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #7c3aed;
      }

      /* 可选下拉标签：选择技能 / 选择 ERP 环境 */
      .lingee-context-chip--pick {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 0 8px 0 9px;
        cursor: pointer;
        color: #475569;
        background: #f8fafc;
        box-shadow: inset 0 0 0 1px #e2e8f0;
        transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
      }
      /* 未选择态：虚线描边，表达“待选择” */
      .lingee-context-chip--pick:not(.is-selected) {
        color: #64748b;
        background: transparent;
        box-shadow: inset 0 0 0 1px transparent;
        border: 1px dashed #cbd5e1;
      }
      .lingee-context-chip--pick:not(.is-selected):hover { background: #f8fafc; border-color: #94a3b8; }
      .lingee-context-chip--pick .lingee-context-chip__ic { display: inline-flex; align-items: center; }
      .lingee-context-chip--pick .lingee-context-chip__ic svg { width: 13px; height: 13px; }
      .lingee-pick-caret { display: inline-flex; align-items: center; opacity: 0.5; }
      .lingee-pick-caret svg { width: 12px; height: 12px; }
      .lingee-context-chip--pick.is-selected .lingee-pick-caret { display: none; }

      /* 选中态配色：技能=蓝，ERP=青蓝 */
      .lingee-context-chip--skill.is-selected {
        color: #1d4ed8;
        background: #eff6ff;
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.22);
      }
      .lingee-context-chip--erp.is-selected {
        color: #0369a1;
        background: #f0f9ff;
        box-shadow: inset 0 0 0 1px rgba(3, 105, 161, 0.22);
      }

      /* 已选择的工具标签（展示在输入框内） */
      .lingee-context-chip--tool {
        max-width: 420px;
        color: #1e293b;
        background: #f1f5f9;
        box-shadow: inset 0 0 0 1px #e2e8f0;
        padding-left: 6px;
      }
      .lingee-tool-chip__avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 600;
        flex-shrink: 0;
      }
      /* 工具后的 ERP 环境标签：可点击展开多选 */
      .lingee-tool-chip__env {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        height: 22px;
        padding: 0 6px 0 8px;
        border-radius: 7px;
        cursor: pointer;
        max-width: 220px;
        transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
      }
      .lingee-tool-chip__env:not(.is-selected) {
        color: #64748b;
        background: transparent;
        border: 1px dashed #cbd5e1;
      }
      .lingee-tool-chip__env:not(.is-selected):hover { color: #0369a1; border-color: #7dd3fc; background: #f0f9ff; }
      .lingee-tool-chip__env.is-selected {
        color: #0369a1;
        background: #f0f9ff;
        box-shadow: inset 0 0 0 1px rgba(3, 105, 161, 0.22);
      }
      .lingee-tool-chip__env .lingee-context-chip__ic { display: inline-flex; align-items: center; }
      .lingee-tool-chip__env .lingee-context-chip__ic svg { width: 13px; height: 13px; }
      .lingee-tool-chip__env .lingee-context-chip__meta {
        opacity: 1;
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .lingee-tool-chip__env .lingee-pick-caret { opacity: 0.6; }

