/* ===== 全局重置与变量 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a28;
  --gold: #c8a45c;
  --gold-light: #e8c96a;
  --gold-dim: #8a6d2b;
  --text-primary: #e8e4dc;
  --text-secondary: #9a968e;
  --text-muted: #5a5750;
  --accent-warm: #d4956a;
  --bubble-ai: #1a1a28;
  --bubble-user: #2a2218;
  --border-subtle: rgba(200, 164, 92, 0.12);
  --shadow-gold: rgba(200, 164, 92, 0.08);
  --radius: 16px;
  --max-width: 780px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ===== 顶部头部 ===== */
.header {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
  text-align: center;
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--bg-primary);
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--shadow-gold);
  font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.header-info h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.header-info p {
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
  letter-spacing: 2px;
}

/* 左上角会话列表按钮 */
.session-toggle-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.session-toggle-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.session-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* 头部右侧按钮组 */
.header-actions {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}

.new-session-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.new-session-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.clear-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* ===== 会话列表面板 ===== */
.session-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 16px;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
  padding: 6px;
}

.session-panel.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.session-panel::-webkit-scrollbar { width: 4px; }
.session-panel::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 8px;
}

.session-item:hover { background: var(--bg-tertiary); }
.session-item.active {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.session-item-info { flex: 1; min-width: 0; }

.session-item-title {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-item.active .session-item-title { color: var(--gold-light); }

.session-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.session-item-del {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: all 0.15s;
}

.session-item:hover .session-item-del { opacity: 1; }
.session-item-del:hover {
  color: #e87070;
  background: rgba(232, 112, 112, 0.1);
}

.session-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== 聊天区域 ===== */
.chat-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 48px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chat-container::-webkit-scrollbar { width: 4px; }
.chat-container::-webkit-scrollbar-track { background: transparent; }
.chat-container::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

.messages {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 消息气泡 ===== */
.message {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.ai   { align-self: flex-start; max-width: 88%; }
.message.user { align-self: flex-end; max-width: 80%; flex-direction: row-reverse; }

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 2px;
}

.message.ai .message-avatar {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-primary);
  font-weight: 700;
  font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.message.user .message-avatar {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 14px;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  line-height: 1.7;
  font-size: 15px;
  word-break: break-word;
}

.message.ai .message-bubble {
  background: var(--bubble-ai);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 4px;
  color: var(--text-primary);
}

.message.user .message-bubble {
  background: linear-gradient(135deg, var(--bubble-user), #2e2618);
  border: 1px solid rgba(200, 164, 92, 0.2);
  border-top-right-radius: 4px;
  color: var(--text-primary);
}

.message.ai .message-bubble strong,
.message.ai .message-bubble b { color: var(--gold-light); }

.message-bubble p { margin: 0 0 0.6em 0; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble ul, .message-bubble ol { margin: 0.4em 0; padding-left: 1.4em; }
.message-bubble li { margin-bottom: 0.3em; }
.message-bubble hr { border: none; border-top: 1px solid var(--border-subtle); margin: 0.8em 0; }
.message-bubble h2 {
  font-size: 1em;
  font-weight: 700;
  color: var(--gold-light);
  margin: 1em 0 0.3em;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-subtle);
}
.message-bubble h3 {
  font-size: 0.93em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.8em 0 0.2em;
}
.message-bubble code {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.88em;
  font-family: ui-monospace, monospace;
}
.message-bubble blockquote {
  border-left: 3px solid var(--gold-dim);
  padding-left: 10px;
  margin: 0.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}

.message-bubble .chat-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  margin-bottom: 6px;
  transition: opacity 0.2s;
}

.message-bubble .chat-image:hover { opacity: 0.85; }

/* ===== 消息操作按钮 ===== */
.message-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-actions {
  display: flex;
  gap: 2px;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.message.ai .message-actions  { justify-content: flex-start; }
.message.user .message-actions { justify-content: flex-end; }
.message:hover .message-actions { opacity: 1; }

.action-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s;
  user-select: none;
  white-space: nowrap;
}

.action-btn:hover         { color: var(--gold); }
.action-btn.delete:hover  { color: #e87070; }
.action-btn svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ===== 图片全屏预览 ===== */
.image-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.image-overlay.show { display: flex; }
.image-overlay img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* ===== 图片预览区（输入框上方）===== */
.image-preview-area {
  display: none;
  max-width: var(--max-width);
  margin: 0 auto 8px;
  padding: 0 4px;
}

.image-preview-area.show { display: flex; flex-wrap: wrap; gap: 8px; }

.image-preview-item { position: relative; display: inline-block; }

.image-preview-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.image-preview-item .preview-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e87070;
  color: #fff;
  font-size: 11px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== 快捷问题 ===== */
.quick-questions {
  max-width: var(--max-width);
  margin: 16px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.quick-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--gold);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-btn:hover {
  background: var(--bubble-user);
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

/* ===== 底部输入区 ===== */
.input-area {
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.input-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.attach-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.attach-btn:hover { color: var(--gold); border-color: var(--gold-dim); }

.input-wrapper textarea {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 10px 18px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 44px;
  transition: border-color 0.2s;
}

.input-wrapper textarea::placeholder { color: var(--text-muted); }
.input-wrapper textarea:focus { border-color: var(--gold-dim); }

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.send-btn:hover { transform: scale(1.05); box-shadow: 0 0 16px var(--shadow-gold); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.send-btn svg { width: 20px; height: 20px; }


/* ===== 语音输入按钮 ===== */
.mic-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}
.mic-btn svg { width: 17px; height: 17px; }
.mic-btn:hover {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.8);
}
.mic-btn.recording {
  border-color: #e85555;
  color: #e85555;
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,85,85,0); }
  50%       { box-shadow: 0 0 0 6px rgba(232,85,85,0.25); }
}

/* ===== 语音状态栏 ===== */
.voice-status {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  color: #e85555;
  background: rgba(232,85,85,0.08);
  border-top: 1px solid rgba(232,85,85,0.15);
  border-radius: 8px 8px 0 0;
}
.voice-status.show { display: flex; }
.voice-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e85555;
  animation: mic-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

/* ===== TTS 朗读按钮状态 ===== */
.action-btn.speaking { color: var(--gold, #d4af37) !important; }
.action-btn.speaking span { color: var(--gold, #d4af37) !important; }

/* ===== 思考开关按钮 ===== */
.think-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}
.think-toggle svg { width: 18px; height: 18px; transition: stroke 0.2s; }

/* ON 状态：金色 */
.think-toggle.thinking-on {
  border-color: var(--gold-dim, rgba(212,175,55,0.4));
  color: var(--gold, #d4af37);
}
.think-toggle.thinking-on:hover {
  border-color: var(--gold, #d4af37);
  background: rgba(212,175,55,0.08);
}

/* OFF 状态：灰色 */
.think-toggle.thinking-off {
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.3);
}
.think-toggle.thinking-off:hover {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.5);
}



/* ===== 文件 chip 预览 ===== */
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  max-width: 220px;
  transition: border-color 0.2s;
}
.file-chip.loading {
  border-color: rgba(100,160,255,0.3);
  animation: thinking-pulse 1.5s ease-in-out infinite;
}
.file-icon { font-size: 15px; flex-shrink: 0; }
.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.file-meta {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  flex-shrink: 0;
  white-space: nowrap;
}
.file-chip .preview-del {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.file-chip .preview-del:hover { background: rgba(255,80,80,0.3); color: #fff; }

/* ===== 加载动画 ===== */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--gold-dim);
  border-radius: 50%;
  animation: typing 1.2s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== 装饰印章 ===== */
.seal {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 60px;
  height: 60px;
  opacity: 0.04;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "STKaiti", "KaiTi", "楷体", serif;
  font-size: 18px;
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 4px;
  transform: rotate(-15deg);
  line-height: 1.2;
  text-align: center;
}

/* ===== 模式切换 ===== */
.mode-switcher {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 10px;
}

.mode-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 1px;
}

.mode-btn:first-child { border-radius: 20px 0 0 20px; border-right: none; }
.mode-btn:last-child  { border-radius: 0 20px 20px 0; }

.mode-btn.active {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-primary);
  border-color: var(--gold);
  font-weight: 600;
}

.mode-btn:not(.active):hover { color: var(--gold); border-color: var(--gold-dim); }

/* ===== 移动端适配 ===== */
@media (max-width: 600px) {
  .header { padding: 14px 16px; }
  .avatar { width: 42px; height: 42px; font-size: 19px; }
  .header-info h1 { font-size: 17px; }
  .header-info p { font-size: 12px; }
  .header-actions { right: 10px; gap: 4px; }
  .header-actions .export-btn { display: none; }
  .clear-btn { font-size: 12px; padding: 6px 10px; }
  .new-session-btn { width: 32px; height: 32px; font-size: 16px; }
  .message.ai   { max-width: 94%; }
  .message.user { max-width: 86%; }
  .message-bubble { font-size: 16px; padding: 12px 14px; line-height: 1.8; }
  .message-avatar { width: 30px; height: 30px; font-size: 12px; }
  .message-actions { opacity: 1; }
  .action-btn { padding: 5px 10px; font-size: 12px; }
  .quick-btn { font-size: 14px; padding: 9px 16px; }
  .seal { display: none; }
  .session-panel { width: calc(100vw - 32px); left: 10px; }
  .mode-btn { font-size: 12px; padding: 5px 18px; }
  .session-toggle-btn { left: 10px; width: 32px; height: 32px; }
  .session-toggle-btn svg { width: 16px; height: 16px; }
  .attach-btn { width: 42px; height: 42px; font-size: 20px; }
  .input-wrapper textarea { font-size: 16px; min-height: 48px; }
  .send-btn { width: 48px; height: 48px; }
}

/* ===== 思考块（可折叠） ===== */
.thinking-block {
  border: 1px solid rgba(200, 164, 92, 0.14);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8em;
  color: var(--text-muted);
  user-select: none;
}

.thinking-block.done .thinking-header {
  cursor: pointer;
}

.thinking-block.done .thinking-header:hover {
  color: var(--text-secondary);
}

.thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-dim);
  flex-shrink: 0;
}

.thinking-block.active .thinking-dot {
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

@keyframes thinking-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%       { opacity: 1;    transform: scale(1);   }
}

.thinking-chevron {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s;
  line-height: 1;
}

.thinking-block.done.expanded .thinking-chevron {
  transform: rotate(180deg);
}

.thinking-content {
  padding: 0 12px 10px 28px;
  font-size: 0.8em;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

.thinking-content::-webkit-scrollbar { width: 3px; }
.thinking-content::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }

/* active 时始终展开 */
.thinking-block.active .thinking-content { display: block; }

/* done 时默认折叠，点击展开 */
.thinking-block.done .thinking-content { display: none; }
.thinking-block.done.expanded .thinking-content { display: block; max-height: 320px; }

/* ── 联网搜索指示块 ────────────────────────────────────────── */
.search-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 8px;
  font-size: 0.78em;
  color: var(--text-muted);
  border: 1px solid rgba(100,160,255,0.18);
  border-radius: 8px;
  background: rgba(100,160,255,0.06);
}
.search-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5a9cf8;
  flex-shrink: 0;
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

/* ── 搜索来源卡片 ── */
.search-sources {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(100,160,255,0.2);
  border-radius: 10px;
  background: rgba(100,160,255,0.05);
  font-size: 0.78em;
}
.search-sources-label {
  color: var(--text-muted);
  font-size: 0.85em;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.search-sources a {
  display: block;
  color: #5a9cf8;
  text-decoration: none;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
}
.search-sources a:hover {
  text-decoration: underline;
  color: #78b4ff;
}

/* 搜索完成 → 整理中状态：静态绿点 */
.search-dot-done {
  animation: none !important;
  background: #4caf7d !important;
}
