/* ═══════════════════════════════════════════════
   The Asherman's Compass — Recovery Tracker
   Mobile-first PWA styles
═══════════════════════════════════════════════ */

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

:root {
  --primary: #9e3a5e;
  --plum: #3d1f35;
  --blush: #e8a4bc;
  --sage: #5a7a64;
  --cream: #fdf8f4;
  --surface: #fff;
  --border: #ece6ea;
  --text: #1a1015;
  --text-muted: #7a6472;
  --radius: 16px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Work Sans', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── SPLASH ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.splash.visible { opacity: 1; }
.splash.fade-out { opacity: 0; pointer-events: none; }
.splash.hidden { display: none !important; }
.splash__bg {
  position: absolute;
  inset: 0;
  background: #3d1f35;
  background: linear-gradient(160deg, #3d1f35 0%, #9e3a5e 60%, #c45c84 100%);
  transition: background 0.8s ease;
}
.splash__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(48px, env(safe-area-inset-top, 48px)) 28px max(32px, var(--safe-bottom));
}
.splash__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
}
.splash__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.splash__streak {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.18);
  border-radius: 99px;
  padding: 6px 14px;
  color: #fff;
}
.splash__streak-fire { font-size: 1.1rem; }
.splash__streak-num { font-size: 1.3rem; font-weight: 700; font-family: 'Cormorant Garamond', Georgia, serif; }
.splash__streak-label { font-size: 0.75rem; color: rgba(255,255,255,0.75); }

.splash__message-wrap {
  padding: 2.5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.splash__tradition {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.splash__tradition::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.4);
}
.splash__quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 500;
  font-style: italic;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}
.splash__source {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  font-style: normal;
}

.splash__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.splash__date {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.splash__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--plum);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.splash__btn:active { transform: scale(0.97); }

/* ── APP SHELL ── */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.app.hidden { display: none; }
.hidden { display: none !important; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(61,31,53,0.08);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  font-family: 'Work Sans', sans-serif;
}
.bottom-nav__item.active { color: var(--primary); }
.bottom-nav__item svg { transition: transform 0.15s; }
.bottom-nav__item.active svg { transform: scale(1.1); }

/* ── TABS ── */
.tab {
  position: absolute;
  inset: 0;
  bottom: calc(60px + var(--safe-bottom));
  background: var(--cream);
  overflow: hidden;
}
.tab.hidden { display: none; }
.tab.active { display: block; }
.tab-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: max(56px, env(safe-area-inset-top, 56px)) 0 24px;
}
.tab-header {
  padding: 16px 20px 8px;
}
.tab-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--plum);
}
.tab-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── HOME TAB ── */
.home-header {
  padding: 20px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-header__greeting {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--plum);
}
.home-header__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.home-header__streak-badge {
  background: linear-gradient(135deg, #ff6b35, #ff9a3c);
  border-radius: 99px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

/* Score card */
.score-card {
  margin: 12px 20px;
  background: linear-gradient(135deg, #3d1f35, #9e3a5e);
  border-radius: 20px;
  padding: 20px;
  color: #fff;
}
.score-card__label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.score-card__ring-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.score-ring-container {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.score-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.score-card__breakdown {
  flex: 1;
}
.score-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.score-breakdown-item:last-child { border-bottom: none; }
.score-breakdown-item span:last-child { font-weight: 600; color: #fff; }
.score-card__message {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 12px;
  line-height: 1.5;
}

/* Checkin prompt */
.checkin-prompt {
  margin: 12px 20px;
  background: var(--surface);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.checkin-prompt__icon { font-size: 1.5rem; }
.checkin-prompt__title { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.checkin-prompt__sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.checkin-prompt__btn {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Work Sans', sans-serif;
}
.checkin-done {
  margin: 12px 20px;
  background: #f0f9f4;
  border: 1px solid #b7dfc7;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d6a4f;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Section labels */
.section-label {
  padding: 16px 20px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Milestone strip */
.milestone-strip {
  margin: 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.milestone-strip__icon { font-size: 1.6rem; }
.milestone-strip__name { font-weight: 600; font-size: 0.9rem; }
.milestone-strip__sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.milestone-strip__progress { flex-shrink: 0; text-align: right; }
.milestone-strip__bar { width: 80px; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.milestone-strip__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--blush)); border-radius: 99px; transition: width 0.6s ease; }
.milestone-strip__pct { font-size: 0.72rem; color: var(--primary); font-weight: 600; }

/* Message mini card */
.message-mini {
  margin: 0 20px;
  background: linear-gradient(135deg, rgba(61,31,53,0.06), rgba(158,58,94,0.08));
  border: 1px solid rgba(158,58,94,0.2);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s;
}
.message-mini:active { transform: scale(0.98); }
.message-mini__tradition {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.message-mini__quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--plum);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.message-mini__tap { font-size: 0.7rem; color: var(--text-muted); margin-top: 8px; }

/* Quick stats */
.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  margin: 0 20px;
}
.quick-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.quick-stat__num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.quick-stat__label {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* ── LOG TAB ── */
.log-section {
  margin: 0 20px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.log-section__title {
  padding: 14px 16px 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--plum);
  border-bottom: 1px solid var(--border);
  background: rgba(61,31,53,0.03);
}
.log-field {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.log-field:last-child { border-bottom: none; }
.log-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.log-label__scale {
  color: var(--primary);
  font-size: 1rem;
}

/* Chip groups */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Work Sans', sans-serif;
}
.chip.selected,
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip:active { transform: scale(0.96); }

/* Slider */
.slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  outline: none;
  margin: 4px 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(158,58,94,0.4);
}
.slider--mood::-webkit-slider-thumb {
  background: linear-gradient(135deg, var(--primary), #c45c84);
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Textarea */
.log-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--cream);
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}
.log-textarea:focus { border-color: var(--primary); }

/* Submit button */
.log-submit {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  background: linear-gradient(135deg, #3d1f35, #9e3a5e);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  box-shadow: 0 4px 20px rgba(158,58,94,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.log-submit:active { transform: scale(0.98); box-shadow: none; }

/* ── PROGRESS TAB ── */
.chart-card {
  margin: 0 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.chart-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--plum);
  margin-bottom: 2px;
}
.chart-card__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Flow calendar */
.flow-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.flow-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.flow-cell--header { background: transparent; border-color: transparent; font-size: 0.6rem; font-weight: 700; color: var(--text-muted); }
.flow-cell--empty  { background: transparent; border-color: transparent; }
.flow-cell--today  { box-shadow: 0 0 0 2px var(--primary); }
.flow-cell--none { background: #f5f0f3; }
.flow-cell--spotting { background: #fde8ee; color: #c45c84; border-color: #f5c6d8; }
.flow-cell--light { background: #f5c6d8; color: #9e3a5e; border-color: #e8a4bc; }
.flow-cell--normal { background: #e8a4bc; color: #fff; border-color: #d489a3; }
.flow-cell--heavy { background: var(--primary); color: #fff; border-color: var(--primary); }
.flow-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.flow-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.flow-dot--none { background: #f5f0f3; border: 1px solid var(--border); }
.flow-dot--spotting { background: #fde8ee; }
.flow-dot--light { background: #f5c6d8; }
.flow-dot--normal { background: #e8a4bc; }
.flow-dot--heavy { background: var(--primary); }

/* Practices bars */
.practices-bars { display: flex; flex-direction: column; gap: 10px; }
.practice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.practice-row__label {
  font-size: 0.75rem;
  color: var(--text);
  width: 120px;
  flex-shrink: 0;
}
.practice-row__bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.practice-row__bar {
  height: 8px;
  background: linear-gradient(90deg, var(--sage), #7aad8c);
  border-radius: 99px;
  transition: width 0.8s ease;
  min-width: 4px;
}
.practice-row__count {
  font-size: 0.72rem;
  color: var(--sage);
  font-weight: 600;
  white-space: nowrap;
}

/* ── BADGES TAB ── */
.badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 20px;
}
.badge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s;
}
.badge-card:not(.badge-card--locked) {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(158,58,94,0.04), rgba(232,164,188,0.1));
  box-shadow: 0 4px 16px rgba(158,58,94,0.12);
}
.badge-card--locked {
  opacity: 0.42;
  filter: grayscale(0.6);
}
.badge-card__icon { font-size: 2.2rem; margin-bottom: 8px; }
.badge-card__name { font-weight: 700; font-size: 0.82rem; color: var(--plum); margin-bottom: 4px; }
.badge-card__desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }
.badge-card__earned-date { font-size: 0.65rem; color: var(--primary); font-weight: 600; margin-top: 6px; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--plum);
  color: #fff;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 2000;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(61,31,53,0.3);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Chart canvas */
canvas { width: 100% !important; }

/* ── SPLASH LOGO IMAGE ── */
.splash__logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.4);
}

/* ── CYCLE PHASE CARD ── */
.cycle-phase-card {
  margin: 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--phase-color, var(--primary));
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.3s;
}
.cycle-phase-card__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cycle-phase-card__icon { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }
.cycle-phase-card__name { font-weight: 700; font-size: 0.9rem; color: var(--plum); margin-bottom: 4px; }
.cycle-phase-card__desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.cycle-phase-card__tip  { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); line-height: 1.5; font-style: italic; }

/* ── WIN CARD ── */
.win-card {
  margin: 0 20px;
  background: linear-gradient(135deg, rgba(232,168,48,0.08), rgba(158,58,94,0.06));
  border: 1px solid rgba(232,168,48,0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.win-card__prompt {
  display: flex;
  align-items: center;
  gap: 10px;
}
.win-card__prompt span { font-size: 1.3rem; flex-shrink: 0; }
.win-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
}
.win-input::placeholder { color: var(--text-muted); }
.win-save-btn {
  background: #e8a830;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  flex-shrink: 0;
}
.win-saved {
  display: flex;
  align-items: center;
  gap: 10px;
}
.win-saved__icon { font-size: 1.5rem; }
.win-saved__text { font-size: 0.88rem; font-weight: 500; color: var(--plum); font-style: italic; }

/* ── LEARN TAB ── */
.learn-nav {
  display: flex;
  gap: 8px;
  padding: 4px 20px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.learn-nav::-webkit-scrollbar { display: none; }
.learn-nav__btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: all 0.15s;
}
.learn-nav__btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.learn-section { padding: 0 20px; }
.learn-intro {
  background: rgba(158,58,94,0.06);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.learn-intro p { font-size: 0.88rem; color: var(--text); line-height: 1.6; }

/* Flow colour cards */
.flow-colour-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.flow-colour-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}
.flow-colour-card__name { font-weight: 700; font-size: 0.9rem; color: var(--plum); margin-bottom: 4px; }
.flow-colour-card__what { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.flow-colour-card__text { font-size: 0.82rem; color: var(--text); line-height: 1.55; margin-bottom: 8px; }
.flow-colour-card__verdict {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}
.flow-colour-card__verdict--ok    { background: #eef6f0; color: #2d6a4f; }
.flow-colour-card__verdict--watch { background: #fff8e1; color: #8a6300; }
.flow-colour-card__verdict--great { background: #e8f5e9; color: #1b5e20; }
.flow-colour-card__verdict--urgent{ background: #fde8e8; color: #8b1a1a; }

/* Red flag cards */
.redflag-card {
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.redflag-card--urgent   { background: #fef5f5; border: 1px solid #f5c0c0; }
.redflag-card--watch    { background: #fffbf0; border: 1px solid #f5e0a0; }
.redflag-card--questions{ background: #f5f0fb; border: 1px solid #d0b8e8; }
.redflag-card__header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.redflag-card__icon { font-size: 1.4rem; flex-shrink: 0; }
.redflag-card__title { font-weight: 700; font-size: 0.9rem; color: var(--plum); margin-bottom: 2px; }
.redflag-card__sub { font-size: 0.75rem; color: var(--text-muted); }
.redflag-list { padding-left: 18px; }
.redflag-list li { font-size: 0.83rem; color: var(--text); line-height: 1.55; margin-bottom: 7px; }

/* Good signs */
.goodsign-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.goodsign-card__icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.goodsign-card__title { font-weight: 700; font-size: 0.9rem; color: var(--plum); margin-bottom: 6px; }
.goodsign-card__text { font-size: 0.82rem; color: var(--text); line-height: 1.55; }
.learn-link { color: var(--primary); text-decoration: underline; font-size: 0.8rem; }

/* Cycle phase cards */
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.phase-card--menstrual { border-left: 4px solid #9e3a5e; }
.phase-card--follicular{ border-left: 4px solid #7c9e6a; }
.phase-card--ovulatory { border-left: 4px solid #e8a830; }
.phase-card--luteal    { border-left: 4px solid #5a6ea0; }
.phase-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phase-card__icon  { font-size: 1.6rem; }
.phase-card__name  { font-weight: 700; font-size: 0.9rem; color: var(--plum); }
.phase-card__days  { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.phase-card__desc  { font-size: 0.83rem; color: var(--text); line-height: 1.55; margin-bottom: 10px; }
.phase-card__section-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 10px 0 4px; }
.phase-card__body  { font-size: 0.82rem; color: var(--text); line-height: 1.55; }

/* Doctor prep */
.doctor-prep-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.doctor-prep-section__title { font-weight: 700; font-size: 0.9rem; color: var(--plum); margin-bottom: 12px; }
.doctor-prep-list { padding-left: 16px; }
.doctor-prep-list li { font-size: 0.83rem; color: var(--text); line-height: 1.6; margin-bottom: 8px; }

/* Q&A accordion */
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qitem {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}
.qitem__q {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--plum);
  position: relative;
}
.qitem__q::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.2s;
}
.qitem--open .qitem__q::after { transform: translateY(-50%) rotate(45deg); }
.qitem__a {
  max-height: 0;
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  padding: 0 14px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.qitem--open .qitem__a {
  max-height: 300px;
  padding: 0 14px 14px;
}

/* Learn callout */
.learn-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(61,31,53,0.05);
  border-radius: var(--radius);
  padding: 14px;
  margin: 16px 0;
}
.learn-callout--green { background: rgba(90,122,100,0.08); }
.learn-callout__icon { font-size: 1.4rem; flex-shrink: 0; }
.learn-callout p { font-size: 0.83rem; color: var(--text); line-height: 1.6; }
.learn-callout a { color: var(--primary); text-decoration: underline; }

/* Doctor summary in progress tab */
.doctor-summary { background: var(--cream); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.doctor-summary__text { font-size: 0.75rem; color: var(--text); font-family: monospace; white-space: pre-wrap; line-height: 1.7; }
.doctor-summary__empty { font-size: 0.83rem; color: var(--text-muted); font-style: italic; text-align: center; padding: 20px 0; }
.copy-summary-btn {
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  width: 100%;
}

/* ═══════════════════════════════════════════════
   MINDFULNESS TAB — all components
═══════════════════════════════════════════════ */

/* 6-tab bottom nav — slightly smaller text */
.bottom-nav__item { font-size: 0.62rem; padding: 8px 2px; }

/* ── Mindful sub-nav ── */
.mindful-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mindful-nav::-webkit-scrollbar { display: none; }
.mindful-nav__btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Work Sans', sans-serif;
}
.mindful-nav__btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Big affirmation card ── */
.big-affirmation-card {
  background: linear-gradient(135deg, #3d1f35 0%, #9e3a5e 100%);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  margin-bottom: 16px;
}
.big-affirmation__quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #fff;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* ── Affirmation mood selector ── */
.affirmation-mood-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.affirmation-mood-btn {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 8px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Work Sans', sans-serif;
}
.affirmation-mood-btn.active {
  background: var(--blush);
  border-color: var(--primary);
  color: var(--plum);
}

/* ── Affirmation pool ── */
.affirmation-pool { display: flex; flex-direction: column; gap: 10px; }
.affirmation-pool__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blush);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}

/* ── Journal prompt card ── */
.journal-prompt-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 14px;
}
.journal-prompt-card__category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}
.journal-prompt-card__prompt {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
}
.journal-textarea {
  width: 100%;
  min-height: 130px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.88rem;
  font-family: 'Work Sans', sans-serif;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.journal-textarea:focus { outline: none; border-color: var(--primary); }
.journal-actions { display: flex; gap: 10px; }
.journal-save-btn {
  flex: 2;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}
.journal-next-btn {
  flex: 1;
  background: var(--surface);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}

/* ── Breathing exercise cards ── */
.breath-exercise-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 12px;
}
.breath-exercise-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.breath-exercise-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--plum);
}
.breath-exercise-card__duration {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--cream);
  border-radius: 99px;
  padding: 2px 10px;
}
.breath-exercise-card__desc {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}
.breath-exercise-card__best {
  font-size: 0.75rem;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 14px;
}
.breath-start-btn {
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 10px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}

/* ── Breathing timer ── */
.breath-timer-card {
  text-align: center;
  padding: 24px 16px 20px;
}
.breath-timer__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--plum);
  margin-bottom: 6px;
}
.breath-timer__instruction {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.breath-timer__circle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.breath-timer__circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--blush);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s ease, background 0.9s ease;
}
.breath-timer__circle.expanding {
  animation: breath-expand 4s ease-in-out forwards;
}
.breath-timer__circle.contracting {
  animation: breath-contract 4s ease-in-out forwards;
}
.breath-timer__circle.holding {
  animation: none;
  transform: scale(1.15);
  background: rgba(158,58,94,0.2);
}
@keyframes breath-expand {
  from { transform: scale(0.85); background: #e8c4d4; }
  to   { transform: scale(1.2);  background: rgba(158,58,94,0.25); }
}
@keyframes breath-contract {
  from { transform: scale(1.2);  background: rgba(158,58,94,0.25); }
  to   { transform: scale(0.85); background: #e8c4d4; }
}
.breath-timer__phase {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--plum);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.breath-timer__count {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
}
.breath-timer__cycles {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 18px;
}
.breath-stop-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 10px 32px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}

/* ── Body scan ── */
.bodyscan-intro {
  background: rgba(90,122,100,0.08);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.6;
}
.bodyscan-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}
.bodyscan-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--plum);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bodyscan-step__area {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}
.bodyscan-step__instruction {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Grounding ── */
.grounding-intro {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.6;
}
.grounding-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--sage);
  margin-bottom: 10px;
}
.grounding-step__icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.grounding-step__sense {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.grounding-step__prompt {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Reframing ── */
.reframe-today-card {
  background: linear-gradient(135deg, rgba(61,31,53,0.06) 0%, rgba(158,58,94,0.08) 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(158,58,94,0.2);
  padding: 20px;
  margin-bottom: 20px;
}
.reframe-today-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 12px;
}
.reframe-thought {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border-left: 3px solid var(--border);
  line-height: 1.55;
}
.reframe-arrow {
  text-align: center;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.reframe-response {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  padding: 12px 14px;
  background: rgba(90,122,100,0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--sage);
}
.reframe-all-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 6px 0 12px;
}
.reframe-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.reframe-card__thought {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}
.reframe-card__arrow {
  text-align: center;
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.reframe-card__response {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Home affirmation card ── */
.affirmation-card {
  background: linear-gradient(135deg, rgba(61,31,53,0.07) 0%, rgba(158,58,94,0.1) 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(158,58,94,0.18);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.affirmation-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 8px;
}
.affirmation-card__text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--plum);
  line-height: 1.6;
}
.affirmation-card__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Work Sans', sans-serif;
}

/* ── Gratitude field in log ── */
.gratitude-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--plum);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}
.gratitude-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  font-family: 'Work Sans', sans-serif;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}
.gratitude-textarea:focus { outline: none; border-color: var(--blush); }

/* ═══════════════════════════════════════
   ACCESS GATE
═══════════════════════════════════════ */
.access-gate {
  position: fixed;
  inset: 0;
  background: #3d1f35;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.access-gate.hidden { display: none; }

.access-gate__inner {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,164,188,0.2);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.access-gate__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  color: #e8a4bc;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.access-gate__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 10px;
}

.access-gate__sub {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0 0 28px;
}

.access-gate__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.access-gate__input {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(232,164,188,0.4);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 15px;
  color: #fff;
  text-align: center;
  letter-spacing: 0.06em;
  font-family: 'Work Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.access-gate__input::placeholder { color: rgba(255,255,255,0.3); }
.access-gate__input:focus { border-color: #e8a4bc; }

.access-gate__btn {
  background: #9e3a5e;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.access-gate__btn:hover { background: #b04470; }
.access-gate__btn:active { transform: scale(0.98); }
.access-gate__btn:disabled { opacity: 0.6; cursor: not-allowed; }

.access-gate__error {
  color: #ffb3b3;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.access-gate__error.hidden { display: none; }

.access-gate__help {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 12px 0 0;
  line-height: 1.6;
}
