/* ═══════════════════════════════════════════════
   Us v3 — Rosetta Stone Design System
   Typography: Playfair Display (heading) + Inter (body)
   Style: Dark intimate, warm accents, nature-inspired warmth
   ═══════════════════════════════════════════════ */

:root {
  /* -- Backgrounds: deep indigo-black, not pure black -- */
  --bg: #0d0d14;
  --bg-card: #151520;
  --bg-raised: #1c1c2a;
  --bg-hover: #222236;
  --border: rgba(232, 224, 214, 0.07);
  --border-hover: rgba(212, 114, 122, 0.2);

  /* -- Text: warm cream, not cool white -- */
  --text: #e8e0d6;
  --text-light: rgba(232, 224, 214, 0.72);
  --text-muted: rgba(232, 224, 214, 0.4);

  /* -- Accent: dusty rose — warm, intimate, not clinical -- */
  --accent: #d4727a;
  --accent-soft: rgba(212, 114, 122, 0.12);
  --accent-glow: rgba(212, 114, 122, 0.25);
  --accent-light: #e8a5ab;

  /* -- Gold: warm amber for "mine" ownership -- */
  --gold: #d4a44c;
  --gold-soft: rgba(212, 164, 76, 0.12);

  /* -- Semantic colors for note ownership -- */
  --mine: rgba(212, 164, 76, 0.06);
  --mine-border: rgba(212, 164, 76, 0.12);
  --theirs: rgba(212, 114, 122, 0.06);
  --theirs-border: rgba(212, 114, 122, 0.12);

  /* -- Success / safe -- */
  --safe: #8fc98f;
  --safe-soft: rgba(143, 201, 143, 0.12);

  /* -- Radii -- */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* -- Transitions -- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
  --duration-slow: 300ms;

  /* -- Z-index scale -- */
  --z-nav: 100;
  --z-modal: 200;
  --z-toast: 300;
}

/* -- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- Focus: visible ring for keyboard nav -- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

:focus:not(:focus-visible) { outline: none; }

/* -- Reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -- Selection -- */
::selection {
  background: var(--accent-soft);
  color: var(--accent-light);
}

/* -- Scrollbar (subtle) -- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(232, 224, 214, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(232, 224, 214, 0.2); }

/* ═══════════════════════════════════════════════
   Nav
   ═══════════════════════════════════════════════ */
/* -- Top bar: slim header with hamburger -- */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}

.topbar-menu {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem 0.5rem -0.5rem -0.5rem;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--accent-light);
  text-decoration: none;
  flex: 1;
}

.topbar-user {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.topbar-user:hover { border-color: var(--border-hover); color: var(--text-light); }

/* -- Sidebar -- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--duration-slow) var(--ease);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--accent-light);
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  min-height: 44px;
}
.sidebar-link svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  max-width: 20px;
  min-height: 20px;
  max-height: 20px;
  flex-shrink: 0;
}
.sidebar-link:hover { background: var(--accent-soft); color: var(--text); }
.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent-light);
  font-weight: 500;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 1.25rem;
}

.sidebar-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 1rem 1.25rem 0.25rem;
  font-weight: 500;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--bg);
}

.sidebar-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--safe);
  flex-shrink: 0;
}
.sidebar-dot--accent {
  background: var(--accent);
}

.sidebar-footer {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

/* Fade transitions for backdrop */
.fade-enter { transition: opacity 200ms ease; }
.fade-leave { transition: opacity 200ms ease; }

/* Legacy nav classes — keep for any pages still referencing */
.nav-link { display: none; }
.nav-user { display: none; }

/* ═══════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════ */
.main { padding: 2rem 1rem; max-width: 100%; }
.container { max-width: 680px; margin: 0 auto; }

/* ═══════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════ */
.greeting h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.page-header { margin-bottom: 1.75rem; }
.page-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--accent-light);
  line-height: 1.3;
}
.page-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.5;
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.unread-badge { font-size: 0.9rem; color: var(--accent); font-weight: 500; }

/* ═══════════════════════════════════════════════
   Cards
   ═══════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ═══════════════════════════════════════════════
   Buttons — 44px min touch target
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  background: var(--accent);
  color: white;
  min-height: 44px;
  gap: 0.5rem;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}
.btn-outline:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-raised); }

.btn-soft { background: var(--accent-soft); color: var(--accent-light); }
.btn-soft:hover { background: var(--accent-glow); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; min-height: 36px; }

/* ═══════════════════════════════════════════════
   Home — Greeting & Actions
   ═══════════════════════════════════════════════ */
.greeting { margin-bottom: 2rem; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}
.action-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-raised);
  transform: translateY(-2px);
}
.action-card:active { transform: translateY(0); }

.action-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-light);
}
.action-icon svg { width: 20px; height: 20px; }

.action-content { flex: 1; min-width: 0; }
.action-title {
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}
.action-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.4; }

/* Home quick action pills */
.home-quick {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  min-height: 44px;
}
.home-quick svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  color: var(--q-color);
}
.home-quick span {
  font-size: 0.78rem;
  color: var(--q-color);
  font-weight: 500;
}
.home-quick:hover {
  border-color: var(--border-hover);
  background: var(--q-bg);
}

/* ═══════════════════════════════════════════════
   Notes Feed — Between Us + Home preview
   ═══════════════════════════════════════════════ */
.section { margin-bottom: 2rem; }
.notes-feed { display: flex; flex-direction: column; gap: 0.75rem; }

.note-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--duration) var(--ease);
}
.note-card.mine {
  background: var(--mine);
  border-color: var(--mine-border);
}
.note-card.theirs {
  background: var(--theirs);
  border-color: var(--theirs-border);
}

.note-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.note-author { font-weight: 500; font-size: 0.85rem; color: var(--accent-light); }
.note-card.mine .note-author { color: var(--gold); }
.note-time { font-size: 0.75rem; color: var(--text-muted); }

.note-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  opacity: 0;
  transition: opacity var(--duration) var(--ease), color var(--duration) var(--ease);
}
.note-card:hover .note-delete { opacity: 1; }
.note-delete:hover { color: var(--accent); background: var(--accent-soft); }

.note-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 65ch;
}

.note-type-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.note-reactions { display: flex; gap: 0.4rem; margin-top: 0.75rem; align-items: center; }

.reaction-btn {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  color: var(--text-muted);
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.reaction-btn:hover { border-color: var(--border-hover); color: var(--text); }
.reaction-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.reaction-received { font-size: 1rem; margin-left: 0.25rem; animation: pop var(--duration-slow) var(--ease); }

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.see-all {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.see-all:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   Empty States
   ═══════════════════════════════════════════════ */
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty p { margin-bottom: 1rem; line-height: 1.6; }

/* ═══════════════════════════════════════════════
   Chat — Nora
   ═══════════════════════════════════════════════ */
.chat-wrap { padding: 0; overflow: hidden; }

.chat-messages {
  min-height: 400px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.65;
  animation: slideIn var(--duration-slow) var(--ease);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.nora {
  align-self: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-xs);
}
.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(212, 114, 122, 0.12);
  border-bottom-right-radius: var(--radius-xs);
}

.chat-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-text { color: var(--text); }
.chat-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.35rem; }

.chat-starters {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.chat-starters p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.starter-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

.chat-input-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--duration) var(--ease);
}
.chat-input:focus { outline: none; border-color: var(--accent-glow); }
.chat-input::placeholder { color: var(--text-muted); }

.btn-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
}

.typing { display: flex; gap: 5px; padding: 4px 0; align-items: center; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-light);
  animation: pulse 1.4s infinite var(--ease);
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.privacy-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-style: italic;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════
   Write Page
   ═══════════════════════════════════════════════ */
.write-card { padding: 1.5rem; }

.type-selector { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }

.type-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.84rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 40px;
}
.type-btn:hover { border-color: var(--border-hover); color: var(--text-light); }
.type-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}

.write-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  resize: vertical;
  margin-bottom: 1rem;
  transition: border-color var(--duration) var(--ease);
}
.write-textarea:focus { outline: none; border-color: var(--accent-glow); }
.write-textarea::placeholder { color: var(--text-muted); }

.char-count { font-size: 0.75rem; color: var(--text-muted); }

.sent-card { text-align: center; padding: 3rem 2rem; }
.sent-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--accent-light);
  font-weight: 400;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.sent-card p { color: var(--text-light); }

.prompts-section { margin-top: 2rem; }
.prompts-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}
.prompts-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.prompt-chip {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.prompt-chip:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--accent-soft);
}

/* ═══════════════════════════════════════════════
   Map — Rosetta Stone Profile Viewer
   ═══════════════════════════════════════════════ */
.map-field { margin-bottom: 1.15rem; }

.map-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.map-value {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-light);
}

.map-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.map-item:last-child { border-bottom: none; }

.map-item-key {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-light);
  text-transform: capitalize;
  margin-bottom: 0.2rem;
}

.map-item-val {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.55;
}

.map-list-item {
  font-size: 0.83rem;
  color: var(--text-light);
  padding: 0.35rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border);
  margin-bottom: 0.3rem;
  line-height: 1.5;
  transition: border-color var(--duration) var(--ease);
}
.map-list-item:hover { border-left-color: var(--accent-soft); }

/* -- Translation cards: the Rosetta Stone itself -- */
.translation-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  margin-bottom: 0.75rem;
  transition: border-color var(--duration-slow) var(--ease);
}
.translation-card:hover { border-color: var(--border-hover); }

.translation-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-light);
}
.translation-row:last-child { margin-bottom: 0; }

.translation-tag {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--text-muted);
  margin-top: 0.15rem;
  min-width: 60px;
  text-align: center;
}

.translation-tag--mean {
  background: var(--gold-soft);
  color: var(--gold);
}

.translation-tag--hear {
  background: var(--accent-soft);
  color: var(--accent);
}

.translation-tag--try {
  background: var(--safe-soft);
  color: var(--safe);
}

/* ═══════════════════════════════════════════════
   Login Page
   ═══════════════════════════════════════════════ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.4rem;
  font-style: italic;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.login-doors {
  display: flex;
  gap: 1.25rem;
  width: 100%;
  max-width: 400px;
}

.login-door {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-slow) var(--ease);
  min-height: 120px;
}
.login-door:hover {
  border-color: var(--border-hover);
  background: var(--bg-raised);
  transform: translateY(-3px);
}

.login-door-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--accent-light);
}

.login-door-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Login form (password entry) */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 300px;
  margin: 1.5rem auto 0;
}

.login-input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}

.login-input:focus {
  border-color: var(--accent);
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--duration) var(--ease);
  min-height: 44px;
}

.login-btn:hover { opacity: 0.9; }

.login-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.login-error {
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-back {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.login-back:hover { color: var(--text); }

/* ═══════════════════════════════════════════════
   Skeleton / Loading States
   ═══════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-raised) 25%,
    var(--bg-hover) 50%,
    var(--bg-raised) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════
   Responsive — Mobile first, scale up
   ═══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .main { padding: 1.25rem 0.75rem; }
  .greeting h1 { font-size: 1.4rem; }
  .page-header h1 { font-size: 1.35rem; }

  .action-card { padding: 1rem 1.15rem; }
  .action-icon { width: 36px; height: 36px; border-radius: 8px; }
  .action-icon svg { width: 18px; height: 18px; }

  .chat-messages { max-height: 55vh; min-height: 300px; padding: 1rem; }
  .chat-bubble { max-width: 90%; }
  .chat-input-wrap { padding: 0.75rem 1rem; }

  .note-card { padding: 1rem 1.15rem; }

  .login-doors { flex-direction: column; max-width: 280px; }
  .login-door { padding: 1.5rem 1rem; }

  .translation-row { flex-direction: column; gap: 0.25rem; }
  .translation-tag { align-self: flex-start; }

  /* Assessment scenario cards — tighter padding on mobile */
  .assess-scenario-card { padding: 1.25rem 1rem !important; }
  .assess-scenario-card p { font-size: 1rem !important; margin-bottom: 1.25rem !important; }
}

/* -- Tablet tweaks -- */
@media (min-width: 601px) and (max-width: 1024px) {
  .container { max-width: 620px; }
}

/* ═══════════════════════════════════════════════
   Game Room
   ═══════════════════════════════════════════════ */
.game-light {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  border: 2px solid transparent;
}

.game-light--green { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.game-light--green.active { background: #4ade80; color: #052e16; border-color: #4ade80; }

.game-light--yellow { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.game-light--yellow.active { background: #facc15; color: #422006; border-color: #facc15; }

.game-light--red { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.game-light--red.active { background: #f87171; color: #450a0a; border-color: #f87171; }

.game-reveal {
  animation: revealPop 0.4s var(--ease);
}

@keyframes revealPop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.game-round-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
}

/* Signal strength dots on map */
.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background var(--duration-slow) var(--ease);
}

/* -- Spectrum slider (Wavelength game) ------- */
.spectrum-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(to right, var(--accent), var(--border) 50%, var(--gold));
  border-radius: 4px;
  outline: none;
}
.spectrum-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.spectrum-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* -- Bridge --------------------------------- */
.bridge-status {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-weight: 500;
}
.bridge-status.composing { background: var(--gold-soft); color: var(--gold); }
.bridge-status.sent { background: var(--accent-soft); color: var(--accent); }
.bridge-status.acknowledged { background: var(--safe-soft); color: var(--safe); }

/* Check-in */
.checkin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.checkin-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.checkin-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.checkin-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.checkin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.checkin-tag {
  cursor: pointer;
}
.checkin-tag input {
  display: none;
}
.checkin-tag span {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}
.checkin-tag input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Home Dashboard */
.home-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--accent-light);
}
.home-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}

.home-spark {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
}
.home-spark-icon {
  flex-shrink: 0;
  color: var(--gold);
  padding-top: 2px;
}
.home-spark p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

.home-quote {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 2px solid var(--accent-soft);
}
.home-quote blockquote {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-light);
  font-style: italic;
  margin: 0 0 0.4rem;
}
.home-quote cite {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: normal;
}

.home-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.home-section {
  margin-bottom: 1.5rem;
}
.home-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.home-growth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.home-growth-stat {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.home-growth-num {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-light);
}
.home-growth-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.home-growth-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
}
.home-growth-count {
  font-weight: 600;
  color: var(--accent-light);
}
.home-growth-link {
  font-size: 0.78rem;
  color: var(--accent);
}

/* UI Tour */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}
.tour-highlight {
  position: fixed;
  border: 2px solid var(--accent);
  border-radius: 8px;
  z-index: 1001;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}
.tour-tooltip {
  position: fixed;
  z-index: 1002;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  width: 90%;
  max-width: 320px;
}
.tour-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 0.75rem;
}
.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tour-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.tour-btns {
  display: flex;
  gap: 0.5rem;
}
.tour-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}
.tour-next {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-weight: 500;
}
[x-cloak] { display: none !important; }

/* ===============================================
   Us Profile
   =============================================== */
.up-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.up-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.up-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent-light);
  margin-bottom: 0.15rem;
}
.up-section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.up-section-count {
  background: var(--accent-soft);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
}
.up-synthesis {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--accent-soft);
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  font-style: italic;
}
.up-synthesis p { margin: 0; }
.up-items {
  margin: 0.75rem 0;
}
.up-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.up-item:last-child { border-bottom: none; }
.up-item-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
}
.up-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.up-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  opacity: 0.5;
}
.up-item-remove:hover { opacity: 1; color: var(--danger, #e57373); }
.up-add {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.up-add-btn, .up-synth-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}
.up-add-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.up-synth-btn:hover { border-color: var(--gold); color: var(--gold); }
.up-add-form {
  margin-top: 0.5rem;
}
.up-add-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  box-sizing: border-box;
}
.up-add-input:focus { outline: none; border-color: var(--accent); }
.up-add-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.up-save-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-weight: 500;
}
.up-cancel-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}

/* ===============================================
   Growth Tracker
   =============================================== */
.growth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.growth-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.growth-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.25rem 0 0;
}
.growth-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.growth-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.growth-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}
.growth-status-identified { background: rgba(212,175,55,0.12); color: var(--gold); }
.growth-status-active { background: var(--accent-soft); color: var(--accent-light); }
.growth-status-progressing { background: rgba(143,201,143,0.12); color: var(--safe); }
.growth-status-resolved { background: rgba(232,224,214,0.08); color: var(--text-muted); }
.growth-ref {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-soft);
}
.growth-status-btns {
  display: flex;
  gap: 0.3rem;
  margin: 0.75rem 0;
}
.growth-st-btn {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
}
.growth-st-btn.active {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-soft);
}
.growth-notes {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 8px;
}
.growth-note {
  font-size: 0.82rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.growth-note:last-child { border-bottom: none; }
.growth-note-user {
  font-weight: 500;
  color: var(--accent-light);
  margin-right: 0.4rem;
}
.growth-note-text {
  color: var(--text-light);
}
.growth-checkin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.growth-checkin-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.growth-rating {
  display: flex;
  gap: 0.2rem;
}
.growth-rate-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}
.growth-rate-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}
.growth-add-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Personal Insights */
.insights-personal {
  margin-bottom: 1.5rem;
}
.insight-dim {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.insight-dim-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 0.4rem;
}
.insight-pattern {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.insight-pattern:last-child { border-bottom: none; }
.insight-obs {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}
.insight-construct {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.3rem;
}

/* -- Morning Pulse --------------------------------------------------------- */
.pulse-battery-row {
  display: flex; gap: 0.75rem; justify-content: center;
  padding: 1.5rem 0;
}
.pulse-level-btn {
  width: 56px; height: 80px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 10px; position: relative; overflow: hidden;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.pulse-level-btn:hover, .pulse-level-btn.active {
  border-color: var(--level-color, var(--accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--level-color, var(--accent)) 30%, transparent);
}
.pulse-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--level-color, var(--accent)) 25%, transparent);
  transition: height 0.3s ease;
  border-radius: 0 0 8px 8px;
}
.pulse-level-btn.active .pulse-bar {
  background: color-mix(in srgb, var(--level-color, var(--accent)) 50%, transparent);
}
.pulse-num {
  position: relative; z-index: 1; font-weight: 600;
  color: var(--text-light); font-size: 1.1rem; padding-bottom: 0.5rem;
}
.pulse-level-btn.active .pulse-num { color: var(--text); }
.pulse-labels {
  display: flex; justify-content: space-between; padding: 0 0.25rem;
}
.pulse-note-input {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.pulse-note-input:focus { border-color: var(--accent); }
.pulse-note-input::placeholder { color: var(--text-muted); }

/* Submitted state */
.pulse-submitted { text-align: center; padding: 1rem 0; }
.pulse-my-result, .pulse-partner-result { margin-bottom: 1.5rem; }
.pulse-big-battery {
  width: 80px; height: 110px; margin: 0 auto 0.75rem;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 14px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pulse-big-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: var(--fill, 0%);
  background: color-mix(in srgb, var(--fill-color, var(--accent)) 40%, transparent);
  transition: height 0.5s ease;
}
.pulse-big-num {
  position: relative; z-index: 1;
  font-size: 2rem; font-weight: 700; color: var(--text);
}
.pulse-my-label { color: var(--text-muted); font-size: 0.85rem; }
.pulse-my-note, .pulse-partner-note {
  color: var(--text-light); font-style: italic; font-size: 0.9rem;
  margin-top: 0.5rem;
}
.pulse-reveal {
  padding: 1.5rem; background: var(--bg-card); border-radius: 12px;
  border: 1px solid var(--border); margin-top: 1.5rem;
}
.pulse-waiting {
  padding: 2rem 1rem; color: var(--text-light);
  text-align: center; font-style: italic;
}

/* History sparkline */
.pulse-history {
  margin-top: 2rem; padding: 1.25rem;
  background: var(--bg-card); border-radius: 12px;
  border: 1px solid var(--border);
}
.pulse-sparkline {
  display: flex; gap: 6px; align-items: flex-end; height: 60px;
}
.pulse-spark-bar {
  flex: 1; min-width: 0;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

/* Home pulse mini widget */
.home-pulse-mini {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  background: var(--bg-card); border-radius: 10px;
  border: 1px solid var(--border);
}
.home-pulse-dots { display: flex; gap: 4px; }
.home-pulse-dot {
  width: 10px; height: 10px; border-radius: 50%;
  transition: background 0.2s;
}

/* -- The Jar --------------------------------------------------------------- */
.jar-write {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem; margin-bottom: 1.5rem;
}
.jar-input {
  width: 100%; background: transparent; border: none;
  color: var(--text); font-size: 0.9rem; resize: none; outline: none;
  font-family: inherit; line-height: 1.6;
}
.jar-input::placeholder { color: var(--text-muted); }
.jar-write-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.5rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.jar-add-btn {
  background: var(--gold-soft); color: var(--gold); border: none;
  padding: 0.4rem 1rem; border-radius: 8px; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.jar-add-btn:hover:not(:disabled) { background: var(--gold); color: var(--bg); }
.jar-add-btn:disabled { opacity: 0.4; cursor: default; }
.jar-stats {
  display: flex; gap: 1rem; justify-content: center; margin-bottom: 1.5rem;
}
.jar-stat {
  text-align: center; padding: 1rem 1.5rem;
  background: var(--bg-card); border-radius: 10px;
  border: 1px solid var(--border);
}
.jar-stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.jar-stat-label { font-size: 0.75rem; color: var(--text-muted); }
.jar-release-btn {
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); padding: 0.5rem 1.25rem; border-radius: 8px;
  font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.jar-release-btn:hover:not(:disabled) { background: var(--gold-soft); }
.jar-release-btn:disabled { opacity: 0.4; cursor: default; }
.jar-received { margin-top: 2rem; }
.jar-note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: 10px;
  padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.jar-note-text {
  color: var(--text-light); font-style: italic; font-size: 0.9rem;
  line-height: 1.6; margin: 0;
}
.jar-note-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; display: block; }

/* -- Weekly Rewind --------------------------------------------------------- */
.rewind-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem; margin-bottom: 1rem;
}
.rewind-headline {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-style: italic; color: var(--accent-light);
  text-align: center; margin-bottom: 1.5rem;
}
.rewind-section { margin-bottom: 1.25rem; }
.rewind-section-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.5rem;
}
.rewind-highlights {
  list-style: none; padding: 0; margin: 0;
}
.rewind-highlights li {
  padding: 0.4rem 0; color: var(--text-light); font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.rewind-highlights li:last-child { border-bottom: none; }
.rewind-highlights li::before {
  content: '\2726 '; color: var(--gold); margin-right: 0.25rem;
}
.rewind-text { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }
.rewind-suggestion {
  background: var(--bg-raised); border-radius: 10px; padding: 1rem;
  margin-top: 1rem; border-left: 3px solid var(--accent);
}
.rewind-suggestion p { color: var(--text-light); font-size: 0.9rem; margin: 0; }
.rewind-stats {
  display: flex; gap: 1rem; justify-content: center;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.rewind-stat { text-align: center; }
.rewind-stat-num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--text); }
.rewind-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.rewind-quote {
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border);
  text-align: center;
}
.rewind-quote blockquote {
  color: var(--text-light); font-style: italic; font-size: 0.88rem;
  margin: 0 0 0.5rem;
}
.rewind-quote cite { color: var(--text-muted); font-size: 0.78rem; }
.rewind-regen-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 0.4rem 1rem; border-radius: 8px;
  font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
}
.rewind-regen-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-light); }
.rewind-regen-btn:disabled { opacity: 0.4; }
.rewind-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-style: italic; }
.rewind-past-card {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.75rem 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 0.5rem;
}
.rewind-past-week { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; min-width: 70px; }
.rewind-past-headline { color: var(--text-light); font-size: 0.88rem; font-style: italic; }

/* -- Time Capsule ---------------------------------------------------------- */
.capsule-create {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; background: var(--bg-card);
  border: 1px dashed var(--border); border-radius: 12px;
  color: var(--text-muted); transition: all 0.2s;
}
.capsule-create:hover { border-color: var(--accent); color: var(--accent-light); }
.capsule-create-icon { display: flex; }
.capsule-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.capsule-note-input {
  width: 100%; background: transparent; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.9rem;
  padding: 0.75rem; resize: none; outline: none; font-family: inherit;
  line-height: 1.6; box-sizing: border-box;
}
.capsule-note-input:focus { border-color: var(--accent); }
.capsule-note-input::placeholder { color: var(--text-muted); }
.capsule-duration { margin-top: 1rem; }
.capsule-months { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.capsule-month-btn {
  flex: 1; padding: 0.5rem; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); border-radius: 8px;
  font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
}
.capsule-month-btn:hover { border-color: var(--accent); }
.capsule-month-btn.active {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-light);
}
.capsule-cancel-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 8px;
  cursor: pointer; font-size: 0.85rem;
}
.capsule-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.capsule-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.capsule-date { font-size: 0.8rem; color: var(--text-muted); }
.capsule-lock { font-size: 0.75rem; color: var(--gold); }
.capsule-preview { color: var(--text-light); font-size: 0.88rem; font-style: italic; margin: 0; }
.capsule-openable { border-color: var(--gold); }
.capsule-open-btn {
  margin-top: 0.75rem; width: 100%;
  background: var(--gold-soft); color: var(--gold); border: none;
  padding: 0.5rem; border-radius: 8px; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.capsule-open-btn:hover:not(:disabled) { background: var(--gold); color: var(--bg); }
.capsule-open-btn:disabled { opacity: 0.4; }
.capsule-locked-overlay {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0;
}
.capsule-note-text {
  color: var(--text-light); font-style: italic; font-size: 0.9rem;
  line-height: 1.6; margin: 0;
}
.capsule-opened { border-left: 3px solid var(--accent); }

/* -- Date Suggestions & Reading Recs --------------------------------------- */
.date-card {
  background: var(--bg-raised); border-radius: 10px;
  padding: 0.75rem 1rem; margin-bottom: 0.5rem;
}
.date-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.25rem;
}
.date-title { color: var(--text); font-weight: 500; font-size: 0.9rem; }
.date-vibe {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gold); background: var(--gold-soft);
  padding: 0.15rem 0.5rem; border-radius: 4px;
}
.date-desc { color: var(--text-light); font-size: 0.85rem; margin: 0; line-height: 1.5; }
.reading-card {
  background: var(--bg-raised); border-radius: 10px;
  padding: 0.75rem 1rem; margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
}
.reading-header { margin-bottom: 0.25rem; }
.reading-title { color: var(--text); font-weight: 500; font-size: 0.9rem; }
.reading-author { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.5rem; }
.reading-why { color: var(--text-muted); font-size: 0.8rem; margin: 0.25rem 0; }
.reading-quote {
  color: var(--text-light); font-style: italic; font-size: 0.85rem;
  margin: 0.5rem 0 0; padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

/* -- Spark Lab ------------------------------------------------------------- */
.spark-lab-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem;
  text-align: center;
}
.spark-lab-category {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold); background: var(--gold-soft);
  padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem;
}
.spark-lab-title {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-style: italic; color: var(--text); margin-bottom: 0.75rem;
}
.spark-lab-desc {
  color: var(--text-light); font-size: 0.9rem; line-height: 1.6; margin: 0;
}
.spark-lab-meta {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted);
}
.spark-lab-rate {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.spark-lab-stars {
  display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 0.75rem;
}
.spark-lab-star {
  background: none; border: none; cursor: pointer; padding: 0.25rem;
  transition: transform 0.15s;
}
.spark-lab-star:hover { transform: scale(1.15); }
.spark-lab-note-input {
  width: 100%; padding: 0.6rem 0.75rem; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 0.88rem; outline: none;
}
.spark-lab-note-input:focus { border-color: var(--accent); }
.spark-lab-note-input::placeholder { color: var(--text-muted); }
.spark-lab-rated {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.spark-lab-partner-rating {
  margin-top: 1rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border); text-align: center;
}
.spark-lab-past {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.5rem;
}
.spark-lab-past-header {
  display: flex; justify-content: space-between; align-items: center;
}
.spark-lab-past-title { color: var(--text-light); font-size: 0.9rem; font-style: italic; }
.spark-lab-past-week { font-size: 0.75rem; color: var(--text-muted); }
.spark-lab-past-ratings {
  display: flex; gap: 1rem; margin-top: 0.4rem;
}

/* -- Conflict Forecast ----------------------------------------------------- */
.home-forecast {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  border-radius: 10px; border: 1px solid var(--border);
}
.home-forecast-cloudy {
  background: color-mix(in srgb, var(--gold) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--gold) 25%, var(--border));
}
.home-forecast-stormy {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}
.home-forecast-icon { flex-shrink: 0; margin-top: 0.1rem; color: var(--text-muted); }
.home-forecast-cloudy .home-forecast-icon { color: var(--gold); }
.home-forecast-stormy .home-forecast-icon { color: var(--accent); }

/* Assessment Chat */
.assess-chat { margin-top: 1rem; }
.assess-chat-reply {
  background: var(--bg-raised);
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}
.assess-chat-reply p:last-child { margin-bottom: 0 !important; }
.assess-chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  min-height: 44px;
}
.assess-chat-input:focus { border-color: var(--gold); }
.assess-chat-input::placeholder { color: var(--text-muted); }
.assess-chat-input:disabled { opacity: 0.5; }
.assess-chat-send {
  background: var(--gold-soft);
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.assess-chat-send:hover { background: var(--gold); color: var(--bg); }
.assess-chat-send:disabled { opacity: 0.4; cursor: default; }

/* Home Nudge Cards */
.home-nudge {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: var(--nudge-bg, var(--bg-card));
  border: 1px solid var(--border);
  border-left: 3px solid var(--nudge-color, var(--accent));
  border-radius: 8px;
  margin-bottom: 0.6rem;
  text-decoration: none;
  transition: border-color 0.2s;
  cursor: pointer;
}
.home-nudge:hover { border-color: var(--nudge-color, var(--accent)); }
.home-nudge-icon { color: var(--nudge-color, var(--accent)); flex-shrink: 0; margin-top: 0.1rem; }
.home-nudge-title { font-size: 0.88rem; font-weight: 500; color: var(--nudge-color, var(--text)); margin-bottom: 0.15rem; }
.home-nudge-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Home Next Step — single clear CTA */
.home-next-step {
  display: block;
  text-decoration: none;
  background: var(--step-bg, rgba(160, 140, 200, 0.06));
  border: 1px solid color-mix(in srgb, var(--step-color, #b8a5d4) 25%, var(--border));
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.home-next-step:hover { border-color: var(--step-color, #b8a5d4); }
.home-next-step-badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--step-color, #b8a5d4);
  background: color-mix(in srgb, var(--step-color, #b8a5d4) 12%, transparent);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.home-next-step-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.home-next-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}
.home-next-step-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--step-color, #b8a5d4);
}

/* Daily inspiration card — merged spark + quote */
.home-daily-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 1rem;
  overflow: hidden;
}
.home-daily-card .home-spark {
  margin: 0;
  border: none;
  border-radius: 0;
  background: none;
}
.home-daily-card .home-quote {
  margin: 0;
  border: none;
  border-radius: 0;
  border-left: none;
}
.home-quote--with-spark {
  border-top: 1px solid var(--border) !important;
}

/* Section header link */
.home-section-link {
  font-size: 0.8rem;
  color: var(--accent-light);
  text-decoration: none;
}
.home-section-link:hover {
  text-decoration: underline;
}
