/* 對話功能頁「上一句的脈絡」那段 LINE 對話示意（.memory-*）。
   從舊版 conversation/styles.css 原文抽出，聊天畫面裡的色值與字級照舊不動。
   外框（邊線、陰影、透視傾斜）屬於頁面外殼，由 styles.css 覆寫。 */

.memory-chat { --green: #06c755; }

.memory-chat {
  position: relative;
  max-width: 560px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: #dfe8ed;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.42);
  transform: perspective(1100px) rotateY(-3deg) rotateX(1deg);
}

.memory-chat::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.memory-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px;
  color: #142338;
  background: #fff;
  border-bottom: 1px solid #dce3ea;
}

.memory-avatar img { border-radius: 12px; }

.memory-chat-head > div:nth-child(2) { display: grid; line-height: 1.25; }

.memory-chat-head strong { font-size: 0.9rem; }

.memory-chat-head span { color: #6e7d91; font-size: 0.65rem; }

.memory-chat-head span i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--green); }

.memory-chat-head > small { margin-left: auto; padding: 5px 9px; border-radius: 999px; color: #fff; background: var(--green); font-size: 0.56rem; font-weight: 800; }

.memory-chat-body {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 32px;
  background:
    linear-gradient(rgba(224, 235, 240, 0.94), rgba(210, 225, 232, 0.98)),
    radial-gradient(circle at 20% 20%, #fff, transparent 28%);
}

.memory-day { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: #8795a5; font-size: 0.62rem; }

.memory-day::before, .memory-day::after { content: ''; flex: 1; height: 1px; background: rgba(70, 91, 112, 0.13); }

.memory-bubble { max-width: 78%; margin-bottom: 13px; padding: 13px 16px; border-radius: 18px; color: #17263a; font-size: 0.81rem; line-height: 1.65; box-shadow: 0 7px 20px rgba(45, 69, 91, 0.08); }

.memory-bubble--user { align-self: flex-end; border-bottom-right-radius: 5px; background: #9ce889; }

.memory-bubble--assistant { align-self: flex-start; border-bottom-left-radius: 5px; background: #fff; }

.memory-bubble > span { display: block; margin-top: 6px; color: #7b8b9d; font-size: 0.58rem; }

.memory-bubble--highlight { position: relative; border: 1px solid rgba(109, 87, 205, 0.18); background: linear-gradient(135deg, #fff, #f6f2ff); }

.memory-bubble--highlight > span { color: #7155c5; font-weight: 700; }

.memory-thread { display: flex; align-items: center; gap: 8px; margin: 3px 0 15px; color: #8265d2; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.05em; text-align: center; }

.memory-thread i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(126, 95, 212, 0.34)); }

.memory-thread i:last-child { background: linear-gradient(90deg, rgba(126, 95, 212, 0.34), transparent); }

@media (max-width: 980px) {
  .memory-chat { width: min(100%, 600px); margin: 0 auto; transform: none; }
}

@media (max-width: 620px) {
  .memory-chat { margin-inline: -2px; border-radius: 22px; }
  .memory-chat-body { min-height: 460px; padding: 24px 16px; }
  .memory-bubble { max-width: 88%; }
}
