/* ─── ARIA LIVING MEMORY SCREEN ─────────────────────────────────────────────
   A memory display that feels like Aria's private notes — not a settings table.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── section base ──────────────────────────────────────────────────────────── */
.lm-section {
  padding: 0 20px 28px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lm-section.lm-section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── eyebrow label ─────────────────────────────────────────────────────────── */
.lm-section-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  letter-spacing: 1.8px;
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

.lm-eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f472b6;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(244,114,182,0.6);
}
.lm-dot-amber { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.lm-dot-blue  { background: #60a5fa; box-shadow: 0 0 6px rgba(96,165,250,0.5); }
.lm-dot-green { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.5); }

/* ── narration (Aria's notes about the user) ───────────────────────────────── */
.lm-section-narration {
  padding-top: 20px;
}

.lm-note-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateX(-8px);
  animation: lm-note-in 0.4s ease forwards;
}

@keyframes lm-note-in {
  to { opacity: 1; transform: translateX(0); }
}

.lm-note-dash {
  color: rgba(244,114,182,0.5);
  font-size: 15px;
  line-height: 1.6;
  flex-shrink: 0;
  font-family: 'Instrument Serif', serif;
}

.lm-note-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text, #f8fafc);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  letter-spacing: 0.1px;
}

/* ── open threads ──────────────────────────────────────────────────────────── */
.lm-threads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lm-thread-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.18);
  border-radius: 10px;
  padding: 11px 14px;
  opacity: 0;
  animation: lm-note-in 0.38s ease forwards;
}

.lm-thread-icon {
  color: #fbbf24;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.8;
}

.lm-thread-text {
  font-size: 13px;
  color: rgba(248,250,252,0.85);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.55;
}

/* ── style pills ───────────────────────────────────────────────────────────── */
.lm-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lm-style-pill {
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12px;
  color: #93c5fd;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.1px;
  opacity: 0;
  animation: lm-note-in 0.35s ease forwards;
}

/* ── sessions timeline ─────────────────────────────────────────────────────── */
.lm-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lm-session-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  position: relative;
  opacity: 0;
  animation: lm-note-in 0.38s ease forwards;
}

.lm-session-line {
  position: absolute;
  left: 6px;
  top: 9px;
  width: 1px;
  height: 100%;
  background: rgba(52,211,153,0.2);
}

.lm-session-row:last-child .lm-session-line {
  display: none;
}

.lm-session-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(52,211,153,0.15);
  border: 1.5px solid rgba(52,211,153,0.5);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.lm-session-text {
  font-size: 12.5px;
  color: var(--muted, #94a3b8);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

/* ── empty / unsigned states ───────────────────────────────────────────────── */
.lm-empty,
.lm-unsigned {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 32px;
  gap: 12px;
}

.lm-empty-icon,
.lm-unsigned-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--card2, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #94a3b8);
  font-size: 22px;
}

.lm-empty-title,
.lm-unsigned-text {
  font-size: 14px;
  color: var(--text, #f8fafc);
  font-family: 'DM Sans', sans-serif;
}

.lm-empty-sub,
.lm-unsigned-sub {
  font-size: 12.5px;
  color: var(--muted, #94a3b8);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

/* ── skeleton loading ─────────────────────────────────────────────────────── */
.lm-skeleton-wrap {
  padding: 20px 20px;
}

.lm-skeleton-eyebrow {
  height: 8px;
  width: 90px;
  background: var(--border, rgba(255,255,255,0.06));
  border-radius: 4px;
  margin-bottom: 16px;
  animation: lm-shimmer 1.4s ease infinite;
}

.lm-skeleton-line {
  height: 14px;
  background: var(--border, rgba(255,255,255,0.06));
  border-radius: 6px;
  margin-bottom: 12px;
  animation: lm-shimmer 1.4s ease infinite;
}
.lm-sk-long   { width: 90%; animation-delay: 0.05s; }
.lm-sk-medium { width: 70%; animation-delay: 0.1s; }
.lm-sk-short  { width: 55%; animation-delay: 0.15s; }

.lm-skeleton-thread {
  height: 44px;
  background: var(--border, rgba(255,255,255,0.06));
  border-radius: 10px;
  margin-bottom: 10px;
  animation: lm-shimmer 1.4s ease infinite;
}
.lm-skeleton-thread:nth-child(2) { animation-delay: 0.1s; width: 88%; }

@keyframes lm-shimmer {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}


/* ─── ARIA XP / RELATIONSHIP PROGRESS BAR ───────────────────────────────────
   Surfaces the relationship stage as a visible progress indicator.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── chat screen XP bar (below top-bar) ───────────────────────────────────── */
#ariaXPBar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 8px;
  background: rgba(0,0,0,0.12);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}

.xp-stage-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 78px;
}

/* Color the label by stage */
#ariaXPBar[data-stage="acquaintance"] .xp-stage-label { color: #60a5fa; }
#ariaXPBar[data-stage="friend"]       .xp-stage-label { color: #f472b6; }
#ariaXPBar[data-stage="close"]        .xp-stage-label { color: #a78bfa; }

.xp-track-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.xp-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.xp-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 2px;
}

.xp-pct {
  font-size: 10px;
  color: var(--muted, #94a3b8);
  font-family: 'DM Sans', sans-serif;
  min-width: 28px;
  text-align: right;
}

/* ── intro screen XP card ─────────────────────────────────────────────────── */
.xp-intro-card {
  margin: 0 16px 16px;
  background: var(--card2, rgba(255,255,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 14px;
  padding: 14px 16px 16px;
  transition: border-color 0.4s ease;
}

.xp-intro-card[data-stage="acquaintance"] { border-color: rgba(96,165,250,0.22); }
.xp-intro-card[data-stage="friend"]       { border-color: rgba(244,114,182,0.25); }
.xp-intro-card[data-stage="close"]        { border-color: rgba(167,139,250,0.28); }

.xp-intro-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.xp-intro-stage-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.xp-intro-stage-name {
  font-size: 16px;
  font-family: 'Instrument Serif', serif;
  color: var(--text, #f8fafc);
  letter-spacing: 0.2px;
  font-style: italic;
  transition: color 0.4s ease;
}

.xp-intro-card[data-stage="acquaintance"] .xp-intro-stage-name { color: #93c5fd; }
.xp-intro-card[data-stage="friend"]       .xp-intro-stage-name { color: #f9a8d4; }
.xp-intro-card[data-stage="close"]        .xp-intro-stage-name { color: #c4b5fd; }

.xp-intro-stage-num {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  font-family: 'DM Sans', sans-serif;
}

.xp-intro-arc-wrap {
  margin-bottom: 10px;
}

.xp-intro-track {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: visible;
}

.xp-intro-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.xp-intro-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #f472b6;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(244,114,182,0.6);
  transition: background 0.4s ease;
}

.xp-intro-card[data-stage="acquaintance"] .xp-intro-fill::after { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,0.6); }
.xp-intro-card[data-stage="friend"]       .xp-intro-fill::after { background: #f472b6; box-shadow: 0 0 8px rgba(244,114,182,0.6); }
.xp-intro-card[data-stage="close"]        .xp-intro-fill::after { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,0.6); }

/* milestone dots on the track */
.xp-intro-nodes {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.xp-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  transform: translate(-50%, -50%);
  top: 50%;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.xp-node.xp-node-reached {
  background: var(--node-color, #f472b6);
  border-color: var(--node-color, #f472b6);
  box-shadow: 0 0 6px var(--node-color, rgba(244,114,182,0.5));
}

.xp-intro-sub {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
}

/* ── stage unlock toast ──────────────────────────────────────────────────────── */
#xpUnlockToast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 4000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 280px;
  width: calc(100% - 40px);
}

#xpUnlockToast.xp-unlock-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.xp-unlock-inner {
  background: var(--card, #1a1a2e);
  border: 1px solid rgba(244,114,182,0.3);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(244,114,182,0.15);
}

.xp-unlock-stage {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  margin-bottom: 5px;
}

.xp-unlock-msg {
  font-size: 13px;
  color: var(--text, #f8fafc);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
}
