/* ── Chat Screen ───────────────────────────────────────────────────── */

.chat-area { flex: 1; display: flex; overflow: hidden }
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg2); position: relative }

/* Chat header */
.chat-header {
  height: 56px; flex-shrink: 0;
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.chat-header-left { display: flex; align-items: center; gap: 12px }
.chat-header-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 14px;
  color: var(--rose-dim); position: relative;
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light));
}
.chat-header-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px }
.chat-header-status {
  position: absolute; bottom: -2px; right: -2px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2.5px solid var(--bg2);
  background: #94252a;
  transition: background-color 0.4s ease;
}
.chat-header-status.online { background: #22c55e; animation: status-pulse 2.5s ease-in-out infinite }
.chat-header-status.idle   { background: #f97316; animation: none }
.chat-header-status.busy   { background: #94252a; animation: none }
.chat-header-name {
  font-family: var(--ff-display); font-size: 17px;
  font-weight: 400; color: var(--cream);
}
.chat-header-meta { font-size: 11px; color: var(--muted); margin-top: 1px }
.chat-header-right { display: flex; align-items: center; gap: 4px }
.chat-hdr-btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.chat-hdr-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.chat-hdr-btn.rose { border-color: var(--rose-30); color: var(--rose); background: var(--rose-bg) }
.chat-hdr-btn.chat-fav-active { color: var(--rose); border-color: var(--rose-30) }
.chat-hdr-btn svg { width: 15px; height: 15px }

/* Messages */
.messages {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 20px 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.messages::-webkit-scrollbar { width: 4px }
.messages::-webkit-scrollbar-track { background: transparent }
.messages::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 2px }

.msg-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px }
.msg-row { display: flex; align-items: flex-end; gap: 10px }
.msg-row.user { flex-direction: row-reverse }
.msg-avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 11px;
  overflow: hidden;
}
.msg-avatar.comp { background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light)); color: var(--rose-dim); cursor: pointer }
.msg-avatar.comp img { width: 100%; height: 100%; object-fit: cover }
.msg-avatar.user-av { background: none; overflow: visible; border-radius: 50%; cursor: pointer }
.msg-avatar.user-av img { width: 100%; height: 100%; object-fit: cover }
.msg-avatar.spacer { background: transparent }
.msg-bubble {
  max-width: 480px; padding: 10px 14px; border-radius: 14px;
  font-size: 13px; line-height: 1.6; color: var(--cream);
}
.msg-action { font-style: italic; color: var(--action-text-color); opacity: 0.9 }
.msg-bubble.comp { background: var(--bubble-comp-bg, var(--bg3)); border: 1px solid var(--border2); border-bottom-left-radius: 4px; position: relative }
.msg-bubble.user { background: var(--bubble-user-bg, var(--rose-dim)); border-bottom-right-radius: 4px }

/* Typewriter streaming bubble */
.msg-bubble.streaming { padding: 10px 14px; min-height: 1.6em }
.tw-text { white-space: pre-wrap; word-break: break-word }
.tw-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--text1);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: twBlink 0.8s step-end infinite;
}
@keyframes twBlink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }

/* ── Multi-bubble sub-groups ────────────────────────────────────── */
.msg-group.sub-bubble { margin-bottom: 2px }

/* Connected border-radius for grouped companion bubbles */
.msg-bubble.comp.sub-first { border-bottom-left-radius: 4px; border-top-left-radius: 14px }
.msg-bubble.comp.sub-mid   { border-top-left-radius: 4px; border-bottom-left-radius: 4px }
.msg-bubble.comp.sub-last  { border-top-left-radius: 4px; border-bottom-left-radius: 14px }

/* Mini typing dots between staggered bubbles */
.sub-typing-dots {
  display: flex; gap: 4px; align-items: center;
  padding: 8px 14px;
  background: var(--bubble-comp-bg, var(--bg3));
  border: 1px solid var(--border2);
  border-radius: 14px 14px 14px 4px;
}
.sub-typing-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: subTypeDot 1s ease-in-out infinite;
}
.sub-typing-dots span:nth-child(2) { animation-delay: 0.15s }
.sub-typing-dots span:nth-child(3) { animation-delay: 0.3s }
@keyframes subTypeDot { 0%, 80%, 100% { opacity: 0.3 } 40% { opacity: 1 } }

/* TTS play button on companion messages */
.msg-tts-btn {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: transparent; color: var(--muted2); cursor: pointer;
  padding: 0; position: absolute; bottom: 4px; right: 4px;
  transition: color 0.15s, background 0.15s, opacity 0.15s; opacity: 0;
}
.msg-bubble.comp:hover .msg-tts-btn { opacity: 1 }
.msg-tts-btn:hover { color: var(--cream); background: var(--cream-08) }
.msg-tts-btn.playing { opacity: 1; color: var(--rose); background: rgba(193, 100, 120, 0.12) }
.msg-tts-btn.loading { opacity: 1 }
.msg-tts-btn.loading svg { animation: tts-pulse 1s ease-in-out infinite }
@keyframes tts-pulse { 0%, 100% { opacity: 0.3 } 50% { opacity: 1 } }

/* Voice note bubble */
.vn-bubble {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 14px; border-bottom-left-radius: 4px;
  padding: 10px 14px; max-width: 340px; min-width: 220px;
  cursor: pointer; transition: background 0.2s;
}
.vn-bubble:hover { background: var(--cream-08) }
.vn-bubble.playing { border-color: var(--rose) }
.vn-bubble.expired { opacity: 0.5; pointer-events: none }

.vn-play-btn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.vn-play-btn:hover { background: var(--accent-hover); transform: scale(1.05) }
.vn-play-btn:active { transform: scale(0.95) }
.vn-play-btn.loading { opacity: 0.6; pointer-events: none }

.vn-waveform {
  flex: 1; display: flex; align-items: center; gap: 2px; height: 32px;
  overflow: hidden;
}
.vn-bar {
  flex: 1; min-width: 2px; max-width: 4px;
  background: var(--muted2); border-radius: 1px;
  transition: background 0.15s;
}
.vn-bar.played { background: var(--accent) }
.vn-bubble.playing .vn-bar:not(.played) { background: var(--cream-15) }

.vn-time {
  flex-shrink: 0; font-size: 11px; color: var(--muted);
  min-width: 28px; text-align: right; font-variant-numeric: tabular-nums;
}

.vn-transcript {
  padding: 6px 14px 2px 38px; font-size: 12px; color: var(--muted);
  line-height: 1.5;
}
.vn-transcript-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted2); display: block; margin-bottom: 2px;
}
.vn-transcript p { margin: 0 }

.msg-time { font-size: 10px; color: var(--muted2); padding: 0 4px; margin-bottom: 2px; text-align: right }
.msg-time.comp-time { text-align: left; padding-left: 38px }
.msg-time.user-time { text-align: right; padding-right: 38px }

/* Message image */
.msg-image {
  width: 240px; max-height: 320px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border2); position: relative; cursor: pointer;
  background: var(--bg3); min-height: 180px;
}
.msg-image.img-loaded { min-height: 0 }
.msg-image img, .msg-image video { width: 100%; display: block }
.msg-report-btn {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.6); border: none; border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.msg-image:hover .msg-report-btn { opacity: 1 }
.msg-report-btn:hover { color: var(--rose); background: rgba(0,0,0,0.8) }

/* Date card */
.date-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 16px;
  margin: 12px auto; max-width: 360px;
  transition: all 0.3s ease;
}
.date-card-entering { opacity: 0; transform: translateY(8px) }
.date-card-leaving { opacity: 0; transform: translateY(-4px) }
.date-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px }
.date-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--rose-15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.date-card-icon svg { width: 14px; height: 14px; color: var(--rose-l) }
.date-icon-confirmed { background: var(--green-bg) }
.date-icon-confirmed svg { color: var(--green) }
.date-card-title { font-size: 13px; font-weight: 500; color: var(--cream) }
.date-card-sub { font-size: 11px; color: var(--muted); margin-top: 2px }
.date-card-details { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px }
.date-detail { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim) }
.date-detail svg { width: 12px; height: 12px; color: var(--rose-dim); flex-shrink: 0 }
.date-detail span { line-height: 1.3 }
.date-card-actions { display: flex; gap: 8px }
.date-btn {
  flex: 1; padding: 8px 12px; border-radius: 8px; font-size: 12px;
  font-family: var(--ff-body); cursor: pointer; border: none;
  transition: all 0.15s; text-align: center; font-weight: 500;
}
.date-btn:disabled { opacity: 0.5; cursor: default }
.date-btn-confirm { background: var(--rose); color: #fff }
.date-btn-confirm:hover:not(:disabled) { background: var(--rose-hover) }
.date-btn-later { background: transparent; color: var(--muted); border: 1px solid var(--border2) }
.date-btn-later:hover:not(:disabled) { color: var(--cream) }
.date-confirmed { border-color: var(--green-border) }
.date-confirmed .date-card-details { margin-bottom: 0 }
.date-confirmed .date-card-title { color: var(--green) }
.date-confirmed .date-detail svg { color: var(--green); opacity: 0.5 }

/* XP toast */
.xp-toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--green-border);
  border-radius: 99px; padding: 6px 14px;
  font-size: 12px; color: var(--green); align-self: center; margin: 4px 0;
}
.xp-toast svg { width: 13px; height: 13px }

/* Floating XP toast (appended to .chat-main) */
.xp-float {
  position: absolute; right: 20px; z-index: 90;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 10px;
  background: rgba(16, 16, 20, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--green-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(74, 222, 128, 0.06);
  opacity: 0; transform: translateY(8px) scale(0.96);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.xp-float--visible { opacity: 1; transform: translateY(0) scale(1) }
.xp-float--exit { opacity: 0; transform: translateY(-12px) scale(0.96); transition-duration: 0.3s }
.xp-float-amount {
  font-family: var(--ff-display); font-size: 13px; font-weight: 600;
  color: var(--green); letter-spacing: 0.02em; white-space: nowrap;
}
.xp-float-label {
  font-size: 12px; font-weight: 300; color: var(--muted); white-space: nowrap;
}
.xp-float--neg { border-color: rgba(239, 68, 68, 0.25) }
.xp-float--neg .xp-float-amount { color: #ef4444 }

/* Stage-up celebration overlay */
.stageup-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.4s ease; cursor: pointer;
}
.stageup-overlay.stageup-show { opacity: 1 }
.stageup-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 48px; border-radius: 20px;
  background: rgba(20, 18, 24, 0.92);
  border: 1px solid rgba(244, 114, 182, 0.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 80px rgba(244, 114, 182, 0.08);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stageup-show .stageup-content { transform: scale(1) translateY(0) }
.stageup-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.stageup-emoji {
  font-size: 48px; line-height: 1; margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(244, 114, 182, 0.3));
}
.stageup-title {
  font-family: var(--ff-display); font-size: 26px; font-weight: 500;
  color: var(--cream); margin: 0 0 6px; letter-spacing: 0.01em;
}
.stageup-subtitle {
  font-size: 14px; font-weight: 300; color: var(--muted); margin: 0;
}
.stageup-unlock {
  margin: 12px 0 0; padding: 6px 16px; border-radius: 99px;
  font-size: 12px; font-weight: 400; color: var(--rose);
  background: var(--rose-bg); border: 1px solid var(--rose-30);
}
.stageup-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.stageup-particle {
  position: absolute; bottom: 60%; font-size: 18px;
  opacity: 0;
  animation: stageupFloat 1.6s ease-out forwards;
}
@keyframes stageupFloat {
  0% { opacity: 1; transform: translateY(0) translateX(0) scale(1) }
  100% { opacity: 0; transform: translateY(-120px) translateX(var(--drift)) scale(0.5) }
}

/* Day separator */
.day-sep { display: flex; align-items: center; gap: 12px; margin: 12px 0 }
.day-sep-line { flex: 1; height: 1px; background: var(--border2) }
.day-sep-text { font-size: 11px; color: var(--muted2); letter-spacing: 0.04em }

/* Typing indicator */
.typing { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; margin-bottom: 4px }
.typing-row { display: flex; align-items: center; gap: 10px }
.typing-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 11px;
  color: var(--rose-dim); flex-shrink: 0; overflow: hidden;
}
.typing-avatar img { width: 100%; height: 100%; object-fit: cover }
.typing-bubble {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 14px; border-bottom-left-radius: 4px;
  padding: 10px 14px; display: flex; gap: 4px; align-items: center;
}
.typing-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: typingPulse 1.2s infinite }
.typing-dot:nth-child(2) { animation-delay: 0.2s }
.typing-dot:nth-child(3) { animation-delay: 0.4s }
@keyframes typingPulse { 0%, 60%, 100% { opacity: 0.3; transform: scale(0.9) } 30% { opacity: 1; transform: scale(1) } }
.typing-status { font-size: 11px; color: var(--muted); margin-left: 38px }

/* Input bar */
.chat-input-wrap { padding: 12px 20px 10px; border-top: 1px solid var(--border2) }
.chat-ai-disclaimer {
  text-align: center; font-family: var(--ff-body); font-size: 10px;
  color: var(--muted2); margin: 0; padding-top: 8px; line-height: 1.3;
  border-top: 1px solid var(--border2);
  margin-top: 8px;
}
.chat-input-bar {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; display: flex; align-items: flex-end;
  gap: 8px; padding: 10px 12px; transition: border-color 0.15s;
}
.chat-input-bar:focus-within { border-color: var(--rose-30) }
.chat-input-actions { display: flex; gap: 4px; padding-bottom: 2px }
.input-action {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--muted2); cursor: pointer; transition: all 0.15s;
}
.input-action:hover { color: var(--rose); background: var(--rose-bg) }
.input-action svg { width: 15px; height: 15px }
.chat-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: var(--ff-body); font-size: 13px; font-weight: 300;
  color: var(--cream); resize: none;
  min-height: 22px; max-height: 120px; line-height: 1.5; padding-bottom: 2px;
}
.chat-input::placeholder { color: var(--muted2) }
.chat-char-count {
  font-size: 10px; color: var(--muted2); flex-shrink: 0;
  align-self: flex-end; padding-bottom: 4px; font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}
.chat-char-warn { color: var(--muted) }
.chat-char-limit { color: var(--rose) }
.send-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--rose); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0; padding-bottom: 2px;
}
.send-btn:hover { background: var(--rose-hover) }
.send-btn svg { width: 14px; height: 14px; color: #fff }

/* Chat info panel (right) */
.chat-info {
  width: 260px; flex-shrink: 0;
  background: var(--panel); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  margin-right: 0; opacity: 1; visibility: visible;
  transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s;
}
.chat-info::-webkit-scrollbar { width: 4px }
.chat-info::-webkit-scrollbar-track { background: transparent }
.chat-info::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 2px }
.chat-info.collapsed {
  margin-right: -260px; opacity: 0; visibility: hidden;
}

/* Info toggle button selected state */
.chat-hdr-btn.info-active {
  border-color: var(--rose-30); color: var(--rose); background: var(--rose-bg);
}

.info-profile { padding: 18px 14px 14px; text-align: center }
.info-avatar-lg {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light));
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 24px;
  color: var(--rose-dim); position: relative;
}
.info-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px }
.info-online {
  position: absolute; bottom: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--panel);
  background: #94252a;
  transition: background-color 0.4s ease;
}
.info-online.online { background: #22c55e; animation: status-pulse 2.5s ease-in-out infinite }
.info-online.idle   { background: #f97316; animation: none }
.info-online.busy   { background: #94252a; animation: none }
.info-name { font-family: var(--ff-display); font-size: 19px; font-weight: 400; color: var(--cream) }
.info-job { font-size: 12px; color: var(--muted); margin-top: 2px }
.info-status-msg {
  font-size: 11px; color: var(--muted2); margin-top: 4px;
  font-style: italic; line-height: 1.4;
  word-break: break-word;
}
.info-location { font-size: 11px; color: var(--muted2); margin-top: 3px }
.info-actions { display: flex; gap: 12px; margin-top: 14px; justify-content: center }
.info-act { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer }
.info-act-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border2); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all 0.15s; cursor: pointer;
}
.info-act-btn:hover { color: var(--rose); background: var(--rose-04) }
.info-act-btn svg { width: 16px; height: 16px }
.info-act-label { font-size: 9px; color: var(--muted2) }

.info-section {
  padding: 12px 14px; margin: 0 10px 6px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px;
}
.info-section-title { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted2); margin-bottom: 10px }
/* Muse publication badges & button */
.muse-pub-badge { font-size: 11px; padding: 6px 10px; border-radius: 6px; text-align: center; font-weight: 500 }
.muse-pub-published { background: rgba(76,175,80,0.12); color: #81c784 }
.muse-pub-pending { background: rgba(255,183,77,0.12); color: #ffb74d }
.muse-pub-hidden { background: rgba(244,67,54,0.12); color: #e57373 }
.muse-pub-btn { width: 100%; padding: 8px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--ff-body); transition: opacity 0.15s }
.muse-pub-btn:hover { opacity: 0.85 }
.muse-pub-note { font-size: 10px; color: var(--muted2); text-align: center; margin-top: 6px }
.muse-pub-support { font-size: 11px; color: var(--accent); cursor: pointer; display: block; text-align: center; margin-top: 6px }
.info-xp-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px }
.info-stage { font-size: 13px; color: var(--cream); font-weight: 400 }
.info-xp-val { font-size: 11px; color: var(--muted) }
.info-bar-track { height: 4px; background: var(--border2); border-radius: 2px; overflow: hidden; margin-bottom: 8px }
.info-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--rose-dim), var(--rose)) }
.info-bar-gated { border: 1px solid var(--amber, #f59e0b); background: var(--border2) }
.info-bar-fill-gated { background: linear-gradient(90deg, #f59e0b, #fbbf24); animation: gatedPulse 2s ease-in-out infinite }
.info-gate-hint {
  font-size: 11px; color: #fbbf24; margin: -4px 0 8px;
  display: flex; align-items: center; gap: 4px;
}
.info-gate-hint::before { content: '\1F512'; font-size: 10px }
@keyframes gatedPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }

/* Proposal action buttons */
.proposal-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 14px; margin: 12px 0 10px;
  border: 1px solid var(--rose); border-radius: 10px;
  background: rgba(194, 105, 122, 0.12); color: var(--rose-l, #e8899a);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
}
.proposal-action-btn:hover { background: rgba(194, 105, 122, 0.25); transform: scale(1.01) }
.proposal-action-btn:active { transform: scale(0.98) }
.proposal-action--ready {
  background: linear-gradient(135deg, rgba(194, 105, 122, 0.15), rgba(194, 105, 122, 0.25));
  animation: proposalPulse 2.5s ease-in-out infinite;
}
.proposal-action--pending { border-color: var(--gold-accent, #d4a862); color: var(--gold-accent-l, #e8c98a); background: rgba(212, 168, 98, 0.1) }
.proposal-action--pending:hover { background: rgba(212, 168, 98, 0.2) }
.proposal-action--engaged { border-color: var(--rose); background: rgba(194, 105, 122, 0.1) }
.proposal-action--cooldown {
  border-color: var(--border); background: transparent;
  color: var(--muted); cursor: not-allowed; opacity: 0.6;
  animation: none;
}
.proposal-action--cooldown:hover { background: transparent; transform: none }
@keyframes proposalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--rose-rgb, 194, 105, 122), 0.35) }
  50% { box-shadow: 0 0 0 6px rgba(var(--rose-rgb, 194, 105, 122), 0) }
}

/* Married card */
.married-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(212, 168, 98, 0.1), rgba(194, 105, 122, 0.1));
  border: 1px solid rgba(212, 168, 98, 0.2);
  border-radius: 10px;
}
.married-card-ring { color: var(--gold-accent, #d4a862); flex-shrink: 0; display: flex }
.married-card-body { flex: 1; min-width: 0 }
.married-card-flavour { font-size: 13px; color: var(--cream); font-weight: 500 }
.married-card-date { font-size: 11px; color: var(--muted); margin-top: 3px }
[data-theme="light"] .married-card {
  background: linear-gradient(135deg, rgba(212, 168, 98, 0.08), rgba(176, 80, 104, 0.06));
  border-color: rgba(212, 168, 98, 0.18);
}

/* Milestone compact summary */
.milestone-summary { margin-bottom: 4px }
.milestone-summary-bar-track {
  height: 4px; background: var(--border2); border-radius: 2px;
  overflow: hidden; margin-bottom: 8px;
}
.milestone-summary-bar-fill {
  height: 100%; border-radius: 2px; background: var(--rose);
  transition: width 0.4s ease;
}
.milestone-expand-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--muted); font-family: var(--ff-body);
  padding: 0; transition: color 0.15s;
}
.milestone-expand-btn:hover { color: var(--cream) }
.milestone-expand-btn svg { transition: transform 0.25s ease }
.milestone-expand-btn--open svg { transform: rotate(180deg) }

/* Milestone checklist (collapsed by default) */
.milestone-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
}
.milestone-list--expanded { max-height: 600px; padding-top: 8px }
.milestone-row { display: flex; align-items: flex-start; gap: 8px }
.milestone-check {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border); background: transparent;
}
.milestone-check--done {
  border-color: var(--accent); background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 9px;
}
.milestone-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px }
.milestone-label { font-size: 12px; color: var(--text-secondary); line-height: 1.35 }
.milestone-progress { display: flex; align-items: center; gap: 8px }
.milestone-bar-track { flex: 1; height: 3px; background: var(--border2); border-radius: 2px; overflow: hidden }
.milestone-bar-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.3s ease }
.milestone-counter { font-size: 11px; color: var(--muted); flex-shrink: 0 }

/* Cooldown indicator */
.cooldown-indicator {
  font-size: 11px; color: var(--muted); margin: 4px 0 8px;
  padding: 6px 10px; background: var(--bg3); border-radius: 6px;
  border: 1px solid var(--border2);
}

/* Stage regression flash */
.stage-regression-flash { animation: regressionFlash 1.5s ease-out }
@keyframes regressionFlash {
  0% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) }
  100% { box-shadow: none }
}

.info-mood {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0; margin-top: 10px;
}
.mood-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0 }
.mood-emoji { font-size: 14px; line-height: 1; flex-shrink: 0 }
.mood-label { font-size: 12px; color: var(--cream) }

.info-schedule-item {
  display: flex; align-items: stretch; gap: 10px;
  padding: 7px 8px; border-radius: 6px;
  transition: background 0.15s, opacity 0.15s;
}
.info-schedule-item--current {
  background: var(--rose-04);
}
.info-schedule-item--past { opacity: 0.45 }
.info-sched-time {
  font-size: 11px; color: var(--muted); width: 38px; flex-shrink: 0;
  text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums;
}
.info-sched-bar { width: 3px; border-radius: 1.5px; flex-shrink: 0; min-height: 28px }
.info-sched-text { flex: 1; min-width: 0 }
.info-sched-activity { font-size: 12px; color: var(--cream); word-wrap: break-word }
.info-schedule-item--current .info-sched-activity { font-weight: 500 }
.info-sched-loc { font-size: 10px; color: var(--muted); margin-top: 2px }
.info-sched-now { color: var(--rose) !important; font-weight: 600 }

.info-stat-row { display: flex }
.info-stat {
  flex: 1; padding: 6px 4px; text-align: center;
}
.info-stat + .info-stat { border-left: 1px solid var(--border2) }
.info-stat-val { font-family: var(--ff-display); font-size: 17px; font-weight: 300; color: var(--cream) }
.info-stat-lbl { font-size: 9px; color: var(--muted); margin-top: 2px; letter-spacing: 0.03em }

/* Info stressor */
.info-stressor {
  display: flex; align-items: flex-start; gap: 10px;
}
.info-stressor-icon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--rose-04);
}
.info-stressor-icon svg { width: 14px; height: 14px; stroke: var(--rose-dim); fill: none }
.info-stressor-body { flex: 1; min-width: 0 }
.info-stressor-label {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); margin-bottom: 3px;
}
.info-stressor-text {
  font-size: 12px; color: var(--cream); line-height: 1.5;
  opacity: 0.85;
}
.info-stressor--none .info-stressor-icon { background: transparent }
.info-stressor--none .info-stressor-icon svg { stroke: var(--muted2) }
.info-stressor--none .info-stressor-label { color: var(--muted2) }
.info-stressor--none .info-stressor-text { color: var(--muted); opacity: 0.6 }

/* ── Info panel: Date cards ──────────────────────────────────────── */
.info-date-card {
  padding: 10px 12px; margin-bottom: 6px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; border-left: 3px solid var(--muted);
}
.info-date-card:last-of-type { margin-bottom: 0 }
.info-date-confirmed { border-left-color: var(--green, #22c55e) }
.info-date-pending { border-left-color: var(--rose-dim) }

.info-date-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.info-date-activity {
  font-size: 13px; color: var(--cream); font-weight: 500;
  text-transform: capitalize;
}
.info-date-badge {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 9px; white-space: nowrap; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: var(--muted2);
}
.info-date-confirmed .info-date-badge {
  background: var(--green-bg); color: var(--green);
}
.info-date-pending .info-date-badge {
  background: var(--rose-bg); color: var(--rose-dim);
}

.info-date-details { margin-top: 8px; display: flex; flex-direction: column; gap: 4px }
.info-date-row {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11px; color: var(--muted); line-height: 1.4;
}
.info-date-icon {
  width: 12px; height: 12px; flex-shrink: 0; margin-top: 1px;
  stroke: var(--muted2); opacity: 0.7;
}

.info-date-cancel-btn {
  display: block; width: 100%; margin-top: 8px; padding: 5px 0;
  background: none; border: 1px solid var(--border2); border-radius: 6px;
  color: var(--muted); font-size: 11px; cursor: pointer;
  transition: all 0.2s;
}
.info-date-cancel-btn:hover {
  color: var(--red-light, #f87171); border-color: var(--red-light, #f87171);
  background: rgba(239, 68, 68, 0.06);
}

.info-dates-past {
  font-size: 11px; color: var(--muted2); margin-top: 8px; font-style: italic;
}

/* Cancel Date Modal -- form content only (structure uses shared modal system) */
.cancel-date-field { margin-bottom: 20px }
.cancel-date-label {
  display: block; font-size: 12px; color: var(--muted2);
  margin-bottom: 8px; font-weight: 500; text-align: left;
}
.cancel-date-textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--cream); font-size: 13px; line-height: 1.5;
  resize: none; outline: none; font-family: inherit;
  transition: border-color 0.2s; box-sizing: border-box;
}
.cancel-date-textarea:focus { border-color: var(--rose-dim) }
.cancel-date-textarea::placeholder { color: var(--muted); opacity: 0.5 }
.cancel-date-charcount {
  text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; opacity: 0.6;
}

/* ── Info panel: Birthday card ───────────────────────────────────── */
.bday-card {
  padding: 12px 14px; border-radius: 10px; margin: 0 0 4px;
  text-align: center; border-left: 3px solid transparent;
}
.bday-countdown {
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(245,158,11,0.04));
  border-left-color: #f59e0b;
}
.bday-today {
  background: linear-gradient(135deg, rgba(244,63,94,0.10), rgba(251,191,36,0.06));
  border-left-color: var(--rose);
}
.bday-icon { font-size: 22px; margin-bottom: 4px }
.bday-title {
  font-size: 13px; color: var(--cream); font-weight: 500; margin-bottom: 2px;
}
.bday-sub { font-size: 11px; color: var(--muted); margin-bottom: 8px }
.bday-countdown-text { font-size: 12px; color: var(--muted) }
.bday-gift-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--rose), #e11d48);
  color: #fff; border: none; border-radius: 8px;
  padding: 7px 16px; font-size: 12px; font-family: var(--ff-body);
  font-weight: 500; cursor: pointer; transition: opacity 0.15s;
  margin-top: 4px;
}
.bday-gift-btn:hover { opacity: 0.88 }
.bday-gift-btn:disabled { opacity: 0.5; cursor: default }
.bday-gift-btn svg { width: 14px; height: 14px }
.bday-gift-sent {
  font-size: 11px; color: #4ade80; font-style: italic; margin-top: 4px;
}

/* ── Info panel: View Profile button (moved to footer) ──────────── */

/* ── Companion Profile Modal -- content only (structure uses shared modal system) */
.profile-modal-text {
  font-size: 12px; color: var(--muted); line-height: 1.6; white-space: pre-line;
}
.profile-modal-tag-group { margin-top: 8px }
.profile-modal-tag-group:first-child { margin-top: 0 }
.profile-modal-tag-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted2); margin-bottom: 5px;
}
.profile-modal-field { margin-bottom: 10px }
.profile-modal-field:last-child { margin-bottom: 0 }
.profile-modal-field-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted2); margin-bottom: 4px;
}
.profile-modal-field-val {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.profile-modal-list {
  margin: 0; padding: 0 0 0 16px; font-size: 12px;
  color: var(--muted); line-height: 1.7;
}
.profile-modal-list li::marker { color: var(--rose-dim) }

/* ── Our Story Modal -- content only (structure uses shared modal system) */
.story-detail {
  padding: 12px 0; border-bottom: 1px solid var(--border2);
}
.story-detail:last-child { border-bottom: none }
.story-detail-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted2); margin-bottom: 6px;
}
.story-detail-val {
  font-size: 13px; color: var(--cream);
  display: flex; align-items: center; gap: 8px;
}
.story-detail-icon { font-size: 16px; flex-shrink: 0 }

/* ── Our Story sections ──────────────────────────────────────────── */
.story-section { margin-bottom: 8px }
.story-section:last-child { margin-bottom: 0 }
.story-section-title {
  font-family: var(--ff-heading); font-size: 13px;
  font-weight: 400; color: var(--rose); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border2);
}
.story-loading {
  font-size: 12px; color: var(--muted); text-align: center; padding: 16px 0;
}
.story-empty { text-align: center; padding: 16px 0; color: var(--muted); font-size: 13px }
.story-empty-hint { font-size: 11px; color: var(--muted2); margin-top: 6px }
.story-activity-list { display: flex; flex-direction: column; gap: 8px }
.story-activity-card {
  background: var(--bg3); border-radius: 10px; padding: 10px 14px;
  border: 1px solid var(--border2);
}
.story-activity-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.story-activity-icon { font-size: 14px; flex-shrink: 0 }
.story-activity-name {
  font-family: var(--ff-body); font-size: 13px;
  font-weight: 500; color: var(--cream);
}
.story-activity-record {
  font-family: var(--ff-body); font-size: 12px;
  font-weight: 400; color: var(--cream); margin-bottom: 2px;
}
.story-activity-streak {
  font-size: 11px; color: var(--rose); margin-bottom: 2px;
}
.story-activity-meta {
  font-size: 11px; color: var(--muted); font-weight: 300;
}

/* Active call header button */
.chat-hdr-btn.active-call {
  border-color: var(--green-border); color: var(--green);
  background: var(--green-bg);
  animation: callPulse 1.5s infinite;
}
@keyframes callPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }

/* Call indicator in panel */
.call-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 16px; margin: 4px 8px;
  background: var(--green-bg); border: 1px solid var(--green-border);
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.call-indicator:hover { background: var(--green-border) }
.call-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: callPulse 1.5s infinite;
}
.call-indicator-text { font-size: 11px; color: var(--green); flex: 1 }
.call-indicator-time { font-size: 10px; color: var(--green); opacity: 0.6 }

/* Call event cards in chat — see unified block below */

/* Right panel tabs (for call/profile toggle) */
.panel-tabs {
  display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ptab {
  flex: 1; padding: 10px 0; font-size: 12px; text-align: center;
  cursor: pointer; border: none; background: transparent;
  color: var(--muted); transition: all 0.15s; font-family: var(--ff-body); position: relative;
}
.ptab.active { color: var(--cream) }
.ptab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 2px; background: var(--rose); border-radius: 1px;
}
.ptab:hover:not(.active) { color: var(--dim) }
.ptab-call-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
  display: inline-block; margin-left: 5px; animation: callPulse 1.5s infinite;
  vertical-align: middle; margin-bottom: 1px;
}

/* Call panel */
.call-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden }
.call-panel-avatar-section {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px 16px; border-bottom: 1px solid var(--border2);
  position: relative; overflow: hidden;
}
.call-panel-ambient {
  position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.08) 0%, transparent 70%);
  top: 10px; left: 50%; transform: translateX(-50%);
  animation: ambientPulse 3s ease-in-out infinite;
}
@keyframes ambientPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5 }
  50% { transform: translateX(-50%) scale(1.2); opacity: 1 }
}
.call-panel-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-lighter));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 26px;
  color: var(--rose-dim); position: relative; z-index: 2; margin-bottom: 12px;
  overflow: hidden;
}
.call-panel-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }
.call-speaking-ring {
  position: absolute; width: 88px; height: 88px; border-radius: 50%;
  border: 1.5px solid var(--rose-40);
  animation: speakRing 0.9s ease-in-out infinite; z-index: 1;
}
@keyframes speakRing {
  0%, 100% { transform: scale(1); opacity: 0.5 }
  50% { transform: scale(1.1); opacity: 1 }
}
.call-panel-name {
  font-family: var(--ff-display); font-size: 17px;
  font-weight: 400; color: var(--cream); margin-bottom: 2px;
}
.call-panel-status { font-size: 11px; color: var(--muted); margin-bottom: 8px }
.call-panel-timer {
  font-size: 20px; font-weight: 300; color: var(--cream);
  letter-spacing: 0.1em; font-family: var(--ff-body);
}

/* Mic visualizer */
.mic-viz-sm { display: flex; align-items: center; gap: 2px; height: 18px; margin-top: 10px }
.vb {
  width: 2px; border-radius: 1px; background: var(--rose-dim);
  animation: vizB 0.6s ease-in-out infinite;
}
.vb:nth-child(1) { height: 5px; animation-delay: 0s }
.vb:nth-child(2) { height: 12px; animation-delay: 0.1s }
.vb:nth-child(3) { height: 16px; animation-delay: 0.2s }
.vb:nth-child(4) { height: 10px; animation-delay: 0.3s }
.vb:nth-child(5) { height: 14px; animation-delay: 0.15s }
.vb:nth-child(6) { height: 8px; animation-delay: 0.25s }
.vb:nth-child(7) { height: 12px; animation-delay: 0.05s }
@keyframes vizB {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3 }
  50% { transform: scaleY(1); opacity: 1 }
}

/* Token pill */
.token-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 99px; font-size: 11px; margin: 10px 20px 0;
}
.token-pill-icon { color: var(--rose) }
.token-pill-val { color: var(--cream); font-weight: 500 }
.token-pill-sub { color: var(--muted2) }

/* Call controls */
.call-controls-compact {
  display: flex; gap: 8px; justify-content: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border2);
}
.cctrl {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; transition: all 0.15s;
}
.cctrl svg { width: 16px; height: 16px }
.cctrl-mute {
  background: var(--cream-05); border: 1px solid var(--border2); color: var(--muted);
}
.cctrl-mute:hover { color: var(--cream) }
.cctrl-mute.muted { background: var(--yellow-bg); border-color: rgba(250, 204, 21, 0.3); color: var(--yellow) }
.cctrl-end { background: var(--red); color: #fff; width: 50px; height: 50px }
.cctrl-end:hover { background: var(--red-hover); transform: scale(1.05) }
.cctrl-type {
  background: var(--cream-05); border: 1px solid var(--border2); color: var(--muted);
}
.cctrl-type:hover { color: var(--cream) }
.cctrl-type.active { background: var(--rose-bg); border-color: var(--rose-30); color: var(--rose) }

/* Transcript mini */
.transcript-mini {
  flex: 1; overflow-y: auto;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 6px;
}
.transcript-mini::-webkit-scrollbar { width: 3px }
.transcript-mini::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 2px }
.tr-mini-row { display: flex; gap: 7px; align-items: flex-start }
.tr-mini-row.user { flex-direction: row-reverse }
.tr-mini-sp {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 9px; margin-top: 1px;
}
.tr-mini-sp.comp { background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light)); color: var(--rose-dim); font-family: var(--ff-display); font-style: italic }
.tr-mini-sp.user { background: linear-gradient(135deg, var(--rose-dim), var(--rose)); color: #fff; font-family: var(--ff-body); font-weight: 500 }
.tr-mini-bubble { max-width: 180px; padding: 7px 10px; border-radius: 10px; font-size: 11px; line-height: 1.5; color: var(--cream) }
.tr-mini-bubble.comp { background: var(--bg3); border: 1px solid var(--border2); border-bottom-left-radius: 2px }
.tr-mini-bubble.user { background: var(--rose-dim); border-bottom-right-radius: 2px }
.tr-live-mini { display: flex; gap: 7px; align-items: flex-start }
.tr-live-dots-mini {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; border-bottom-left-radius: 2px;
  padding: 8px 10px; display: flex; gap: 3px; align-items: center;
}
.ld { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: typingPulse 1.2s infinite }
.ld:nth-child(2) { animation-delay: 0.2s }
.ld:nth-child(3) { animation-delay: 0.4s }

/* Type input mini (during call) */
.type-mini-wrap { padding: 8px 12px; border-top: 1px solid var(--border2); display: none }
.type-mini-bar {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; display: flex; align-items: center; gap: 6px; padding: 6px 10px;
}
.type-mini-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: var(--ff-body); font-size: 12px; color: var(--cream);
}
.type-mini-input::placeholder { color: var(--muted2) }
.type-mini-send {
  width: 24px; height: 24px; border-radius: 6px; background: var(--rose);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.type-mini-send svg { width: 11px; height: 11px; color: #fff }

/* Chat empty state */
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted2); font-size: 13px; gap: 16px;
}
.chat-empty-browse {
  padding: 10px 24px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--rose); color: var(--cream); font-size: 13px; font-weight: 600;
  transition: opacity .15s;
}
.chat-empty-browse:hover { opacity: 0.85; }

/* ── Scroll-to-bottom button ──────────────────────────────────────── */
.chat-scroll-bottom {
  position: absolute; bottom: 80px; right: 20px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--cream); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px var(--shadow);
  transition: opacity .15s, transform .15s;
}
.chat-scroll-bottom:hover { background: var(--bg2); border-color: var(--cream-15) }
.chat-scroll-bottom.hidden { opacity: 0; pointer-events: none; transform: translateY(8px) }

/* ── Historical view banner ──────────────────────────────────────── */
.chat-history-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px; margin: 8px 16px 12px;
  background: var(--bg2); border: 1px solid var(--rose-20);
  border-radius: 10px; font-size: 12px; color: var(--muted);
}
.chat-history-jump {
  background: var(--rose-12); border: 1px solid var(--rose-20);
  border-radius: 6px; padding: 4px 12px;
  color: var(--rose); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.chat-history-jump:hover { background: var(--rose-20) }

/* ── Lazy-load spinner ───────────────────────────────────────────── */
.chat-load-more {
  display: flex; justify-content: center; padding: 8px 0; min-height: 32px;
}
.chat-load-more.loading .chat-load-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--rose);
  animation: imgSpin 0.8s linear infinite;
}

/* ── Image Loading ────────────────────────────────────────────────── */
.msg-image-loading {
  max-width: 280px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border2); background: var(--bg3);
  padding: 24px 32px; display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.msg-image-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--rose);
  animation: imgSpin 0.8s linear infinite;
}
@keyframes imgSpin { to { transform: rotate(360deg) } }
.msg-image-loading-text { font-size: 11px; color: var(--muted) }

/* ── Info Panel Footer ────────────────────────────────────────────── */
.info-leave-footer {
  margin-top: auto; padding: 10px 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.info-footer-btn {
  width: 100%; padding: 7px 0; border-radius: 8px; font-size: 11px;
  font-family: var(--ff-body); cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border2); transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.info-footer-btn svg { width: 14px; height: 14px }
.info-footer-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.info-footer-btn--danger svg { color: var(--rose-dim) }
.info-footer-btn--danger:hover {
  color: var(--rose); border-color: var(--rose-30);
  background: rgba(194, 105, 122, 0.05);
}
.info-footer-btn--danger:hover svg { color: var(--rose) }

/* ── Leave / Breakup ──────────────────────────────────────────────── */

@keyframes heart-pulse { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.15) } }
.leave-heart-pulse { animation: heart-pulse 1.5s ease-in-out infinite }

/* Breakup overlay */
.breakup-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: var(--black-60); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.breakup-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 32px 36px; text-align: center;
  max-width: 320px; width: 100%;
  animation: breakupFadeIn 0.25s ease-out;
}
@keyframes breakupFadeIn { from { opacity: 0; transform: scale(0.95) } to { opacity: 1; transform: scale(1) } }

.breakup-heart {
  width: 64px; height: 64px; margin: 0 auto 18px;
  color: var(--rose); position: relative;
}
.breakup-heart svg { width: 100%; height: 100% }

.breakup-title {
  font-family: var(--ff-display); font-size: 20px;
  font-weight: 400; color: var(--cream); margin-bottom: 6px;
}
.breakup-sub { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 24px }

.breakup-btns { display: flex; gap: 10px }
.breakup-btn-cancel {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 13px;
  font-family: var(--ff-body); cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--border2);
  transition: all 0.15s;
}
.breakup-btn-cancel:hover { color: var(--cream); border-color: var(--cream-15) }
.breakup-btn-leave {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 13px;
  font-family: var(--ff-body); cursor: pointer;
  background: var(--rose); color: #fff; border: none;
  transition: all 0.15s;
}
.breakup-btn-leave:hover { background: var(--rose-hover) }

/* Heart split halves */
.breakup-heart-half {
  position: absolute; inset: 0; color: var(--rose);
}
.breakup-heart-half svg { width: 100%; height: 100% }
.breakup-heart-left { clip-path: inset(0 50% 0 0) }
.breakup-heart-right { clip-path: inset(0 0 0 50%) }

@keyframes heart-split-left {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1 }
  100% { transform: translate(-30px, 10px) rotate(-15deg); opacity: 0 }
}
@keyframes heart-split-right {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1 }
  100% { transform: translate(30px, 10px) rotate(15deg); opacity: 0 }
}
.breakup-heart-left.splitting { animation: heart-split-left 1s ease-in forwards }
.breakup-heart-right.splitting { animation: heart-split-right 1s ease-in forwards }

.breakup-card-fade { animation: breakupCardFade 0.5s ease-in forwards }
@keyframes breakupCardFade { to { opacity: 0; transform: scale(0.95) } }

/* ── Admin Modal -- content only (structure uses shared modal system) */
.admin-section { margin-bottom: 18px }
.admin-section:last-child { margin-bottom: 0 }
.admin-section-label {
  font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted2); margin-bottom: 8px;
}
.admin-stage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.admin-stage-btn {
  padding: 8px 0; border-radius: 8px; font-size: 12px;
  font-family: var(--ff-body); cursor: pointer;
  background: var(--bg3); color: var(--muted);
  border: 1px solid var(--border2); transition: all 0.15s;
}
.admin-stage-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.admin-stage-btn.active {
  background: var(--rose-bg); color: var(--rose);
  border-color: var(--rose-30);
}
.admin-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.admin-action-btn {
  padding: 10px 8px; border-radius: 8px; font-size: 11px;
  font-family: var(--ff-body); cursor: pointer;
  background: var(--bg3); color: var(--muted);
  border: 1px solid var(--border2); transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.admin-action-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.admin-action-btn svg { width: 13px; height: 13px; flex-shrink: 0 }
.admin-action-btn.danger { color: var(--red) }
.admin-action-btn.danger:hover { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.06) }
.admin-action-btn.success { color: var(--green) }
.admin-action-btn.success:hover { border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.06) }
/* ── Memories debug modal -- content only (structure uses shared modal system) */
.admin-mem-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--cream-10) }
.admin-mem-tab { background: none; border: none; color: var(--text-secondary); font-size: 13px; padding: 6px 12px; cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s }
.admin-mem-tab:hover { color: var(--text-primary) }
.admin-mem-tab.active { color: var(--accent); border-bottom-color: var(--accent) }
.admin-mem-tab-count { font-size: 11px; opacity: 0.6; margin-left: 4px }
.admin-mem-cat-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px }
.admin-mem-count-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.05); color: var(--text-secondary) }
.admin-mem-count-badge b { color: var(--text-primary); margin-left: 3px }
.admin-memories-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; flex: 1; min-height: 0 }
.admin-memory-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(255,255,255,0.03); font-size: 13px }
.admin-memory-row:hover { background: rgba(255,255,255,0.06) }
.admin-memory-cat { flex-shrink: 0; padding: 2px 6px; border-radius: 4px; background: var(--accent-alpha); color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px }
.admin-memory-imp { flex-shrink: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--text-tertiary); font-size: 10px; font-weight: 600 }
.admin-memory-text { flex: 1; color: var(--text-primary) }
.admin-memory-date { flex-shrink: 0; color: var(--text-tertiary); font-size: 11px }
.admin-memory-del { flex-shrink: 0; background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 16px; padding: 0 4px; line-height: 1; opacity: 0; transition: opacity 0.15s, color 0.15s }
.admin-memory-row:hover .admin-memory-del { opacity: 1 }
.admin-memory-del:hover { color: var(--red) }
.admin-summary-row { display: flex; align-items: baseline; gap: 8px; padding: 8px; border-radius: 6px; background: rgba(255,255,255,0.03); font-size: 13px }
.admin-summary-range { flex-shrink: 0; padding: 2px 6px; border-radius: 4px; background: rgba(139, 92, 246, 0.15); color: #a78bfa; font-size: 11px; white-space: nowrap }
.admin-summary-text { flex: 1; color: var(--text-primary); line-height: 1.4 }
.admin-mem-empty { color: var(--text-secondary); text-align: center; padding: 24px 0 }
.admin-mem-footer { padding-top: 10px; border-top: 1px solid var(--cream-10); margin-top: 8px; display: flex; justify-content: flex-end }
.admin-mem-clear-all { font-size: 12px }

/* ── Call event cards ────────────────────────────────────────────── */
.call-event-card {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 8px 16px; margin: 8px auto; width: fit-content;
  background: var(--cream-04); border: 1px solid var(--border2);
  border-radius: 20px; font-size: 12px; color: var(--muted);
}
.call-event-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.call-event-icon svg { width: 13px; height: 13px }
.call-event-icon.green { background: var(--green-bg); color: var(--green) }
.call-event-icon.muted { background: var(--bg2); color: var(--muted2) }
.call-event-title { font-size: 12px; font-weight: 400; color: var(--cream) }
.call-event-sub { font-size: 11px; color: var(--muted); margin-top: 1px }

/* ── Date event cards (confirmed/declined) ──────────────────────── */
.date-event-card {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 8px 16px; margin: 8px auto; width: fit-content;
  background: var(--cream-04); border: 1px solid var(--border2);
  border-radius: 20px; font-size: 12px; color: var(--muted);
}
.date-event-card svg { flex-shrink: 0; opacity: 0.6 }
.date-event-card.confirmed svg { color: var(--green); opacity: 0.8 }
.date-event-card.confirmed span { color: var(--green) }
.date-event-card.declined svg { color: var(--muted); opacity: 0.6 }

/* ── Chat error card (in-chat timeout/failure) ──────────────────── */
.chat-error-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 8px 40px;
  background: rgba(239, 68, 68, 0.06); border: 1px solid var(--red-border);
  border-radius: 12px; color: var(--red);
}
.chat-error-card svg { flex-shrink: 0 }
.chat-error-body { display: flex; align-items: center; gap: 12px; flex: 1 }
.chat-error-text { font-size: 12px; line-height: 1.4; color: var(--red-light); flex: 1 }
.chat-error-retry {
  flex-shrink: 0; padding: 5px 14px;
  font-size: 12px; font-weight: 600; border: none; border-radius: 6px; cursor: pointer;
  background: var(--red); color: #fff;
  transition: opacity 0.15s; white-space: nowrap;
}
.chat-error-retry:hover { opacity: 0.85 }
.chat-error-dismiss {
  flex-shrink: 0; padding: 5px 14px;
  font-size: 12px; font-weight: 500; border: 1px solid var(--red-border); border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--red-light);
  transition: all 0.15s; white-space: nowrap;
}
.chat-error-dismiss:hover { background: rgba(239, 68, 68, 0.06) }

/* ── Pending message (warming-up / unsent) ──────────────────────── */
.msg-group.pending { opacity: 0.45 }

/* ── Warming up card (in-chat 503 — LLM pod loading) ────────────── */
.chat-warming-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin: 8px 40px;
  background: var(--yellow-bg); border: 1px solid var(--yellow-border);
  border-radius: 12px; color: var(--yellow);
}
.chat-warming-card svg { flex-shrink: 0; margin-top: 3px }
.chat-warming-body { display: flex; flex-direction: column; gap: 8px }
.chat-warming-text { font-size: 12px; line-height: 1.5; color: var(--amber, #f59e0b) }
.chat-warming-retry {
  align-self: flex-start; padding: 5px 14px;
  font-size: 12px; font-weight: 600; border: none; border-radius: 6px; cursor: pointer;
  background: var(--amber, #f59e0b); color: #1a1a1a;
  transition: opacity 0.15s;
}
.chat-warming-retry:hover:not(:disabled) { opacity: 0.85 }
.chat-warming-retry:disabled { opacity: 0.45; cursor: not-allowed }

/* ── Server starting pulse (cold-start first message) ────────────── */
.chat-starting-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber, #f59e0b);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0; margin-top: 5px;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ── Chat hint card (subtle info note, e.g. poll timeout) ────────── */
.chat-hint-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 8px 40px;
  background: var(--cream-04); border: 1px solid var(--border2);
  border-radius: 12px; color: var(--muted);
}
.chat-hint-card svg { flex-shrink: 0; opacity: 0.5 }
.chat-hint-text { font-size: 12px; line-height: 1.4; color: var(--muted) }

/* ── Locked input bar (while message pending) ───────────────────── */
.chat-input-bar.locked .send-btn,
.chat-input-bar.locked .input-action { opacity: 0.5; pointer-events: none }

/* ── Block warning card (in-chat system message) ────────────────── */
.block-warning-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin: 8px 40px;
  background: rgba(239, 68, 68, 0.06); border: 1px solid var(--red-border);
  border-radius: 12px; color: var(--red);
}
.block-warning-card svg { flex-shrink: 0; margin-top: 1px }
.block-warning-text { font-size: 12px; line-height: 1.5; color: var(--red-light) }

/* ── Blocked overlay ─────────────────────────────────────────────── */
.blocked-overlay, .reset-confirm-overlay {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--black-60); backdrop-filter: blur(6px);
}
.blocked-card, .reset-confirm-card {
  width: 380px; max-width: 90%; padding: 32px 28px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; text-align: center;
}
.blocked-icon-ring {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--red-bg);
  border: 2px solid rgba(239, 68, 68, 0.25); color: var(--red);
}
.blocked-title { font-size: 18px; font-weight: 700; color: var(--cream); margin-bottom: 8px; font-family: var(--ff-display) }
.blocked-desc { font-size: 13px; color: var(--muted); line-height: 1.5 }
.blocked-divider { height: 1px; background: var(--border2); margin: 20px 0 }
.blocked-option-title { font-size: 14px; font-weight: 600; color: var(--cream); margin-bottom: 6px }
.blocked-option-desc { font-size: 12px; color: var(--muted); line-height: 1.5 }
.blocked-option-desc strong { color: var(--red-light) }
.blocked-btns { display: flex; gap: 10px; margin-top: 20px; justify-content: center }
.blocked-btn-dismiss {
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border2);
  background: transparent; color: var(--muted); font-size: 13px;
  font-family: var(--ff-body); cursor: pointer; transition: all 0.15s;
}
.blocked-btn-dismiss:hover { color: var(--cream); border-color: var(--border) }
.blocked-btn-reset {
  padding: 10px 20px; border-radius: 10px; border: none;
  background: rgba(239, 68, 68, 0.15); color: var(--red); font-size: 13px;
  font-weight: 600; font-family: var(--ff-body); cursor: pointer; transition: all 0.15s;
}
.blocked-btn-reset:hover { background: rgba(239, 68, 68, 0.25) }
.blocked-btn-reset:disabled { opacity: 0.5; cursor: not-allowed }

/* ── Reset confirmation ──────────────────────────────────────────── */
.reset-confirm-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--yellow-bg);
  border: 2px solid var(--yellow-border); color: var(--yellow);
}
.reset-confirm-title { font-size: 17px; font-weight: 700; color: var(--cream); margin-bottom: 8px; font-family: var(--ff-display) }
.reset-confirm-desc { font-size: 12px; color: var(--muted); line-height: 1.5 }
.reset-confirm-list {
  text-align: left; margin: 10px 0 0 20px; padding: 0;
  font-size: 12px; color: var(--muted); line-height: 1.8;
}
.reset-confirm-list li::marker { color: var(--red) }

/* ── Center-area call state ──────────────────────────────────────── */

.call-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 24px;
  position: relative; overflow: hidden;
  animation: callStateFadeIn 0.3s ease-out;
}
.call-state.hidden { display: none }
@keyframes callStateFadeIn { from { opacity: 0 } to { opacity: 1 } }

.call-state-ambient {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.1) 0%, transparent 70%);
  top: 80px; left: 50%; transform: translateX(-50%);
  animation: callAmbientPulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes callAmbientPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5 }
  50% { transform: translateX(-50%) scale(1.2); opacity: 1 }
}

.call-state-avatar-wrap {
  position: relative; width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; z-index: 2;
}
.call-state-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-lighter));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-style: italic; font-size: 32px;
  color: var(--rose-dim); overflow: hidden; position: relative; z-index: 2;
}
.call-state-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }

.call-speak-ring, .call-speak-ring-2 {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--rose-40);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: none; z-index: 1;
}
.call-speak-ring {
  width: 110px; height: 110px;
  animation: callSpeakRing1 0.9s ease-in-out infinite;
}
.call-speak-ring-2 {
  width: 126px; height: 126px;
  border-color: var(--rose-20);
  animation: callSpeakRing2 0.9s ease-in-out 0.15s infinite;
}
@keyframes callSpeakRing1 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5 }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1 }
}
@keyframes callSpeakRing2 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3 }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.7 }
}

.call-state-name {
  font-family: var(--ff-display); font-size: 18px;
  font-weight: 400; color: var(--cream); margin-bottom: 2px; z-index: 2;
}
.call-state-status {
  font-size: 11px; color: var(--muted); margin-bottom: 6px; z-index: 2;
}

.call-state-viz {
  display: flex; align-items: center; gap: 3px;
  height: 24px; margin-bottom: 12px; z-index: 2;
}
.call-state-viz .vb { width: 3px; border-radius: 1.5px }

.call-state-transcript {
  width: 100%; max-width: 420px; flex: 1; min-height: 0;
  overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 0 20px 40px; z-index: 2;
}
.call-state-transcript::-webkit-scrollbar { width: 3px }
.call-state-transcript::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 2px }

.call-state-token-pill {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 5px 14px; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 99px; font-size: 11px; z-index: 2;
}
.call-state-token-pill .token-pill-icon { color: var(--rose) }
.call-state-token-pill .token-pill-val { color: var(--cream); font-weight: 500 }
.call-state-token-pill .token-pill-sub { color: var(--muted2) }

/* Transcript rows (center call state) */
.ct-row { display: flex; gap: 8px; align-items: flex-start }
.ct-row.user { flex-direction: row-reverse }
.ct-sp {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; margin-top: 1px;
}
.ct-sp.comp {
  background: linear-gradient(135deg, var(--av-comp-dark), var(--av-comp-light));
  color: var(--rose-dim); font-family: var(--ff-display); font-style: italic;
}
.ct-sp.comp img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px }
.ct-sp.user {
  background: linear-gradient(135deg, var(--rose-dim), var(--rose));
  color: #fff; font-family: var(--ff-body); font-weight: 500;
  overflow: hidden;
}
.ct-sp.user img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px }
.ct-bub {
  max-width: 300px; padding: 8px 12px; border-radius: 12px;
  font-size: 12px; line-height: 1.5; color: var(--cream);
}
.ct-bub.comp { background: var(--bg3); border: 1px solid var(--border2); border-bottom-left-radius: 3px }
.ct-bub.user { background: var(--rose-dim); border-bottom-right-radius: 3px }

.ct-live { display: flex; gap: 8px; align-items: flex-start }
.ct-live-dots {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; border-bottom-left-radius: 3px;
  padding: 9px 12px; display: flex; gap: 3px; align-items: center;
}

/* Header call-mode groups */
.chat-hdr-normal { display: flex; align-items: center; gap: 4px }
.chat-hdr-normal.hidden { display: none }
.chat-hdr-call { display: flex; align-items: center; gap: 8px }
.chat-hdr-call.hidden { display: none }

/* Call timer badge in header */
.call-timer-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: var(--green-bg); border: 1px solid var(--green-border);
  font-size: 12px; font-weight: 500; color: var(--green);
  font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
}
.call-timer-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: callPulse 1.5s infinite;
}

/* Header end call button */
.call-hdr-end {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-bg); border: 1px solid var(--red-border);
  color: var(--red); cursor: pointer; transition: all 0.15s;
}
.call-hdr-end:hover { background: var(--red-border); border-color: var(--red-border) }
.call-hdr-end svg { width: 15px; height: 15px }

/* Mute pill in input bar */
.call-mute-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  background: var(--yellow-bg); border: 1px solid var(--yellow-border);
  font-size: 11px; color: var(--yellow); white-space: nowrap;
}
.call-mute-pill.hidden { display: none }
.call-mute-pill svg { width: 12px; height: 12px }

/* ── Life change confirmation ────────────────────────────────── */
.life-change-overlay {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--black-60); backdrop-filter: blur(6px);
}
.life-change-card {
  width: 380px; max-width: 90%; padding: 32px 28px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; text-align: center;
}
.life-change-icon-ring {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--rose-bg);
  border: 2px solid var(--rose-30); color: var(--rose);
}
.life-change-title {
  font-size: 18px; font-weight: 700; color: var(--cream);
  margin-bottom: 4px; font-family: var(--ff-display);
}
.life-change-type {
  font-size: 13px; color: var(--rose); text-transform: capitalize;
  margin-bottom: 10px; font-weight: 600;
}
.life-change-desc {
  font-size: 13px; color: var(--muted); line-height: 1.5;
  margin-bottom: 4px;
}
.life-change-btns { display: flex; gap: 10px; margin-top: 20px; justify-content: center }
.life-change-btn-dismiss {
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border2);
  background: transparent; color: var(--muted); font-size: 13px;
  font-family: var(--ff-body); cursor: pointer; transition: all 0.15s;
}
.life-change-btn-dismiss:hover { color: var(--cream); border-color: var(--border) }
.life-change-btn-dismiss:disabled { opacity: 0.5; cursor: not-allowed }
.life-change-btn-confirm {
  padding: 10px 20px; border-radius: 10px; border: none;
  background: var(--rose-bg); color: var(--rose); font-size: 13px;
  font-weight: 600; font-family: var(--ff-body); cursor: pointer; transition: all 0.15s;
}
.life-change-btn-confirm:hover { background: rgba(var(--rose-rgb), 0.25) }
.life-change-btn-confirm:disabled { opacity: 0.5; cursor: not-allowed }

.life-change-reply {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
  text-align: left;
}
.life-change-reply-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 4px;
}
.life-change-reply-text {
  font-size: 13px; line-height: 1.5; color: var(--cream);
}

/* ── Pause Confirm Overlay ───────────────────────────────────────── */
.pause-confirm-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: var(--black-60); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.pause-confirm-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 32px 36px; text-align: center;
  max-width: 320px; width: 100%;
  animation: breakupFadeIn 0.25s ease-out;
}
.pause-confirm-icon {
  width: 48px; height: 48px; margin: 0 auto 14px;
  color: var(--muted);
}
.pause-confirm-icon svg { width: 100%; height: 100% }
.pause-confirm-title {
  font-family: var(--ff-display); font-size: 18px;
  font-weight: 400; color: var(--cream); margin-bottom: 6px;
}
.pause-confirm-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 16px;
}
.pause-reason-input {
  width: 100%; min-height: 60px; max-height: 100px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 12px; color: var(--cream);
  font-size: 12px; font-family: var(--ff-body);
  resize: vertical; margin-bottom: 16px;
}
.pause-reason-input::placeholder { color: var(--muted2) }
.pause-confirm-btns { display: flex; gap: 10px }
.pause-cancel-btn {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 13px;
  font-family: var(--ff-body); cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--border2);
  transition: all 0.15s;
}
.pause-cancel-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.pause-confirm-btn {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 13px;
  font-family: var(--ff-body); cursor: pointer;
  background: var(--rose); color: #fff; border: none;
  transition: all 0.15s;
}
.pause-confirm-btn:hover { background: var(--rose-hover) }

/* ── Paused Companion Overlay ────────────────────────────────────── */
.paused-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: var(--black-60); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.paused-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 36px 40px; text-align: center;
  max-width: 320px; width: 100%;
  animation: breakupFadeIn 0.25s ease-out;
}
.paused-icon {
  width: 48px; height: 48px; margin: 0 auto 16px; color: var(--muted);
}
.paused-icon svg { width: 100%; height: 100% }
.paused-title {
  font-family: var(--ff-display); font-size: 18px;
  font-weight: 400; color: var(--cream); margin-bottom: 6px;
}
.paused-sub {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 24px;
}
.paused-resume-btn {
  padding: 10px 28px; border-radius: 10px; font-size: 13px;
  font-family: var(--ff-body); cursor: pointer;
  background: var(--rose); color: #fff; border: none;
  transition: all 0.15s;
}
.paused-resume-btn:hover { background: var(--rose-hover) }
.paused-resume-btn:disabled { opacity: 0.5; cursor: not-allowed }

/* ── Testing Diagnostics Panel ────────────────────────────────────── */

.dbg-panel{
  margin:6px 0 0 44px;max-width:360px;
}
.dbg-toggle{
  background:none;border:none;padding:0;cursor:pointer;
  display:inline-flex;align-items:center;gap:4px;
  color:var(--muted);font-size:10px;font-weight:500;letter-spacing:0.3px;
  font-family:var(--ff-body);opacity:0.5;transition:opacity 0.15s;
}
.dbg-toggle:hover{opacity:0.8}
.dbg-toggle svg{width:12px;height:12px;flex-shrink:0}
.dbg-toggle .dbg-chevron{transition:transform 0.2s;width:10px;height:10px}
.dbg-toggle.open .dbg-chevron{transform:rotate(180deg)}
.dbg-body{
  margin-top:6px;padding:10px 12px;border-radius:10px;
  background:var(--bg3);border:1px solid var(--border);
  font-size:11px;color:var(--dim);font-family:var(--ff-body);
}
.dbg-row{display:flex;gap:8px;align-items:baseline;padding:3px 0}
.dbg-row + .dbg-row{border-top:1px solid var(--border2)}
.dbg-label{
  min-width:72px;color:var(--muted);font-weight:600;
  font-size:10px;text-transform:uppercase;letter-spacing:0.4px;flex-shrink:0;
}
.dbg-val{color:var(--cream);font-weight:400;opacity:0.8}
.dbg-pills{display:flex;flex-wrap:wrap;gap:4px}
.dbg-pill{
  background:var(--rose-bg);border:1px solid var(--border);
  border-radius:100px;padding:1px 8px;font-size:10px;color:var(--rose-dim);
  white-space:nowrap;font-weight:500;
}
.dbg-mem{
  background:rgba(200,160,255,0.06);border:1px solid rgba(200,160,255,0.1);
  border-radius:100px;padding:1px 8px;font-size:10px;color:rgba(200,160,255,0.6);
  white-space:nowrap;font-weight:500;
}
[data-theme="light"] .dbg-toggle{color:var(--muted)}
[data-theme="light"] .dbg-body{background:var(--bg3);border-color:var(--border);color:var(--dim)}
[data-theme="light"] .dbg-label{color:var(--muted)}
[data-theme="light"] .dbg-val{color:var(--text);opacity:0.7}
[data-theme="light"] .dbg-pill{background:var(--rose-bg);border-color:var(--border);color:var(--rose-d)}
[data-theme="light"] .dbg-mem{background:rgba(120,60,200,0.06);border-color:rgba(120,60,200,0.1);color:rgba(120,60,200,0.6)}

/* ── Milestone Progress Card ─────────────────────────────────────── */
.milestone-card{
  display:flex;align-items:center;gap:10px;
  margin:6px auto;padding:8px 14px;border-radius:10px;
  background:rgba(200,160,255,0.06);border:1px solid rgba(200,160,255,0.12);
  max-width:420px;width:fit-content;
  animation:milestoneSlideIn 0.3s ease-out;
}
.milestone-card.completed{
  background:rgba(80,200,120,0.08);border-color:rgba(80,200,120,0.18);
}
.milestone-card-icon{
  flex-shrink:0;color:var(--accent,#c8a0ff);display:flex;align-items:center;
}
.milestone-card.completed .milestone-card-icon{color:#50c878}
.milestone-card-body{flex:1;min-width:0}
.milestone-card-label{
  font-size:12px;color:var(--text-secondary,rgba(200,210,230,0.8));
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  margin-bottom:4px;
}
.milestone-card-bar{
  height:4px;border-radius:2px;background:rgba(200,160,255,0.12);overflow:hidden;
}
.milestone-card.completed .milestone-card-bar{background:rgba(80,200,120,0.15)}
.milestone-card-fill{
  height:100%;border-radius:2px;
  background:linear-gradient(90deg,var(--accent,#c8a0ff),#e0b0ff);
  transition:width 0.4s ease;
}
.milestone-card.completed .milestone-card-fill{
  background:linear-gradient(90deg,#50c878,#80e8a0);
}
.milestone-card-status{
  font-size:11px;color:var(--muted,rgba(180,190,210,0.5));
  white-space:nowrap;flex-shrink:0;
}
.milestone-card.completed .milestone-card-status{color:#50c878;font-weight:600}
@keyframes milestoneSlideIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

/* ── Milestone Trigger Badge on User Bubble ─────────────────────── */
.msg-bubble.user.milestone-trigger{
  position:relative;
  box-shadow:0 0 0 1px rgba(200,160,255,0.25);
}
.milestone-badge{
  position:absolute;bottom:-2px;left:-2px;
  width:16px;height:16px;border-radius:50%;
  background:var(--accent,#c8a0ff);
  display:flex;align-items:center;justify-content:center;
  animation:milestoneBadgePop 0.3s ease-out;
  cursor:pointer;transition:transform 0.15s ease,box-shadow 0.15s ease;
}
.milestone-badge svg{stroke:#fff}
@keyframes milestoneBadgePop{
  0%{transform:scale(0)}
  70%{transform:scale(1.2)}
  100%{transform:scale(1)}
}
.milestone-badge:hover{transform:scale(1.15);box-shadow:0 0 6px rgba(200,160,255,0.4)}

/* ── Milestone Badge Tooltip ───────────────────────────────────── */
.milestone-tooltip{
  position:fixed;
  min-width:180px;max-width:240px;
  background:var(--bg2,#1e1826);border:1px solid rgba(200,160,255,0.15);
  border-radius:8px;padding:8px 10px;
  opacity:0;pointer-events:none;
  transform:translateY(-4px);
  transition:opacity 0.15s ease,transform 0.15s ease;
  z-index:9999;
}
.milestone-tooltip.visible{
  opacity:1;pointer-events:auto;transform:translateY(0);
}
.ms-tip-item+.ms-tip-item{
  margin-top:6px;padding-top:6px;
  border-top:1px solid rgba(200,160,255,0.08);
}
.ms-tip-row{
  display:flex;justify-content:space-between;align-items:center;
  gap:8px;margin-bottom:3px;
}
.ms-tip-label{
  font-size:11px;color:var(--text-secondary,rgba(200,210,230,0.8));
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ms-tip-status{
  font-size:11px;color:var(--muted,rgba(180,190,210,0.5));
  white-space:nowrap;flex-shrink:0;
}
.ms-tip-bar{
  height:3px;border-radius:2px;
  background:rgba(200,160,255,0.12);overflow:hidden;
}
.ms-tip-fill{
  height:100%;border-radius:2px;
  background:linear-gradient(90deg,var(--accent,#c8a0ff),#e0b0ff);
}
.ms-tip-item.completed .ms-tip-status{color:#50c878;font-weight:600}
.ms-tip-item.completed .ms-tip-bar{background:rgba(80,200,120,0.15)}
.ms-tip-item.completed .ms-tip-fill{background:linear-gradient(90deg,#50c878,#80e8a0)}

/* Light theme overrides */
[data-theme="light"] .milestone-card{background:rgba(120,80,200,0.06);border-color:rgba(120,80,200,0.12)}
[data-theme="light"] .milestone-card.completed{background:rgba(40,160,80,0.06);border-color:rgba(40,160,80,0.12)}
[data-theme="light"] .milestone-card-bar{background:rgba(120,80,200,0.1)}
[data-theme="light"] .milestone-card.completed .milestone-card-bar{background:rgba(40,160,80,0.1)}
[data-theme="light"] .milestone-tooltip{background:var(--bg,#fff);border-color:rgba(120,80,200,0.15)}
[data-theme="light"] .ms-tip-bar{background:rgba(120,80,200,0.1)}
[data-theme="light"] .ms-tip-item.completed .ms-tip-bar{background:rgba(40,160,80,0.1)}
[data-theme="light"] .milestone-badge:hover{box-shadow:0 0 6px rgba(120,80,200,0.3)}

/* ── Stage Icon (shared) ──────────────────────────────────────────── */
.stage-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0 }
.stage-icon svg { width: 100%; height: 100% }

/* ── Clickable Milestone Label (Info Panel) ───────────────────────── */
.milestone-label--clickable{cursor:pointer;transition:color 0.15s}
.milestone-label--clickable:hover{color:var(--accent,#c8a0ff)}

/* ── Jump-to-Message Highlight ───────────────────────────────────── */
.msg-highlight{animation:msgHighlight 3s ease-out}
@keyframes msgHighlight{
  0%{background:rgba(200,160,255,0.15)}
  70%{background:rgba(200,160,255,0.08)}
  100%{background:transparent}
}
[data-theme="light"] .msg-highlight{animation:msgHighlightLight 3s ease-out}
@keyframes msgHighlightLight{
  0%{background:rgba(120,80,200,0.12)}
  70%{background:rgba(120,80,200,0.05)}
  100%{background:transparent}
}

/* ── Achievement Trigger Links ──────────────────────────────────── */
.ach-view-trigger{
  font-size:11px;color:var(--accent,#c8a0ff);background:none;border:none;
  cursor:pointer;padding:0;margin-top:4px;text-decoration:underline;
  text-underline-offset:2px;
}
.ach-view-trigger:hover{opacity:0.8}

/* ── Milestone Trigger Popup ────────────────────────────────────── */
.ach-trigger-overlay{
  position:fixed;inset:0;z-index:9999;
  background:var(--black-60);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;
  animation:fadeIn 0.15s ease-out;
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.ach-trigger-popup{
  background:var(--bg3);border-radius:14px;padding:24px;
  max-width:420px;width:calc(100vw - 40px);max-height:60vh;
  border:1px solid var(--border2);
  box-shadow:0 20px 60px var(--shadow-lg);
  display:flex;flex-direction:column;
}
.ach-trigger-header{
  font-size:14px;font-weight:600;color:var(--cream);margin-bottom:16px;
}
.ach-trigger-list{
  display:flex;flex-direction:column;gap:8px;
  overflow-y:auto;flex:1;min-height:0;
}
.ach-trigger-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:8px;
  background:var(--cream-04);border:1px solid var(--border2);
}
.ach-trigger-snippet{
  flex:1;font-size:12px;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  line-height:1.4;
}
.ach-trigger-jump{
  font-size:11px;color:var(--rose);background:none;border:none;
  cursor:pointer;white-space:nowrap;text-decoration:underline;
  text-underline-offset:2px;padding:4px 0;
}
.ach-trigger-jump:hover{opacity:0.8}
.ach-trigger-close{
  display:block;margin:16px auto 0;padding:8px 28px;
  background:var(--rose-12);border:1px solid var(--rose-20);
  border-radius:8px;color:var(--text);cursor:pointer;font-size:13px;
}
.ach-trigger-close:hover{background:var(--rose-20)}

/* ── Pause Button in Info Panel (now uses .info-footer-btn) ───────── */
