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

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --sage:        #4A6741;
  --sage-light:  #7A9E72;
  --sage-pale:   #B8D4B0;
  --sage-mist:   #E8F0E6;
  --cream:       #F7F3EC;
  --cream-warm:  #EDE6D9;
  --gold:        #B8912A;
  --gold-light:  #D4B060;
  --char:        #2A2A24;
  --char-mid:    #4A4A40;
  --dust:        #8A8A78;
  --blush:       #D4A5A5;
  --bg:          #E8E4DD;
  --red:         #c0392b;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;
  --r:  16px;
  --r-sm: 10px;
  --sidebar-w: 220px;
  --sidebar-w-mid: 60px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--char);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────────
   AUTH
───────────────────────────────────────── */
.auth-page {
  height: auto;
  overflow: auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem 1rem;
}
.auth-card {
  background: var(--cream);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(42,42,36,0.14), 0 0 0 1px rgba(74,103,65,0.08);
  padding: 2.5rem 2.25rem;
  width: 100%; max-width: 400px;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--sage-mist), var(--sage-pale));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 0.875rem;
}
.auth-logo h1 {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 400; color: var(--sage); letter-spacing: 0.01em;
}
.auth-logo p { color: var(--dust); font-size: 0.82rem; margin-top: 0.2rem; font-weight: 300; }
.auth-tabs {
  display: flex; background: var(--cream-warm); border-radius: 10px;
  padding: 3px; margin-bottom: 1.75rem; gap: 3px;
}
.auth-tab {
  flex: 1; padding: 0.5rem; text-align: center; cursor: pointer;
  font-size: 0.83rem; font-weight: 400; color: var(--dust);
  border-radius: 8px; transition: all 0.2s; border: none;
  background: transparent; font-family: var(--font-body);
}
.auth-tab.active { color: var(--char); background: white; font-weight: 500; box-shadow: 0 1px 3px rgba(42,42,36,0.1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─────────────────────────────────────────
   FORMS / BUTTONS
───────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
label {
  display: block; font-size: 0.72rem; font-weight: 500; color: var(--dust);
  margin-bottom: 0.35rem; letter-spacing: 0.04em; text-transform: uppercase;
}
input[type="email"], input[type="password"], input[type="tel"], input[type="text"], textarea {
  width: 100%; padding: 0.7rem 0.875rem;
  border: 1.5px solid rgba(74,103,65,0.18); border-radius: var(--r-sm);
  font-size: 0.9rem; font-family: var(--font-body); outline: none;
  transition: border-color 0.2s; background: white; color: var(--char);
}
input:focus, textarea:focus { border-color: var(--sage); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.75rem; }
.pw-eye {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--dust); opacity: 0.5; line-height: 0;
  transition: opacity 0.15s;
}
.pw-eye:hover { opacity: 1; }
input::placeholder, textarea::placeholder { color: var(--dust); opacity: 0.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem; background: var(--sage); color: white; border: none;
  border-radius: var(--r-sm); font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s; text-decoration: none; font-family: var(--font-body); letter-spacing: 0.01em;
}
.btn:hover { background: var(--char); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.42rem 0.875rem; font-size: 0.78rem; }
.btn-outline { background: transparent; color: var(--sage); border: 1.5px solid var(--sage); }
.btn-outline:hover { background: var(--sage-mist); }
.btn-ghost {
  background: none; border: none; color: var(--dust); cursor: pointer;
  font-size: 0.82rem; padding: 0.3rem 0.6rem; border-radius: 6px;
  font-family: var(--font-body); transition: color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--char); background: var(--cream-warm); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #a93226; }

.msg { font-size: 0.78rem; margin-top: 0.625rem; text-align: center; padding: 0.5rem 0.75rem; border-radius: 8px; }
.msg-error  { color: var(--red);  background: rgba(192,57,43,0.07);  border: 1px solid rgba(192,57,43,0.15); }
.msg-success{ color: var(--sage); background: var(--sage-mist); border: 1px solid rgba(74,103,65,0.18); }

/* ─────────────────────────────────────────
   APP SHELL
───────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--cream);
  border-right: 1px solid rgba(74,103,65,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 1.1rem 1rem 0.875rem;
  border-bottom: 1px solid rgba(74,103,65,0.08);
  flex-shrink: 0;
}
.sidebar-logo-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0;
}
.sidebar-logo-text {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; color: var(--sage); letter-spacing: 0.02em;
}
.sidebar-nav { flex: 1; padding: 0.625rem 0.625rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.snav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--r-sm);
  border: none; background: transparent; cursor: pointer; width: 100%;
  font-family: var(--font-body); font-size: 0.875rem; color: var(--dust);
  transition: all 0.15s; text-align: left;
}
.snav-item:hover { background: var(--sage-mist); color: var(--char); }
.snav-item.active { background: var(--sage-mist); color: var(--sage); font-weight: 500; }
.snav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.snav-label { white-space: nowrap; }

.sidebar-footer {
  padding: 0.5rem 0.5rem;
  border-top: 1px solid rgba(74,103,65,0.08);
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.sidebar-user-btn {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.5rem; border-radius: var(--r-sm);
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); text-align: left;
  transition: background 0.15s;
}
.sidebar-user-btn:hover { background: var(--sage-mist); }
.sidebar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-pale), var(--sage-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: white; flex-shrink: 0;
  font-family: var(--font-body);
}
.sidebar-user-info { min-width: 0; }
.sidebar-display-name { font-size: 0.8rem; font-weight: 500; color: var(--char); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-sub { font-size: 0.62rem; color: var(--dust); margin-top: 1px; }
.sidebar-signout {
  flex-shrink: 0; background: none; border: none; color: var(--dust);
  cursor: pointer; padding: 0.35rem; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.sidebar-signout:hover { color: var(--char); background: var(--cream-warm); }

/* ─────────────────────────────────────────
   MAIN CONTENT + SCREENS
───────────────────────────────────────── */
.main-content {
  flex: 1; position: relative; overflow: hidden; min-width: 0;
  background: var(--bg);
}

.screen {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
}
.screen.active { opacity: 1; transform: translateY(0); pointer-events: all; }
#screen-journal { display: flex; flex-direction: row; overflow: hidden; }

/* ─────────────────────────────────────────
   HOME SCREEN
───────────────────────────────────────── */
.home-hero {
  padding: 1.75rem 1.5rem 1.25rem;
  background: linear-gradient(150deg, #EAF0E7 0%, var(--cream) 65%);
  border-bottom: 1px solid rgba(74,103,65,0.08);
}
.home-greeting {
  font-family: var(--font-display); font-size: 2rem; font-weight: 300; color: var(--char); line-height: 1.2; margin-bottom: 4px;
}
.home-greeting em { font-style: italic; color: var(--sage); }
.home-date { font-size: 0.78rem; color: var(--dust); margin-bottom: 0.25rem; letter-spacing: 0.02em; }
.home-weather { font-size: 0.78rem; color: var(--dust); margin-bottom: 1rem; letter-spacing: 0.02em; opacity: 0.85; }

.streak-row { display: flex; gap: 6px; flex-wrap: wrap; }
.streak-pill {
  display: flex; align-items: center; gap: 5px;
  background: white; border: 1px solid rgba(74,103,65,0.15); border-radius: 20px;
  padding: 4px 10px; font-size: 0.72rem; color: var(--char-mid);
}
.streak-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }
.streak-pill .dot.gold { background: var(--gold); }
.streak-num { font-weight: 500; color: var(--sage); }
.streak-num.gold { color: var(--gold); }

.home-inner { padding: 0 1.5rem; }
.home-section { padding: 1.25rem 1.5rem 0; }

.section-label {
  font-size: 0.68rem; font-weight: 500; color: var(--dust);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.625rem;
}

.mood-row { display: flex; gap: 6px; }
.mood-btn {
  flex: 1; padding: 0.625rem 0.25rem; border-radius: var(--r-sm);
  border: 1.5px solid rgba(74,103,65,0.15); background: white;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--font-body); transition: all 0.2s;
}
.mood-btn:hover { border-color: var(--sage-light); background: var(--sage-mist); }
.mood-btn.selected { border-color: var(--sage); background: var(--sage-mist); }
.mood-emoji { font-size: 1.125rem; }
.mood-label { font-size: 0.62rem; color: var(--dust); letter-spacing: 0.03em; }

.prompt-card {
  margin: 1.25rem 1.5rem;
  background: white; border-radius: var(--r); border: 1px solid rgba(74,103,65,0.12); overflow: hidden;
}
.prompt-card-accent { height: 3px; background: linear-gradient(90deg, var(--sage), var(--sage-light), var(--gold-light)); }
.prompt-card-body { padding: 1rem 1.125rem; }
.prompt-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; color: var(--sage); text-transform: uppercase; margin-bottom: 0.5rem;
}
.prompt-tag::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--sage); }
.prompt-q {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 300; font-style: italic;
  color: var(--char); line-height: 1.5; margin-bottom: 0.875rem;
}
.prompt-start-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.55rem 1rem; background: var(--sage); color: white;
  border: none; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  cursor: pointer; font-family: var(--font-body); letter-spacing: 0.01em; transition: background 0.2s;
}
.prompt-start-btn:hover { background: var(--char); }

.stats-scroll { display: flex; gap: 8px; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.stats-scroll::-webkit-scrollbar { display: none; }
.stat-card {
  min-width: 110px; flex-shrink: 0; background: white; border-radius: var(--r);
  border: 1px solid rgba(74,103,65,0.12); padding: 0.875rem;
}
.stat-icon { font-size: 1rem; margin-bottom: 5px; }
.stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 300; color: var(--sage); line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: 0.65rem; color: var(--dust); line-height: 1.4; }

.chart-card { margin: 1.25rem 1.5rem 1.5rem; background: white; border-radius: var(--r); border: 1px solid rgba(74,103,65,0.12); padding: 1rem; }
.chart-title { font-size: 0.72rem; font-weight: 500; color: var(--char-mid); margin-bottom: 0.75rem; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.mini-bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--sage-mist); transition: background 0.2s; cursor: pointer; min-height: 4px; }
.mini-bar.today { background: var(--sage); }
.mini-bar.future { background: var(--cream-warm); }
.mini-bar-days { display: flex; gap: 4px; margin-top: 5px; }
.mini-bar-day { flex: 1; text-align: center; font-size: 0.6rem; color: var(--dust); }
.mini-bar-day.today { color: var(--sage); font-weight: 500; }

/* ─────────────────────────────────────────
   JOURNAL / CHAT SCREEN
───────────────────────────────────────── */
.journal-header {
  padding: 0.625rem 1.25rem 0.5rem;
  border-bottom: 1px solid rgba(74,103,65,0.08);
  background: rgba(247,243,236,0.92);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.journal-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.session-badge { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--dust); }
.session-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.35} }
.session-count { font-size: 0.7rem; color: var(--dust); }
.framework-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  padding: 2px 8px; border-radius: 12px; font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.04em; border: 1px solid rgba(74,103,65,0.2); color: var(--sage); background: var(--sage-mist);
}
.chip.gold { border-color: rgba(184,145,42,0.25); color: var(--gold); background: rgba(184,145,42,0.07); }

.messages-area {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.empty-state { margin: auto; text-align: center; padding: 2rem 1.5rem; }
.empty-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-pale), var(--sage));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: white;
  margin: 0 auto 0.875rem;
}
.empty-state p { font-family: var(--font-display); font-size: 1rem; font-weight: 300; font-style: italic; color: var(--char-mid); line-height: 1.5; margin-bottom: 1.125rem; }
.suggestions-row { display: flex; flex-direction: column; gap: 0.4rem; max-width: 320px; margin: 0 auto; }
.suggestion-chip {
  padding: 0.5rem 0.875rem; border-radius: 18px; font-size: 0.8rem;
  border: 1px solid rgba(74,103,65,0.2); color: var(--char-mid); background: white;
  cursor: pointer; font-family: var(--font-body); transition: all 0.2s; text-align: left;
}
.suggestion-chip:hover { background: var(--sage-mist); border-color: var(--sage); color: var(--sage); }

.date-divider {
  text-align: center; font-size: 0.62rem; color: var(--dust);
  position: relative; margin: 0.125rem 0; letter-spacing: 0.05em; text-transform: uppercase;
}
.date-divider::before,.date-divider::after {
  content:''; position:absolute; top:50%; width:calc(50% - 3.5rem); height:1px; background:rgba(74,103,65,0.1);
}
.date-divider::before { left:0; } .date-divider::after { right:0; }

.message { display: flex; gap: 7px; max-width: 80%; }
.message-user { align-self: flex-end; flex-direction: row-reverse; }
.message-ai   { align-self: flex-start; }
.msg-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; }
.msg-avatar.sage { background: linear-gradient(135deg, var(--sage-pale), var(--sage)); color: white; font-family: var(--font-display); font-size: 12px; font-weight: 600; }
.msg-avatar.user { background: var(--cream-warm); color: var(--char-mid); }
.msg-body { display: flex; flex-direction: column; }
.message-label { font-size: 0.62rem; color: var(--dust); margin-bottom: 0.18rem; font-weight: 500; letter-spacing: 0.02em; }
.message-user .message-label { text-align: right; }
.bubble { padding: 0.55rem 0.8rem; font-size: 0.875rem; line-height: 1.6; white-space: pre-wrap; }
.message-ai .bubble { background: white; border: 1px solid rgba(74,103,65,0.1); border-radius: 4px 14px 14px 14px; color: var(--char); box-shadow: 0 1px 3px rgba(42,42,36,0.06); }
.message-user .bubble { background: var(--sage); border-radius: 14px 4px 14px 14px; color: white; }
.message-time { font-size: 0.6rem; color: var(--dust); margin-top: 0.18rem; padding: 0 0.1rem; }
.message-user .message-time { text-align: right; }

.loading-bubble {
  background: white; border: 1px solid rgba(74,103,65,0.1); border-radius: 4px 14px 14px 14px;
  padding: 0.55rem 0.8rem; display: flex; gap: 4px; align-items: center; box-shadow: 0 1px 3px rgba(42,42,36,0.06);
}
.loading-bubble span { width: 5px; height: 5px; border-radius: 50%; background: var(--sage-pale); animation: bounce 1.2s infinite; }
.loading-bubble span:nth-child(2){animation-delay:.2s} .loading-bubble span:nth-child(3){animation-delay:.4s}
@keyframes bounce { 0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)} }

.input-area { padding: 0.625rem 1rem 0.75rem; background: white; border-top: 1px solid rgba(74,103,65,0.1); flex-shrink: 0; }
.input-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.toolbar-btns { display: flex; gap: 2px; }
.toolbar-btn { width: 26px; height: 26px; border-radius: 7px; background: transparent; border: none; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; color: var(--dust); transition: all 0.15s; }
.toolbar-btn:hover { background: var(--sage-mist); color: var(--sage); }
.word-count { font-size: 0.65rem; color: var(--dust); }
.input-row { display: flex; gap: 0.5rem; align-items: flex-end; }
.input-row textarea { flex: 1; resize: none; border-radius: 10px; min-height: 38px; max-height: 110px; padding: 0.55rem 0.8rem; font-size: 0.875rem; line-height: 1.5; background: var(--cream); border: 1.5px solid rgba(74,103,65,0.15); }
.input-row textarea:focus { border-color: var(--sage); background: var(--cream); }
.send-btn { width: 38px; height: 38px; border-radius: 10px; background: var(--sage); border: none; color: white; font-size: 1rem; cursor: pointer; flex-shrink: 0; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.send-btn:hover { background: var(--char); }
.send-btn:disabled { background: var(--sage-pale); cursor: not-allowed; }

/* ─────────────────────────────────────────
   INSIGHTS SCREEN
───────────────────────────────────────── */
.insights-hero {
  padding: 1.5rem 1.5rem 1.125rem;
  background: linear-gradient(145deg, #EAF0E7 0%, var(--cream) 70%);
  border-bottom: 1px solid rgba(74,103,65,0.08);
}
.insights-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 300; color: var(--char); margin-bottom: 3px; }
.insights-subtitle { font-size: 0.78rem; color: var(--dust); }
.insights-inner { max-width: 760px; padding: 0 1.5rem 2rem; }

.et-card { margin-top: 1.25rem; background: white; border-radius: var(--r); border: 1px solid rgba(74,103,65,0.12); padding: 1rem; }
.et-title { font-size: 0.72rem; font-weight: 500; color: var(--char-mid); margin-bottom: 0.75rem; }
.et-chart { display: flex; align-items: flex-end; gap: 3px; height: 72px; margin-bottom: 6px; }
.et-bar { flex: 1; border-radius: 3px 3px 0 0; cursor: pointer; transition: opacity 0.2s; min-height: 4px; }
.et-bar:hover { opacity: 0.75; }
.et-legend { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--dust); }
.et-legend-item { display: flex; align-items: center; gap: 4px; }
.et-legend-dot { width: 8px; height: 8px; border-radius: 2px; }

.pattern-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 1.25rem; }
.pattern-card { background: white; border-radius: var(--r-sm); border: 1px solid rgba(74,103,65,0.12); padding: 0.875rem; }
.pc-icon { font-size: 1rem; margin-bottom: 4px; }
.pc-title { font-size: 0.72rem; font-weight: 500; color: var(--dust); margin-bottom: 2px; }
.pc-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 300; color: var(--sage); line-height: 1; margin-bottom: 2px; }
.pc-note { font-size: 0.68rem; color: var(--dust); line-height: 1.4; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; margin-bottom: 0.625rem; }

.trigger-list { display: flex; flex-direction: column; gap: 6px; }
.trigger-item { display: flex; align-items: center; gap: 10px; padding: 0.5rem 0.75rem; border-radius: 8px; background: white; border: 1px solid rgba(74,103,65,0.1); }
.trigger-name { font-size: 0.78rem; color: var(--char-mid); min-width: 110px; }
.trigger-bar-bg { flex: 1; height: 5px; background: var(--sage-mist); border-radius: 3px; overflow: hidden; }
.trigger-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--sage-light), var(--sage)); }
.trigger-pct { font-size: 0.7rem; color: var(--sage); font-weight: 500; min-width: 26px; text-align: right; }

.reframe-card { margin-top: 1.25rem; border-radius: var(--r); overflow: hidden; border: 1px solid rgba(184,145,42,0.2); }
.rc-header { background: rgba(184,145,42,0.07); padding: 0.625rem 0.875rem; border-bottom: 1px solid rgba(184,145,42,0.12); display: flex; align-items: center; gap: 6px; }
.rc-tag { font-size: 0.68rem; font-weight: 500; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.rc-body { padding: 0.875rem; background: white; }
.rc-text { font-family: var(--font-display); font-size: 1rem; font-weight: 300; color: var(--char); line-height: 1.65; font-style: italic; }

/* ─────────────────────────────────────────
   KIT SCREEN
───────────────────────────────────────── */
.kit-hero {
  background: linear-gradient(145deg, #2A3D26 0%, var(--sage) 100%);
  padding: 1.75rem 1.5rem; position: relative; overflow: hidden;
}
.kit-hero::after { content:''; position:absolute; right:-20px; top:-20px; width:140px; height:140px; border-radius:50%; background:rgba(255,255,255,0.05); }
.kit-hero::before { content:''; position:absolute; right:40px; bottom:-40px; width:100px; height:100px; border-radius:50%; background:rgba(255,255,255,0.04); }
.kit-month { font-size: 0.68rem; font-weight: 500; color: rgba(255,255,255,0.55); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; position: relative; z-index: 1; }
.kit-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 300; color: white; line-height: 1.2; margin-bottom: 5px; position: relative; z-index: 1; }
.kit-title em { font-style: italic; color: var(--sage-pale); }
.kit-subtitle { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-bottom: 1.125rem; position: relative; z-index: 1; }
.kit-progress-bar { height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; margin-bottom: 4px; position: relative; z-index: 1; }
.kit-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--sage-pale), white); }
.kit-progress-label { display: flex; justify-content: space-between; font-size: 0.68rem; color: rgba(255,255,255,0.5); position: relative; z-index: 1; }

.kit-inner { max-width: 680px; padding: 1.25rem 1.5rem 2rem; }
.ex-card {
  background: white; border-radius: var(--r); border: 1px solid rgba(74,103,65,0.12);
  margin-bottom: 8px; overflow: hidden; display: flex; cursor: pointer; transition: border-color 0.2s;
}
.ex-card:hover { border-color: var(--sage-light); }
.ex-card.done { opacity: 0.65; }
.ex-card.next { border-color: var(--gold); }
.ex-accent { width: 4px; flex-shrink: 0; background: var(--sage-mist); }
.ex-card.done .ex-accent { background: var(--sage); }
.ex-card.next .ex-accent { background: var(--gold); }
.ex-content { padding: 0.75rem 0.875rem; flex: 1; }
.ex-tag { font-size: 0.65rem; font-weight: 500; color: var(--dust); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.ex-card.next .ex-tag { color: var(--gold); }
.ex-title { font-size: 0.875rem; font-weight: 500; color: var(--char); margin-bottom: 2px; }
.ex-desc { font-size: 0.75rem; color: var(--dust); line-height: 1.4; margin-bottom: 0.5rem; }
.ex-footer { display: flex; align-items: center; justify-content: space-between; }
.ex-time { font-size: 0.68rem; color: var(--dust); }
.ex-card.next .ex-time { color: var(--gold); }
.ex-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--sage-pale); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--sage); background: var(--sage-mist); }
.ex-card.done .ex-check { background: var(--sage); border-color: var(--sage); color: white; }
.ex-card.next .ex-check { background: rgba(184,145,42,0.1); border-color: var(--gold); color: var(--gold); }

/* ─────────────────────────────────────────
   SETTINGS SCREEN
───────────────────────────────────────── */
.settings-inner { max-width: 620px; padding: 1.5rem 1.5rem 3rem; }
.settings-page-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 300; color: var(--char); margin-bottom: 3px; }
.settings-page-sub { font-size: 0.78rem; color: var(--dust); margin-bottom: 1.5rem; }

.settings-block { background: white; border-radius: var(--r); border: 1px solid rgba(74,103,65,0.1); overflow: hidden; margin-bottom: 1rem; }
.settings-block-label { padding: 0.625rem 1rem 0; font-size: 0.65rem; font-weight: 500; color: var(--dust); letter-spacing: 0.1em; text-transform: uppercase; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(74,103,65,0.07); }
.setting-row:last-child { border-bottom: none; }
.sr-left { display: flex; align-items: center; gap: 0.75rem; }
.sr-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--sage-mist); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.sr-name { font-size: 0.875rem; color: var(--char); }
.sr-desc { font-size: 0.7rem; color: var(--dust); margin-top: 1px; }
.sr-value { font-size: 0.8rem; color: var(--char-mid); }

/* toggle */
.toggle {
  width: 38px; height: 22px; border-radius: 11px;
  background: var(--sage-mist); border: 1.5px solid rgba(74,103,65,0.15);
  position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.toggle.on { background: var(--sage); border-color: var(--sage); }
.toggle::after {
  content:''; position:absolute; width:14px; height:14px; border-radius:50%;
  background:white; top:2px; left:2px; transition:transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle.on::after { transform:translateX(16px); }

/* framework grid */
.fw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0.625rem 1rem 1rem; }
.fw-btn {
  padding: 0.75rem; border-radius: var(--r-sm);
  border: 1.5px solid rgba(74,103,65,0.15); background: white;
  cursor: pointer; font-family: var(--font-body); text-align: left; transition: all 0.2s;
}
.fw-btn:hover { border-color: var(--sage); background: var(--sage-mist); }
.fw-btn.active { border-color: var(--sage); background: var(--sage-mist); }
.fw-name { font-size: 0.875rem; font-weight: 500; color: var(--char); margin-bottom: 2px; }
.fw-desc { font-size: 0.68rem; color: var(--dust); line-height: 1.4; }

/* profile hero (settings) */
.settings-profile { display: flex; align-items: center; gap: 0.875rem; padding: 1rem; border-bottom: 1px solid rgba(74,103,65,0.08); }
.settings-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--sage-pale), var(--sage-light)); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: white; flex-shrink: 0; }
.settings-email { font-size: 0.875rem; color: var(--char); font-weight: 500; }
.settings-meta  { font-size: 0.72rem; color: var(--dust); margin-top: 1px; }

/* phone input inline */
.phone-input-row { display: flex; gap: 0.5rem; align-items: center; padding: 0 1rem 0.75rem; }
.phone-input-row input { margin: 0; }

/* badge */
.badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: 20px; font-size: 0.7rem; font-weight: 500; }
.badge-free { background: rgba(138,138,120,0.12); color: var(--dust); }
.badge-paid { background: var(--sage-mist); color: var(--sage); }

/* steps */
.steps-list { padding: 0 1rem 0.875rem; }
.steps-list li { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.4rem 0; border-bottom: 1px solid rgba(74,103,65,0.07); font-size: 0.8rem; color: var(--char-mid); line-height: 1.5; }
.steps-list li:last-child { border-bottom: none; }
.step-num { width: 18px; height: 18px; border-radius: 50%; background: var(--sage-mist); color: var(--sage); font-size: 0.6rem; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
code { background: var(--cream-warm); padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.75rem; color: var(--char-mid); font-family: 'SF Mono','Fira Code',monospace; }

/* connect banner */
.connect-banner { background: white; border-bottom: 1px solid rgba(74,103,65,0.1); padding: 0.75rem 1.25rem; flex-shrink: 0; }
.connect-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.connect-banner-title { font-size: 0.8rem; font-weight: 500; color: var(--char); margin-bottom: 1px; }
.connect-banner-sub { font-size: 0.72rem; color: var(--dust); }
.connect-banner-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.connect-dismiss { background: none; border: none; color: var(--dust); cursor: pointer; font-size: 1.1rem; padding: 0.2rem; line-height: 1; }

/* ─────────────────────────────────────────
   MOBILE NAV
───────────────────────────────────────── */
.mobile-nav {
  display: none;
  height: 54px;
  background: rgba(247,243,236,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(74,103,65,0.1);
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  z-index: 20;
}
.mnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 4px 10px; border-radius: 10px;
  transition: background 0.15s; border: none; background: transparent;
  font-family: var(--font-body);
}
.mnav-item.active { background: var(--sage-mist); }
.mnav-icon { font-size: 16px; line-height: 1; }
.mnav-label { font-size: 0.58rem; font-weight: 500; color: var(--dust); letter-spacing: 0.04em; }
.mnav-item.active .mnav-label { color: var(--sage); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 700px) {
  .app-shell { flex-direction: column; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .main-content { flex: 1; }
  .home-hero, .home-section, .prompt-card, .stats-scroll,
  .chart-card, .insights-inner, .kit-inner, .settings-inner,
  .wbp-header, .wbp-section { padding-left: 1rem; padding-right: 1rem; }
  .prompt-card { margin-left: 1rem; margin-right: 1rem; }
  .stats-scroll { padding-left: 1rem; }
  .pattern-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 701px) and (max-width: 920px) {
  :root { --sidebar-w: 60px; }
  .sidebar-logo-text { display: none; }
  .snav-label { display: none; }
  .snav-item { padding: 0.625rem; justify-content: center; }
  .sidebar-user-info { display: none; }
  .sidebar-signout { display: none; }
  .sidebar-footer { justify-content: center; padding: 0.5rem 0; }
  .sidebar-user-btn { justify-content: center; padding: 0.45rem; }
}

/* ─────────────────────────────────────────
   JOURNAL EDITOR (redesign)
───────────────────────────────────────── */
.journal-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
}

.journal-editor-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem 0.875rem;
  border-bottom: 1px solid rgba(74,103,65,0.08);
  background: var(--bg);
}

.journal-date-header {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--sage);
  letter-spacing: 0.01em;
}

.journal-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0 0;
}

.journal-title-input {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--char);
  padding: 0.25rem 1.75rem 0.75rem;
}
.journal-title-input::placeholder { color: var(--dust); opacity: 0.5; }

.journal-editor-divider {
  height: 1px;
  background: rgba(74,103,65,0.1);
  margin: 0 1.75rem 0.875rem;
}

.journal-content-area {
  display: block;
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.925rem;
  line-height: 1.85;
  color: var(--char);
  padding: 0 1.75rem 2rem;
  min-height: 180px;
}
.journal-content-area::placeholder { color: var(--dust); opacity: 0.5; }

.journal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.75rem;
  border-top: 1px solid rgba(74,103,65,0.08);
  background: var(--bg);
}
.journal-word-count { font-size: 0.7rem; color: var(--dust); }

/* ─────────────────────────────────────────
   SAGE PANEL
───────────────────────────────────────── */
.journal-sage-panel {
  width: 0;
  overflow: hidden;
  transition: width 0.25s ease;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  flex-shrink: 0;
  border-left: 0 solid rgba(74,103,65,0.1);
}
.journal-sage-panel.open {
  width: 38%;
  border-left-width: 1px;
}

.sage-panel-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(74,103,65,0.1);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--char-mid);
  white-space: nowrap;
}

.sage-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.sage-input-area {
  flex-shrink: 0;
  padding: 0.5rem 0.625rem 0.75rem;
  border-top: 1px solid rgba(74,103,65,0.1);
  display: flex;
  gap: 0.375rem;
  align-items: flex-end;
}
.sage-input-area textarea {
  flex: 1;
  resize: none;
  border-radius: 10px;
  min-height: 34px;
  max-height: 80px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.5;
  background: white;
  border: 1.5px solid rgba(74,103,65,0.15);
  font-family: var(--font-body);
  color: var(--char);
}
.sage-input-area textarea:focus { border-color: var(--sage); }

/* ─────────────────────────────────────────
   CHATS SCREEN
───────────────────────────────────────── */
.chats-screen { height: 100%; overflow-y: auto; }

.chat-day-group { border-bottom: 1px solid rgba(74,103,65,0.08); }

.chat-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--char-mid);
  background: var(--cream);
  user-select: none;
}
.chat-day-header:hover { background: var(--sage-mist); }
.chat-day-chevron { font-size: 0.6rem; color: var(--dust); }

.chat-day-body {
  padding: 0.75rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg);
}
.chat-day-body.collapsed { display: none; }

.chat-bubble-ro {
  max-width: 75%;
  padding: 0.5rem 0.875rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.chat-bubble-ro-user {
  align-self: flex-end;
  background: var(--sage);
  color: white;
  border-radius: 14px 4px 14px 14px;
}
.chat-bubble-ro-ai {
  align-self: flex-start;
  background: white;
  color: var(--char);
  border: 1px solid rgba(74,103,65,0.1);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 3px rgba(42,42,36,0.05);
}

/* ─────────────────────────────────────────
   MOBILE — SAGE PANEL FULL-SCREEN OVERLAY
───────────────────────────────────────── */
@media (max-width: 768px) {
  .journal-sage-panel.open {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 50;
    top: 0;
    left: 0;
    border-left: none;
  }
  .journal-editor-header { padding: 1rem 1.25rem 0.75rem; }
  .journal-date-header { font-size: 1.1rem; }
  .journal-title-input { padding: 0.25rem 1.25rem 0.625rem; font-size: 1.1rem; }
  .journal-editor-divider { margin: 0 1.25rem 0.625rem; }
  .journal-content-area { padding: 0 1.25rem 1.5rem; }
  .journal-footer { padding: 0.625rem 1.25rem; }
}


/* ── Wellbeing Plan ──────────────────────────────────────────── */
.wbp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  padding: 0 1.5rem;
}
.wbp-section { padding: 0 1.5rem 1.5rem; }
.wbp-progress-pill {
  font-size: 0.72rem;
  color: var(--sage);
  background: var(--sage-mist);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-weight: 500;
}
.wbp-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.wbp-block {
  background: white;
  border-radius: var(--r);
  box-shadow: 0 1px 4px rgba(42,42,36,0.06);
  padding: 1.125rem 1.125rem 0.875rem;
}
.wbp-block-hd {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.wbp-block-icon { font-size: 1.15rem; line-height: 1; margin-top: 0.05rem; flex-shrink: 0; }
.wbp-block-meta { flex: 1; }
.wbp-block-title { font-size: 0.95rem; font-weight: 500; color: var(--char); }
.wbp-block-sub { font-size: 0.73rem; color: var(--dust); margin-top: 0.15rem; line-height: 1.4; }

/* Suggest button (AI — only in "Working on now") */
.wbp-suggest-btn {
  font-size: 0.71rem; color: var(--sage); background: var(--sage-mist);
  border: none; border-radius: 20px; padding: 0.25rem 0.7rem;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap;
  transition: background 0.15s; flex-shrink: 0; margin-top: 0.05rem;
}
.wbp-suggest-btn:hover { background: var(--sage-pale); }
.wbp-suggest-btn:disabled { opacity: 0.5; cursor: default; }

/* Items */
.wbp-item {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.25rem; border-radius: 8px;
  transition: background 0.1s;
}
.wbp-item:hover { background: var(--cream); }
.wbp-item.done .wbp-item-text { text-decoration: line-through; color: var(--dust); }
.wbp-check {
  flex-shrink: 0; background: none; border: 1.5px solid var(--sage-pale);
  cursor: pointer; color: var(--sage); font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.wbp-check-circle { width: 20px; height: 20px; border-radius: 50%; }
.wbp-check-square { width: 17px; height: 17px; border-radius: 4px; }
.wbp-item.done .wbp-check { background: var(--sage-mist); border-color: var(--sage-light); }
.wbp-item-text { flex: 1; font-size: 0.875rem; color: var(--char-mid); line-height: 1.4; }
.wbp-item-text--strong { color: var(--char); font-weight: 450; }
.wbp-sage-badge {
  font-size: 0.63rem; color: var(--sage); background: var(--sage-mist);
  border-radius: 10px; padding: 0.1rem 0.45rem; flex-shrink: 0; letter-spacing: 0.02em;
}
.wbp-steps-btn {
  font-size: 0.71rem; color: var(--dust); background: none;
  border: 1px solid var(--cream-warm); border-radius: 6px;
  padding: 0.18rem 0.55rem; cursor: pointer; font-family: var(--font-body);
  flex-shrink: 0; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.wbp-steps-btn:hover { color: var(--sage); border-color: var(--sage-pale); }
.wbp-delete-btn {
  width: 18px; height: 18px; border: none; background: none; cursor: pointer;
  font-size: 0.6rem; color: var(--dust); opacity: 0; flex-shrink: 0;
  transition: opacity 0.15s; display: flex; align-items: center; justify-content: center;
}
.wbp-item:hover .wbp-delete-btn { opacity: 0.55; }
.wbp-delete-btn:hover { opacity: 1 !important; }
.wbp-empty {
  font-size: 0.8rem; color: var(--dust); padding: 0.125rem 0 0.375rem; line-height: 1.5;
}

/* Todo groups */
.wbp-todo-group { margin-bottom: 0.125rem; }
.wbp-todo-group-label {
  font-size: 0.69rem; color: var(--dust); padding: 0.4rem 0.25rem 0.1rem; font-style: italic;
}

/* Add row */
.wbp-add-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 0.25rem 0.125rem;
  margin-top: 0.375rem;
  border-top: 1px solid var(--cream-warm);
}
.wbp-add-input {
  flex: 1; border: none; background: transparent;
  font-size: 0.82rem; font-family: var(--font-body); color: var(--char);
  padding: 0.15rem 0; outline: none;
}
.wbp-add-input::placeholder { color: var(--dust); }
.wbp-add-btn {
  width: 24px; height: 24px; border-radius: 50%; background: var(--sage-mist);
  border: none; cursor: pointer; font-size: 1rem; color: var(--sage);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  line-height: 1; transition: background 0.15s;
}
.wbp-add-btn:hover { background: var(--sage-pale); }

/* ═══════════════════════════════════════════════════════════
   REDESIGN ADDITIONS — appended, cascade-safe
═══════════════════════════════════════════════════════════ */

/* ── Global: page background ──────────────────────────── */
body { background: #FAF7F2; }
.main-content { background: #FAF7F2; }
.home-hero { background: linear-gradient(150deg, #EAF0E7 0%, #FAF7F2 65%); }

/* ── Global: section labels ───────────────────────────── */
.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #9A9A8E;
  font-weight: 600;
}

/* ── Sidebar enhancements ─────────────────────────────── */
.snav-item { padding: 10px 16px; }
.snav-item:hover { background: rgba(45,74,62,0.07); }
.snav-item.active {
  border-left: 3px solid #2D4A3E;
  background: rgba(45,74,62,0.07);
  color: #2D4A3E;
}
.sidebar-logo-text { font-family: var(--font-display); color: #2D4A3E; font-size: 1rem; }
.sidebar-footer { border-top: 1px solid #E0D8CE; }

/* ── Home: hero header ────────────────────────────────── */
.home-greeting { font-size: 1.75rem; font-weight: 400; }
.home-weather { margin-bottom: 1.5rem; }
.streak-pill {
  background: white; border: 1px solid #E0D8CE;
  border-radius: 50px; padding: 3px 10px; font-size: 0.75rem; gap: 6px;
}

/* ── Home: mood buttons ───────────────────────────────── */
.mood-btn { min-height: 72px; border-radius: 12px; background: white; border: 1px solid #E0D8CE; }
.mood-btn.selected { background: #2D4A3E; color: white; border: none; }
.mood-btn.selected .mood-label { color: rgba(255,255,255,0.85); }
.mood-emoji { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.mood-label { font-size: 0.75rem; font-weight: 500; }

/* ── Home: prompt card ────────────────────────────────── */
.prompt-card { border-left: 3px solid #C8A96E; }
.prompt-tag {
  background: #FDF4E7; color: #C8A96E; border-radius: 50px;
  padding: 2px 10px; font-size: 0.7rem; font-weight: 600;
  display: inline-block; margin-bottom: 0.5rem;
}
.prompt-tag::before { display: none; }
.prompt-q { font-style: italic; font-size: 0.95rem; color: #444440; line-height: 1.6; }
.prompt-start-btn { border-radius: 50px; background: #2D4A3E; color: white; padding: 10px 20px; font-size: 0.85rem; }

/* ── Home: Oura Ring banner ───────────────────────────── */
.oura-banner {
  margin: 0 1.5rem 1.25rem;
  background: linear-gradient(135deg, #1A1A18, #2D4A3E);
  border-radius: 12px; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.oura-banner-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.oura-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #7FA688; flex-shrink: 0; animation: oura-pulse 2s infinite;
}
@keyframes oura-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.oura-banner-title { font-size: 0.85rem; font-weight: 500; color: white; margin-bottom: 2px; }
.oura-banner-sub   { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.oura-banner-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.oura-connect-btn {
  background: white; color: #2D4A3E; border-radius: 50px;
  padding: 8px 16px; font-size: 0.8rem; font-weight: 600;
  border: none; cursor: pointer; font-family: var(--font-body); white-space: nowrap; transition: background 0.15s;
}
.oura-connect-btn:hover { background: #EEF4F1; }
.oura-dismiss-btn {
  color: rgba(255,255,255,0.5); background: none; border: none;
  margin-left: 8px; cursor: pointer; font-size: 1rem; padding: 0.2rem; line-height: 1; transition: color 0.15s;
}
.oura-dismiss-btn:hover { color: rgba(255,255,255,0.9); }

/* ── Home: Sage Reflects card ─────────────────────────── */
.sage-reflects-card {
  margin: 0 1.5rem 1.25rem;
  background: linear-gradient(135deg, #2D4A3E, #3d6b57);
  border-radius: 14px; padding: 20px 24px; color: white;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.sage-reflects-left { flex: 1; }
.sage-reflects-label {
  font-size: 0.7rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6); margin-bottom: 0.4rem; font-weight: 500;
}
.sage-reflects-text {
  font-family: var(--font-display);
  font-style: italic; font-size: 1rem; font-weight: 300; line-height: 1.5; color: white;
}
.sage-reflects-btn {
  flex-shrink: 0; border-radius: 50px; background: white; color: #2D4A3E;
  padding: 8px 16px; font-size: 0.8rem; font-weight: 600; border: none;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap; transition: background 0.15s;
}
.sage-reflects-btn:hover { background: #EEF4F1; }

/* ── Home: stats cards ────────────────────────────────── */
.stat-card {
  background: white; border-radius: 12px;
  border: 1px solid #E0D8CE; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-num   { font-size: 1.5rem; font-weight: 600; color: #2D4A3E; }
.stat-label { font-size: 0.7rem; color: #9A9A8E; }

/* ── Home: chart card ─────────────────────────────────── */
.chart-card   { background: white; border-radius: 12px; border: 1px solid #E0D8CE; padding: 16px 20px; }
.mini-bar-day { font-size: 0.7rem; color: #9A9A8E; }

/* ── Journal: Ask Sage button ─────────────────────────── */
.journal-editor-header .btn-outline {
  background: #2D4A3E; color: white;
  border-radius: 50px; padding: 8px 18px; font-size: 0.8rem; border: none;
}
.journal-editor-header .btn-outline:hover { background: #3d6b57; }

/* ── Journal: writing mode pills ─────────────────────── */
.journal-mode-pills {
  display: flex; gap: 6px; padding: 0.75rem 1.75rem 0.5rem; flex-wrap: wrap; flex-shrink: 0;
}
.journal-mode-pill {
  border-radius: 50px; padding: 6px 14px; font-size: 0.78rem;
  border: 1px solid #E0D8CE; background: white; color: #666;
  cursor: pointer; font-family: var(--font-body); transition: background 0.15s, color 0.15s;
}
.journal-mode-pill.active { background: #2D4A3E; color: white; border-color: #2D4A3E; }
.journal-mode-pill:not(.active):hover { background: #EEF4F1; color: #2D4A3E; }

/* ── Journal: prompt banner ───────────────────────────── */
.journal-prompt-banner {
  margin: 0 1.75rem 0.75rem; background: #F5F2ED; border-radius: 10px;
  padding: 12px 16px; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.journal-prompt-icon { font-size: 1rem; flex-shrink: 0; }
.journal-prompt-text { flex: 1; font-style: italic; font-size: 0.875rem; color: #555550; }
.journal-prompt-skip {
  background: none; border: none; color: #9A9A8E; font-size: 0.78rem;
  cursor: pointer; font-family: var(--font-body); flex-shrink: 0; white-space: nowrap; transition: color 0.15s;
}
.journal-prompt-skip:hover { color: #555; }

/* ── Journal: editor body as white card ───────────────── */
.journal-editor-body {
  background: white; border-radius: 14px; border: 1px solid #E0D8CE;
  margin: 0 1.75rem 1rem; padding-top: 0.5rem;
}
.journal-title-input {
  font-family: var(--font-display); font-size: 1.5rem;
  color: #2D4A3E; font-weight: 400; padding: 12px 1.5rem 8px;
}
.journal-editor-divider { margin: 0 1.5rem 0.75rem; }
.journal-content-area   { padding: 0 1.5rem 1.5rem; }

/* ── Journal: footer mood tags ────────────────────────── */
.journal-footer     { flex-wrap: wrap; gap: 0.5rem; }
.journal-footer-left { display: flex; flex-direction: column; gap: 0.4rem; }
.journal-mood-tags  { display: flex; gap: 5px; flex-wrap: wrap; }
.journal-mood-tag {
  background: #F5F2ED; border-radius: 50px; padding: 3px 10px;
  font-size: 0.72rem; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-body); transition: border-color 0.15s;
}
.journal-mood-tag:hover  { border-color: #2D4A3E; }
.journal-mood-tag.active { background: #EEF4F1; border-color: #2D4A3E; color: #2D4A3E; }

/* ── Journal: save button ─────────────────────────────── */
#save-btn { border-radius: 50px; padding: 10px 24px; background: #2D4A3E; font-size: 0.85rem; }

/* ── Chats: header typography ─────────────────────────── */
#screen-chats .insights-title    { font-size: 1.4rem; font-weight: 400; }
#screen-chats .insights-subtitle { font-size: 0.8rem; color: #9A9A8E; }

/* ── Chats: container ─────────────────────────────────── */
.chats-screen { padding: 0; max-width: 860px; margin: 0 auto; }
.chats-screen .insights-hero { padding: 1.5rem 2rem 1.125rem; }
#chats-list  { padding: 0 2rem; }

/* ── Chats: date separator ────────────────────────────── */
.chat-day-header {
  display: flex; align-items: center;
  padding: 16px 0; cursor: pointer; background: transparent;
  font-size: 0.72rem; color: #9A9A8E; letter-spacing: 0.08em; font-weight: 400;
  justify-content: center;
}
.chat-day-header::before,
.chat-day-header::after { content: ''; flex: 1; height: 1px; background: #E0D8CE; }
.chat-day-header > span:first-child { padding: 0 12px; white-space: nowrap; }
.chat-day-chevron { display: none; }
.chat-day-header:hover { background: transparent; }

/* ── Chats: bubbles ───────────────────────────────────── */
.chat-day-body { gap: 10px; background: transparent; padding: 0 0 1rem; }
.chat-bubble-ro-ai {
  border-radius: 4px 16px 16px 16px; background: white;
  border: 1px solid #E8E4DE; padding: 14px 18px; max-width: 68%;
  font-size: 0.9rem; line-height: 1.65; color: #333330;
}
.chat-bubble-ro-user {
  border-radius: 16px 4px 16px 16px; background: #2D4A3E; color: white;
  padding: 12px 18px; max-width: 62%; font-size: 0.9rem; line-height: 1.6;
}
.chat-sage-label {
  font-size: 0.65rem; letter-spacing: 0.1em; color: #9A9A8E; margin-bottom: 4px; font-weight: 500;
}

/* ── Chats: sticky input bar ──────────────────────────── */
.chats-input-bar {
  background: white; border-top: 1px solid #E0D8CE;
  padding: 12px 2rem; display: flex; gap: 10px; align-items: center;
  position: sticky; bottom: 0;
}
.chats-input-field {
  flex: 1; border: 1px solid #E0D8CE; border-radius: 50px;
  padding: 10px 18px; font-size: 0.875rem; background: #FAF7F2;
  font-family: var(--font-body); color: var(--char); outline: none; transition: border-color 0.15s;
}
.chats-input-field:focus { border-color: #2D4A3E; }
.chats-send-btn {
  background: #2D4A3E; color: white; border-radius: 50px;
  padding: 10px 20px; font-size: 0.85rem; font-weight: 500;
  border: none; cursor: pointer; font-family: var(--font-body); transition: background 0.15s; white-space: nowrap;
}
.chats-send-btn:hover { background: #3d6b57; }

/* ── Chats: Sage typing indicator ─────────────────────── */
.sage-typing { padding: 0 2rem 0.5rem; }
.sage-typing-bubble {
  display: inline-flex; gap: 4px; align-items: center;
  background: white; border: 1px solid #E8E4DE;
  border-radius: 4px 16px 16px 16px; padding: 12px 18px;
}
.sage-typing-bubble span {
  width: 6px; height: 6px; border-radius: 50%; background: #9A9A8E;
  display: block; animation: sage-type-bounce 1.2s infinite;
}
.sage-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.sage-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sage-type-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-5px); }
}

/* ── Responsive additions ─────────────────────────────── */
@media (max-width: 700px) {
  .oura-banner, .sage-reflects-card { margin-left: 1rem; margin-right: 1rem; }
  .sage-reflects-card { flex-direction: column; align-items: flex-start; }
  .journal-mode-pills { padding: 0.625rem 1.25rem 0.4rem; }
  .journal-prompt-banner { margin: 0 1.25rem 0.625rem; }
  .journal-editor-body  { margin: 0 1rem 1rem; }
  .journal-editor-divider { margin: 0 1rem 0.625rem; }
  .journal-content-area { padding: 0 1rem 1.5rem; }
  .chats-screen .insights-hero { padding: 1.25rem 1rem 0.875rem; }
  #chats-list { padding: 0 1rem; }
  .chats-input-bar { padding: 12px 1rem; }
  .sage-typing { padding: 0 1rem 0.5rem; }
  .settings-cols { grid-template-columns: 1fr; }
}

/* ── Insights: full-width layout ──────────────────────── */
.insights-inner {
  max-width: none;
  padding: 0 1.5rem 2rem;
}
.insights-inner .et-card,
.insights-inner .reframe-card { max-width: 860px; }
.insights-inner .pattern-grid  { max-width: 860px; grid-template-columns: repeat(4, 1fr); }
.insights-inner .section-header,
.insights-inner .trigger-list   { max-width: 860px; }

/* ── Settings: remove width cap, two-column grid ─────── */
.settings-inner {
  max-width: none;
  padding: 1.5rem 1.5rem 3rem;
}
.settings-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.settings-col {
  display: flex;
  flex-direction: column;
  gap: 0; /* settings-block already has margin-bottom: 1rem */
}
