/* =========================================================
   Agent 页面样式 · 董海棠博客 v2
   设计语言：米色画布 + 琥珀金 + 现代衬线 + 终端美学
   与 index.html 设计语言完全统一
   ========================================================= */

/* === ReAct 阶段颜色（基于琥珀金主色调协调） === */
:root {
  --agent-react-thought: #6B6FC4;
  --agent-react-action:  var(--haitang-accent);
  --agent-react-obs:     #4F9F7A;
  --agent-react-reflect: #9C6B8A;
  --agent-react-finish:  #276749;
  --agent-header-h: var(--haitang-nav-height);
}

html[data-theme="dark"] {
  --agent-react-thought: #9b9be4;
  --agent-react-action:  var(--haitang-accent-warm);
  --agent-react-obs:     #7fc7a8;
  --agent-react-reflect: #d39bbf;
  --agent-react-finish:  #7fc7a8;
}

/* === 三栏布局 === */
.agent-page {
  position: fixed;
  top: var(--agent-header-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 400px;
  background: transparent;
  overflow: hidden;
  z-index: 1;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .agent-page { grid-template-columns: 1fr 360px; }
}
@media (max-width: 760px) {
  .agent-page {
    grid-template-columns: 1fr;
    overflow: visible;
    position: relative;
    top: 0;
    min-height: calc(100vh - var(--agent-header-h));
  }
  .agent-panel-left  { display: none; }
  .agent-panel-right { display: none; }
}

/* === 小节编号标签（与 index.html 的 section-tag 呼应） === */
.section-tag-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--haitang-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  margin-right: 6px;
}

/* === 面板通用 === */
.agent-panel {
  background: var(--haitang-card);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  box-shadow: var(--haitang-card-shadow);
  border: 1px solid var(--haitang-border);
}

.agent-panel-left  {
  border-right: 1px solid var(--haitang-border);
  border-radius: 0;
}
.agent-panel-right {
  border-left:  1px solid var(--haitang-border);
  border-radius: 0;
}
.chat-panel {
  background:
    radial-gradient(at 95% 5%, rgba(217, 163, 104, 0.06) 0px, transparent 50%),
    radial-gradient(at 5% 95%, rgba(193, 138, 74, 0.05) 0px, transparent 50%),
    var(--haitang-bg);
}

/* === 左栏 · 会话列表 === */
.session-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  flex-shrink: 0;
}

.session-list-title {
  font-family: var(--haitang-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--haitang-text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.session-list-title .count {
  font-size: 10px;
  font-weight: 600;
  background: var(--haitang-canvas);
  color: var(--haitang-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--haitang-font-mono);
  letter-spacing: 0;
}

.session-new-btn {
  width: calc(100% - 36px);
  margin: 0 18px 16px;
  padding: 11px 14px;
  background: var(--haitang-card);
  border: 1px dashed var(--haitang-border-strong);
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--haitang-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--haitang-font-body);
}

.session-new-btn:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
  border-style: solid;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.12);
}

.session-new-btn svg { transition: transform 0.25s ease; }
.session-new-btn:hover svg { transform: rotate(90deg); }

.session-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.session-list::-webkit-scrollbar { width: 5px; }
.session-list::-webkit-scrollbar-track { background: transparent; }
.session-list::-webkit-scrollbar-thumb {
  background: var(--haitang-border-strong);
  border-radius: 5px;
}
.session-list::-webkit-scrollbar-thumb:hover {
  background: var(--haitang-accent);
}

.session-item {
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: transparent;
}

.session-item:hover {
  background: var(--haitang-bg-deep);
  border-color: var(--haitang-border);
}

.session-item.active {
  background: var(--haitang-accent-light);
  border-color: rgba(193, 138, 74, 0.35);
}

.session-query {
  font-size: 13px;
  color: var(--haitang-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  font-weight: 500;
}

.session-meta {
  font-size: 11px;
  color: var(--haitang-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--haitang-font-mono);
}

.session-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.session-status-dot.s1 { background: var(--haitang-accent-warm); }
.session-status-dot.s2 { background: var(--haitang-success); }
.session-status-dot.s3 { background: var(--haitang-danger); }

.session-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 16px;
  text-align: center;
  color: var(--haitang-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.session-empty .em-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--haitang-canvas), var(--haitang-bg-deep));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 4px;
  box-shadow: inset 0 1px 2px rgba(74, 56, 32, 0.06);
  border: 1px solid var(--haitang-border);
}

/* === 中栏 · 对话区 === */
.chat-panel { display: flex; flex-direction: column; min-height: 0; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--haitang-border);
  flex-shrink: 0;
  background: var(--haitang-card);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.chat-header-info { display: flex; align-items: center; gap: 14px; }

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url('https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--haitang-font-display);
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.chat-header-name {
  font-family: var(--haitang-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--haitang-text);
  letter-spacing: 0.01em;
}

.chat-header-sub {
  font-size: 11px;
  color: var(--haitang-text-muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--haitang-font-mono);
}

.chat-header-right { display: flex; align-items: center; gap: 8px; }

.chat-header-pill {
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--haitang-canvas);
  color: var(--haitang-text-light);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-family: var(--haitang-font-body);
  border: 1px solid var(--haitang-border);
  transition: all 0.2s ease;
}

.chat-header-pill .pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--haitang-text-muted);
  display: inline-block;
}

.chat-header-pill.done {
  background: rgba(79, 159, 122, 0.1);
  color: var(--haitang-success);
  border-color: rgba(79, 159, 122, 0.25);
}
.chat-header-pill.running {
  background: rgba(217, 163, 104, 0.12);
  color: var(--haitang-accent-deep);
  border-color: rgba(193, 138, 74, 0.3);
  animation: pulsePill 1.6s ease-in-out infinite;
}
.chat-header-pill.abort {
  background: rgba(215, 87, 87, 0.1);
  color: var(--haitang-danger);
  border-color: rgba(215, 87, 87, 0.25);
}
.chat-header-pill.done .pill-dot    { background: var(--haitang-success); }
.chat-header-pill.running .pill-dot { background: var(--haitang-accent); }
.chat-header-pill.abort .pill-dot   { background: var(--haitang-danger); }

@keyframes pulsePill {
  0%, 100% { box-shadow: 0 0 0 0 rgba(193, 138, 74, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(193, 138, 74, 0.08); }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 140px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--haitang-border-strong);
  border-radius: 6px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--haitang-accent);
}

.msg-block { display: flex; align-items: flex-start; gap: 12px; max-width: 86%; }
.msg-block.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  font-family: var(--haitang-font-display);
  box-shadow: 0 1px 3px rgba(74, 56, 32, 0.1);
}

.msg-block.bot .msg-avatar {
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url('https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(193, 138, 74, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.msg-block.user .msg-avatar { background: var(--haitang-text); color: #fff; }

.msg-bubble {
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 24px;
  border-top-left-radius: 6px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--haitang-text);
  box-shadow: 0 1px 2px rgba(74, 56, 32, 0.03);
  font-family: var(--haitang-font-body);
  transition: box-shadow 0.2s ease;
}

.msg-block.user .msg-bubble {
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  color: #fff;
  border-color: transparent;
  border-radius: 18px;
  border-top-left-radius: 18px;
  border-top-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.28);
}

.msg-bubble p { margin: 0 0 10px; }
.msg-bubble p:last-child { margin-bottom: 0; }

.msg-bubble strong {
  font-weight: 600;
  color: var(--haitang-accent-deep);
  background: linear-gradient(180deg, transparent 60%, rgba(193, 138, 74, 0.12) 60%);
  padding: 0 2px;
}
.msg-block.user .msg-bubble strong { color: #fff; background: rgba(255, 255, 255, 0.18); }

.msg-bubble code {
  font-family: var(--haitang-font-mono);
  font-size: 12.5px;
  background: var(--haitang-canvas);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--haitang-border);
  color: var(--haitang-accent-deep);
}
.msg-block.user .msg-bubble code {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.msg-bubble pre {
  background: linear-gradient(180deg, #1F1B16, #18140F);
  color: #E0D5C0;
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--haitang-font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.msg-bubble pre code { background: transparent; border: none; padding: 0; color: inherit; }

.msg-bubble blockquote {
  border-left: 3px solid var(--haitang-accent);
  padding: 6px 14px;
  margin: 10px 0;
  color: var(--haitang-text-light);
  background: var(--haitang-accent-light);
  border-radius: 0 6px 6px 0;
}

.msg-bubble ul, .msg-bubble ol { margin: 6px 0; padding-left: 22px; list-style: disc; }
.msg-bubble ol { list-style: decimal; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble img { max-width: 100%; border-radius: 12px; margin: 10px 0; border: 1px solid var(--haitang-border); }

.typing { display: inline-flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--haitang-text-muted);
  animation: typingBounce 1.3s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
  35%           { transform: translateY(-4px); opacity: 1; }
}

.quick-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.quick-pill {
  padding: 13px 15px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 12px;
  color: var(--haitang-text-light);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
  display: flex; flex-direction: column; gap: 4px; text-align: left;
}

.quick-pill .qp-title {
  font-size: 13px; font-weight: 600; color: var(--haitang-text);
  display: flex; align-items: center; gap: 6px;
  font-family: var(--haitang-font-display);
}
.quick-pill .qp-desc {
  font-size: 11px; color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono); letter-spacing: 0.01em;
}
.quick-pill:hover {
  background: var(--haitang-accent-light);
  border-color: var(--haitang-accent);
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.1);
}
@media (max-width: 520px) { .quick-prompts { grid-template-columns: 1fr; } }

.chat-input-wrap {
  position: fixed;
  left: 290px; right: 360px; bottom: 0;
  padding: 14px 24px 18px;
  background: linear-gradient(180deg, rgba(251, 246, 235, 0) 0%, var(--haitang-bg) 40%);
  z-index: 50;
  display: flex; flex-direction: column; gap: 6px;
  border-top: none;
}
@media (max-width: 1100px) { .chat-input-wrap { left: 250px; right: 310px; } }
@media (max-width: 760px) { .chat-input-wrap { left: 0; right: 0; padding: 10px 14px 14px; } }

.chat-input-box {
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 24px;
  padding: 10px 10px 10px 20px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(74, 56, 32, 0.06), 0 12px 40px rgba(74, 56, 32, 0.08);
}
.chat-input-box:focus-within {
  border-color: var(--haitang-accent);
  box-shadow: 0 0 0 4px var(--haitang-accent-light), 0 4px 16px rgba(193, 138, 74, 0.12);
}

.chat-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; font-family: var(--haitang-font-body); color: var(--haitang-text);
  resize: none; max-height: 120px; padding: 10px 4px;
  line-height: 1.6; min-height: 40px;
}
.chat-input::placeholder { color: var(--haitang-text-muted); }

.chat-send-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border: none; border-radius: 18px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  color: #fff; font-size: 13px; font-weight: 600;
  font-family: var(--haitang-font-body);
  flex-shrink: 0; gap: 7px;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.3);
}
.chat-send-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.42);
  background: linear-gradient(135deg, var(--haitang-accent), var(--haitang-accent-deep));
}
.chat-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-send-btn svg { transition: transform 0.2s ease; }
.chat-send-btn:hover:not(:disabled) svg { transform: translateX(2px); }

.chat-stop-btn {
  display: none; height: 42px; padding: 0 18px; border: none;
  border-radius: 12px; cursor: pointer; background: var(--haitang-danger);
  color: #fff; font-size: 12px; font-weight: 600;
  font-family: var(--haitang-font-body);
  align-items: center; justify-content: center; gap: 7px;
  flex-shrink: 0; transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(215, 87, 87, 0.3);
}
.chat-stop-btn.show { display: inline-flex; }
.chat-stop-btn:hover { opacity: 0.9; box-shadow: 0 3px 10px rgba(215, 87, 87, 0.4); }

.chat-input-footer {
  text-align: center; font-size: 10.5px; color: var(--haitang-text-muted);
  letter-spacing: 0.06em; font-family: var(--haitang-font-mono);
  text-transform: uppercase; margin-top: 2px;
}

.think-panel { display: flex; flex-direction: column; min-height: 0; }
.think-head-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--haitang-border);
  flex-shrink: 0; background: var(--haitang-card);
}
.think-title {
  font-family: var(--haitang-font-display);
  font-size: 14px; font-weight: 700; color: var(--haitang-text);
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.01em;
}
.think-title.live .live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--haitang-success);
  box-shadow: 0 0 0 0 rgba(79, 159, 122, 0.5);
  animation: livePulse 1.4s ease-in-out infinite; margin-left: 4px;
}
.live-dot { display: none; }
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 159, 122, 0.4); opacity: 1; }
  50%      { box-shadow: 0 0 0 6px rgba(79, 159, 122, 0);   opacity: 0.55; }
}
.think-fold-btn {
  font-size: 11px; color: var(--haitang-text-muted);
  background: transparent; border: 1px solid var(--haitang-border);
  padding: 5px 12px; border-radius: 6px; cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--haitang-font-mono); font-weight: 500;
}
.think-fold-btn:hover {
  color: var(--haitang-accent);
  border-color: var(--haitang-accent);
  background: var(--haitang-accent-light);
}

.progress-bar {
  height: 3px; background: var(--haitang-canvas);
  margin: 14px 18px 6px; border-radius: 999px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(74, 56, 32, 0.04);
}
.progress-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--haitang-accent-warm), var(--haitang-accent));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 0 6px rgba(193, 138, 74, 0.4);
}
.progress-text {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 10.5px; color: var(--haitang-text-muted);
  margin-bottom: 8px; flex-shrink: 0;
  font-family: var(--haitang-font-mono); letter-spacing: 0.02em;
}

.think-divider { border: none; border-top: 1px solid var(--haitang-border); margin: 0; flex-shrink: 0; }

.think-body {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.25s ease, padding 0.3s ease;
  padding: 16px 18px; flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.think-body.collapsed {
  max-height: 0 !important; opacity: 0;
  padding-top: 0 !important; padding-bottom: 0 !important;
  overflow: hidden; gap: 0;
}

.think-section-title {
  font-size: 11px; font-weight: 700;
  color: var(--haitang-text-light);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--haitang-font-mono);
}
.num-badge {
  font-size: 9.5px; padding: 2px 8px;
  background: var(--haitang-canvas); color: var(--haitang-text-muted);
  border-radius: 999px; font-weight: 600; letter-spacing: 0.03em;
}

.global-goal {
  font-size: 12.5px; color: var(--haitang-text);
  padding: 10px 12px;
  background: var(--haitang-accent-light);
  border-left: 3px solid var(--haitang-accent);
  border-radius: 0 6px 6px 0;
  line-height: 1.6; font-family: var(--haitang-font-body);
}
.global-goal.placeholder {
  color: var(--haitang-text-muted); font-style: italic;
  background: var(--haitang-canvas);
  border-left-color: var(--haitang-border-strong);
}

.think-log-wrap { flex: 1; overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
.log-scroll {
  overflow-y: auto; display: flex; flex-direction: column;
  gap: 8px; padding-right: 2px;
}
.log-scroll::-webkit-scrollbar { width: 4px; }
.log-scroll::-webkit-scrollbar-track { background: transparent; }
.log-scroll::-webkit-scrollbar-thumb { background: var(--haitang-border-strong); border-radius: 4px; }
.log-scroll::-webkit-scrollbar-thumb:hover { background: var(--haitang-accent); }

.think-log-entry {
  padding: 8px 10px 8px 14px;
  border-left: 2px solid var(--haitang-border-strong);
  border-radius: 0 6px 6px 0;
  background: var(--haitang-bg-deep);
  font-size: 11.5px;
  transition: background 0.2s ease;
  font-family: var(--haitang-font-body);
}
.think-log-entry:hover { background: var(--haitang-accent-light); }
.think-log-entry.t-thought { border-left-color: var(--agent-react-thought); background: rgba(107, 111, 196, 0.06); }
.think-log-entry.t-action  { border-left-color: var(--agent-react-action);  background: rgba(193, 138, 74, 0.08); }
.think-log-entry.t-obs     { border-left-color: var(--agent-react-obs);     background: rgba(79, 159, 122, 0.06); }
.think-log-entry.t-reflect { border-left-color: var(--agent-react-reflect); background: rgba(156, 107, 138, 0.06); }
.think-log-entry.t-finish  { border-left-color: var(--agent-react-finish);  background: rgba(39, 103, 73, 0.06); }

.think-log-entry .log-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.log-phase {
  font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; letter-spacing: 0.04em;
}
.think-log-entry.t-thought .log-phase { color: var(--agent-react-thought); background: rgba(107, 111, 196, 0.12); }
.think-log-entry.t-action  .log-phase { color: var(--agent-react-action);  background: rgba(193, 138, 74, 0.14); }
.think-log-entry.t-obs     .log-phase { color: var(--agent-react-obs);     background: rgba(79, 159, 122, 0.12); }
.think-log-entry.t-reflect .log-phase { color: var(--agent-react-reflect); background: rgba(156, 107, 138, 0.12); }
.think-log-entry.t-finish  .log-phase { color: var(--agent-react-finish);  background: rgba(39, 103, 73, 0.14); }
.log-loop { font-size: 9.5px; color: var(--haitang-text-muted); font-family: var(--haitang-font-mono); }
.think-log-entry .log-text {
  color: var(--haitang-text-light); font-size: 11.5px;
  line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}

.think-log-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 52px 12px;
  text-align: center; color: var(--haitang-text-muted);
  font-size: 12px; line-height: 1.7;
}
.think-log-empty .em-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--haitang-canvas), var(--haitang-bg-deep));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 4px;
  color: var(--haitang-accent);
  box-shadow: inset 0 1px 2px rgba(74, 56, 32, 0.06);
  border: 1px solid var(--haitang-border);
}
.think-log-empty .em-icon svg {
  width: 38px; height: 38px;
  display: block;
  fill: currentColor;
}

.tools-section {
  border-top: 1px solid var(--haitang-border);
  padding: 16px 18px; flex-shrink: 0; background: var(--haitang-card);
}
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tool-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  background: var(--haitang-bg-deep);
  border: 1px solid var(--haitang-border);
  border-radius: 12px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-card:hover { background: var(--haitang-accent-light); border-color: var(--haitang-accent); }
.tool-icon {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px;
}
.tool-icon.search   { background: rgba(79, 159, 122, 0.14); color: #3e8a67; }
.tool-icon.recall   { background: rgba(107, 111, 196, 0.14); color: #5a5fb3; }
.tool-icon.research { background: rgba(193, 138, 74, 0.16); color: var(--haitang-accent-deep); }
.tool-icon.note     { background: rgba(156, 107, 138, 0.14); color: #8a5a78; }
.tool-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-name {
  font-size: 11.5px; font-weight: 700; color: var(--haitang-text);
  font-family: var(--haitang-font-mono); letter-spacing: 0;
}
.tool-desc { font-size: 10.5px; color: var(--haitang-text-muted); line-height: 1.3; }

.agent-panel-left  { animation: fadeInLeft  0.55s ease both; }
.chat-panel        { animation: fadeIn      0.55s ease 0.08s both; }
.think-panel       { animation: fadeInRight 0.55s ease 0.16s both; }
@keyframes fadeInLeft  { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn      { from { opacity: 0; }                           to { opacity: 1; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(10px);  } to { opacity: 1; transform: translateX(0); } }

.msg-block { animation: msgIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes msgIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
.msg-block.user { animation-name: msgInUser; }
@keyframes msgInUser { from { opacity: 0; transform: translateX(4px); } to { opacity: 1; transform: translateX(0); } }

.quick-pill { animation: fadeIn 0.5s ease both; }
.quick-pill:nth-child(1) { animation-delay: 0.12s; }
.quick-pill:nth-child(2) { animation-delay: 0.18s; }
.quick-pill:nth-child(3) { animation-delay: 0.24s; }
.quick-pill:nth-child(4) { animation-delay: 0.3s; }

.think-log-entry { animation: logIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes logIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }

/* ===== 优化后的 Markdown 渲染样式 ===== */
.msg-bubble .msg-content { line-height: 1.75; }
.msg-bubble .msg-content p { margin: 0 0 0.75em 0; color: var(--haitang-text, #3a2e1f); }
.msg-bubble .msg-content p:last-child { margin-bottom: 0; }
.md-h { font-family: 'Noto Serif SC', serif; color: var(--haitang-accent, #C18A4A); margin: 0.8em 0 0.4em; font-weight: 600; }
.md-h1 { font-size: 1.5em; }
.md-h2 { font-size: 1.3em; border-bottom: 1px dashed rgba(193,138,74,0.3); padding-bottom: 0.3em; }
.md-h3 { font-size: 1.15em; display: flex; align-items: center; gap: 0.4em; }
.md-h3::before { content: ''; width: 4px; height: 1em; background: var(--haitang-accent, #C18A4A); border-radius: 2px; }
.md-h4 { font-size: 1.05em; color: var(--haitang-text-soft, #5a4a32); }

.md-pre { background: #f8f1e3; border: 1px solid rgba(193,138,74,0.2); border-radius: 10px; padding: 12px 14px; margin: 0.8em 0; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.86em; line-height: 1.6; color: #3a2e1f; }
.md-code { background: rgba(193,138,74,0.12); color: #8a5a2a; padding: 1px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.9em; }
.md-hr { border: none; border-top: 1px dashed rgba(193,138,74,0.25); margin: 1em 0; }

.field-grid { background: linear-gradient(135deg, rgba(251,246,235,0.7), rgba(245,232,210,0.5)); border: 1px solid rgba(193,138,74,0.15); border-radius: 12px; padding: 10px 14px; margin: 0.6em 0; display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 10px; align-items: baseline; font-size: 0.95em; }
.field-key { color: var(--haitang-accent, #C18A4A); font-weight: 600; flex-shrink: 0; min-width: 4.5em; font-family: 'Noto Serif SC', serif; }
.field-val { color: #3a2e1f; flex: 1; word-break: break-word; }
.field-val strong { color: #8a5a2a; }

.md-ol-item { display: flex; gap: 8px; margin: 0.3em 0; padding-left: 4px; }
.md-ol-num { color: var(--haitang-accent, #C18A4A); font-weight: 600; min-width: 1.8em; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.92em; }

/* 错误码标签 */
.error-code { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 0.72em; font-family: 'JetBrains Mono', monospace; color: #8a5a2a; background: rgba(193,138,74,0.12); border: 1px solid rgba(193,138,74,0.3); border-radius: 8px; vertical-align: middle; letter-spacing: 0.05em; }
[data-theme="dark"] .error-code { color: #e5b377; background: rgba(229,179,119,0.12); border-color: rgba(229,179,119,0.3); }

/* 引用块 */
.md-quote { margin: 0.8em 0; padding: 8px 14px; background: rgba(193,138,74,0.06); border-left: 3px solid var(--haitang-accent, #C18A4A); border-radius: 0 8px 8px 0; color: #6b5230; font-size: 0.92em; font-style: italic; }

.md-link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: rgba(193,138,74,0.1); color: #8a5a2a; border: 1px solid rgba(193,138,74,0.25); border-radius: 14px; font-size: 0.85em; text-decoration: none; transition: all 0.2s; margin: 0 2px; font-family: inherit; }
.md-link-btn:hover { background: var(--haitang-accent, #C18A4A); color: #fff; border-color: var(--haitang-accent, #C18A4A); box-shadow: 0 2px 8px rgba(193,138,74,0.3); }
.md-link-primary { background: linear-gradient(135deg, #C18A4A, #D9A55A); color: #fff; border-color: #C18A4A; font-weight: 500; }
.md-link-primary:hover { background: linear-gradient(135deg, #A8763A, #C18A4A); color: #fff; box-shadow: 0 4px 12px rgba(193,138,74,0.4); }

.obs-link { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(193,138,74,0.2); }
.obs-link .md-link-btn { font-size: 0.88em; padding: 5px 12px; }

/* 深色模式 */
[data-theme="dark"] .md-h { color: #e5b377; }
[data-theme="dark"] .md-pre { background: #2a2218; border-color: rgba(229,179,119,0.25); color: #e8d8b8; }
[data-theme="dark"] .md-code { background: rgba(229,179,119,0.15); color: #e5b377; }
[data-theme="dark"] .field-grid { background: linear-gradient(135deg, rgba(50,38,22,0.7), rgba(38,28,18,0.5)); border-color: rgba(229,179,119,0.2); }
[data-theme="dark"] .field-key { color: #e5b377; }
[data-theme="dark"] .field-val { color: #e8d8b8; }
[data-theme="dark"] .field-val strong { color: #f0c890; }
[data-theme="dark"] .md-link-btn { background: rgba(229,179,119,0.12); color: #e5b377; border-color: rgba(229,179,119,0.3); }
[data-theme="dark"] .md-link-btn:hover { background: #e5b377; color: #2a2218; }
[data-theme="dark"] .md-quote { background: rgba(229,179,119,0.06); color: #d8b890; border-left-color: #e5b377; }

/* ===== 主编精选 杂志卡片 ===== */
.article-cards-wrap { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 14px 0; }
.article-card {
  display: grid;
  grid-template-columns: 56px 56px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  margin: 14px 0;
  background: linear-gradient(135deg, #fdf8ec 0%, #f6e8cf 100%);
  border-radius: 16px;
  border: 1px solid rgba(193, 138, 74, 0.18);
  box-shadow: 0 2px 12px rgba(193, 138, 74, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  position: relative;
  transition: box-shadow 0.3s ease;
  /* 不要 translateY ! */
}
.article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  background: linear-gradient(180deg, #C18A4A, #E5B377);
  border-radius: 0 2px 2px 0;
}
.article-card:hover {
  box-shadow: 0 6px 24px rgba(193, 138, 74, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}
.article-card-rank {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #C18A4A 0%, #E5B377 100%);
  color: #fff;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 0.95em;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.3);
  letter-spacing: 0.5px;
}
.article-card-cover {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8em;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(193, 138, 74, 0.15);
}
.article-card-body { min-width: 0; }
.article-card-title {
  margin: 0 0 8px 0;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05em;
  font-weight: 600;
  color: #3a2e1f;
  line-height: 1.4;
}
.article-card-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82em;
  color: #8a6a4a;
}
.article-card-meta .meta-item { display: inline-flex; align-items: center; gap: 3px; }
.article-card-meta .meta-tag {
  padding: 1px 8px;
  background: rgba(193, 138, 74, 0.12);
  color: #8a5a2a;
  border-radius: 10px;
  font-size: 0.92em;
  font-weight: 500;
}
.article-card-summary {
  margin: 6px 0 10px 0;
  font-size: 0.88em;
  line-height: 1.6;
  color: #5a4a32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 14px;
  background: linear-gradient(135deg, #C18A4A, #D9A55A);
  color: #fff !important;
  border-radius: 14px;
  font-size: 0.85em;
  font-weight: 500;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(193, 138, 74, 0.25);
  transition: all 0.2s;
}
.article-card-link:hover {
  background: linear-gradient(135deg, #A8763A, #C18A4A);
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.4);
  color: #fff !important;
}

/* ===== Markdown 表格 ===== */
.md-table-wrap {
  margin: 1em 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(193, 138, 74, 0.2);
}
.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  background: #fdfaf2;
}
.md-table th {
  background: linear-gradient(135deg, #C18A4A, #D9A55A);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-family: 'Noto Serif SC', serif;
  font-weight: 600;
}
.md-table td {
  padding: 10px 14px;
  border-top: 1px solid rgba(193, 138, 74, 0.1);
  color: #3a2e1f;
}
.md-table tr:nth-child(even) td { background: rgba(251, 246, 235, 0.5); }
.md-table tr:hover td { background: rgba(193, 138, 74, 0.06); }

/* ===== 思考区版本（简化版卡片） ===== */
.think-card-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 4px 0; }
.think-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-left: 2px solid rgba(193, 138, 74, 0.4);
  background: rgba(251, 246, 235, 0.55);
  border-radius: 0 6px 6px 0;
  margin: 2px 0;
  transition: background 0.2s ease;
}
.think-card:hover { background: rgba(193, 138, 74, 0.08); }
.think-card-rank {
  font-family: 'Noto Serif SC', serif;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--haitang-accent, #C18A4A);
  background: rgba(193, 138, 74, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.think-card-cover {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.think-card-title {
  font-size: 11.5px;
  color: var(--haitang-text, #3a2e1f);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.think-card-link {
  font-size: 10.5px;
  color: var(--haitang-accent, #C18A4A);
  text-decoration: none;
  flex-shrink: 0;
  padding: 1px 7px;
  background: rgba(193, 138, 74, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(193, 138, 74, 0.2);
  transition: all 0.18s;
}
.think-card-link:hover {
  background: var(--haitang-accent, #C18A4A);
  color: #fff !important;
  border-color: var(--haitang-accent, #C18A4A);
}

/* ===== 深色模式 ===== */
[data-theme="dark"] .article-card {
  background: linear-gradient(135deg, #2a2218 0%, #3a2e1f 100%);
  border-color: rgba(229, 179, 119, 0.2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
[data-theme="dark"] .article-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
[data-theme="dark"] .article-card-title { color: #f0e0c0; }
[data-theme="dark"] .article-card-meta { color: #b89875; }
[data-theme="dark"] .article-card-meta .meta-tag { background: rgba(229, 179, 119, 0.15); color: #e5b377; }
[data-theme="dark"] .article-card-summary { color: #d0b890; }
[data-theme="dark"] .article-card-cover { background: rgba(0, 0, 0, 0.3); border-color: rgba(229, 179, 119, 0.18); }
[data-theme="dark"] .md-table { background: #2a2218; color: #e8d8b8; }
[data-theme="dark"] .md-table td { color: #e8d8b8; border-top-color: rgba(229, 179, 119, 0.15); }
[data-theme="dark"] .md-table tr:nth-child(even) td { background: rgba(229, 179, 119, 0.05); }
[data-theme="dark"] .md-table tr:hover td { background: rgba(229, 179, 119, 0.1); }
[data-theme="dark"] .md-table-wrap { border-color: rgba(229, 179, 119, 0.2); }
[data-theme="dark"] .think-card { background: rgba(229, 179, 119, 0.05); border-left-color: rgba(229, 179, 119, 0.4); }
[data-theme="dark"] .think-card:hover { background: rgba(229, 179, 119, 0.1); }
[data-theme="dark"] .think-card-title { color: #e8d8b8; }
[data-theme="dark"] .think-card-rank { color: #e5b377; background: rgba(229, 179, 119, 0.15); }
[data-theme="dark"] .think-card-link { color: #e5b377; background: rgba(229, 179, 119, 0.1); border-color: rgba(229, 179, 119, 0.25); }
[data-theme="dark"] .think-card-link:hover { background: #e5b377; color: #2a2218 !important; }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .article-card { grid-template-columns: 40px 1fr; gap: 10px; padding: 14px; }
  .article-card-cover { display: none; }
  .article-card-rank { width: 36px; height: 36px; font-size: 0.85em; }
  .article-card-title { font-size: 0.98em; }
  .md-table th, .md-table td { padding: 8px 10px; font-size: 0.85em; }
}

.article-cards-intro {
  margin: 0 0 12px 0;
  padding: 8px 14px;
  background: rgba(193, 138, 74, 0.06);
  border-left: 3px solid var(--haitang-accent, #C18A4A);
  border-radius: 0 8px 8px 0;
  color: #5a4a32;
  font-size: 0.92em;
  line-height: 1.6;
}
[data-theme="dark"] .article-cards-intro {
  background: rgba(229, 179, 119, 0.08);
  color: #d0b890;
}

/* =========================================================
   音乐播放器卡片 · 杂志感黑胶唱片 v3
   设计语言：米色画布 + 琥珀金 + 现代衬线 + 唱片纹路
   - 卡片：玻璃态米色 + 顶部琥珀金装饰线 + 杂志感噪点
   - 唱片：黑胶纹路 + 封面 + 阴影 + 旋转 + 边缘光晕
   - 信息：衬线大标题 + mono 元数据 + 琥珀金小标签
   - 控件：自定义琥珀金音色 + 米色面板
   - 播放态：唱片快速旋转 + 卡片琥珀光晕脉冲
   - 暗色主题：墨黑底 + 暖金高光
   ========================================================= */
.music-player-wrap {
  margin: 18px 0 14px;
  padding: 24px 24px 26px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.94) 0%, rgba(250, 243, 230, 0.82) 100%);
  border: 1px solid var(--haitang-border);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(74, 56, 32, 0.05),
    0 12px 40px rgba(74, 56, 32, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  position: relative;
  overflow: hidden;
}
/* 杂志感噪点纹理 */
.music-player-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.46  0 0 0 0 0.34  0 0 0 0 0.18  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
.music-player-wrap > * { position: relative; z-index: 1; }
/* 顶部琥珀金细线 */
.music-player-wrap::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--haitang-accent) 22%,
    var(--haitang-accent-warm) 50%,
    var(--haitang-accent) 78%,
    transparent 100%);
  opacity: 0.65;
  z-index: 2;
}

/* ---------- 头部 ---------- */
.music-player-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--haitang-border);
  position: relative;
}
.music-player-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 56px; height: 1px;
  background: var(--haitang-accent);
}
.mph-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--haitang-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--haitang-accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.mph-tag {
  background: var(--haitang-accent);
  color: #fff;
  padding: 3px 8px 2px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.18em;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.mph-sep { color: var(--haitang-text-muted); opacity: 0.5; }
.mph-count {
  color: var(--haitang-text-light);
  font-style: italic;
  letter-spacing: 0.1em;
}
.mph-title {
  font-family: 'Noto Serif SC', 'Source Han Serif', 'Songti SC', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.mph-title::before {
  content: "№";
  font-family: 'Georgia', 'Noto Serif SC', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--haitang-accent);
  letter-spacing: 0;
}
.mph-sub {
  font-size: 12px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mph-sub::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--haitang-accent);
  display: inline-block;
}

/* ---------- 列表 ---------- */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- 单张歌曲卡 ---------- */
.mc-card {
  display: grid;
  grid-template-columns: 84px 1fr minmax(220px, 320px);
  gap: 16px;
  align-items: center;
  padding: 14px 16px 14px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(252, 246, 232, 0.4) 100%);
  border: 1px solid var(--haitang-border);
  border-radius: 14px;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  overflow: hidden;
}
/* 左侧琥珀金竖线 */
.mc-card::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: var(--haitang-accent);
  opacity: 0;
  border-radius: 0 2px 2px 0;
  transition: opacity 0.3s ease;
}
.mc-card:hover::before,
.mc-card.is-playing::before { opacity: 1; }
/* 顶部一道细线，hover 时从左滑到右 */
.mc-card::after {
  content: "";
  position: absolute;
  top: 0; left: -40%;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--haitang-accent-warm), transparent);
  transition: left 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 2;
}
.mc-card:hover { border-color: rgba(193, 138, 74, 0.4); }
.mc-card:hover::after { left: 110%; }
.mc-card.is-playing {
  border-color: var(--haitang-accent);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 1) 0%, rgba(252, 238, 214, 0.7) 100%);
  box-shadow:
    0 0 0 1px rgba(193, 138, 74, 0.3),
    0 8px 28px rgba(193, 138, 74, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: mc-glow 2.4s ease-in-out infinite;
}
@keyframes mc-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(193, 138, 74, 0.3), 0 8px 28px rgba(193, 138, 74, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
  50%      { box-shadow: 0 0 0 1px rgba(193, 138, 74, 0.45), 0 12px 36px rgba(193, 138, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
}

/* ---------- 黑胶唱片 ---------- */
.mc-vinyl {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}
.mc-cover-img,
.mc-cover-bg {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 3;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.mc-cover-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 30px;
  font-family: 'Georgia', 'Songti SC', serif;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* 黑胶盘本体 */
.mc-vinyl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      var(--haitang-accent) 0 4px,
      transparent 4px 8px,
      #1a1410 8px 10px,
      transparent 10px 14px,
      #1a1410 14px),
    repeating-radial-gradient(circle at center,
      rgba(255, 255, 255, 0.05) 0 1px,
      rgba(0, 0, 0, 0.6) 1px 2px),
    linear-gradient(135deg, #2a201a 0%, #1a1410 50%, #2a201a 100%);
  z-index: 2;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: mc-spin 18s linear infinite;
  animation-play-state: paused;
  transform-origin: center;
}
/* 黑胶外圈刻度感 */
.mc-vinyl::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px dashed rgba(193, 138, 74, 0.25);
  z-index: 1;
  pointer-events: none;
}
.mc-card:hover .mc-vinyl-disc { animation-play-state: running; }
.mc-card.is-playing .mc-vinyl-disc {
  animation-duration: 4.5s;
  animation-play-state: running;
}
@keyframes mc-spin { to { transform: rotate(360deg); } }

/* ---------- 信息区 ---------- */
.mc-info { min-width: 0; }
.mc-title {
  font-family: 'Noto Serif SC', 'Source Han Serif', 'Songti SC', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--haitang-text);
  line-height: 1.35;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  padding-left: 0;
  transition: padding-left 0.25s ease;
}
.mc-card.is-playing .mc-title {
  padding-left: 18px;
}
.mc-card.is-playing .mc-title::before {
  content: "♪";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--haitang-accent);
  font-size: 14px;
  animation: mc-note 1.6s ease-in-out infinite;
}
@keyframes mc-note {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.15); }
}
.mc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: var(--haitang-text-light);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-meta-2 {
  color: var(--haitang-text-muted);
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.mc-sep { color: var(--haitang-text-muted); opacity: 0.6; }
.mc-artist { font-weight: 500; }
.mc-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px 1px;
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--haitang-font-mono);
  text-transform: uppercase;
  border: 1px solid rgba(193, 138, 74, 0.18);
}
.mc-dur, .mc-stat {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.mc-stat { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- 播放器控件（自定义播放/暂停 + 进度条 + 时间） ---------- */
.mc-player {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  min-width: 0;
}
.mc-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 4px 6px;
  background:
    linear-gradient(180deg, #fbf3e3 0%, #f0e2c5 100%);
  border: 1px solid rgba(193, 138, 74, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(74, 56, 32, 0.06);
}
/* 真正的 audio 元素：定位到屏幕外，保持正常渲染（display:none 会让某些浏览器拒绝 play） */
.mc-audio {
  position: fixed;
  left: -99999px;
  top: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  pointer-events: none;
}

/* 播放/暂停按钮 */
.mc-play-btn {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, var(--haitang-accent-warm) 0%, var(--haitang-accent) 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 2px rgba(74, 56, 32, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  outline: none;
  overflow: visible;
}
.mc-play-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
  box-shadow:
    0 2px 6px rgba(193, 138, 74, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.mc-play-btn:active { transform: scale(0.96); }
.mc-play-btn:focus-visible { box-shadow: 0 0 0 2px rgba(193, 138, 74, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
/* 图标切换：默认显示 play，播放中显示 pause */
.mc-icon-play  { display: inline-flex; }
.mc-icon-pause { display: none; }
.mc-card.is-playing .mc-icon-play  { display: none; }
.mc-card.is-playing .mc-icon-pause { display: inline-flex; }
/* 播放时的环形波纹 */
.mc-play-ripple {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--haitang-accent);
  opacity: 0;
  pointer-events: none;
}
.mc-card.is-playing .mc-play-ripple {
  animation: mc-ripple 1.4s ease-out infinite;
}
@keyframes mc-ripple {
  0%   { transform: scale(1);    opacity: 0.55; }
  100% { transform: scale(1.55); opacity: 0;    }
}

/* 错误状态：按钮变暗灰 + 卡片红边，hover 看原因 */
.mc-play-btn.is-error {
  background: linear-gradient(180deg, #c8c1b3 0%, #9a9285 100%);
  cursor: not-allowed;
  box-shadow: 0 1px 2px rgba(74, 56, 32, 0.12);
}
.mc-play-btn.is-error:hover { transform: none; filter: none; }
.mc-card.is-error {
  border-color: rgba(180, 60, 60, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 250, 250, 0.7) 0%, rgba(255, 235, 235, 0.4) 100%);
}
.mc-card.is-error .mc-time { color: #b43c3c; }

/* 进度条 */
.mc-progress {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 18px;
  cursor: pointer;
}
.mc-progress-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(193, 138, 74, 0.2);
  border-radius: 999px;
  overflow: hidden;
  transition: height 0.18s ease;
}
.mc-progress:hover .mc-progress-bar { height: 5px; }
.mc-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--haitang-accent-warm) 0%, var(--haitang-accent) 100%);
  border-radius: 999px;
  transition: width 0.12s linear;
  box-shadow: 0 0 6px rgba(193, 138, 74, 0.4);
}

/* 时间显示 */
.mc-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--haitang-font-mono);
  font-size: 10.5px;
  color: var(--haitang-text-light);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.mc-time-sep { color: var(--haitang-text-muted); opacity: 0.5; }
.mc-time-cur { color: var(--haitang-accent); font-weight: 600; }
.mc-time-dur { color: var(--haitang-text-muted); }

.mc-no-audio {
  font-family: var(--haitang-font-mono);
  font-size: 11px;
  color: var(--haitang-text-muted);
  padding: 9px 16px;
  background: var(--haitang-accent-light);
  border-radius: 999px;
  border: 1px dashed var(--haitang-border);
  letter-spacing: 0.05em;
}

/* ---------- 歌单网格 ---------- */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.pl-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(252, 246, 232, 0.3) 100%);
  border: 1px solid var(--haitang-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}
.pl-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--haitang-accent);
  transition: width 0.4s ease;
}
.pl-card:hover::before { width: 100%; }
.pl-card:hover {
  border-color: rgba(193, 138, 74, 0.4);
  box-shadow: 0 8px 24px rgba(74, 56, 32, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 1) 0%, rgba(252, 240, 218, 0.5) 100%);
}
.pl-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  background:
    radial-gradient(circle at 30% 30%, #d9a368 0%, #c18a4a 50%, #8b5a2b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 38px;
  font-family: 'Georgia', serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.pl-cover-empty { color: rgba(255, 255, 255, 0.9); }
.pl-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--haitang-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-meta {
  font-family: var(--haitang-font-mono);
  font-size: 10.5px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   暗色主题适配
   ========================================================= */
[data-theme="dark"] .music-player-wrap {
  background:
    linear-gradient(180deg, rgba(34, 28, 20, 0.94) 0%, rgba(22, 18, 14, 0.85) 100%);
  border-color: rgba(229, 179, 119, 0.2);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .music-player-wrap::after {
  opacity: 0.35;
  mix-blend-mode: screen;
}
[data-theme="dark"] .mph-title { color: var(--haitang-text); }
[data-theme="dark"] .mc-card {
  background:
    linear-gradient(180deg, rgba(40, 32, 22, 0.6) 0%, rgba(28, 22, 16, 0.4) 100%);
  border-color: rgba(229, 179, 119, 0.14);
}
[data-theme="dark"] .mc-card:hover { border-color: rgba(229, 179, 119, 0.45); }
[data-theme="dark"] .mc-card.is-playing {
  background:
    linear-gradient(180deg, rgba(48, 36, 24, 1) 0%, rgba(60, 44, 28, 0.85) 100%);
  box-shadow:
    0 0 0 1px rgba(229, 179, 119, 0.45),
    0 10px 32px rgba(229, 179, 119, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .mc-title { color: var(--haitang-text); }
[data-theme="dark"] .mc-meta { color: var(--haitang-text-light); }
[data-theme="dark"] .mc-tag {
  background: rgba(229, 179, 119, 0.16);
  color: #e5b377;
  border-color: rgba(229, 179, 119, 0.25);
}
[data-theme="dark"] .mc-audio {
  filter: invert(0.92) hue-rotate(180deg) sepia(0.2) saturate(0.9);
}
[data-theme="dark"] .mc-audio::-webkit-media-controls-panel {
  background: linear-gradient(180deg, #2a2218 0%, #1f1810 100%);
  border-color: rgba(229, 179, 119, 0.2);
}
[data-theme="dark"] .mc-no-audio {
  background: rgba(229, 179, 119, 0.08);
  border-color: rgba(229, 179, 119, 0.2);
  color: #b8ae99;
}
[data-theme="dark"] .pl-card {
  background:
    linear-gradient(180deg, rgba(40, 32, 22, 0.6) 0%, rgba(28, 22, 16, 0.4) 100%);
  border-color: rgba(229, 179, 119, 0.14);
}
[data-theme="dark"] .pl-card:hover { border-color: rgba(229, 179, 119, 0.4); }
[data-theme="dark"] .pl-name { color: var(--haitang-text); }
[data-theme="dark"] .pl-meta { color: var(--haitang-text-muted); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 760px) {
  .mc-card { grid-template-columns: 60px 1fr; gap: 12px; padding: 12px 14px 12px 10px; }
  .mc-vinyl { width: 56px; height: 56px; }
  .mc-cover-img, .mc-cover-bg { inset: 7px; }
  .mc-cover-bg { font-size: 22px; }
  .mc-player { grid-column: 1 / -1; padding-top: 8px; border-top: 1px dashed var(--haitang-border); }
  .mc-audio { max-width: 100%; height: 38px; }
  .mc-title { font-size: 15px; }
  .music-player-wrap { padding: 20px 16px 22px; }
  .mph-title { font-size: 20px; }
  .mph-eyebrow { font-size: 9.5px; }
}

/* =========================================================
   文章列表卡片（消息区大卡 · 杂志风 · 琥珀金进入按钮）
   - 整张卡是可点击的 <a>，href 实时由 detail_url 渲染
   - 右侧琥珀金"进入"按钮（用 ::after 画箭头避免占位）
   - hover：边框转琥珀金、左侧 2px 竖线浮现、阴影加深
   - 不使用 translateY（避免跳动）
   ========================================================= */
.article-list-wrap {
  margin: 18px 0 14px;
  padding: 22px 22px 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.92) 0%, rgba(251, 246, 235, 0.78) 100%);
  border: 1px solid var(--haitang-border);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(74, 56, 32, 0.04),
    0 8px 32px rgba(74, 56, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  position: relative;
  overflow: hidden;
}

.article-list-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--haitang-border-strong);
  position: relative;
}

.alh-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--haitang-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--haitang-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.alh-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--haitang-accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 9.5px;
}

.alh-sep { color: var(--haitang-border-strong); }

.alh-count {
  font-style: italic;
  color: var(--haitang-text-muted);
}

.alh-title {
  font-family: var(--haitang-font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--haitang-text);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.alh-sub {
  font-size: 12px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
  letter-spacing: 0.02em;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alc-card {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  background: var(--haitang-canvas);
  border: 1px solid var(--haitang-border);
  border-radius: 14px;
  text-decoration: none !important;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
  box-shadow: 0 1px 2px rgba(74, 56, 32, 0.04);
}

.alc-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--haitang-accent);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(.2,.7,.2,1);
}

.alc-card:hover {
  border-color: var(--haitang-accent);
  background: linear-gradient(180deg, #fffaf0 0%, #fbf3e3 100%);
  box-shadow:
    0 1px 2px rgba(74, 56, 32, 0.06),
    0 8px 22px rgba(193, 138, 74, 0.14);
}

.alc-card:hover::before { transform: scaleY(1); }
.alc-card:focus-visible {
  outline: 2px solid var(--haitang-accent);
  outline-offset: 2px;
}

/* 封面区 */
.alc-cover {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--haitang-bg-soft);
}

.alc-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}

.alc-card:hover .alc-cover-img { transform: scale(1.04); }

.alc-cover-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--haitang-font-display);
  font-size: 42px;
  font-weight: 700;
  color: rgba(74, 56, 32, 0.32);
  letter-spacing: 0.02em;
}

.alc-cover-note { line-height: 1; }

.alc-cat-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  font-family: var(--haitang-font-mono);
  font-size: 10px;
  font-weight: 600;
  background: rgba(31, 25, 18, 0.78);
  color: #fbf3e3;
  border-radius: 999px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 中部信息 */
.alc-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.alc-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--haitang-font-mono);
  font-size: 10.5px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.02em;
}

.alc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.alc-title {
  font-family: var(--haitang-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1.35;
  margin: 2px 0 0;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alc-summary {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--haitang-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alc-meta-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--haitang-font-mono);
  font-size: 10.5px;
  color: var(--haitang-text-muted);
  margin-top: auto;
  padding-top: 4px;
}

.alc-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.alc-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.alc-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 右侧"进入"按钮（琥珀金渐变 + 箭头） */
.alc-action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: stretch;
  min-width: 88px;
}

.alc-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--haitang-accent) 0%, var(--haitang-accent-warm, #A56B2A) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(122, 71, 24, 0.18),
    0 6px 16px rgba(193, 138, 74, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.32s ease, transform 0.32s ease;
  pointer-events: none; /* 整张卡已是 <a>，按钮只是视觉元素 */
}

.alc-enter-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.alc-card:hover .alc-enter-btn {
  box-shadow:
    0 1px 2px rgba(122, 71, 24, 0.22),
    0 10px 24px rgba(193, 138, 74, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.alc-card:hover .alc-enter-btn::after { transform: translateX(100%); }

/* 暗色主题 */
html[data-theme="dark"] .article-list-wrap {
  background:
    linear-gradient(180deg, rgba(31, 27, 20, 0.92) 0%, rgba(21, 18, 14, 0.78) 100%);
  border-color: rgba(229, 179, 119, 0.18);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .alc-card {
  background: rgba(31, 27, 20, 0.7);
  border-color: rgba(229, 179, 119, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .alc-card:hover {
  border-color: rgba(229, 179, 119, 0.42);
  background: linear-gradient(180deg, rgba(40, 33, 24, 0.92) 0%, rgba(30, 24, 18, 0.92) 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 22px rgba(229, 179, 119, 0.18);
}

html[data-theme="dark"] .alc-title { color: #f0e6d3; }
html[data-theme="dark"] .alh-title  { color: #f0e6d3; }
html[data-theme="dark"] .alc-summary { color: rgba(229, 220, 200, 0.62); }
html[data-theme="dark"] .alc-cover-bg {
  background: linear-gradient(135deg, #2a2318 0%, #1a1410 100%);
  color: rgba(229, 179, 119, 0.4);
}

html[data-theme="dark"] .alc-tag {
  background: rgba(229, 179, 119, 0.12);
  color: rgba(229, 179, 119, 0.86);
}

html[data-theme="dark"] .alc-enter-btn {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(229, 179, 119, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* 响应式 */
@media (max-width: 720px) {
  .alc-card {
    grid-template-columns: 84px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .alc-cover { width: 84px; height: 84px; }
  .alc-action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    min-width: 0;
  }
  .alh-title { font-size: 17px; }
}

@media (max-width: 460px) {
  .alh-title { font-size: 15px; }
  .alc-cover { width: 72px; height: 72px; }
  .alc-title { font-size: 14px; }
}

/* ============================================================
   会话侧栏 + 实时思考侧栏 · 精致杂志奢雅风 增强层
   设计方向：Editorial Luxury × 米色画布 × 琥珀金
   ============================================================ */

/* --- 通用：面板基底注入柔和多层光影 + 细腻边角纹理 --- */
.agent-panel-left,
.agent-panel-right {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9) 0%, rgba(252, 247, 236, 0.78) 42%, rgba(250, 243, 229, 0.72) 100%),
    var(--haitang-card);
  position: relative;
}
.agent-panel-left::before,
.agent-panel-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(193, 138, 74, 0.18) 50%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}
.agent-panel-left::after,
.agent-panel-right::after {
  content: '';
  position: absolute;
  top: 12px;
  width: 34px; height: 34px;
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
  background:
    linear-gradient(135deg, transparent 50%, rgba(193, 138, 74, 0.14) 50%, rgba(193, 138, 74, 0.14) 60%, transparent 60%),
    linear-gradient(135deg, transparent 46%, rgba(193, 138, 74, 0.07) 46%, rgba(193, 138, 74, 0.07) 65%, transparent 65%);
}
.agent-panel-left::after  { right: 12px; }
.agent-panel-right::after { left: 12px;  transform: scaleX(-1); }

html[data-theme="dark"] .agent-panel-left,
html[data-theme="dark"] .agent-panel-right {
  background:
    linear-gradient(180deg, rgba(38, 33, 26, 0.72) 0%, rgba(30, 26, 20, 0.82) 100%),
    var(--haitang-card);
}
html[data-theme="dark"] .agent-panel-left::before,
html[data-theme="dark"] .agent-panel-right::before {
  background: linear-gradient(90deg, transparent 0%, rgba(229, 179, 119, 0.22) 50%, transparent 100%);
}

/* ============================================================
   左栏：会话记录
   ============================================================ */
.session-list-head {
  padding: 20px 22px 14px;
  position: relative;
}
.session-list-head::after {
  content: '';
  position: absolute;
  left: 22px; right: 22px;
  bottom: 0;
  height: 1px;
  background:
    linear-gradient(90deg, var(--haitang-border-strong) 0%, transparent 45%, transparent 55%, var(--haitang-border-strong) 100%);
  opacity: 0.6;
}
.session-list-title {
  font-size: 14.5px;
  letter-spacing: 0.02em;
  position: relative;
  padding-left: 2px;
}
.session-list-title::before {
  content: 'ARCHIVES';
  display: block;
  font-family: var(--haitang-font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--haitang-accent);
  opacity: 0.85;
  margin-bottom: 4px;
}
.session-list-title .count {
  background:
    linear-gradient(135deg, var(--haitang-accent-light), rgba(193, 138, 74, 0.08));
  border: 1px solid rgba(193, 138, 74, 0.2);
  color: var(--haitang-accent-warm, #8a5a1e);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 新会话按钮：杂志 CTA 胶囊 */
.session-new-btn {
  position: relative;
  padding: 12px 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.95) 0%, rgba(250, 243, 229, 0.92) 100%);
  border: 1px solid rgba(193, 138, 74, 0.32);
  color: var(--haitang-accent-warm, #8a5a1e);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 6px rgba(74, 56, 32, 0.05),
    0 8px 18px -10px rgba(193, 138, 74, 0.28);
}
.session-new-btn::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px dashed rgba(193, 138, 74, 0.3);
  border-radius: 14px;
  pointer-events: none;
  opacity: 0.6;
}
.session-new-btn:hover {
  background:
    linear-gradient(180deg, var(--haitang-accent-light) 0%, rgba(193, 138, 74, 0.1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 14px -6px rgba(193, 138, 74, 0.4);
}

/* 会话列表：滚动条精致化 */
.session-list {
  padding: 10px 14px 24px;
  gap: 7px;
  position: relative;
}

/* 会话项：卡片化 + 编号点 + 精致悬浮 */
.session-item {
  position: relative;
  padding: 13px 14px 13px 38px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.6), rgba(250, 243, 229, 0.35));
  border: 1px solid rgba(193, 138, 74, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(74, 56, 32, 0.02);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}
.session-item::before {
  content: '';
  position: absolute;
  left: 16px; top: 18px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(193, 138, 74, 0.25);
  border: 1.5px solid rgba(193, 138, 74, 0.5);
  transition: all 0.25s ease;
  box-shadow: 0 0 0 2px rgba(193, 138, 74, 0.05);
}
.session-item::after {
  content: '';
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: 16px; height: 16px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C18A4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6l6 6-6 6'/></svg>");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: all 0.28s ease;
}
.session-item:hover {
  transform: translateX(3px);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(250, 243, 229, 0.7));
  border-color: rgba(193, 138, 74, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 14px -6px rgba(193, 138, 74, 0.25);
}
.session-item:hover::before {
  background: var(--haitang-accent);
  border-color: var(--haitang-accent);
  box-shadow: 0 0 0 4px rgba(193, 138, 74, 0.12), 0 0 10px rgba(193, 138, 74, 0.4);
}
.session-item:hover::after {
  opacity: 0.85;
  transform: translateY(-50%) translateX(0);
}
.session-item.active {
  background:
    linear-gradient(135deg, rgba(193, 138, 74, 0.12) 0%, rgba(165, 107, 42, 0.06) 100%),
    var(--haitang-accent-light);
  border-color: rgba(193, 138, 74, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 4px 18px -6px rgba(193, 138, 74, 0.32),
    0 0 0 1px rgba(193, 138, 74, 0.08);
}
.session-item.active::before {
  background: var(--haitang-accent);
  border-color: var(--haitang-accent);
  box-shadow: 0 0 0 4px rgba(193, 138, 74, 0.18), 0 0 12px rgba(193, 138, 74, 0.5);
}
.session-item.active::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.session-query {
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 7px;
}
.session-item.active .session-query {
  color: #6b4419;
  font-weight: 600;
}
.session-meta {
  font-size: 10.5px;
  letter-spacing: 0.03em;
}
html[data-theme="dark"] .session-item.active .session-query { color: #f2dcb8; }

/* 会话空状态：杂志感书签 */
.session-empty {
  padding: 72px 18px 64px;
  position: relative;
}
.session-empty::before {
  content: 'NO. 00';
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--haitang-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--haitang-accent);
  opacity: 0.75;
}
.session-empty::after {
  content: '';
  position: absolute;
  width: 56px; height: 1px;
  bottom: 44px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--haitang-border-strong), transparent);
}
.session-empty .em-icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.95), rgba(246, 236, 218, 0.9)),
    linear-gradient(135deg, var(--haitang-canvas), var(--haitang-bg-deep));
  border: 1px solid rgba(193, 138, 74, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 24px -10px rgba(193, 138, 74, 0.35);
  position: relative;
}
.session-empty .em-icon::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 18px; height: 18px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(193, 138, 74, 0.2) 50%, rgba(193, 138, 74, 0.2) 60%, transparent 60%);
  border-radius: 0 22px 0 10px;
}

/* ============================================================
   右栏：实时思考
   ============================================================ */
.think-head-row {
  padding: 22px 20px 16px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(250, 243, 229, 0.82));
}
.think-head-row::after {
  content: '';
  position: absolute;
  left: 20px; right: 20px;
  bottom: 0;
  height: 1px;
  background:
    linear-gradient(90deg, var(--haitang-border-strong) 0%, transparent 40%, transparent 60%, var(--haitang-border-strong) 100%);
  opacity: 0.55;
}
.think-title {
  font-size: 13.5px;
  letter-spacing: 0.025em;
  position: relative;
  padding-left: 2px;
}
.think-title::before {
  content: 'LIVE · REACT';
  display: block;
  font-family: var(--haitang-font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--haitang-accent);
  opacity: 0.9;
  margin-bottom: 4px;
}
.think-title .live-dot {
  width: 8px; height: 8px;
}

/* 展开/收起按钮：精致胶囊 */
.think-fold-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border-color: rgba(193, 138, 74, 0.25);
  background: rgba(255, 253, 247, 0.7);
  font-weight: 600;
  color: var(--haitang-text-light);
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.think-fold-btn:hover {
  color: var(--haitang-accent-warm, #8a5a1e);
  border-color: rgba(193, 138, 74, 0.45);
  background:
    linear-gradient(180deg, var(--haitang-accent-light), rgba(193, 138, 74, 0.08));
  box-shadow: 0 3px 10px -4px rgba(193, 138, 74, 0.35);
}

/* 进度条：杂志分栏里程碑 */
.progress-bar {
  height: 5px;
  margin: 16px 20px 6px;
  background:
    linear-gradient(90deg,
      rgba(193, 138, 74, 0.08) 0%,
      rgba(193, 138, 74, 0.14) 50%,
      rgba(193, 138, 74, 0.08) 100%);
  position: relative;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 2px rgba(74, 56, 32, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}
.progress-bar::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 0;
  pointer-events: none;
  height: 0;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 0; right: 0;
  height: 0;
  background: none;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg,
    #E3B074 0%,
    var(--haitang-accent-warm) 30%,
    var(--haitang-accent) 60%,
    #A56B2A 100%);
  border-radius: 999px;
  position: relative;
  box-shadow:
    0 0 6px rgba(193, 138, 74, 0.5),
    0 0 14px -3px rgba(193, 138, 74, 0.4);
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: -2px;
  width: 5px; height: 100%;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  opacity: 0.85;
}
.progress-text {
  padding: 0 20px;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.progress-text #phaseText {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(193, 138, 74, 0.08);
  color: var(--haitang-accent-warm, #8a5a1e);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* 思考区块标题 + 编号徽章 */
.think-section-title {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  position: relative;
  padding: 6px 0 4px;
}
.think-section-title::before {
  content: '';
  position: absolute;
  left: -4px; top: 0; bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--haitang-accent-warm), transparent);
  opacity: 0.7;
  border-radius: 2px;
}
.num-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--haitang-accent-light), rgba(193, 138, 74, 0.06));
  border: 1px solid rgba(193, 138, 74, 0.2);
  color: var(--haitang-accent-warm, #8a5a1e);
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 全局目标：纸条约 + 琥珀丝带角 + 首字下沉 */
.global-goal {
  position: relative;
  padding: 14px 14px 14px 18px;
  margin-top: 2px;
  border-radius: 10px;
  border-left: none;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96) 0%, rgba(250, 243, 229, 0.86) 100%);
  border: 1px solid rgba(193, 138, 74, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 14px -8px rgba(193, 138, 74, 0.35);
  font-size: 12px;
  line-height: 1.7;
  overflow: hidden;
}
.global-goal::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; bottom: -1px;
  width: 4px;
  background: linear-gradient(180deg, #E3B074 0%, var(--haitang-accent) 50%, #A56B2A 100%);
  border-radius: 10px 0 0 10px;
  box-shadow: 2px 0 10px rgba(193, 138, 74, 0.22);
}
.global-goal::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(193, 138, 74, 0.18) 50%, rgba(193, 138, 74, 0.22) 58%, transparent 58%);
  pointer-events: none;
}
.global-goal.placeholder {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.6), rgba(250, 243, 229, 0.35));
  border-color: var(--haitang-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-style: italic;
  color: var(--haitang-text-muted);
}
.global-goal.placeholder::before {
  background: linear-gradient(180deg, var(--haitang-border-strong), var(--haitang-border));
}

/* 思考时间线：垂直连接线 + 阶段卡 */
.think-body { padding: 18px 20px; gap: 16px; }

.log-scroll {
  gap: 14px;
  padding-left: 18px;
  position: relative;
  padding-right: 2px;
}
.log-scroll::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px; bottom: 8px;
  width: 1.5px;
  background:
    linear-gradient(180deg,
      rgba(193, 138, 74, 0.35) 0%,
      rgba(193, 138, 74, 0.18) 40%,
      rgba(193, 138, 74, 0.12) 100%);
  border-radius: 2px;
}

.think-log-entry {
  position: relative;
  padding: 12px 12px 12px 12px;
  border-left: none;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(250, 243, 229, 0.65));
  border: 1px solid rgba(193, 138, 74, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(74, 56, 32, 0.03);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  animation: logSlideIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes logSlideIn {
  0%   { opacity: 0; transform: translateY(6px) translateX(-2px); }
  100% { opacity: 1; transform: translateY(0) translateX(0); }
}
.think-log-entry::before {
  content: none !important;
  display: none !important;
  width: 0 !important; height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  left: auto !important; top: auto !important;
}
.think-log-entry:hover {
  transform: translateX(2px);
  border-color: rgba(193, 138, 74, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 5px 14px -6px rgba(193, 138, 74, 0.28);
}

.think-log-entry.t-thought {
  background:
    linear-gradient(180deg, rgba(246, 245, 255, 0.95), rgba(232, 232, 253, 0.55));
  border-color: rgba(107, 111, 196, 0.22);
}
.think-log-entry.t-thought::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}
.think-log-entry.t-action {
  background:
    linear-gradient(180deg, rgba(254, 248, 238, 0.97), rgba(250, 236, 214, 0.65));
  border-color: rgba(193, 138, 74, 0.3);
}
.think-log-entry.t-action::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}
.think-log-entry.t-obs {
  background:
    linear-gradient(180deg, rgba(241, 251, 245, 0.96), rgba(227, 246, 235, 0.55));
  border-color: rgba(79, 159, 122, 0.22);
}
.think-log-entry.t-obs::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}
.think-log-entry.t-reflect {
  background:
    linear-gradient(180deg, rgba(250, 243, 247, 0.96), rgba(243, 229, 238, 0.55));
  border-color: rgba(156, 107, 138, 0.22);
}
.think-log-entry.t-reflect::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}
.think-log-entry.t-finish {
  background:
    linear-gradient(180deg, rgba(237, 249, 242, 0.97), rgba(215, 241, 227, 0.65));
  border-color: rgba(39, 103, 73, 0.25);
}
.think-log-entry.t-finish::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}

/* meta + phase 胶囊：chips 风 */
.think-log-entry .log-meta {
  gap: 10px;
  margin-bottom: 8px;
}
.log-phase {
  font-family: var(--haitang-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  position: relative;
}
.log-loop {
  font-family: var(--haitang-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(193, 138, 74, 0.06);
}
.think-log-entry .log-text {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--haitang-text);
  letter-spacing: 0.005em;
}

/* 思考空状态：杂志 EDITORIAL 风格 */
.think-log-empty {
  padding: 72px 14px 56px;
  gap: 14px;
  position: relative;
}
.think-log-empty::before {
  content: 'ISSUE · 待思考';
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--haitang-font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--haitang-accent);
  opacity: 0.8;
}
.think-log-empty::after {
  content: '';
  position: absolute;
  width: 64px; height: 1px;
  bottom: 38px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--haitang-border-strong), transparent);
}
.think-log-empty .em-icon {
  width: 72px; height: 72px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.96), rgba(246, 236, 218, 0.9));
  border: 1px solid rgba(193, 138, 74, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 28px -12px rgba(193, 138, 74, 0.4);
  color: var(--haitang-accent-warm, #8a5a1e);
  margin-bottom: 8px;
  position: relative;
}
.think-log-empty .em-icon::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 20px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(193, 138, 74, 0.22) 50%, rgba(193, 138, 74, 0.28) 60%, transparent 60%);
  border-radius: 0 24px 0 10px;
}
.think-log-empty .em-icon svg { width: 40px; height: 40px; }

/* 暗色主题适配 */
html[data-theme="dark"] .think-log-entry {
  background: linear-gradient(180deg, rgba(44, 37, 28, 0.7), rgba(34, 29, 22, 0.5));
  border-color: rgba(229, 179, 119, 0.15);
}
html[data-theme="dark"] .think-log-entry::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important; height: 0 !important;
}
html[data-theme="dark"] .think-log-entry.t-thought {
  background: linear-gradient(180deg, rgba(70, 68, 104, 0.35), rgba(40, 39, 64, 0.22));
  border-color: rgba(155, 155, 228, 0.28);
}
html[data-theme="dark"] .think-log-entry.t-action {
  background: linear-gradient(180deg, rgba(80, 59, 30, 0.4), rgba(50, 38, 20, 0.25));
  border-color: rgba(229, 179, 119, 0.32);
}
html[data-theme="dark"] .think-log-entry.t-obs {
  background: linear-gradient(180deg, rgba(44, 80, 62, 0.35), rgba(28, 52, 40, 0.22));
  border-color: rgba(127, 199, 168, 0.28);
}
html[data-theme="dark"] .think-log-entry.t-reflect {
  background: linear-gradient(180deg, rgba(78, 56, 68, 0.35), rgba(46, 33, 40, 0.22));
  border-color: rgba(211, 155, 191, 0.28);
}
html[data-theme="dark"] .think-log-entry.t-finish {
  background: linear-gradient(180deg, rgba(36, 70, 50, 0.45), rgba(24, 50, 36, 0.28));
  border-color: rgba(127, 199, 168, 0.35);
}
html[data-theme="dark"] .global-goal {
  background: linear-gradient(180deg, rgba(50, 42, 30, 0.75), rgba(36, 30, 22, 0.7));
  border-color: rgba(229, 179, 119, 0.28);
  color: #f3e7d2;
}
html[data-theme="dark"] .session-new-btn {
  background: linear-gradient(180deg, rgba(52, 43, 32, 0.7), rgba(40, 33, 24, 0.6));
  border-color: rgba(229, 179, 119, 0.35);
  color: #e9c88f;
}
html[data-theme="dark"] .session-item {
  background: linear-gradient(180deg, rgba(48, 40, 30, 0.55), rgba(36, 30, 22, 0.4));
  border-color: rgba(229, 179, 119, 0.12);
}
html[data-theme="dark"] .session-item:hover {
  background: linear-gradient(180deg, rgba(58, 47, 34, 0.75), rgba(42, 34, 24, 0.55));
}
html[data-theme="dark"] .session-item.active {
  background: linear-gradient(135deg, rgba(82, 58, 28, 0.55), rgba(54, 38, 20, 0.3));
  border-color: rgba(229, 179, 119, 0.5);
}
html[data-theme="dark"] .think-head-row {
  background: linear-gradient(180deg, rgba(50, 42, 30, 0.75), rgba(40, 33, 24, 0.65));
}
html[data-theme="dark"] .think-fold-btn {
  background: rgba(52, 43, 32, 0.6);
  border-color: rgba(229, 179, 119, 0.28);
  color: #e9c88f;
}
html[data-theme="dark"] .think-log-empty::before,
html[data-theme="dark"] .session-empty::before { color: #e9c88f; opacity: 0.75; }
html[data-theme="dark"] .think-log-empty .em-icon,
html[data-theme="dark"] .session-empty .em-icon {
  background: linear-gradient(145deg, rgba(52, 43, 32, 0.8), rgba(36, 30, 22, 0.72));
  border-color: rgba(229, 179, 119, 0.3);
  color: #e9c88f;
}

/* ============================================================
   补丁 v2 · DOM 实测后精修（think-head 细节 + 胶囊质感补全）
   ============================================================ */

/* --- (1) LIVE 呼吸点：强制常驻显示 + 琥珀金发光动画 --- */
.think-title .live-dot,
.live-dot {
  display: inline-block !important;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--haitang-accent);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow:
    0 0 0 2px rgba(193, 138, 74, 0.12),
    0 0 8px 0 rgba(193, 138, 74, 0.55);
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 0.82; transform: scale(1); box-shadow: 0 0 0 2px rgba(193,138,74,.12), 0 0 8px 0 rgba(193,138,74,.5); }
  50%     { opacity: 1;    transform: scale(1.1); box-shadow: 0 0 0 3px rgba(193,138,74,.22), 0 0 14px 2px rgba(193,138,74,.8); }
}

/* --- (2) 折叠按钮 think-fold-btn · 杂志 CTA 胶囊质感 --- */
.think-fold-btn {
  position: relative;
  padding: 6px 14px !important;
  height: auto;
  color: var(--haitang-accent-warm, #8a5a1e) !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98) 0%, rgba(250, 243, 229, 0.94) 100%) !important;
  border: 1px solid rgba(193, 138, 74, 0.32) !important;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 6px rgba(74, 56, 32, 0.05),
    0 8px 18px -10px rgba(193, 138, 74, 0.32) !important;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .28s ease, border-color .28s ease, background .28s ease;
}
.think-fold-btn::before {
  content: '' !important;
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border: 1px dashed rgba(193, 138, 74, 0.28);
  border-radius: 999px;
  pointer-events: none;
}
.think-fold-btn:hover {
  transform: translateX(2px);
  border-color: rgba(193, 138, 74, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(74, 56, 32, 0.08),
    0 14px 26px -12px rgba(193, 138, 74, 0.5) !important;
}

/* --- (3) section-tag-mini · 头部状态胶囊质感 --- */
.section-tag-mini {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 4px 10px !important;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--haitang-accent-warm, #8a5a1e) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg, var(--haitang-accent-light), rgba(193, 138, 74, 0.08)) !important;
  border: 1px solid rgba(193, 138, 74, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 3px rgba(193, 138, 74, 0.06);
}

/* --- (4) phaseText · 进度文本阶段徽章 --- */
.progress-text #phaseText,
.progress-text .phase-chip,
.progress-text [class*="phase"] {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px !important;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--haitang-accent-warm, #8a5a1e) !important;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--haitang-accent-light), rgba(193, 138, 74, 0.08)) !important;
  border: 1px solid rgba(193, 138, 74, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============================================================
   补丁 v2 · 暗色主题对应覆盖
   ============================================================ */
html[data-theme="dark"] .think-title .live-dot,
html[data-theme="dark"] .live-dot {
  background: var(--haitang-accent-warm, #e9c88f);
  box-shadow:
    0 0 0 2px rgba(229, 179, 119, 0.16),
    0 0 10px 0 rgba(229, 179, 119, 0.7);
}
html[data-theme="dark"] @keyframes livePulse {
  0%,100% { opacity: 0.85; transform: scale(1); box-shadow: 0 0 0 2px rgba(229,179,119,.16), 0 0 10px 0 rgba(229,179,119,.6); }
  50%     { opacity: 1;    transform: scale(1.1); box-shadow: 0 0 0 3px rgba(229,179,119,.26), 0 0 16px 2px rgba(229,179,119,.9); }
}
html[data-theme="dark"] .think-fold-btn {
  color: var(--haitang-accent-warm, #e9c88f) !important;
  background:
    linear-gradient(180deg, rgba(50, 42, 32, 0.98), rgba(40, 33, 24, 0.96)) !important;
  border-color: rgba(229, 179, 119, 0.34) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.22),
    0 8px 18px -10px rgba(229, 179, 119, 0.28) !important;
}
html[data-theme="dark"] .think-fold-btn::before {
  border-color: rgba(229, 179, 119, 0.22);
}
html[data-theme="dark"] .think-fold-btn:hover {
  border-color: rgba(229, 179, 119, 0.58) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.28),
    0 14px 28px -12px rgba(229, 179, 119, 0.45) !important;
}
html[data-theme="dark"] .section-tag-mini {
  color: var(--haitang-accent-warm, #e9c88f) !important;
  background:
    linear-gradient(135deg, rgba(229, 179, 119, 0.14), rgba(229, 179, 119, 0.06)) !important;
  border-color: rgba(229, 179, 119, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.22);
}
html[data-theme="dark"] .progress-text #phaseText,
html[data-theme="dark"] .progress-text .phase-chip,
html[data-theme="dark"] .progress-text [class*="phase"] {
  color: var(--haitang-accent-warm, #e9c88f) !important;
  background:
    linear-gradient(135deg, rgba(229, 179, 119, 0.14), rgba(229, 179, 119, 0.06)) !important;
  border-color: rgba(229, 179, 119, 0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ============================================================
   v3 · 去会话栏后思考板块视觉精修
   设计：圆角统一加大 · 间距更舒展 · 配色更柔和精致
   ============================================================ */

/* --- 面板整体：更大圆角 + 柔和多层渐变背景 --- */
.think-panel {
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96) 0%, rgba(252, 247, 236, 0.88) 40%, rgba(250, 243, 229, 0.82) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 3px rgba(74, 56, 32, 0.03);
  overflow: hidden;
}
html[data-theme="dark"] .think-panel {
  background:
    linear-gradient(180deg, rgba(38, 33, 26, 0.82) 0%, rgba(30, 26, 20, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.15);
}

/* --- 头部：padding 加大 + 底部渐变线精修 --- */
.think-head-row {
  padding: 24px 24px 18px !important;
  border-bottom: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98) 0%, rgba(250, 243, 229, 0.92) 100%) !important;
  border-radius: 20px 20px 0 0;
}
.think-head-row::after {
  left: 24px !important;
  right: 24px !important;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(193, 138, 74, 0.22) 30%, rgba(193, 138, 74, 0.22) 70%, transparent) !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .think-head-row {
  background:
    linear-gradient(180deg, rgba(50, 42, 32, 0.98) 0%, rgba(40, 33, 24, 0.92) 100%) !important;
}
html[data-theme="dark"] .think-head-row::after {
  background: linear-gradient(90deg, transparent, rgba(229, 179, 119, 0.28) 30%, rgba(229, 179, 119, 0.28) 70%, transparent) !important;
}

/* --- 进度条区域：margin 间距加大 --- */
.progress-bar {
  margin: 16px 24px 8px !important;
}
.progress-text {
  padding: 0 24px !important;
  margin-bottom: 10px !important;
}

/* --- 主体：padding + gap 更舒展 --- */
.think-body {
  padding: 20px 24px !important;
  gap: 18px !important;
}
.think-body.collapsed {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  gap: 0 !important;
}

/* --- 小节标题：加左侧装饰短线 --- */
.think-section-title {
  font-size: 11.5px !important;
  letter-spacing: 0.1em !important;
  padding-left: 14px;
  position: relative;
}
.think-section-title::before {
  content: '' !important;
  position: absolute !important;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--haitang-accent), rgba(193, 138, 74, 0.2)) !important;
  border-radius: 999px !important;
  display: block !important;
  margin: 0 !important;
}
html[data-theme="dark"] .think-section-title::before {
  background: linear-gradient(90deg, var(--haitang-accent-warm, #e9c88f), rgba(229, 179, 119, 0.25)) !important;
}

/* --- 全局目标：四角圆角 + padding 加大 --- */
.global-goal {
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}
.global-goal::before {
  border-radius: 12px 0 0 12px !important;
}

/* --- 时间线滚动区：gap + padding 加大 --- */
.log-scroll {
  gap: 10px !important;
  padding: 4px 4px 4px 0;
}
.log-scroll::before {
  left: 24px !important;
}

/* --- 思考条目：圆角加大 + padding 加大 + 五阶段配色更柔和 --- */
.think-log-entry {
  border-radius: 12px !important;
  padding: 12px 14px 12px 18px !important;
  font-size: 12px !important;
  line-height: 1.65;
}
.think-log-entry::before {
  display: none !important;
  content: none !important;
  width: 0 !important; height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  left: auto !important; top: auto !important;
}
.think-log-entry .log-text {
  font-size: 12px !important;
  line-height: 1.7 !important;
}
.think-log-entry.t-thought {
  background: linear-gradient(135deg, rgba(107, 111, 196, 0.05) 0%, rgba(107, 111, 196, 0.02) 100%) !important;
}
.think-log-entry.t-action {
  background: linear-gradient(135deg, rgba(193, 138, 74, 0.07) 0%, rgba(193, 138, 74, 0.03) 100%) !important;
}
.think-log-entry.t-obs {
  background: linear-gradient(135deg, rgba(79, 159, 122, 0.05) 0%, rgba(79, 159, 122, 0.02) 100%) !important;
}
.think-log-entry.t-reflect {
  background: linear-gradient(135deg, rgba(156, 107, 138, 0.05) 0%, rgba(156, 107, 138, 0.02) 100%) !important;
}
.think-log-entry.t-finish {
  background: linear-gradient(135deg, rgba(39, 103, 73, 0.06) 0%, rgba(39, 103, 73, 0.02) 100%) !important;
}
html[data-theme="dark"] .think-log-entry.t-thought {
  background: linear-gradient(135deg, rgba(155, 155, 228, 0.1) 0%, rgba(155, 155, 228, 0.04) 100%) !important;
}
html[data-theme="dark"] .think-log-entry.t-action {
  background: linear-gradient(135deg, rgba(229, 179, 119, 0.12) 0%, rgba(229, 179, 119, 0.05) 100%) !important;
}
html[data-theme="dark"] .think-log-entry.t-obs {
  background: linear-gradient(135deg, rgba(127, 199, 168, 0.1) 0%, rgba(127, 199, 168, 0.04) 100%) !important;
}
html[data-theme="dark"] .think-log-entry.t-reflect {
  background: linear-gradient(135deg, rgba(211, 155, 191, 0.1) 0%, rgba(211, 155, 191, 0.04) 100%) !important;
}
html[data-theme="dark"] .think-log-entry.t-finish {
  background: linear-gradient(135deg, rgba(127, 199, 168, 0.12) 0%, rgba(127, 199, 168, 0.05) 100%) !important;
}

/* --- log-phase chip 圆角加大 --- */
.log-phase {
  border-radius: 8px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
}

/* --- 空状态：padding 加大 --- */
.think-log-empty {
  padding: 56px 16px !important;
  gap: 14px !important;
}

/* --- num-badge 胶囊质感 --- */
.num-badge {
  font-size: 10px !important;
  padding: 3px 10px !important;
}

/* ============================================================
   v4 · 整体布局视觉重塑（解决"别扭感"）
   痛点：主区无内边距 / 面板紧贴边缘 / 消息区与输入框重叠
        / 面板无呼吸 / 缺乏层次
   ============================================================ */

/* --- 1. agent-page：注入四周留白 + 上下结构化间距 --- */
.agent-page {
  top: calc(var(--agent-header-h) + 16px) !important;
  bottom: calc(var(--agent-header-h) - 60px) !important; /* 给 fixed 输入框留位 */
  left: 12px !important;
  right: 12px !important;
  gap: 18px !important;
  border-radius: 22px;
  padding: 6px;
  background: transparent;
}

/* --- 2. 面板通用：卡片化容器 + 圆角 + 柔和投影 --- */
.agent-panel {
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 2px 8px rgba(74, 56, 32, 0.04),
    0 18px 38px -22px rgba(74, 56, 32, 0.18);
  overflow: hidden;
  position: relative;
}
html[data-theme="dark"] .agent-panel {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 18px 38px -22px rgba(0, 0, 0, 0.4);
}

/* --- 3. chat-panel：与 think-panel 等高 + 整体米色画布 --- */
.chat-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98) 0%, rgba(252, 247, 236, 0.92) 60%, rgba(250, 243, 229, 0.88) 100%);
}
html[data-theme="dark"] .chat-panel {
  background:
    linear-gradient(180deg, rgba(38, 33, 26, 0.92) 0%, rgba(30, 26, 20, 0.95) 100%);
}

/* --- 4. chat-header：精修 padding + 底部装饰线 --- */
.chat-header {
  padding: 20px 24px 16px !important;
  border-bottom: 1px solid transparent;
  background: transparent;
  position: relative;
}
.chat-header::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(193, 138, 74, 0.22) 30%, rgba(193, 138, 74, 0.22) 70%, transparent);
}
html[data-theme="dark"] .chat-header::after {
  background: linear-gradient(90deg, transparent, rgba(229, 179, 119, 0.28) 30%, rgba(229, 179, 119, 0.28) 70%, transparent);
}

/* --- 5. chat-messages：底部留白充足，避免与 fixed 输入框冲突 --- */
.chat-messages {
  padding: 22px 28px 180px 28px !important; /* 180px 留给 fixed 输入框 + 安全间距 */
  gap: 18px !important;
  scrollbar-gutter: stable;
}

/* --- 6. think-panel 微调：与 chat-panel 等高感 --- */
.think-panel {
  margin: 0 !important;
}

/* --- 7. think-panel 子内容 padding 对齐 chat-panel --- */
.think-head-row {
  padding: 20px 24px 16px !important;
}
.think-body {
  padding: 20px 24px !important;
  gap: 16px !important;
}
.progress-bar {
  margin: 14px 24px 8px !important;
}
.progress-text {
  padding: 0 24px !important;
}

/* --- 8. chat-input-wrap：浮起感 + 圆角 + 阴影 + 半透明画布 --- */
.chat-input-wrap {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 22px !important;
  width: min(720px, 600px) !important;
  max-width: calc(100vw - 420px) !important;
  padding: 0 !important;
  background: transparent !important;
  border-top: none !important;
  z-index: 20;
}
html[data-theme="dark"] .chat-input-wrap {
  background: transparent !important;
  border-top: none !important;
}
.chat-input-box {
  padding: 10px 10px 10px 20px !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96) 0%, rgba(252, 247, 236, 0.92) 100%) !important;
  border: 1px solid rgba(193, 138, 74, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 4px 16px rgba(74, 56, 32, 0.06),
    0 24px 48px -16px rgba(74, 56, 32, 0.22) !important;
}
html[data-theme="dark"] .chat-input-box {
  background:
    linear-gradient(180deg, rgba(50, 42, 30, 0.96) 0%, rgba(40, 33, 24, 0.92) 100%) !important;
  border-color: rgba(229, 179, 119, 0.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.18),
    0 24px 48px -16px rgba(0, 0, 0, 0.5) !important;
}

/* --- 9. 移动端断点：<=1100 输入框切换为贴底全宽 --- */
@media (max-width: 1100px) {
  .chat-input-wrap {
    width: calc(100% - 60px) !important;
  }
}
@media (max-width: 760px) {
  .agent-page {
    top: var(--agent-header-h) !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    gap: 0 !important;
  }
  .agent-panel {
    border-radius: 0 !important;
  }
  .chat-input-wrap {
    width: calc(100% - 24px) !important;
    bottom: 12px !important;
  }
  .chat-messages {
    padding: 18px 18px 160px 18px !important;
  }
}

/* ============================================================
   v5 · 思考条目极简化（去掉所有装饰圆圈/节点/引导线/背景渐变）
   设计：仅保留 · 左侧 4px 实色阶段色条 · log-phase 文字 · log-loop 文字
   ============================================================ */

/* --- 取消时间线垂直引导线 --- */
.log-scroll::before { display: none !important; }

/* --- 取消所有思考条目 ::before 圆形节点 --- */
.think-log-entry::before { display: none !important; }

/* --- 思考条目：去掉 padding-left 让左侧 4px 条贴边 --- */
.think-log-entry {
  background: transparent !important;
  border: 0 !important;
  border-left: 4px solid var(--agent-react-thought) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 10px 14px !important;
  box-shadow: none !important;
  position: relative;
}

/* --- 五阶段用 4px 左边实色条作为唯一颜色标识 --- */
.think-log-entry.t-thought { border-left-color: #6B6FC4 !important; }
.think-log-entry.t-action  { border-left-color: #C18A4A !important; }
.think-log-entry.t-obs     { border-left-color: #4F9F7A !important; }
.think-log-entry.t-reflect { border-left-color: #9C6B8A !important; }
.think-log-entry.t-finish  { border-left-color: #276749 !important; }

html[data-theme="dark"] .think-log-entry.t-thought { border-left-color: #9B9BE4 !important; }
html[data-theme="dark"] .think-log-entry.t-action  { border-left-color: #E5B377 !important; }
html[data-theme="dark"] .think-log-entry.t-obs     { border-left-color: #7FC7A8 !important; }
html[data-theme="dark"] .think-log-entry.t-reflect { border-left-color: #D39BBF !important; }
html[data-theme="dark"] .think-log-entry.t-finish  { border-left-color: #5BB18C !important; }

/* --- hover：极简，仅左条颜色加深 --- */
.think-log-entry:hover {
  background: rgba(193, 138, 74, 0.04) !important;
  transform: none !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .think-log-entry:hover {
  background: rgba(229, 179, 119, 0.06) !important;
}

/* --- log-meta：纯文字横排，无 chip 背景 --- */
.log-meta {
  margin-bottom: 4px !important;
  gap: 10px !important;
}

/* --- log-phase：纯文字，颜色用阶段色，无背景无圆角 --- */
.log-phase {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em;
  text-transform: none;
}
.think-log-entry.t-thought .log-phase { color: #6B6FC4 !important; }
.think-log-entry.t-action  .log-phase { color: #C18A4A !important; }
.think-log-entry.t-obs     .log-phase { color: #4F9F7A !important; }
.think-log-entry.t-reflect .log-phase { color: #9C6B8A !important; }
.think-log-entry.t-finish  .log-phase { color: #276749 !important; }
html[data-theme="dark"] .think-log-entry.t-thought .log-phase { color: #9B9BE4 !important; }
html[data-theme="dark"] .think-log-entry.t-action  .log-phase { color: #E5B377 !important; }
html[data-theme="dark"] .think-log-entry.t-obs     .log-phase { color: #7FC7A8 !important; }
html[data-theme="dark"] .think-log-entry.t-reflect .log-phase { color: #D39BBF !important; }
html[data-theme="dark"] .think-log-entry.t-finish  .log-phase { color: #5BB18C !important; }

/* --- log-loop：纯文字弱化色 --- */
.log-loop {
  color: var(--haitang-text-muted) !important;
  font-size: 10.5px !important;
  letter-spacing: 0.02em;
}
html[data-theme="dark"] .log-loop {
  color: rgba(243, 231, 210, 0.55) !important;
}

/* --- log-text：行高更舒展 --- */
.think-log-entry .log-text {
  color: var(--haitang-text-light) !important;
  line-height: 1.7 !important;
}
html[data-theme="dark"] .think-log-entry .log-text {
  color: rgba(243, 231, 210, 0.82) !important;
}

