/* ============ CHAT PAGE ============ */

/* Chat background: faint ruled lines like a notebook */
.chat-bg-lines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 31px,
      rgba(196, 168, 130, 0.04) 31px,
      rgba(196, 168, 130, 0.04) 32px
    );
  pointer-events: none;
  z-index: 0;
}

.chat-bg-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232,213,196,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(200,196,180,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============ CHAT HEADER ============ */
.chat-header {
  display: flex;
  align-items: center;
  padding: 14px 20px 12px;
  padding-top: calc(env(safe-area-inset-top, 14px) + 6px);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.chat-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-light);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-header-center {
  flex: 1;
  text-align: center;
}

.chat-header-name {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--ink);
  line-height: 1;
}

.chat-header-status {
  font-family: 'EB Garamond', serif;
  font-size: 10px;
  color: var(--sage);
  letter-spacing: 2px;
  margin-top: 2px;
}

.chat-header-status::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  margin-right: 5px;
  vertical-align: middle;
  position: relative;
  top: -0.5px;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(184,196,168,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(184,196,168,0); }
}

.chat-mood {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.chat-mood-face {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.2px solid var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.chat-mood:active .chat-mood-face { transform: scale(0.9); }

/* header lace border */
.header-lace {
  height: 14px;
  overflow: hidden;
  opacity: 0.06;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  filter: saturate(0) brightness(0.7);
  margin: 0 -5px;
}

.header-lace img {
  width: 110%;
  height: auto;
  margin-left: -5%;
}

/* ============ CHAT AREA ============ */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

/* date divider */
.chat-date {
  text-align: center;
  margin: 8px 0 12px;
}

.chat-date-text {
  font-family: 'EB Garamond', serif;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 2px;
  background: var(--warm-white);
  padding: 3px 14px;
  border-radius: 10px;
  border: 0.5px solid rgba(168,154,142,0.12);
}

/* message row */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 82%;
  margin-bottom: 6px;
  animation: msgIn 0.25s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-row.claude { align-self: flex-start; }
.msg-row.nai { align-self: flex-end; flex-direction: row-reverse; }

/* avatar + name */
.msg-avatar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 1px 4px rgba(58,51,48,0.06);
}

.msg-avatar.claude-avatar {
  background: var(--cream);
  border: 0.8px solid rgba(168,154,142,0.15);
}

.msg-avatar.claude-avatar svg {
  width: 16px;
  height: 16px;
  fill: var(--ink);
}

.msg-avatar.nai-avatar {
  background: var(--blush);
  border: 0.8px solid rgba(168,154,142,0.1);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1;
}

.msg-avatar-name {
  font-family: 'Caveat', cursive;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* bubble */
.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg-row.nai .msg-bubble-wrap { align-items: flex-end; }
.msg-row.claude .msg-bubble-wrap { align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.85;
  font-weight: 300;
  letter-spacing: 0.2px;
  position: relative;
  max-width: 100%;
  word-break: break-word;
}

.claude .msg-bubble {
  background: var(--claude-bubble, #f6f1eb);
  border-radius: 2px 14px 14px 14px;
  color: var(--ink);
  border-left: 1.5px solid var(--accent-soft);
  box-shadow: 0 1px 6px rgba(58,51,48,0.04);
}

.nai .msg-bubble {
  background: var(--nai-bubble, #ece4da);
  border-radius: 14px 2px 14px 14px;
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(58,51,48,0.04);
}

/* timestamp */
.msg-time {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  padding: 0 4px;
  opacity: 0.6;
}

/* image message */
.msg-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(58,51,48,0.08);
  max-width: 200px;
  position: relative;
}

.msg-image-placeholder {
  width: 200px;
  height: 150px;
  background: linear-gradient(145deg, var(--cream) 0%, var(--blush) 50%, var(--accent-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.msg-image-placeholder svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.2;
  opacity: 0.4;
}

.msg-image-placeholder span {
  font-size: 9px;
  color: var(--ink-faint);
  font-family: 'EB Garamond', serif;
  letter-spacing: 1.5px;
  opacity: 0.5;
}

/* code block */
.msg-code {
  background: #2a2320;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #e8ddd0;
  overflow-x: auto;
  position: relative;
}

.msg-code-label {
  position: absolute;
  top: 6px;
  right: 10px;
  font-family: 'EB Garamond', serif;
  font-size: 8px;
  color: #a89a8e;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.5;
}

.code-keyword { color: #c9a9a0; }
.code-string { color: #b8c4a8; }
.code-comment { color: #6b5f56; font-style: italic; }

/* typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--claude-bubble, #f6f1eb);
  border-radius: 2px 14px 14px 14px;
  border-left: 1.5px solid var(--accent-soft);
  box-shadow: 0 1px 6px rgba(58,51,48,0.04);
  width: fit-content;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 0.8; }
}

.typing-label {
  font-size: 10px;
  color: var(--ink-faint);
  font-style: italic;
  margin-left: 4px;
  letter-spacing: 0.3px;
}

/* ============ INPUT AREA ============ */
.input-area {
  padding: 8px 14px 6px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: linear-gradient(180deg, transparent 0%, var(--warm-white) 20%);
}

/* paperclip decoration on input */
.input-deco-clip {
  position: absolute;
  top: -6px;
  right: 58px;
  width: 18px;
  opacity: 0.35;
  transform: rotate(15deg);
  pointer-events: none;
  filter: brightness(1.05) saturate(0.8) drop-shadow(1px 1px 2px rgba(0,0,0,0.08));
}

.input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--cream);
  border-radius: 22px;
  padding: 6px 6px 6px 14px;
  border: 0.8px solid rgba(168,154,142,0.12);
  box-shadow: 0 2px 12px rgba(58,51,48,0.04);
}

.input-actions-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.input-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.input-btn:active {
  background: rgba(168,154,142,0.1);
}

.input-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-field {
  flex: 1;
  min-height: 32px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: 0.3px;
  padding: 4px 0;
  font-family: 'Noto Serif SC', serif;
  outline: none;
  cursor: text;
  word-break: break-word;
}

.input-field:empty::before {
  content: '说点什么...';
  color: var(--ink-faint);
  pointer-events: none;
}

.input-send {
  width: 34px;
  height: 34px;
  background: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
  box-shadow: 0 2px 8px rgba(58,51,48,0.2);
}

.input-send:active { transform: scale(0.92); }

.input-send svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--warm-white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
  margin-left: -1px;
  margin-top: -1px;
}

/* voice coming soon badge */
.voice-badge {
  position: relative;
}

.voice-badge::after {
  content: 'soon';
  position: absolute;
  bottom: -4px;
  right: -6px;
  font-family: 'Caveat', cursive;
  font-size: 7px;
  color: var(--dusty-rose);
  letter-spacing: 0.5px;
}

/* ============ PLUS MENU ============ */
.plus-menu-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
}

.plus-menu-overlay.show { display: block; }

.plus-menu {
  position: absolute;
  bottom: 80px;
  left: 14px;
  background: var(--warm-white);
  border: 0.8px solid var(--accent-soft);
  border-radius: 16px;
  padding: 10px 6px;
  box-shadow: 0 10px 36px rgba(58,51,48,0.14);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  width: 240px;
  animation: plus-slide-up 0.2s ease;
}

@keyframes plus-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.plus-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.plus-menu-item:active {
  background: rgba(168,154,142,0.08);
}

.plus-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus-menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--warm-white);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plus-menu-icon.icon-photo { background: var(--sage); }
.plus-menu-icon.icon-camera { background: var(--dusty-rose); }
.plus-menu-icon.icon-file { background: var(--accent); }
.plus-menu-icon.icon-location { background: #a8bcc4; }
.plus-menu-icon.icon-mood { background: #c9b8d0; }
.plus-menu-icon.icon-voice { background: var(--blush); }

.plus-menu-label {
  font-size: 9.5px;
  color: var(--ink-light);
  font-weight: 300;
  letter-spacing: 0.3px;
  text-align: center;
}

/* ============ LONG PRESS BUBBLE MENU ============ */
.bubble-context-menu {
  position: fixed;
  background: var(--ink);
  border-radius: 10px;
  padding: 6px 4px;
  display: none;
  gap: 2px;
  box-shadow: 0 6px 20px rgba(58,51,48,0.25);
  z-index: 200;
  flex-direction: row;
}

.bubble-context-menu.show {
  display: flex;
}

.bubble-ctx-item {
  padding: 6px 12px;
  font-size: 11px;
  color: var(--warm-white);
  font-weight: 300;
  letter-spacing: 0.3px;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s;
}

.bubble-ctx-item:active {
  background: rgba(255,255,255,0.1);
}

.bubble-ctx-divider {
  width: 0.5px;
  background: rgba(255,255,255,0.15);
  margin: 4px 0;
}

/* ============ MOOD OVERLAY ============ */
.mood-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(58,51,48,0.25);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 70px;
}

.mood-overlay.show { display: flex; }

.mood-card {
  width: 320px;
  max-width: calc(100% - 32px);
  background: var(--warm-white);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 50px rgba(58,51,48,0.18), 0 0 0 0.5px rgba(168,154,142,0.1);
  position: relative;
  animation: mood-slide-in 0.3s ease;
}

@keyframes mood-slide-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mood-card-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 16px;
  border-radius: 50%;
  transition: background 0.2s;
}

.mood-card-close:active { background: rgba(168,154,142,0.1); }

/* header: current mood */
.mood-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid rgba(168,154,142,0.12);
}

.mood-card-emoji {
  width: 48px;
  height: 48px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 2px 8px rgba(58,51,48,0.06);
  flex-shrink: 0;
}

.mood-card-info { flex: 1; }

.mood-card-label {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

.mood-card-status {
  font-size: 16px;
  color: var(--ink);
  font-weight: 400;
}

.mood-card-reason {
  font-size: 11px;
  color: var(--ink-light);
  font-style: italic;
  font-weight: 300;
  margin-top: 1px;
}

/* chart section */
.mood-chart-section {
  margin-bottom: 16px;
}

.mood-chart-title {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.mood-chart-container {
  position: relative;
  height: 120px;
  background: linear-gradient(180deg, rgba(232,213,196,0.08) 0%, transparent 100%);
  border-radius: 10px;
  padding: 8px 4px 18px 4px;
}

.mood-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mood-chart-grid-line {
  stroke: rgba(168,154,142,0.08);
  stroke-width: 0.5;
}

.mood-chart-area {
  fill: url(#moodGradient);
  opacity: 0.3;
}

.mood-chart-line {
  fill: none;
  stroke: var(--dusty-rose);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mood-chart-dot {
  fill: var(--warm-white);
  stroke: var(--dusty-rose);
  stroke-width: 2;
}

.mood-chart-dot-now {
  fill: var(--dusty-rose);
  stroke: var(--warm-white);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(201,169,160,0.5));
}

.mood-chart-annotation {
  font-family: 'Caveat', cursive;
  font-size: 9px;
  fill: var(--ink-light);
}

.mood-chart-time-label {
  font-family: 'EB Garamond', serif;
  font-size: 8px;
  fill: var(--ink-faint);
  letter-spacing: 0.5px;
}

.mood-chart-y-label {
  font-family: 'Caveat', cursive;
  font-size: 8px;
  fill: var(--ink-faint);
}

/* emotion stats */
.mood-stats-section {
  padding-top: 14px;
  border-top: 0.5px solid rgba(168,154,142,0.12);
}

.mood-stats-title {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.mood-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mood-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--cream);
  border-radius: 8px;
}

.mood-stat-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.mood-stat-info {
  flex: 1;
  min-width: 0;
}

.mood-stat-name {
  font-size: 10px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.mood-stat-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--accent-soft);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}

.mood-stat-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.mood-stat-bar.bar-warmth { background: var(--dusty-rose); }
.mood-stat-bar.bar-happy { background: var(--sage); }
.mood-stat-bar.bar-miss { background: var(--accent); }
.mood-stat-bar.bar-playful { background: #c9b8d0; }
.mood-stat-bar.bar-calm { background: #a8bcc4; }
.mood-stat-bar.bar-blush { background: var(--blush); }

.mood-stat-value {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

/* mood log */
/* emotion bars */
.mood-emotions-section {
  padding: 10px 0 8px;
  border-bottom: 0.5px solid rgba(168,154,142,0.08);
}
.emo-bar-row {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0;
}
.emo-bar-label {
  width: 28px; text-align: right; flex-shrink: 0;
  font-size: 9.5px; color: var(--ink-faint); font-weight: 300;
}
.emo-bar-track {
  flex: 1; height: 6px; border-radius: 3px;
  background: rgba(168,154,142,0.08); overflow: hidden;
}
.emo-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.5s ease;
}
.emo-bar-val {
  width: 18px; flex-shrink: 0;
  font-size: 9px; color: var(--ink-faint);
  font-family: 'EB Garamond', serif;
}

/* mood log */
.mood-log-section {
  padding-top: 10px;
  border-top: 0.5px solid rgba(168,154,142,0.12);
  max-height: 130px;
  overflow-y: auto;
}
.mood-log-item {
  display: flex;
  align-items: center;
  padding: 4px 0;
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 300;
  border-bottom: 0.5px solid rgba(168,154,142,0.04);
  gap: 6px;
}
.mood-log-item:last-child { border-bottom: none; }
.mood-log-mood {
  flex-shrink: 0;
  font-size: 9px; color: var(--dusty-rose);
  background: rgba(201,169,160,0.12);
  padding: 1px 6px; border-radius: 4px;
  font-weight: 400;
}
.mood-log-event { flex: 1; color: var(--ink-light); }
.mood-log-time {
  flex-shrink: 0;
  font-family: 'EB Garamond', serif;
  font-size: 10px;
  color: var(--ink-faint);
}

/* footer note */
.mood-card-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 10px;
  color: var(--ink-faint);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.mood-card-footer span {
  font-family: 'Caveat', cursive;
  font-size: 12px;
  font-style: normal;
  color: var(--dusty-rose);
}

/* ============ SUBTLE DECO ============ */
.deco-flower-chat {
  position: absolute;
  bottom: 140px;
  left: -8px;
  width: 50px;
  opacity: 0.12;
  transform: rotate(120deg) scaleX(-1);
  pointer-events: none;
  z-index: 1;
  filter: saturate(0.3) brightness(1.15) drop-shadow(1px 1px 2px rgba(0,0,0,0.04));
}

.sparkle-chat {
  position: absolute;
  color: var(--ink-faint);
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

.sparkle-chat svg { fill: currentColor; }
.sparkle-c1 { top: 180px; right: 20px; }
.sparkle-c2 { bottom: 200px; left: 14px; }

/* ============ CHAT-SPECIFIC VARIABLES ============ */
:root {
  --claude-bubble: #f6f1eb;
  --nai-bubble: #ece4da;
}

.dark-mode {
  --claude-bubble: #262220;
  --nai-bubble: #2a2522;
}

/* 漫想消息 */
.wander-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-soft, #b8a99a);
  margin-bottom: 3px;
  opacity: 0.7;
}
.wander-bubble {
  border-left: 2px solid var(--accent-soft, #b8a99a) !important;
  background: linear-gradient(135deg, var(--claude-bubble) 0%, rgba(184,169,154,0.08) 100%) !important;
  font-style: italic;
}

/* 表情包 */
.sticker-bubble {
  background: transparent;
  padding: 4px;
}
.sticker-img {
  max-width: 140px;
  max-height: 140px;
  border-radius: 8px;
}

/* 聊天图片 */
.img-bubble {
  background: transparent !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
}
.chat-img {
  max-width: 220px;
  max-height: 300px;
  border-radius: 12px;
  display: block;
}

/* 表情包选择面板 */
.sticker-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50vh;
  max-height: 400px;
  background: var(--warm-white, #f5f0eb);
  border-top: 1px solid rgba(168,154,142,0.15);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease, visibility 0.25s;
  visibility: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}
.sticker-panel.show {
  transform: translateY(0);
  visibility: visible;
}
.sticker-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--ink-faint, #888);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sticker-panel-title {
  font-weight: 500;
}
.sticker-upload-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px dashed var(--ink-faint, #888);
  font-size: 18px;
  color: var(--ink-faint, #888);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.sticker-upload-btn:hover {
  border-color: var(--accent, #c9a87c);
  color: var(--accent, #c9a87c);
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom, 0px));
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.sticker-pick {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  padding: 4px;
}
.sticker-pick:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.06);
}
.sticker-pick:active {
  transform: scale(0.95);
}

/* Mood picker overlay */
.mood-pick-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(58,51,48,0.3);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.25s;
}
.mood-pick-overlay.show { opacity: 1; }
.mood-pick-panel {
  width: 100%; max-width: 440px;
  background: var(--warm-white, #f9f5ef);
  border-radius: 16px 16px 0 0;
  padding: 18px 20px 30px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.mood-pick-overlay.show .mood-pick-panel {
  transform: translateY(0);
}
.mood-pick-title {
  font-family: 'Caveat', cursive;
  font-size: 14px; color: var(--ink, #3a3330);
  text-align: center; margin-bottom: 14px;
}
.mood-pick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mood-pick-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 10px 0; border-radius: 10px;
  cursor: pointer; transition: background 0.15s;
}
.mood-pick-item:active {
  background: rgba(168,154,142,0.1);
}
.mood-pick-emoji { font-size: 28px; }
.mood-pick-label {
  font-size: 10px; color: var(--ink-light, #6b6460);
  font-weight: 300; letter-spacing: 0.3px;
}

/* ============ SUMMARY BANNER & OVERLAY ============ */
.summary-banner {
  text-align: center; padding: 10px 0 14px;
  font-size: 11px; color: var(--ink-faint);
  font-weight: 300; letter-spacing: 0.5px;
  cursor: pointer; opacity: 0.7;
  transition: opacity 0.2s;
}
.summary-banner:active { opacity: 1; }
.summary-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: summaryFadeIn 0.2s ease;
}
@keyframes summaryFadeIn { from { opacity: 0; } to { opacity: 1; } }
.summary-card {
  width: 340px; max-width: 90vw; max-height: 80vh;
  background: var(--warm-white);
  border-radius: 20px; padding: 24px 20px;
  position: relative; display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}
.summary-card-close {
  position: absolute; top: 14px; right: 16px;
  color: var(--ink-faint); cursor: pointer; font-size: 14px;
}
.summary-card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 400; color: var(--ink);
  letter-spacing: 1px; text-align: center;
}
.summary-card-sub {
  font-size: 10px; color: var(--ink-faint); text-align: center;
  margin: 4px 0 16px; font-weight: 300;
}
.summary-card-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.summary-item {
  padding: 12px 0;
  border-bottom: 0.5px solid rgba(168,154,142,0.1);
}
.summary-item:last-child { border-bottom: none; }
.summary-item-date {
  font-family: 'EB Garamond', serif;
  font-size: 10px; color: var(--dusty-rose);
  letter-spacing: 1px; margin-bottom: 4px;
}
.summary-item-text {
  font-size: 12px; color: var(--ink-light);
  font-weight: 300; line-height: 1.8;
  letter-spacing: 0.2px;
}

