/* ============================================================
 * 薯薯的第二大脑（情感内核 / 记忆分层 / 战略顾问） 2026-10-02
 * 主色沿用 #FF2442；动效只用 transform & opacity；尊重 reduced-motion
 * ============================================================ */

/* ---------- 情绪状态 ---------- */
.br-emo { display: flex; gap: var(--s-16, 16px); align-items: center; flex-wrap: wrap; }
.br-emo-face {
  flex: 0 0 96px; height: 96px; border-radius: 22px;
  background: linear-gradient(135deg, #E02039, #ff7a90);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  box-shadow: var(--shadow-red, 0 8px 22px rgba(255, 36, 66, .28));
  transition: transform .2s var(--ease-spring, cubic-bezier(.34,1.56,.64,1));
}
.br-emo-face:hover { transform: scale(1.04); }
.br-emo-face[data-emo="thinking"] { background: linear-gradient(135deg, #7c5cff, #a99bff); box-shadow: 0 8px 22px rgba(124, 92, 255, .28); }
.br-emo-face[data-emo="calm"], .br-emo-face[data-emo="sleepy"] { background: linear-gradient(135deg, #2f9e8f, #6fd0c2); box-shadow: 0 8px 22px rgba(47, 158, 143, .28); }
.br-emo-face[data-emo="caring"] { background: linear-gradient(135deg, #ff8a3d, #ffb37a); box-shadow: 0 8px 22px rgba(255, 138, 61, .28); }
.br-emo-face[data-emo="apologetic"] { background: linear-gradient(135deg, #6b7280, #767076); box-shadow: 0 8px 22px rgba(107, 114, 128, .28); }
.br-emo-face[data-emo="curious"] { background: linear-gradient(135deg, #0ea5e9, #7dd3fc); box-shadow: 0 8px 22px rgba(14, 165, 233, .28); }

.br-emo-info { flex: 1 1 240px; min-width: 220px; }
.br-emo-line { font-size: 14px; color: var(--ink, #1f1f1f); }
.br-emo-line b { color: var(--xhs-red-text, #D81B37); font-size: 18px; }
.br-emo-sub { font-size: 12px; color: var(--ink3, #6E6869); margin-top: 3px; }

.br-bar-track {
  position: relative; height: 10px; border-radius: 999px; background: var(--bg-subtle, #fff5f6);
  overflow: hidden; margin: 8px 0 6px;
}
.br-bar-fill {
  height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff2442, #ff7a90);
  transform-origin: left center; transform: scaleX(0); opacity: 0;
  transition: transform .7s var(--ease-out, cubic-bezier(.22,.61,.36,1)), opacity .3s linear;
}
.br-bar-fill.on { transform: scaleX(calc(var(--w, 0) / 100)); opacity: 1; }
.br-bar-base { position: absolute; top: -2px; bottom: -2px; left: 0; width: 2px; background: var(--ink3, #8b8b8b); transform: translateX(calc(var(--b, 0) * 1%)); }

/* ---------- 趋势柱 ---------- */
.br-trend { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 4px 0; }
.br-trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.br-trend-bar {
  width: 70%; max-width: 26px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ff7a90, #ff2442);
  height: var(--h, 4%); transform: scaleY(0); transform-origin: bottom center;
  transition: transform .55s var(--ease-out, cubic-bezier(.22,.61,.36,1));
}
.br-trend-bar.on { transform: scaleY(1); }
.br-trend-x { font-size: 12px; color: var(--ink3, #6E6869); margin-top: 4px; }

/* ---------- 事件流水 ---------- */
.br-ev { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.br-ev-item {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 6px 8px; border-radius: 10px; background: var(--bg-subtle, #fffafb);
}
.br-ev-txt { flex: 1; color: var(--ink2, #4b4b4b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-ev-time { flex: 0 0 auto; color: var(--ink3, #6E6869); font-size: 12px; }

/* ---------- 记忆分层 ---------- */
.br-tier {
  border: 1px solid var(--border-subtle, #f3d0d7); border-radius: var(--r-md, 12px);
  padding: var(--s-12, 12px) var(--s-14, 14px); margin-bottom: var(--s-10, 10px);
  background: var(--bg-surface, #fff);
}
.br-tier-head { display: flex; justify-content: space-between; align-items: baseline; }
.br-tier-head b { font-size: 14px; color: var(--ink, #1f1f1f); }
.br-tier-head span { font-size: 12px; color: var(--xhs-red-text, #D81B37); font-weight: 700; }
.br-tier-desc { font-size: 12px; color: var(--ink3, #6E6869); margin: 3px 0 8px; line-height: 1.6; }
.br-mem { display: flex; flex-direction: column; gap: 5px; }
.br-mem-item {
  display: flex; gap: 8px; align-items: center; font-size: 12.5px;
  padding: 6px 8px; border-radius: 8px; background: var(--bg-subtle, #fffafb);
}
.br-mem-txt { flex: 1; color: var(--ink2, #4b4b4b); line-height: 1.55; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .br-emo-face { flex: 0 0 72px; height: 72px; font-size: 16px; border-radius: 18px; }
  .br-emo-info { flex: 1 1 100%; }
  .br-trend { height: 100px; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .br-emo-face, .br-bar-fill, .br-trend-bar { transition: none !important; }
  .br-bar-fill { opacity: 1 !important; transform: scaleX(calc(var(--w, 0) / 100)) !important; }
  .br-trend-bar { transform: scaleY(1) !important; }
  .br-emo-face:hover { transform: none !important; }
}
html.ss-reduced-motion .br-emo-face,
html.ss-reduced-motion .br-bar-fill,
html.ss-reduced-motion .br-trend-bar { transition: none !important; }
html.ss-reduced-motion .br-bar-fill { opacity: 1 !important; transform: scaleX(calc(var(--w, 0) / 100)) !important; }
html.ss-reduced-motion .br-trend-bar { transform: scaleY(1) !important; }
