
/* 隐藏 React 原生能力包行（一级 + 原生推荐二级）与「更多」。
   特异性需 >= 强制显示规则
   body .chat-welcome:not(.lg-cat-partner) .chat-quick-tags:not(.chat-quick-tags--rec){display:flex!important}
   （0,4,1）；此处采用同构选择器并靠源码顺序在后取胜。 */
body .chat-welcome:not(.lg-cat-partner) .chat-quick-tags:not(.chat-quick-tags--rec) { display: none !important; }
body .chat-welcome .chat-quick-tags.chat-quick-tags--rec { display: none !important; }
body .chat-welcome .lg-tags-more { display: none !important; }

/* ---------- 一级 / 二级行：单行横向滚动（沿用原生形式），同位替换 ---------- */
/* 位置：输入框「下方」（原在问候语 ↔ 输入框之间，已整体下移；
   间距节奏随之翻转为 margin-top:16px，原位空间由输入框自身的
   .chat-composer-wrap margin-top 承接，问候语直接接输入框）。 */
.chat-welcome .lg-cap-first,
.chat-welcome .lg-cap-second {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 860px;
  margin: 16px auto 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-welcome .lg-cap-first::-webkit-scrollbar,
.chat-welcome .lg-cap-second::-webkit-scrollbar { display: none; }
/* 默认：一级显示、二级隐藏；进入二级态后互换（隐藏一级、显示二级） */
.chat-welcome .lg-cap-second { display: none; }
.chat-welcome .lg-cap-second.is-open { display: flex; }
.chat-welcome .lg-cap-first.is-hidden { display: none !important; }

/* 说明：「图像生成」选中时收起输入框里的「选择智能体」入口，规则不在这里 ——
   那个入口是 lingee-work-agent-entry 注入的 .lingee-agent-wrap（React 原生的
   .planb-composer__agent-chip 早已被 enhanceComposer 隐藏），所以联动规则写在
   style#lingee-work-agent-entry-style 的第 4 条，按 .lg-cap-pill[data-key] 命中。 */

.lg-cap-chip,
.lg-cap-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 32px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.82);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.lg-cap-chip:hover,
.lg-cap-sub:hover { background: #fafafa; border-color: rgba(0, 0, 0, 0.12); }
.lg-cap-chip__ic { display: inline-flex; align-items: center; color: currentColor; }
.lg-cap-chip__ic svg { width: 15px; height: 15px; }
.lg-cap-sub__a { display: inline-flex; align-items: center; color: rgba(0, 0, 0, 0.32); }
.lg-cap-sub__a svg { width: 13px; height: 13px; }

/* ---------- 输入框顶部标签胶囊 ---------- */
.chat-welcome .planb-composer > .lg-cap-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  height: 28px;
  padding: 0 6px 0 10px;
  margin: 0 0 8px;
  border-radius: 8px;
  background: #1f2328;
  color: #fff;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  max-width: calc(100% - 24px);
}
.lg-cap-pill__ic { display: inline-flex; align-items: center; }
.lg-cap-pill__ic svg { width: 15px; height: 15px; }
.lg-cap-pill__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  opacity: 0.7;
  cursor: pointer;
}
.lg-cap-pill__x:hover { opacity: 1; background: rgba(255, 255, 255, 0.16); }
.lg-cap-pill__x svg { width: 12px; height: 12px; }

/* ============================================================
   AI 速记：chip 就地「收音」动画 + 右上角录音胶囊
   点击「AI速记」不再填入输入框，而是：
   1) chip 本体切换为收音波形动画（录音中 / 已暂停），保持默认配色，
      仅锁定点击（点击无反馈，不置灰、不降透明度）；
   2) 右上角浮出录音胶囊（计时 + 暂停 / 终止，无波形）。
   ============================================================ */
/* ---------- chip 录音态（尺寸与配色不变，只换内容 + 锁定点击） ---------- */
/* 录音中的 chip 必须和其它推荐 chip 完全同色，不能出现任何「禁用态」观感。
   注意：录音态不再写 aria-disabled，因为主包全局样式里有
   `[disabled],[aria-disabled=true]{opacity:.5;cursor:not-allowed}`，
   会把整枚 chip（文字 + 声纹）整体压到 50% 透明度 → 看起来像置灰禁用。
   锁点击改由 pointer-events:none + data-lg-rec 标记完成，交互行为不变；
   同时把文字色 / 背景 / 描边 / 透明度显式写回默认值并加 !important 兜底。 */
.lg-cap-chip.is-rec,
.lg-cap-chip[data-lg-rec="1"] {
  cursor: default;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.82) !important;
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  opacity: 1 !important;
  filter: none !important;
}
.lg-cap-chip.is-rec .lg-cap-chip__t {
  color: rgba(0, 0, 0, 0.82) !important;
  -webkit-text-fill-color: rgba(0, 0, 0, 0.82);
  opacity: 1 !important;
}
.lg-cap-chip.is-rec .lg-cap-chip__ic { opacity: 1 !important; }
/* 收音波形：4 根竖条上下起伏 */
.lg-cap-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.lg-cap-wave i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  animation: lgCapWave .9s ease-in-out infinite;
}
.lg-cap-wave i:nth-child(1) { animation-delay: 0s; }
.lg-cap-wave i:nth-child(2) { animation-delay: .18s; }
.lg-cap-wave i:nth-child(3) { animation-delay: .36s; }
.lg-cap-wave i:nth-child(4) { animation-delay: .54s; }
/* 只做高度起伏，不降透明度，避免波形看起来像置灰 */
@keyframes lgCapWave {
  0%, 100% { height: 4px; }
  50%      { height: 14px; }
}
/* 暂停态：波形静止 */
.lg-cap-chip.is-rec.is-paused .lg-cap-wave i { animation: none; height: 4px; opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  .lg-cap-wave i { animation: none !important; height: 9px; }
}

/* 声纹（收音波形）用品牌蓝，和录音红点做区分 */
.lg-cap-chip.is-rec .lg-cap-wave { color: var(--lg-g-fg-color-primary-default, #495dff); }
.lg-cap-chip.is-rec.is-paused .lg-cap-wave { color: var(--lg-g-fg-color-primary-muted, #b7c1ff); }

/* ============================================================
   右上角速记卡：状态行（红点 + 速记中 + 计时 + 暂停/终止/放大）
   + 实时转写文字；放大后约半屏，可滚动查看更多并进入速记
   ============================================================ */
.lg-rc {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 2147483000;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--lg-spacing-0-5x-small, 10px);
  padding: var(--lg-spacing-small, 12px);
  border-radius: var(--lg-radius-x-large, 16px);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--lg-g-border-color-black-soft, rgba(0, 0, 0, 0.08));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.05),
              0 1px 2px rgba(0, 0, 0, 0.04);
  color: var(--lg-g-fg-color-black-strong, rgba(0, 0, 0, 0.82));
  font-family: var(--lg-font-family-body, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  opacity: 0;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .26s ease,
              width .28s cubic-bezier(.22, 1, .36, 1);
  user-select: none;
}
.lg-rc.is-in { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- 状态行 ---------- */
.lg-rc__hd {
  display: flex; align-items: center;
  gap: var(--lg-spacing-x-small, 8px);
  min-height: 28px;
}
/* 录音红点：danger 语义色 + 呼吸光圈，暂停时静止转灰 */
.lg-rc__dot {
  position: relative;
  width: 8px; height: 8px; border-radius: var(--lg-radius-circle, 999px);
  background: var(--lg-g-fg-color-danger-default, #f12234);
  flex: 0 0 auto;
  margin-left: 2px;
}
.lg-rc__dot::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: inherit;
  background: var(--lg-g-bg-color-danger-translucent-soft, rgba(255, 41, 59, .12));
  animation: lgRcPulse 1.8s ease-out infinite;
}
@keyframes lgRcPulse {
  0%   { transform: scale(.6); opacity: .9; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.lg-rc__state {
  font-size: var(--lg-font-size-small-14, 14px); line-height: 22px;
  color: var(--lg-g-fg-color-black-strong, rgba(0, 0, 0, 0.82));
  flex: 0 0 auto;
}
.lg-rc__time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: var(--lg-font-size-small-14, 14px); line-height: 22px;
  font-weight: var(--lg-font-weight-semibold, 600); letter-spacing: .2px;
  color: var(--lg-g-fg-color-black-muted, rgba(0, 0, 0, 0.64));
  margin-right: auto;
}
.lg-rc__btns { display: flex; align-items: center; gap: 4px; }
.lg-rc__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--lg-radius-circle, 999px);
  border: 0; padding: 0; cursor: pointer;
  background: transparent;
  color: var(--lg-g-fg-color-black-muted, rgba(0, 0, 0, 0.64));
  transition: background .2s cubic-bezier(.645, .045, .355, 1),
              color .2s cubic-bezier(.645, .045, .355, 1),
              transform .2s cubic-bezier(.645, .045, .355, 1);
  flex: 0 0 auto;
}
.lg-rc__btn:hover {
  background: var(--lg-g-bg-color-black-subtle, rgba(0, 0, 0, 0.06));
  color: var(--lg-g-fg-color-black-strong, rgba(0, 0, 0, 0.82));
}
.lg-rc__btn:active { transform: scale(.92); }
.lg-rc__btn:focus-visible {
  outline: 2px solid var(--lg-g-border-color-primary-default, #495dff);
  outline-offset: 1px;
}
.lg-rc__btn svg { width: 15px; height: 15px; display: block; }
.lg-rc__btn--size svg { width: 14px; height: 14px; }
.lg-rc__btn--stop { color: var(--lg-g-fg-color-danger-default, #f12234); }
.lg-rc__btn--stop svg { width: 13px; height: 13px; }
.lg-rc__btn--stop:hover {
  background: var(--lg-g-bg-color-danger-translucent-soft, rgba(255, 41, 59, .12));
  color: var(--lg-g-fg-color-danger-emphasis, #da0b20);
}
/* 暂停态 */
.lg-rc.is-paused .lg-rc__dot { background: var(--lg-g-fg-color-black-aint, rgba(0, 0, 0, 0.28)); }
.lg-rc.is-paused .lg-rc__dot::after { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .lg-rc__dot::after { animation: none; opacity: 0; }
}

/* ---------- 实时转写 ---------- */
.lg-rc__tail {
  font-size: var(--lg-font-size-small-14, 14px); line-height: 22px;
  color: var(--lg-g-fg-color-black-muted, rgba(0, 0, 0, 0.64));
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 22px;
  user-select: text;
}
.lg-rc__caret {
  display: inline-block; width: 2px; height: 13px;
  margin-left: 3px; vertical-align: -2px;
  border-radius: 1px;
  background: var(--lg-g-fg-color-primary-default, #495dff);
  animation: lgRcCaret 1s steps(1) infinite;
}
@keyframes lgRcCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.lg-rc.is-paused .lg-rc__caret { animation: none; opacity: .25; }

.lg-rc__scroll { display: none; }
.lg-rc__foot { display: none; }

/* ---------- 放大态：约半屏 ---------- */
.lg-rc--big { width: min(420px, 34vw); gap: var(--lg-spacing-small, 12px); }
.lg-rc--big .lg-rc__tail { display: none; }
/* 头部与转写列表之间用分隔线，滚动内容顶部渐隐，避免文字被硬切 */
.lg-rc--big .lg-rc__hd {
  padding-bottom: var(--lg-spacing-0-5x-small, 10px);
  border-bottom: 1px solid var(--lg-g-border-color-black-subtle, rgba(0, 0, 0, 0.06));
  margin-bottom: -2px;
}
.lg-rc--big .lg-rc__scroll {
  display: block;
  height: 46vh;
  min-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 2px 2px 0;
  scrollbar-width: thin;
  user-select: text;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px,
                      #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px,
              #000 calc(100% - 12px), transparent 100%);
}
.lg-rc--big .lg-rc__scroll::-webkit-scrollbar { width: 6px; }
.lg-rc--big .lg-rc__scroll::-webkit-scrollbar-track { background: transparent; }
.lg-rc--big .lg-rc__scroll::-webkit-scrollbar-thumb {
  background: var(--lg-g-bg-color-black-moderate, rgba(0, 0, 0, 0.18));
  border-radius: var(--lg-radius-pill, 999px);
}
.lg-rc__ln {
  display: flex; gap: var(--lg-spacing-small, 12px);
  margin: 0 0 var(--lg-spacing-small, 12px);
}
.lg-rc__ln:last-child { margin-bottom: 2px; }
.lg-rc__ln-t {
  flex: 0 0 34px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: var(--lg-font-size-small-12, 12px); line-height: 22px;
  color: var(--lg-g-fg-color-black-aint, rgba(0, 0, 0, 0.28));
}
.lg-rc__ln-x {
  flex: 1; min-width: 0;
  font-size: var(--lg-font-size-small-14, 14px); line-height: 22px;
  color: var(--lg-g-fg-color-black-strong, rgba(0, 0, 0, 0.82));
  word-break: break-word;
}
/* 最新一句略微提亮，形成阅读焦点 */
.lg-rc__ln:last-child .lg-rc__ln-x { color: var(--lg-g-fg-color-black-intense, rgba(0, 0, 0, 0.94)); }
.lg-rc__empty {
  font-size: var(--lg-font-size-small-12, 12px); line-height: 22px;
  color: var(--lg-g-fg-color-black-aint, rgba(0, 0, 0, 0.28));
  padding: 2px 0;
}
.lg-rc--big .lg-rc__foot {
  display: flex; align-items: center; gap: var(--lg-spacing-x-small, 8px);
}
.lg-rc__enter {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--lg-spacing-1-5x-small, 6px);
  height: 32px; border: 0; border-radius: var(--lg-radius-x-medium, 8px);
  cursor: pointer;
  background: var(--lg-g-bg-color-primary-default, #495dff); color: #fff;
  font-family: inherit;
  font-size: var(--lg-font-size-small-14, 14px);
  font-weight: var(--lg-font-weight-semibold, 600);
  transition: background .2s cubic-bezier(.645, .045, .355, 1);
}
.lg-rc__enter:hover { background: var(--lg-g-bg-color-primary-emphasis, #3b47f2); }
.lg-rc__enter svg { width: 15px; height: 15px; }
.lg-rc__collapse {
  height: 32px; padding: 0 var(--lg-spacing-small, 12px);
  border: 1px solid var(--lg-g-border-color-black-soft, rgba(0, 0, 0, 0.08));
  border-radius: var(--lg-radius-x-medium, 8px);
  background: var(--lg-g-bg-color-white-heavy, #fff);
  color: var(--lg-g-fg-color-black-muted, rgba(0, 0, 0, 0.64));
  font-family: inherit; font-size: var(--lg-font-size-small-14, 14px);
  cursor: pointer;
  transition: background .2s cubic-bezier(.645, .045, .355, 1),
              color .2s cubic-bezier(.645, .045, .355, 1),
              border-color .2s cubic-bezier(.645, .045, .355, 1);
}
.lg-rc__collapse:hover {
  background: var(--lg-g-bg-color-black-faint, rgba(0, 0, 0, 0.03));
  border-color: var(--lg-g-border-color-black-moderate, rgba(0, 0, 0, 0.18));
  color: var(--lg-g-fg-color-black-strong, rgba(0, 0, 0, 0.82));
}
.lg-rc__enter:focus-visible, .lg-rc__collapse:focus-visible {
  outline: 2px solid var(--lg-g-border-color-primary-default, #495dff);
  outline-offset: 1px;
}
