:root {
  --peach: #fde6d8;
  --peach-dark: #f5cbb7;
  --terracotta: #d4826a;
  --terracotta-dark: #b8654e;
  --rose: #e8a0b4;
  --rose-deep: #c47088;
  --cream: #faf0e8;
  --bg: #f7f0de;
  --card-bg: #fffaf5;
  --text: #3d2c25;
  --text-muted: #9a8580;
  --border: #ecdcd4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(180, 120, 100, 0.1);
  --shadow-lg: 0 8px 32px rgba(180, 120, 100, 0.15);
  --green: #6aaa7a;
  --amber: #d4a050;
  --red: #c47060;
  --font-scale: 1;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth ── */
.auth-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-wrap > .auth-box { flex: 0 0 auto; }
.auth-box {
  width: 100%; max-width: 380px;
}
.auth-box .logo {
  font-size: calc(28px * var(--font-scale));
  font-weight: 700;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.5px;
}
.auth-box .logo span { color: var(--terracotta); }
.auth-box .tagline {
  text-align: center;
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  margin: 4px 0 24px;
}
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--peach);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}
.auth-tabs button {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  font-size: calc(13px * var(--font-scale));
  font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-muted);
  transition: all 0.15s;
}
.auth-tabs button.active {
  background: var(--card-bg);
  color: var(--terracotta);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Layout ── */
.app-wrap { max-width: 600px; margin: 0 auto; padding: 16px; }

/* Sticky top bar (keeps hamburger/menu reachable while scrolling) */
.logo-bar {
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 90;
  background: var(--bg);
  padding: 12px 0 10px;
  margin: -16px 0 16px;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  color: #fff; font-size: 18px; font-weight: 700;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-text {
  font-size: calc(20px * var(--font-scale));
  font-weight: 700; letter-spacing: -0.3px;
  cursor: pointer;
}
.logo-text span { color: var(--terracotta); }

/* ── Page indicator (swipe views) ── */
.page-dots {
  display: flex; justify-content: center; gap: 8px;
  margin: -6px 0 14px;
}
.page-dot {
  width: 22px; height: 4px; border-radius: 2px;
  background: var(--peach-dark);
  transition: background 0.15s, width 0.15s;
}
.page-dot.active {
  background: var(--terracotta);
  width: 32px;
}

/* ── Menu button (ChatGPT-style) ── */
.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: var(--peach); color: var(--terracotta-dark);
  font-size: calc(22px * var(--font-scale));
  cursor: pointer; transition: all 0.12s;
}
.menu-btn:hover { background: var(--peach-dark); }
.menu-btn:active { transform: scale(0.92); }

/* ── Cards ── */
.card-t {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

/* ── Mood picker ── */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  touch-action: pan-y;
}
.mood-btn {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s;
  overflow: visible;
}
.mood-btn:active { transform: scale(0.92); }
.mood-btn.selected {
  background: var(--peach);
  box-shadow: 0 0 0 3px rgba(212, 130, 106, 0.25);
}
.mood-emoji {
  display: inline-block;
  font-size: 2.1rem;
  line-height: 1;
  transform-origin: center;
  transition: transform .18s cubic-bezier(.34,1.3,.64,1);
  will-change: transform;
  position: relative;
  z-index: 1;
}
.mood-btn.selected .mood-emoji { z-index: 2; }
.mood-scale {
  display: flex; justify-content: space-between;
  font-size: calc(11px * var(--font-scale));
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Mobile: emoji base stays 2rem (lens engages on touch, not at rest) */
@media (max-width: 576px) {
  .mood-emoji { font-size: 2rem; }
}

/* ── Check-in card layout ── */
.checkin-card { padding: 20px 18px; }
.checkin-head {
  font-size: calc(18px * var(--font-scale));
  font-weight: 700; line-height: 1.3;
  margin-bottom: 18px;
}
.checkin-head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.checkin-head-row .checkin-head { margin-bottom: 0; }
.checkin-sub {
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  margin-bottom: 12px;
}
.speech-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 8px;
}
.checkin-actions {
  display: flex; gap: 8px; margin-top: 16px;
}
.checkin-actions .btn-t.primary { flex: 1; }
.checkin-card .checkin-tip { margin-top: 14px; }
.checkin-stepbar { margin-bottom: 0; margin-top: 16px; }

/* ── Textarea ── */
.txt-t {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: calc(14px * var(--font-scale));
  background: var(--bg);
  resize: none;
  min-height: 80px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.txt-t:focus { border-color: var(--terracotta); }
.txt-t.listening {
  border-color: var(--red);
  animation: glow-pulse 1.2s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 112, 96, 0.15), 0 0 12px rgba(196, 112, 96, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(196, 112, 96, 0.28), 0 0 26px rgba(196, 112, 96, 0.55); }
}
.txt-t::placeholder { color: var(--text-muted); }

/* ── Speech hint (hold to talk / listening) ── */
.speech-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  white-space: nowrap;
}
.speech-hint.recording { color: var(--red); }

/* ── Check-in tips ── */
.checkin-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--peach);
  color: var(--text-muted);
  font-size: calc(12px * var(--font-scale));
  line-height: 1.5;
}
.checkin-tip i { color: var(--terracotta); font-size: calc(13px * var(--font-scale)); margin-top: 1px; }

/* ── Buttons ── */
.btn-t {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-weight: 600; font-size: calc(14px * var(--font-scale));
  cursor: pointer; transition: all 0.12s;
  width: 100%;
}
.btn-t:active { transform: scale(0.98); }
.btn-t.primary { background: var(--terracotta); color: #fff; }
.btn-t.primary:hover { background: var(--terracotta-dark); }
.btn-t.primary:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-t.outline {
  background: transparent;
  color: var(--terracotta);
  border: 2px solid var(--terracotta);
}
.btn-t.outline:hover { background: var(--peach); color: var(--terracotta-dark); }
.btn-t.sm { padding: 8px 16px; font-size: calc(12px * var(--font-scale)); width: auto; }
.btn-t.ghost { background: transparent; color: var(--text-muted); border: none; width: auto; padding: 6px 12px; }
.btn-t.ghost:hover { color: var(--terracotta); }

/* ── Breathing guide ── */
.breathing-wrap {
  text-align: center;
  padding: 32px 16px;
}
.breathe-stage {
  position: relative;
  width: 270px; height: 270px;   /* circle max scale = 200 * 1.35 */
  margin: 0 auto;
}
.breathe-circle {
  position: absolute;
  left: 50%; top: 50%;
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terracotta), var(--rose));
  opacity: 0.55;
  animation: boxbreathe 16s ease-in-out infinite;
}
.breathe-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 20px;
  pointer-events: none;
}
.breathe-count {
  color: #fff;
  font-size: calc(54px * var(--font-scale));
  font-weight: 700; line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
@keyframes boxbreathe {
  0%   { transform: scale(1);    opacity: 0.45; }
  25%  { transform: scale(1.35); opacity: 0.85; }
  50%  { transform: scale(1.35); opacity: 0.85; }
  75%  { transform: scale(1);    opacity: 0.45; }
  100% { transform: scale(1);    opacity: 0.45; }
}
.breathe-label {
  font-size: calc(15px * var(--font-scale));
  font-weight: 600; color: #b44a2a;
}
.breathe-sub {
  font-size: calc(12px * var(--font-scale));
  color: #b44a2a; margin-top: 0;
}

/* ── Tooltip ── */
.tip {
  position: relative; cursor: help;
  border-bottom: 1px dotted var(--terracotta);
  padding-left: 4px;
}
.tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 220px; text-align: center;
  background: var(--text); color: var(--card-bg);
  font-size: calc(11px * var(--font-scale)); font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
  line-height: 1.5; white-space: normal;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  z-index: 30;
}
.tip:hover::after, .tip:focus::after { opacity: 1; }

/* ── Insight cards ── */
.insight-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.insight-icon.observation { background: #f0e6f0; color: #a070a0; }
.insight-icon.pattern { background: #e6f0ee; color: #60a080; }
.insight-icon.alert { background: #f0e6e6; color: #c07060; }

.insight-tag {
  display: inline-block;
  font-size: calc(10px * var(--font-scale));
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  padding: 2px 10px; border-radius: 10px;
}
.insight-tag.observation { background: #f0e6f0; color: #a070a0; }
.insight-tag.pattern { background: #e6f0ee; color: #60a080; }
.insight-tag.alert { background: #f0e6e6; color: #c07060; }

/* ── Heatmap ── */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 5px;
  background: #fdf6f0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.heatmap-cell span { color: var(--text); }
.heatmap-cell.l1 { background: #fde6d8; }
.heatmap-cell.l2 { background: #f5cbb7; }
.heatmap-cell.l3 { background: #e8a090; }
.heatmap-cell.l4 { background: #d4826a; }
.heatmap-cell.l5 { background: #b8654e; }
.heatmap-cell.today { border: 2px solid var(--terracotta); }
.heatmap-cell.selected { box-shadow: 0 0 0 2px var(--terracotta-dark); }

.sample-data-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--peach);
  color: var(--terracotta-dark);
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sample-data-pill:active { transform: scale(0.98); }
/* Insights variant: sticks below the week/month toggle (toggle bottom ~96px when stuck) */
.sample-data-pill.sticky-toggle {
  position: sticky;
  top: 104px;
  z-index: 45;
}

/* Help FAQ */
.help-item { overflow: hidden; }
.help-q {
  display: flex; align-items: center; gap: 8px;
  padding: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.help-q:active { opacity: 0.85; }
.help-cat {
  font-size: calc(10px * var(--font-scale));
  color: var(--terracotta-dark);
  background: var(--peach);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.help-a { border-top: 1px solid rgba(0, 0, 0, 0.06); padding: 12px 14px 14px; }
[data-theme="dark"] .help-a { border-top-color: rgba(255, 255, 255, 0.08); }
.help-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 0 0; margin-top: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.help-chips::-webkit-scrollbar { display: none; }
.help-chip {
  flex-shrink: 0;
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  background: var(--peach);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.help-chip.active { background: var(--terracotta); color: #fff; font-weight: 600; }
.guest-draft-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--peach);
  border: 1px solid var(--peach-dark);
  color: var(--text);
  font-size: calc(12px * var(--font-scale));
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* ── Day entries (insights date detail) ── */
.day-entry {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.day-entry:first-of-type { border-top: none; }
.day-entry-text {
  font-size: calc(13px * var(--font-scale));
  color: var(--text); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.day-entry-question {
  margin-top: 6px;
  font-size: calc(12px * var(--font-scale));
  font-style: italic;
  color: var(--terracotta-dark);
  line-height: 1.5;
}
.day-entry-question i { margin-right: 4px; }
.day-entry-confirm {
  align-self: center;
  font-size: calc(11px * var(--font-scale));
  font-weight: 600; color: var(--red);
  white-space: nowrap; flex-shrink: 0;
}
.day-entry-del {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-muted); font-size: calc(13px * var(--font-scale));
  cursor: pointer; transition: all .12s;
  flex-shrink: 0;
}
.day-entry-del:hover { color: var(--red); border-color: var(--red); background: #fdf0ee; }
.day-entry-del:active { transform: scale(0.92); }
.day-entry-del.confirming {
  width: auto; padding: 0 10px;
  background: var(--red); border-color: var(--red); color: #fff;
  font-size: calc(12px * var(--font-scale)); font-weight: 700;
  animation: pulse-mic 1s ease-in-out infinite;
}
.day-entry-del.confirming:hover { color: #fff; }

/* ── Reframe ── */
.reframe-thought {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-style: italic;
  color: var(--text);
  margin-bottom: 12px;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  border-left: 3px solid var(--rose);
}
.distortion-badge {
  display: inline-block;
  background: #f0e6f0;
  color: #a070a0;
  font-size: calc(11px * var(--font-scale));
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.reframe-text {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.7;
  color: var(--text);
}
.reframe-text strong { color: var(--terracotta-dark); }

/* ── Mic button (check-in speak, hold-to-talk) ── */
.mic-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--rose);
  background: var(--bg); color: var(--rose-deep);
  font-size: calc(16px * var(--font-scale));
  cursor: pointer; transition: all .12s;
  flex-shrink: 0;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.mic-btn:hover { background: var(--peach); }
.mic-btn:active { transform: scale(0.92); }
.mic-btn.recording {
  border-color: var(--red); color: var(--red); background: #fdf0ee;
  animation: pulse-mic 1.2s ease-in-out infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 112, 96, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(196, 112, 96, 0); }
}

/* ── Clear textarea button ── */
.clear-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg); color: var(--text-muted);
  font-size: calc(14px * var(--font-scale));
  cursor: pointer; transition: all .12s;
  flex-shrink: 0;
}
.clear-btn:hover { color: var(--red); border-color: var(--red); background: #fdf0ee; }
.clear-btn:active { transform: scale(0.92); }

/* ── Section title ── */
.sec-title {
  font-size: calc(15px * var(--font-scale));
  font-weight: 700;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Check-in step indicator ── */
.step-bar {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.step-dot { flex: 1; height: 4px; border-radius: 4px; background: var(--peach-dark); }
.step-dot.active { background: var(--terracotta); }
.step-dot.done { background: var(--green); }

/* ── Streak badge ── */
.streak-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--peach); color: var(--terracotta-dark);
  font-size: calc(12px * var(--font-scale)); font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
}
.metric-badge {
  gap: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: metricFade 0.4s ease;
}
.metric-value {
  font-weight: 800;
  color: var(--terracotta-dark);
}
.metric-label {
  font-size: calc(10px * var(--font-scale));
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.3px;
}
@keyframes metricFade {
  from { opacity: 0.3; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

/* ── Misc ── */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* ── Range slider (font size) ── */
input[type="range"] {
  height: 6px; border-radius: 4px;
  -webkit-appearance: none; appearance: none;
  background: var(--peach-dark); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--terracotta); cursor: pointer;
  border: 3px solid var(--card-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ── Notification toggle switch ── */
.notif-toggle {
  position: relative; display: inline-block;
  width: 44px; height: 26px; border-radius: 13px;
  background: var(--border); cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.notif-toggle.on { background: var(--terracotta); }
.notif-toggle .notif-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: left .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.notif-toggle.on .notif-knob { left: 21px; }

/* ── Notification note box ── */
.notif-note {
  padding: 8px; border-radius: 6px;
  font-size: calc(12px * var(--font-scale));
  margin-bottom: 12px;
}

.spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-t {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: calc(13px * var(--font-scale));
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast-t.show { opacity: 1; }
.toast-t.success { background: var(--green); color: #fff; }
.toast-t.error { background: var(--red); color: #fff; }

/* ── Breathing page ── */
.breathe-page {
  min-height: 80dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* ── Footer donate ── */
.footer-donate .card-t {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── Menu overlay ── */
.menu-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.3);
  display: flex; justify-content: flex-end;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.menu-panel {
  width: 300px; max-width: 80vw; height: 100%;
  background: var(--card-bg);
  display: flex; flex-direction: column;
  animation: slideRight .2s ease-out;
}
@keyframes slideRight { from { transform: translateX(100%) } to { transform: translateX(0) } }

.menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.menu-body { flex: 1; padding: 8px; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 12px 14px 4px; border-radius: var(--radius-sm);
  font-size: calc(14px * var(--font-scale));
  font-weight: 500; cursor: pointer;
  transition: background .12s;
}
.menu-item:hover { background: var(--peach); }
.menu-item.active { background: var(--peach); color: var(--terracotta); }
.menu-item i { font-size: calc(18px * var(--font-scale)); width: 22px; text-align: center; }
.menu-divider { height: 1px; background: var(--border); margin: 8px 12px; }

/* ── Menu saved reframes row ── */
.menu-bookmark {
  margin-left: auto; font-size: calc(15px * var(--font-scale));
  color: var(--text-muted); cursor: pointer;
  padding: 4px; border-radius: 6px; transition: all .12s;
}
.menu-bookmark:hover { color: var(--terracotta); background: var(--peach); }
.menu-bookmark.open { color: var(--terracotta); }

.menu-reframes-row {
  padding: 0;
}
.menu-reframes-row .menu-item i {
  color: var(--rose-deep); font-size: calc(12px * var(--font-scale));
  flex-shrink: 0;
}
.menu-reframe-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
  font-size: calc(12px * var(--font-scale));
  font-weight: 500; color: var(--text);
  line-height: 1.4;
}
.menu-reframe-empty {
  padding: 8px 12px;
  font-size: calc(12px * var(--font-scale)); color: var(--text-muted);
  font-style: italic;
}

/* ══ Dark theme ══ */
[data-theme="dark"] {
  --peach: #3a2d27;
  --peach-dark: #4a3a33;
  --terracotta: #d4826a;
  --terracotta-dark: #e0957e;
  --rose: #c47088;
  --rose-deep: #d890a4;
  --cream: #2a231f;
  --bg: #1f1a17;
  --card-bg: #2a231f;
  --text: #f0e6df;
  --text-muted: #a89a92;
  --border: #3a312c;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --green: #6aaa7a;
  --amber: #d4a050;
  --red: #d07f6e;
  --overlay: rgba(20, 16, 14, 0.85);
}
:root { --overlay: rgba(253, 246, 240, 0.85); }

/* Hardcoded light spots that need dark counterparts */
[data-theme="dark"] .heatmap-cell { background: #241e1a; }
[data-theme="dark"] .heatmap-cell.l1 { background: #3a2d27; }
[data-theme="dark"] .heatmap-cell.l2 { background: #5a4238; }
[data-theme="dark"] .heatmap-cell.l3 { background: #7a5444; }
[data-theme="dark"] .heatmap-cell.l4 { background: #b8654e; }
[data-theme="dark"] .heatmap-cell.l5 { background: #d4826a; }
[data-theme="dark"] .insight-icon.observation, [data-theme="dark"] .insight-tag.observation { background: #3a2d3a; color: #c9a0c9; }
[data-theme="dark"] .insight-icon.pattern, [data-theme="dark"] .insight-tag.pattern { background: #263a33; color: #80b09a; }
[data-theme="dark"] .insight-icon.alert, [data-theme="dark"] .insight-tag.alert { background: #3a2626; color: #d09080; }
[data-theme="dark"] .distortion-badge { background: #3a2d3a; color: #c9a0c9; }
[data-theme="dark"] .mic-btn.recording,
[data-theme="dark"] .clear-btn:hover,
[data-theme="dark"] .day-entry-del:hover { background: #3a2420; }

/* Public SEO FAQ block (crawlable, shown under the auth card) - mobile-first */
.seo-faq { margin: 24px auto 36px; padding: 0 16px; width: 100%; max-width: 480px; box-sizing: border-box; }
.seo-faq h2 { font-size: calc(16px * var(--font-scale)); margin: 0 0 10px; color: var(--text); }
.seo-faq-item { margin-bottom: 14px; }
.seo-faq-item h3 { font-size: calc(13px * var(--font-scale)); font-weight: 600; margin: 0 0 4px; line-height: 1.4; color: var(--text); }
.seo-faq-item p { font-size: calc(12.5px * var(--font-scale)); margin: 0; line-height: 1.5; color: var(--text-muted); }

@media (min-width: 577px) {
  .seo-faq h2 { font-size: calc(17px * var(--font-scale)); }
}

/* Swipe navigation transition (Vue <transition name="fade">): simple crossfade */
.fade-enter-active, .fade-leave-active { transition: opacity 0.22s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .fade-enter-active, .fade-leave-active { transition: none; }
}
}
