
.lgr-panel {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.045);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}
.lgr-panel[data-state="thinking"] {
  background-image: linear-gradient(270deg, rgba(99,102,241,.04), rgba(139,92,246,.09), rgba(99,102,241,.04));
  background-size: 200% 100%;
  animation: lgr-shimmer 2s ease-in-out infinite;
}

/* ---------- 头部（整行可点，作为折叠开关） ---------- */
.lgr-panel__header {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: rgba(79, 70, 229, 0.86);
  font: inherit;
  font-size: 12px;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
}
.lgr-panel__header:hover { color: #4338ca; }
.lgr-panel__header:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.5);
  outline-offset: -2px;
  border-radius: 11px;
}
.lgr-panel__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.13);
}
.lgr-panel[data-state="thinking"] .lgr-panel__status { animation: lgr-spin 1s linear infinite; }
.lgr-panel[data-state="done"] .lgr-panel__status {
  color: #15803d;
  background: rgba(22, 163, 74, 0.13);
  animation: none;
}
.lgr-panel__label { flex: 1; min-width: 0; }
.lgr-panel__timer {
  flex: 0 0 auto;
  color: rgba(79, 70, 229, 0.55);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.lgr-panel[data-state="done"] .lgr-panel__timer { color: rgba(15, 23, 42, 0.4); }
.lgr-panel[data-state="done"] .lgr-panel__header { color: rgba(15, 23, 42, 0.55); }
.lgr-panel[data-state="done"] .lgr-panel__header:hover { color: rgba(15, 23, 42, 0.8); }
.lgr-panel__chevron {
  flex: 0 0 auto;
  display: inline-flex;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.lgr-panel[data-view="open"] .lgr-panel__chevron { transform: rotate(90deg); }

/* ---------- 正文（流式区 + 声明） ---------- */
.lgr-panel__body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}
.lgr-panel[data-view="open"] .lgr-panel__body {
  max-height: 236px;
  overflow-y: auto;
  opacity: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .18) transparent;
}
.lgr-panel__body::-webkit-scrollbar { width: 4px; }
.lgr-panel__body::-webkit-scrollbar-thumb { border-radius: 2px; background: rgba(0, 0, 0, .16); }
.lgr-panel__stream {
  margin-left: 12px;
  padding: 0 12px 2px 12px;
  border-left: 1px solid rgba(99, 102, 241, 0.22);
}
.lgr-panel__para {
  margin: 0 0 8px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 13px;
  line-height: 1.68;
}
.lgr-panel__para:last-child { margin-bottom: 0; }
/* 流式游标：仅跟在最后一段之后 */
.lgr-panel[data-state="thinking"] .lgr-panel__para:last-child:after {
  content: "▍";
  margin-left: 1px;
  color: rgba(99, 102, 241, .75);
  animation: lgr-blink 1s step-end infinite;
}
.lgr-panel__note {
  margin: 10px 12px 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.34);
  font-size: 11px;
  line-height: 1.6;
}
.lgr-panel__sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes lgr-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes lgr-spin { to { transform: rotate(360deg); } }
@keyframes lgr-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* 降低动效偏好：去掉底纹流动、旋转与游标闪烁 */
@media (prefers-reduced-motion: reduce) {
  .lgr-panel[data-state="thinking"],
  .lgr-panel[data-state="thinking"] .lgr-panel__status,
  .lgr-panel[data-state="thinking"] .lgr-panel__para:last-child:after {
    animation: none;
  }
  .lgr-panel__body,
  .lgr-panel__chevron { transition: none; }
}

/* 暗色模式 */
[data-theme="dark"] .lgr-panel {
  border-color: rgba(129, 140, 248, 0.2);
  background: rgba(129, 140, 248, 0.08);
}
[data-theme="dark"] .lgr-panel__header { color: rgba(165, 180, 252, 0.9); }
[data-theme="dark"] .lgr-panel__para { color: rgba(255, 255, 255, 0.62); }
[data-theme="dark"] .lgr-panel__note { color: rgba(255, 255, 255, 0.32); }
  