/* ================================================================
   ANTICIPA v2 — Stylesheet
   Refactored from monolithic app.html

   Table of Contents:
   1.  Reset & Base
   2.  Design Tokens (CSS Custom Properties)
   3.  Typography
   4.  Layout — App Shell, Panels, Navigation
   5.  Components — Buttons
   6.  Components — Cards
   7.  Components — Forms & Inputs
   8.  Components — Modals
   9.  Components — Toasts & Banners
   10. Forecast & Events
   11. Check-in & Mood
   12. Anxiety Timeline
   13. Coping Plan & AI Output
   14. Toolkit
   15. Breathing Exercise
   16. Panic Interceptor
   17. Chat / Sage AI
   18. History & Reflections
   19. Pro / Payment
   20. Onboarding & Survey
   21. Home Panel — Spotify Layout
   22. Tool Cards & Tool Modal
   23. FAQ
   24. Sidebar
   25. Journey Bar
   26. Story Modal
   27. Splash Screen
   28. Age Gate
   29. Floating SOS
   30. Calming Background Blocks
   31. Animations & Keyframes
   32. Accent Color Overrides
   33. Responsive — Tablet (<=768px)
   34. Responsive — Mobile (<=480px)
   35. Performance & Accessibility
   36. iOS Native Adjustments
   ================================================================ */


/* ================================================================
   1. RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--tx);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  line-height: 1.6;
}

/* Subtle grid overlay — decorative only */
body::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* Ambient teal glow — subtle, calming */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% -8%, rgba(56, 191, 160, 0.13) 0%, transparent 58%),
    radial-gradient(ellipse 50% 38% at 85% 108%, rgba(56, 191, 160, 0.09) 0%, transparent 52%);
  pointer-events: none;
  z-index: -1;
}


/* ================================================================
   2. DESIGN TOKENS
   ================================================================ */
:root,
[data-theme="dark"],
[data-theme="light"] {
  /* Background */
  --bg: #0e1520;
  --bg2: #121c2e;

  /* Surfaces */
  --sf: rgba(255, 255, 255, 0.05);
  --sf2: rgba(255, 255, 255, 0.08);
  --sf3: rgba(255, 255, 255, 0.11);

  /* Borders */
  --bd: rgba(255, 255, 255, 0.09);
  --bdhi: rgba(255, 255, 255, 0.17);

  /* Text */
  --tx: #e8edf5;
  --tx2: #8b9ab4;
  --mu: #546a84;

  /* Accent — teal */
  --ac: #38bfa0;
  --ac-04: rgba(56, 191, 160, 0.04);
  --ac-06: rgba(56, 191, 160, 0.06);
  --ac-08: rgba(56, 191, 160, 0.08);
  --ac-10: rgba(56, 191, 160, 0.10);
  --ac-12: rgba(56, 191, 160, 0.12);
  --ac-15: rgba(56, 191, 160, 0.15);
  --ac-18: rgba(56, 191, 160, 0.18);
  --ac-20: rgba(56, 191, 160, 0.20);
  --ac-25: rgba(56, 191, 160, 0.25);

  /* Pro */
  --pro: #9b7bdf;
  --pro-08: rgba(155, 123, 223, 0.08);
  --pro-12: rgba(155, 123, 223, 0.12);
  --pro-20: rgba(155, 123, 223, 0.20);
  --pro-25: rgba(155, 123, 223, 0.25);

  /* Status */
  --dng: #e06b6b;
  --dng-10: rgba(224, 107, 107, 0.10);
  --ok: rgba(16, 170, 118, 0.9);
  --ok-10: rgba(16, 170, 118, 0.10);

  /* Overlay — used in shadows */
  --overlay-02: rgba(0, 0, 0, 0.35);
  --overlay-03: rgba(0, 0, 0, 0.42);
  --overlay-04: rgba(0, 0, 0, 0.48);
  --overlay-05: rgba(0, 0, 0, 0.54);
  --overlay-08: rgba(0, 0, 0, 0.62);
  --overlay-10: rgba(0, 0, 0, 0.68);
  --overlay-12: rgba(0, 0, 0, 0.72);
  --overlay-18: rgba(0, 0, 0, 0.78);

  /* Shadows */
  --shadow: 0 2px 20px rgba(0,0,0,0.4);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);

  /* Navigation */
  --nav-bg: rgba(10, 16, 26, 0.96);

  /* Modal & Input */
  --modal-bg: #111a28;
  --input-bg: rgba(255, 255, 255, 0.07);

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;
  --sp-16: 64px;

  /* Border radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Typography — font families */
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;

  /* Typography — type scale (base 13px, ~1.25 ratio) */
  --text-2xs: 9px;    /* micro: tags, badges */
  --text-xs:  11px;   /* caption: secondary labels */
  --text-sm:  12px;   /* small: descriptions, meta */
  --text-base: 13px;  /* body: default UI text */
  --text-md:  15px;   /* emphasis: CTAs, larger body */
  --text-lg:  18px;   /* heading-sm: card titles */
  --text-xl:  22px;   /* heading-md: section headings */
  --text-2xl: 28px;   /* heading-lg: page headings */
  --text-3xl: 36px;   /* display: hero numbers */

  /* Typography — line heights */
  --lh-none:    1;     /* icon/compact UI */
  --lh-tight:   1.2;  /* display headings */
  --lh-snug:    1.35; /* card/component headings */
  --lh-normal:  1.6;  /* body text */
  --lh-relaxed: 1.8;  /* long-form / descriptions */

  /* Typography — letter spacing */
  --ls-tight:  -0.01em; /* headings */
  --ls-normal:  0em;    /* body */
  --ls-wide:    0.08em; /* UI emphasis */
  --ls-wider:   0.12em; /* uppercase labels */
}

/* Dark navy base */
[data-theme="dark"] body,
body {
  background: #0e1520 !important;
  color: var(--tx) !important;
}


/* ================================================================
   3. TYPOGRAPHY
   Scale: --text-2xs (9) → xs (11) → sm (12) → base (13) → md (15)
          → lg (18) → xl (22) → 2xl (28) → 3xl (36)
   Display font: Instrument Serif (headings, hero text)
   Body font:    DM Sans (all UI text)
   ================================================================ */

/* Base element rules */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
}

/* Semantic heading scale */
h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}
h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}
h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}
h4, h5, h6 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-normal);
}

/* Display class — any serif heading not using a semantic element */
.display {
  font-family: var(--font-display) !important;
  font-weight: 400;
  letter-spacing: var(--ls-tight);
}

/* Label class — uppercase tracking labels (replaces scattered 0.08-0.13em letter-spacing) */
.label-upper {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--mu);
}


/* ================================================================
   4. LAYOUT — App Shell, Panels, Navigation
   ================================================================ */
.app-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.sp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.sp-main .main-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sp-main .main-wrap::-webkit-scrollbar { width: 4px; }
.sp-main .main-wrap::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 4px; }

.main-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.main-wrap::-webkit-scrollbar { width: 4px; }
.main-wrap::-webkit-scrollbar-thumb { background: var(--bdhi); border-radius: 4px; }

.body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Panels */
.panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 90px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.panel.on {
  display: block;
  animation: panelIn 0.35s cubic-bezier(0.22, 0.68, 0, 1.05) both;
  will-change: transform, opacity;
}

.panel::-webkit-scrollbar { width: 3px; }
.panel::-webkit-scrollbar-thumb { background: var(--bdhi); border-radius: 3px; }

.sp-main .panel {
  padding: 36px 40px 100px;
  background: transparent !important;
}

.inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Top navigation */
.topnav {
  position: sticky !important;
  top: 0 !important;
  z-index: 200 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top)) !important;
  background: rgba(10, 16, 26, 0.95) !important;
  backdrop-filter: blur(28px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(140%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  flex-shrink: 0;
  isolation: isolate !important;
  -webkit-transform: translateZ(0) !important;
  transform: translateZ(0) !important;
}

[data-theme="dark"] .topnav {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06) !important;
}

/* Ensure nav elements sit above background */
.topnav .logo-wrap,
.topnav .logo-icon,
.topnav .logo,
.topnav .navtabs,
.topnav .navr,
.topnav .navu {
  position: relative !important;
  z-index: 2 !important;
}

/* Logo */
.logo-wrap,
a.logo-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin-right: 6px;
  cursor: pointer;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.logo-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: #1a2540 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  min-width: 30px;
  box-shadow: 0 3px 14px var(--overlay-18) !important;
  overflow: hidden !important;
}

.logo-icon svg { width: 17px; height: 17px; }

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap !important;
  color: var(--tx) !important;
  overflow: visible !important;
}

.logo span.lac,
.logo .lac {
  color: var(--ac) !important;
}

/* Nav tabs */
.navtabs { display: flex; gap: 2px; flex: 1; min-width: 0; }

.nt {
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  color: var(--mu);
  transition: all 0.2s;
  user-select: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nt:hover { color: var(--tx); }
.nt.on { background: var(--ac-10) !important; color: var(--ac) !important; border-color: var(--ac-20) !important; }
.nt.pro-nt { color: var(--pro) !important; }
.nt.pro-nt.on { background: rgba(155, 123, 223, 0.1) !important; color: var(--pro) !important; border-color: rgba(155, 123, 223, 0.2) !important; }

/* Nav right area */
.navr { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-spacer { flex: 1; min-width: 0; }
.nav-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }

/* Nav center — user chip */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--overlay-04);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-pill);
  padding: 4px 12px 4px 6px;
  font-size: 13px;
  color: var(--tx);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.navu:hover { background: rgba(0, 0, 0, 0.07); }

/* Avatar */
.avt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ac), #38bfa0) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px var(--ac-20) !important;
}

/* Sign in/out buttons */
.nav-signout {
  font-size: 12px;
  font-weight: 600;
  color: var(--mu);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-signout:hover { color: var(--tx); }

.nav-home {
  font-size: 12px;
  font-weight: 500;
  color: var(--mu);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-home:hover { color: var(--tx); }

.nav-signin {
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--tx2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: color 0.2s;
}
.nav-signin:hover { color: var(--tx); }

.nav-getstarted {
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  background: var(--tx) !important;
  color: #f0ede8 !important;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px var(--overlay-12);
  letter-spacing: 0.01em;
}
.nav-getstarted:hover { opacity: 0.88; transform: translateY(-0.5px); box-shadow: 0 2px 8px var(--overlay-18); }

/* Theme toggle */
.thmbtn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--mu);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.thmbtn:hover { border-color: var(--bdhi); color: var(--tx); background: var(--sf2); }

/* Generic nav button */
.nb {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--mu);
  transition: all 0.2s;
}
.nb:hover { border-color: var(--bdhi); color: var(--tx); }
.nbf { background: var(--ac); color: #fff; border-color: var(--ac); font-weight: 500; }
.nbf:hover { background: #9bb4fb; border-color: #9bb4fb; }

#mob-nav { display: none; }


/* ================================================================
   5. COMPONENTS — Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill) !important;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

/* Primary button */
.bp {
  background: linear-gradient(145deg, #38bfa0, #2ea88c) !important;
  color: #fff;
  border-color: var(--ac) !important;
  box-shadow: 0 1px 2px var(--ac-20), 0 4px 14px var(--ac-15) !important;
}
.bp:hover { background: linear-gradient(145deg, #2ea88c, #3f8d7b) !important; transform: translateY(-1px); box-shadow: 0 2px 4px var(--ac-25), 0 6px 20px var(--ac-20) !important; }

/* Ghost button */
.bg {
  background: var(--ac-08) !important;
  border: 1.5px solid var(--ac-18) !important;
  color: var(--ac) !important;
}
.bg:hover { background: var(--sf2); border-color: var(--bdhi); }

/* Danger button */
.bd2 {
  background: transparent;
  border: 1px solid rgba(217, 112, 112, 0.3) !important;
  color: #d97070 !important;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: none !important;
}
.bd2:hover { background: rgba(217, 112, 112, 0.06) !important; box-shadow: none !important; }

/* Pro upgrade button */
.bpro {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none !important;
  background: linear-gradient(145deg, #38bfa0, #2ea88c) !important;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 8px;
  display: block;
  box-shadow: 0 1px 2px var(--ac-20), 0 4px 16px var(--ac-15) !important;
  letter-spacing: 0.01em;
}
.bpro:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 2px 4px var(--ac-25), 0 6px 24px var(--ac-20) !important; }

/* Ghost small */
.bgs {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--mu);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.bgs:hover { border-color: var(--bdhi); color: var(--tx); }

/* Journey button */
.btnj {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-pill) !important;
  border: 1px solid var(--ac-18) !important;
  background: linear-gradient(135deg, var(--ac-06), rgba(56, 191, 160, 0.04)) !important;
  color: var(--ac) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.btnj:hover { background: linear-gradient(135deg, var(--ac-12), rgba(56, 191, 160, 0.08)) !important; transform: translateY(-1px); }


/* ================================================================
   6. COMPONENTS — Cards
   ================================================================ */
.card {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: var(--radius-xl) !important;
  padding: 22px 24px;
  transition: border-color 0.25s ease, background 0.3s ease, box-shadow 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.32), 0 4px 20px rgba(0,0,0,0.28) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.card:hover {
  border-color: rgba(255,255,255,0.14) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.38), 0 8px 28px rgba(0,0,0,0.32) !important;
}

.clbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mu);
  margin-bottom: 14px;
  opacity: 0.85;
}

[data-theme="dark"] .clbl { color: var(--ac) !important; }

.card h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 14px;
  color: var(--tx);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cdesc {
  font-size: 12.5px;
  color: var(--mu);
  line-height: 1.75;
  margin-top: -4px;
  margin-bottom: 16px;
}


/* ================================================================
   7. COMPONENTS — Forms & Inputs
   ================================================================ */
.irow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 11px; }
.fg { margin-bottom: 10px; }

.fl {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mu);
  margin-bottom: 5px;
}

input:not([type="range"]):not([type="checkbox"]),
select {
  width: 100%;
  padding: 8px 18px !important;
  background: var(--input-bg) !important;
  border: 1.5px solid var(--bd) !important;
  border-radius: var(--radius-pill) !important;
  color: var(--tx) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  width: 100%;
  padding: 10px 16px !important;
  background: var(--input-bg) !important;
  border: 1.5px solid var(--bd) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--tx) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  resize: none;
  line-height: 1.6;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder,
textarea::placeholder { color: var(--mu); }

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(56, 191, 160,0.5) !important;
  box-shadow: 0 0 0 3px var(--ac-08) !important;
}

input[type=date]::-webkit-calendar-picker-indicator { filter: invert(0.2); cursor: pointer; }
select option { background: var(--bg2); }

/* Select wrapper arrow */
.sw { position: relative; }
.sw::after { content: '\2193'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--mu); font-size: 10px; pointer-events: none; }

/* Range slider */
input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 4px !important;
  border-radius: 2px !important;
  outline: none !important;
  border: none !important;
  padding: 0 !important;
  background: linear-gradient(90deg, #4aab94 0%, #6a9ad6 50%, #cc7a7a 100%) !important;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: var(--ac) !important;
  box-shadow: 0 2px 8px rgba(56, 191, 160,0.3) !important;
  cursor: pointer !important;
  border: 2px solid #ffffff !important;
  transition: box-shadow 0.2s, background 0.3s !important;
}

input[type="range"]::-moz-range-thumb {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: var(--ac) !important;
  box-shadow: 0 2px 8px rgba(56, 191, 160,0.3) !important;
  cursor: pointer !important;
  border: 2px solid #ffffff !important;
}

/* Save chip */
.schip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(74, 171, 148, 0.75);
  background: rgba(74, 171, 148, 0.07);
  border: 1px solid rgba(74, 171, 148, 0.14);
  border-radius: 20px;
  padding: 2px 8px;
  animation: fu 0.25s ease both;
}

.cdot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(56, 191, 160, 0.85) !important;
  box-shadow: 0 0 4px rgba(56, 191, 160, 0.4) !important;
}

/* Verify code inputs */
.vcis { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.vci {
  width: 42px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--bd);
  background: var(--input-bg);
  color: var(--tx);
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.vci:focus { border-color: var(--ac); }


/* ================================================================
   8. COMPONENTS — Modals
   ================================================================ */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px) saturate(120%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: fdi 0.45s ease;
}

.mb {
  background: var(--modal-bg);
  border: 1px solid var(--overlay-05) !important;
  border-radius: 22px;
  padding: 28px 26px;
  max-width: 370px;
  width: 100%;
  animation: fu 0.28s ease both;
  position: relative;
  box-shadow: 0 4px 16px var(--overlay-08), 0 16px 48px var(--overlay-12);
}

.mb h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--tx);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
}

.mb p {
  font-size: var(--text-sm);
  color: var(--mu);
  line-height: var(--lh-normal);
  margin-bottom: 16px;
}

.mcl {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  color: var(--mu);
  font-size: var(--text-lg);
  cursor: pointer;
  line-height: var(--lh-none);
}
.mcl:hover { color: var(--tx); }

/* Auth modal tabs */
.atbs {
  display: flex;
  background: var(--overlay-03);
  border: 1px solid var(--bd);
  border-radius: 7px;
  padding: 3px;
  margin-bottom: 16px;
}

.atb {
  flex: 1;
  padding: 6px;
  border-radius: 5px;
  font-size: var(--text-sm);
  text-align: center;
  cursor: pointer;
  color: var(--mu);
  transition: all 0.2s;
  user-select: none;
  border: 1px solid transparent;
}
.atb.on { background: var(--ac-10) !important; color: var(--ac) !important; border-color: var(--ac-18) !important; }

/* Divider */
.adiv { display: flex; align-items: center; gap: 9px; margin: 13px 0; }
.adl { flex: 1; height: 1px; background: var(--bd); }
.adt { font-size: var(--text-xs); color: var(--mu); letter-spacing: 0.06em; text-transform: uppercase; }

/* Social sign-in button */
.sbtn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--sf2);
  color: var(--tx);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sbtn:hover { border-color: var(--bdhi); background: var(--sf3); }
/* Hidden by default — JS only shows this inside the native Capacitor app */
#appleOAuthBtn { display: none; }
.capacitor #appleOAuthBtn { display: flex; }
.ios-native #appleOAuthBtn { display: flex; }
.sbtn-apple { background: #000; color: #fff; border-color: #000; }
.sbtn-apple:hover { background: #1a1a1a; border-color: #1a1a1a; }
.sic { width: 15px; height: 15px; flex-shrink: 0; }

/* Auth error */
.aerr {
  background: rgba(217, 112, 112, 0.07);
  border: 1px solid rgba(217, 112, 112, 0.17);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: var(--text-xs);
  color: var(--dng);
  margin-bottom: 10px;
  display: none;
}

/* Auth footer */
.aftr { text-align: center; font-size: var(--text-xs); color: var(--mu); margin-top: 11px; }
.aftr a { color: var(--ac); cursor: pointer; }

/* Forgot password link */
.fln { font-size: var(--text-xs); color: var(--mu); text-align: right; cursor: pointer; margin-top: -3px; margin-bottom: 10px; }
.fln:hover { color: var(--ac); }

/* Password input wrapper + eye toggle */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; right: 10px; background: none; border: none; cursor: pointer; padding: 4px; color: var(--mu); display: flex; align-items: center; transition: color 0.2s ease; }
.pw-eye:hover { color: var(--tx); }

/* Password strength meter */
.pw-seg { flex: 1; height: 3px; border-radius: 2px; background: var(--bd); transition: background 0.25s ease; }
.pw-seg.s1 { background: #e05b5b; }
.pw-seg.s2 { background: #e09a3a; }
.pw-seg.s3 { background: #d4c044; }
.pw-seg.s4 { background: #4ade80; }

/* Payment modal */
.pymb {
  background: var(--modal-bg);
  border: 1px solid var(--overlay-05) !important;
  border-radius: 22px;
  padding: 28px 26px;
  max-width: 390px;
  width: 100%;
  animation: fu 0.28s ease both;
  position: relative;
  box-shadow: 0 4px 16px var(--overlay-08), 0 16px 48px var(--overlay-12);
}

.pysum {
  background: var(--ac-06);
  border: 1px solid var(--ac-12);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pyl { font-size: var(--text-sm); color: var(--mu); margin-bottom: 2px; }
.pyc { font-size: var(--text-xs); color: var(--mu); }
.pyp { font-family: var(--font-display); font-size: var(--text-xl); color: var(--tx); }

.pym { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }

.pyr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  background: var(--overlay-02);
}
.pyr:hover { border-color: var(--ac-20) !important; background: rgba(56, 191, 160,0.05) !important; transform: translateY(-1px); }

.pyi { width: 29px; height: 29px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: var(--text-md); flex-shrink: 0; }
.pyn { font-size: var(--text-base); margin-bottom: 1px; color: var(--tx); }
.pyd { font-size: var(--text-xs); color: var(--mu); }
.pya { color: var(--mu); font-size: var(--text-sm); margin-left: auto; }
.pysc { text-align: center; font-size: var(--text-xs); color: var(--mu); display: flex; align-items: center; justify-content: center; gap: 4px; }

#g_id_onload { display: none; }
.g-signin-wrap { margin-bottom: 6px; }


/* ================================================================
   9. COMPONENTS — Toasts & Banners
   ================================================================ */
.tst {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(74, 171, 148, 0.07);
  border: 1px solid rgba(74, 171, 148, 0.16);
  border-radius: 7px;
  padding: 9px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ok);
  animation: fu 0.35s ease both;
}
.td2 { width: 4px; height: 4px; background: var(--ok); border-radius: 50%; flex-shrink: 0; }

/* Verify banner */
.vbn {
  background: rgba(212, 168, 67, 0.07);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 12px;
  color: #d4a843;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 2px;
}
.vbn button {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  background: rgba(212, 168, 67, 0.1);
  color: #d4a843;
  font-size: 11px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}
.vbn button:hover { background: rgba(212, 168, 67, 0.18); }


/* ================================================================
   10. FORECAST & EVENTS
   ================================================================ */
#forecast { display: flex; flex-direction: column; gap: 11px; }

.fi {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 16px 18px;
  animation: fu 0.35s ease both;
  box-shadow: 0 1px 3px var(--overlay-02);
}
[data-theme="light"] .fi { background: rgba(255, 255, 255, 0.7); }

.fn {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--tx);
}

.fdel {
  background: none;
  border: none;
  color: var(--mu);
  font-size: var(--text-md);
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: var(--lh-none);
  transition: color 0.2s;
}
.fdel:hover { color: var(--dng); }

.fws { display: flex; flex-direction: column; gap: 6px; }
.fw { border-radius: 7px; border: 1px solid var(--bd); overflow: hidden; }

.wh {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.wh:hover { background: var(--overlay-03); }

/* Forecast risk dots */
.wd-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dlo { background: rgba(56, 191, 160, 0.85) !important; box-shadow: none !important; }
.dmd { background: #d4a843; box-shadow: 0 0 5px rgba(212, 168, 67, 0.4); }
.dhi { background: #d97070 !important; box-shadow: none !important; }

.wl { font-size: var(--text-sm); font-weight: 400; color: var(--tx); }
.wp { font-size: var(--text-xs); color: var(--mu); flex: 1; }
.wc { color: var(--mu); font-size: var(--text-2xs); margin-left: auto; transition: transform 0.3s; }
.wc.open { transform: rotate(180deg); }

.wa { display: none; padding: 0 10px 10px; border-top: 1px solid var(--bd); }
.wa.vis { display: block; animation: fu 0.25s ease both; }

.al { display: flex; align-items: center; gap: 7px; padding-top: 8px; font-size: var(--text-xs); color: var(--mu); }
.ad { display: flex; gap: 3px; }
.ad span { width: 3px; height: 3px; border-radius: 50%; background: var(--ac); animation: dp 1.2s ease-in-out infinite; }
.ad span:nth-child(2) { animation-delay: 0.2s; }
.ad span:nth-child(3) { animation-delay: 0.4s; }

/* Prediction Engine hero card override */
#panel-forecast .card:first-of-type {
  background: linear-gradient(145deg, var(--ac-08), rgba(18,32,50,0.90), rgba(56, 191, 160, 0.04)) !important;
  border-color: var(--ac-12) !important;
  box-shadow: 0 4px 24px var(--ac-08) !important;
  padding: 28px 28px 24px !important;
}

/* Risk timeline chart */
#risk-timeline {
  height: auto !important;
  min-height: 88px !important;
}

/* "Empty state" */
.empty { text-align: center; padding: 26px 0; color: var(--mu); font-size: var(--text-base); line-height: var(--lh-relaxed); }
.ei { font-size: var(--text-2xl); margin-bottom: 8px; opacity: 0.3; }


/* ================================================================
   11. CHECK-IN & MOOD
   ================================================================ */
/* ── Mood selector ── */
.checkin-mood { display: flex; gap: 7px; margin: 10px 0 4px; }

.mood-btn {
  flex: 1;
  padding: 16px 4px 13px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22), 0 2px 10px rgba(0,0,0,0.18);
}
.mood-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.30);
}

/* Colored dot per mood */
.mood-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 auto 9px;
  background: rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}
.mood-btn:nth-child(1) .mood-dot { background: #d97070; }
.mood-btn:nth-child(2) .mood-dot { background: #d9a050; }
.mood-btn:nth-child(3) .mood-dot { background: #c8b850; }
.mood-btn:nth-child(4) .mood-dot { background: #50b88a; }
.mood-btn:nth-child(5) .mood-dot { background: #5094e8; }

.mood-btn .ml {
  font-size: 10px;
  font-weight: 500;
  color: rgba(232, 237, 245, 0.50);
  display: block;
  letter-spacing: 0.02em;
}

/* Selected states — each mood has its own tint */
.mood-btn:nth-child(1).sel { border-color: rgba(217, 112, 112, 0.45) !important; background: rgba(217, 112, 112, 0.07) !important; }
.mood-btn:nth-child(2).sel { border-color: rgba(217, 160, 80, 0.45) !important; background: rgba(217, 160, 80, 0.07) !important; }
.mood-btn:nth-child(3).sel { border-color: rgba(200, 184, 80, 0.45) !important; background: rgba(200, 184, 80, 0.07) !important; }
.mood-btn:nth-child(4).sel { border-color: rgba(80, 184, 138, 0.45) !important; background: rgba(80, 184, 138, 0.07) !important; }
.mood-btn:nth-child(5).sel { border-color: rgba(80, 148, 232, 0.45) !important; background: rgba(80, 148, 232, 0.07) !important; }

.mood-btn.sel {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09) !important;
}
.mood-btn.sel .ml { font-weight: 700 !important; color: rgba(232, 237, 245, 0.85) !important; }
.mood-btn.sel .mood-dot { transform: scale(1.25); }

/* ── Check-in sections ── */
.ci-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ci-section:first-child { padding-top: 6px; }
.ci-section:last-of-type { border-bottom: none; padding-bottom: 4px; }

.ci-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 12px;
}
.ci-label-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  opacity: 0.7;
}

/* ── Concern / helped tags ── */
.ci-pill-wrap { display: flex; flex-wrap: wrap; gap: 7px; }

.ci-pill {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 500;
  color: rgba(232, 237, 245, 0.55);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
  user-select: none;
}
.ci-pill:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(232, 237, 245, 0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}
.ci-pill.sel {
  border-color: rgba(56, 191, 160, 0.45) !important;
  background: rgba(56, 191, 160, 0.10) !important;
  color: #38bfa0 !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(56, 191, 160, 0.18) !important;
  transform: translateY(-1px);
}


/* ================================================================
   12. ANXIETY TIMELINE
   ================================================================ */
.timeline-chart {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.tl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--overlay-05);
}
.tl-row:last-child { border-bottom: none; }

.tl-date { font-size: 11px; color: var(--mu); width: 55px; flex-shrink: 0; }
.tl-bar-wrap { flex: 1; height: 6px; background: var(--bd); border-radius: 3px; overflow: hidden; }

.tl-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.tl-bar.lo { background: rgba(74, 171, 148, 0.7); }
.tl-bar.md { background: #d4a843; }
.tl-bar.hi { background: var(--dng); }

.tl-label { font-size: 10px; color: var(--mu); width: 55px; text-align: right; flex-shrink: 0; }


/* ================================================================
   13. COPING PLAN & AI OUTPUT
   ================================================================ */
.cope-plan {
  background: linear-gradient(135deg, var(--ac-04), rgba(56, 191, 160, 0.03)) !important;
  border: 1px solid var(--ac-12) !important;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  animation: fu 0.3s ease both;
}

.cope-step { padding: 10px 0; border-bottom: 1px solid var(--overlay-05); }
.cope-step:last-child { border-bottom: none; }
.cope-time { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac); opacity: 0.7; margin-bottom: 3px; }
.cope-text { font-size: 13px; color: var(--tx2); line-height: 1.7; }

/* AI advice tips */
.at2 { padding-top: 8px; font-size: 12px; line-height: 1.8; color: var(--tx2); }
.atip { margin-top: 6px; padding: 7px 9px; border-radius: 5px; font-size: 12px; line-height: 1.75; color: var(--tx2); font-weight: 400; }

.tlo { border-left: 2px solid rgba(56, 191, 160, 0.5) !important; background: rgba(56, 191, 160, 0.06) !important; }
.tmd { border-left: 2px solid rgba(212, 168, 67, 0.5) !important; background: rgba(212, 168, 67, 0.06) !important; }
.thi { border-left: 2px solid rgba(217, 112, 112, 0.5) !important; background: rgba(217, 112, 112, 0.06) !important; }

/* AI output block */
.aio {
  margin-top: 10px;
  padding: 11px 13px;
  background: var(--ac-04) !important;
  border: 1px solid var(--ac-10) !important;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--tx2);
  animation: fu 0.25s ease both;
}

.ail { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ac) !important; opacity: 0.6; margin-bottom: 5px; }
.aierr { background: rgba(217, 112, 112, 0.06) !important; border-color: rgba(217, 112, 112, 0.15) !important; color: var(--dng) !important; }

/* CBT Thought Log result */
.cbt-result { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.cbt-block { border-radius: 12px; padding: 13px 14px; border: 1px solid var(--bd); }
.cbt-block.sky { background: linear-gradient(135deg, var(--ac-08), var(--ac-04)); border-color: var(--ac-18); }
.cbt-block.teal { background: linear-gradient(135deg, rgba(56, 191, 160, 0.08), rgba(56, 191, 160, 0.04)); border-color: rgba(56, 191, 160, 0.18); }
.cbt-block.action { background: rgba(74, 171, 148, 0.06); border-color: rgba(74, 171, 148, 0.18); }

.cbt-block-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; margin-bottom: 7px; }
.cbt-block.sky .cbt-block-label { color: var(--ac); }
.cbt-block.teal .cbt-block-label { color: #38bfa0; }
.cbt-block.action .cbt-block-label { color: #4aab94; }

.cbt-reframe { font-family: 'Instrument Serif', serif; font-size: 15px; line-height: 1.6; color: var(--tx); }
.cbt-bullets { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; }
.cbt-bullets li { font-size: 12.5px; color: var(--tx2); line-height: 1.6; }
.cbt-action-text { font-size: 13px; color: var(--tx2); line-height: 1.6; font-weight: 500; }
.cbt-distortion { font-size: 10px; color: var(--mu); margin-top: 5px; letter-spacing: 0.04em; }


/* ================================================================
   14. TOOLKIT
   ================================================================ */
.tg { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 4px; }

.tb {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  box-shadow: 0 1px 2px var(--overlay-02);
}
.tb:hover { background: var(--ac-06) !important; border-color: var(--ac-18) !important; transform: translateY(-1px); }
.tb.on { background: rgba(56, 191, 160,0.09) !important; border-color: var(--ac-25) !important; }

.ti { font-size: 16px; margin-bottom: 5px; opacity: 0.6; }
.tn { font-size: 12px; font-weight: 400; margin-bottom: 2px; color: var(--tx); }
.td { font-size: 10px; color: var(--mu); line-height: 1.4; }

/* Tool panel */
.tp {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--overlay-05) !important;
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
  margin-top: 12px;
  animation: fu 0.25s ease both;
  box-shadow: 0 1px 3px var(--overlay-03), 0 4px 20px var(--overlay-05) !important;
}

.tph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bd);
}

.tpt { font-family: 'Instrument Serif', serif; font-size: 15px; color: var(--tx); }

.tc {
  background: none;
  border: none;
  color: var(--mu);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.tc:hover { color: var(--tx); }

.tpb { padding: 14px; background: var(--sf2); }


/* ================================================================
   15. BREATHING EXERCISE
   ================================================================ */
.bxv { display: flex; flex-direction: column; align-items: center; padding: 5px 0; }
.bxs { width: 92px; height: 92px; border: 1.5px solid var(--ac-20) !important; border-radius: 10px; position: relative; margin-bottom: 13px; }
.bxd { width: 9px; height: 9px; background: var(--ac) !important; border-radius: 50%; position: absolute; top: -4px; left: -4px; box-shadow: 0 0 8px rgba(56, 191, 160,0.4) !important; }
.bxp { font-family: 'Instrument Serif', serif; font-size: 18px; min-height: 25px; text-align: center; margin-bottom: 3px; color: var(--tx); }
.bxc { font-size: 11px; color: var(--mu); min-height: 16px; text-align: center; }


/* ================================================================
   16. PANIC INTERCEPTOR
   ================================================================ */
.panic-wrap { margin-top: 14px; animation: fu 0.4s ease both; }
.panic-phase { text-align: center; padding: 8px 0 4px; }

/* Breathing orb */
.orb-wrap { position: relative; width: 160px; height: 160px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; overflow: visible; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ac-15) !important; animation: orbPulse 8s ease-in-out infinite; }
.orb-ring2 { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(56, 191, 160,0.07) !important; animation: orbPulse 8s ease-in-out infinite; animation-delay: 0.4s; }

.orb-core {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, rgba(56, 191, 160,0.35), rgba(56, 191, 160, 0.15)) !important;
  border: 1.5px solid var(--ac-20) !important;
  box-shadow: 0 0 30px var(--ac-12), inset 0 0 20px var(--ac-06) !important;
  transition: transform 4s ease, opacity 4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-label { font-family: 'Instrument Serif', serif; font-size: 13px; color: rgba(56, 191, 160,0.8) !important; text-align: center; line-height: 1.3; padding: 6px; }

.orb-core.inhale { animation: orbIn 4s ease-in-out forwards; }
.orb-core.hold { animation: none; transform: scale(1.3); opacity: 1; }
.orb-core.exhale { animation: orbOut 6s ease-in-out forwards; }

.panic-instruction { font-family: 'Instrument Serif', serif; font-size: 20px; text-align: center; margin-bottom: 4px; color: var(--tx); min-height: 28px; transition: opacity 0.5s; }
.panic-sub { font-size: 12px; color: var(--mu); text-align: center; min-height: 18px; margin-bottom: 16px; }
.panic-timer { width: 100%; height: 3px; background: var(--bd); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.panic-timer-fill { height: 100%; background: linear-gradient(90deg, var(--ac), var(--pro)); border-radius: 2px; transition: width linear; box-shadow: none !important; }

.panic-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.panic-step { padding: 10px 13px; border-radius: 9px; border: 1px solid var(--bd); background: var(--sf); font-size: 12px; line-height: 1.65; color: var(--tx2); opacity: 0.45; transition: all 0.5s; }
.panic-step.active { opacity: 1; border-color: var(--ac-25) !important; background: var(--ac-06) !important; color: var(--tx); }
.panic-step-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac); margin-bottom: 3px; opacity: 0.7; }
.panic-nav { display: flex; gap: 8px; justify-content: center; }

/* Panic active state */
body.panic-active.panel-grounding { background: #e8e4de !important; transition: background 1.2s ease !important; }
body.panic-active .panic-timer-fill { background: linear-gradient(90deg, var(--ac), #38bfa0) !important; }
body.panic-active .panic-step.active { border-color: var(--ac-25) !important; background: var(--ac-06) !important; }
body.panic-active #panicDetail { background: var(--ac-04) !important; border-color: var(--ac-12) !important; }
body.panic-active .orb-core { background: radial-gradient(circle at 38% 35%, rgba(56, 191, 160,0.35), rgba(56, 191, 160, 0.15)) !important; border-color: var(--ac-25) !important; box-shadow: 0 0 30px var(--ac-12), inset 0 0 20px var(--ac-06) !important; }
body.panic-active .orb-ring { border-color: var(--ac-15) !important; animation: panicRingPulse 4s ease-in-out infinite !important; }
body.panic-active .orb-ring2 { border-color: var(--ac-08) !important; animation: panicRingPulse 4s ease-in-out infinite !important; animation-delay: 0.6s !important; }
body.panic-active .orb-label { color: rgba(56, 191, 160,0.85) !important; }


/* ================================================================
   17. CHAT / SAGE AI
   ================================================================ */
.chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - 160px); }

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 4px 16px;
  -webkit-overflow-scrolling: touch;
}
.chat-msgs::-webkit-scrollbar { width: 3px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--bdhi); border-radius: 3px; }

.chat-msg {
  max-width: 84%;
  padding: 13px 18px;
  border-radius: 20px;
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  animation: fu 0.25s ease both;
}

.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(145deg, #38bfa0, #2ea88c) !important;
  color: #fff !important;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 10px var(--ac-15);
}

.chat-msg.ai {
  align-self: flex-start;
  background: rgba(245, 242, 237, 0.95) !important;
  border: 1px solid var(--overlay-08) !important;
  color: var(--tx) !important;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 12px var(--overlay-04);
}

.chat-msg.ai .chat-label,
.chat-label {
  font-size: var(--text-2xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ac) !important;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 4px;
}

.chat-msg.typing .ad { display: inline-flex; }

.chat-input-wrap { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--bd); }
.chat-input-wrap textarea { flex: 1; height: 46px; min-height: 46px; max-height: 140px; resize: none; font-size: var(--text-md); }

.chat-send {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(145deg, #38bfa0, #2ea88c) !important;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px var(--ac-20), 0 4px 14px var(--ac-15) !important;
}
.chat-send:hover { filter: brightness(1.1); transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.3; cursor: default; transform: none; }


/* ================================================================
   18. HISTORY & REFLECTIONS
   ================================================================ */
.rl { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.re { background: var(--sf); border: 1px solid var(--bd); border-radius: 8px; padding: 10px 12px; }
[data-theme="light"] .re { background: rgba(255, 255, 255, 0.6); }

.rt { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.rn { font-size: 13px; color: var(--tx); }
.rd { font-size: 10px; color: var(--mu); }
.rb { font-size: 10px; padding: 2px 6px; border-radius: 8px; }

.bcalm { background: rgba(74, 171, 148, 0.1); color: rgba(74, 171, 148, 0.9); }
.bmod { background: rgba(212, 168, 67, 0.1); color: #d4a843; }
.bhigh { background: rgba(217, 112, 112, 0.1); color: var(--dng); }

.rno { font-size: 11px; color: var(--mu); line-height: 1.5; margin-top: 2px; }


/* ================================================================
   19. PRO / PAYMENT
   ================================================================ */
.procard {
  background: linear-gradient(145deg, var(--ac-04), rgba(155, 123, 223, 0.04)) !important;
  border: 1px solid var(--ac-10) !important;
  border-radius: 20px;
  padding: 24px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(155, 123, 223, 0.06);
}
.procard::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(155, 123, 223, 0.06), transparent 70%) !important; pointer-events: none; }

.pbadge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, var(--ac), #38bfa0) !important;
  color: #fff;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  margin-bottom: 10px;
  box-shadow: 0 2px 12px var(--ac-15) !important;
}

.procard h2 { color: var(--tx); }
.psub { font-size: 12px; color: var(--mu); line-height: 1.65; margin-bottom: 17px; }

/* Pro tool grid */
.ptg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px !important; margin-bottom: 20px !important; }

.pt {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--overlay-05) !important;
  border-radius: 16px !important;
  padding: 16px 14px !important;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease !important;
  box-shadow: 0 1px 3px var(--overlay-03);
}
.pt:hover { background: var(--ac-06) !important; border-color: var(--ac-18) !important; transform: translateY(-2px) !important; box-shadow: 0 4px 16px var(--ac-08) !important; }
.pt.pton { background: var(--ac-08) !important; border-color: rgba(56, 191, 160,0.22) !important; box-shadow: 0 4px 16px var(--ac-10) !important; }

.pti { font-size: 18px !important; margin-bottom: 6px !important; opacity: 1 !important; }
.ptn { font-size: 12.5px !important; font-weight: 500 !important; margin-bottom: 3px !important; color: var(--tx) !important; }
.ptd { font-size: 11px !important; color: var(--mu) !important; line-height: 1.5 !important; }
.plk { position: absolute; top: 9px !important; right: 10px !important; font-size: 12px !important; opacity: 0.32 !important; }

/* Unlocked banner */
.unb {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--ac-06), rgba(56, 191, 160, 0.06)) !important;
  border: 1px solid rgba(56, 191, 160, 0.2) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  font-size: 13px !important;
  color: #38bfa0 !important;
  font-weight: 500 !important;
}

/* Price toggle */
.ptog { display: flex; background: var(--overlay-03); border: 1px solid var(--bd); border-radius: 10px !important; padding: 4px !important; margin-bottom: 13px; width: fit-content; gap: 3px !important; }
.po { padding: 6px 16px !important; border-radius: 7px !important; font-size: 12px !important; cursor: pointer; color: var(--mu); transition: all 0.2s; user-select: none; border: 1px solid transparent; }
.po.on { background: var(--ac-10) !important; color: var(--ac) !important; border-color: var(--ac-18) !important; }

/* Price display */
.prr { display: flex; align-items: baseline; gap: 4px; margin-bottom: 10px !important; }
.pam { font-family: 'Instrument Serif', serif; font-size: 38px !important; line-height: 1; color: var(--tx); }
.pper { font-size: 12px; color: var(--mu); }
.psav { font-size: 10px; background: rgba(74, 171, 148, 0.1); border: 1px solid rgba(74, 171, 148, 0.17); color: rgba(74, 171, 148, 0.9); padding: 2px 6px; border-radius: 20px; display: none; }

/* Feature list */
.pfts { display: flex; flex-direction: column; gap: 7px !important; margin-bottom: 0 !important; }
.pfr { display: flex; align-items: center; gap: 9px !important; font-size: 12.5px !important; color: var(--tx2); }
.pck { width: 16px !important; height: 16px !important; border-radius: 50%; background: var(--ac-10) !important; border: 1px solid var(--ac-20) !important; display: flex; align-items: center; justify-content: center; font-size: 8px !important; color: var(--ac) !important; flex-shrink: 0; }

/* Pro hero card */
.pro-hero {
  border-radius: 24px !important;
  padding: 28px 24px 24px !important;
  background: linear-gradient(150deg, rgba(56, 191, 160,0.05), rgba(155, 123, 223, 0.04), rgba(56, 191, 160, 0.03)) !important;
  border: 1px solid var(--ac-12) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: proGlow 6s ease-in-out infinite !important;
}
.pro-hero::before {
  content: '' !important;
  position: absolute !important;
  inset: -2px !important;
  background: linear-gradient(135deg, transparent 30%, var(--ac-04), transparent 70%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
.pro-hero::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 40% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  animation: shimmerSlide 5s ease-in-out infinite !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
.pro-hero > * { position: relative !important; z-index: 1 !important; }

/* Pro insight cards */
.pro-insight-card {
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(56, 191, 160,0.05), rgba(56, 191, 160, 0.03));
  border: 1px solid var(--ac-12);
  margin-bottom: 10px;
  animation: panelIn 0.4s ease both;
}
[data-theme="light"] .pro-insight-card { background: rgba(255,255,255,0.06); box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06); }

.pro-insight-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--ac), #38bfa0); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; box-shadow: 0 2px 10px var(--ac-15); }
.pro-insight-title { font-size: 13px; font-weight: 600; color: var(--tx); margin-bottom: 2px; }
.pro-insight-desc { font-size: 11.5px; color: var(--mu); line-height: 1.6; }

/* PayPal container */
#paypal-button-container-P-3YS63600KV646293HNGZTHHY .paypal-buttons { border-radius: var(--radius-pill) !important; }
#paypal-pro-status { margin-top: 8px; padding: 10px 14px; border-radius: 12px; font-size: 12px; text-align: center; display: none; }


/* ================================================================
   20. ONBOARDING & SURVEY
   ================================================================ */
.onboard-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 300; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s; }
.onboard-overlay.hiding { opacity: 0; pointer-events: none; }
.ob-card { max-width: 420px; width: 90%; text-align: center; padding: 40px 30px; }
.ob-icon { font-size: 48px; margin-bottom: 20px; opacity: 0.7; }
.ob-title { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: 12px; color: var(--tx); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.ob-desc { font-size: var(--text-base); color: var(--mu); line-height: var(--lh-relaxed); margin-bottom: 30px; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
.ob-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bd); transition: all 0.3s; }
.ob-dot.on { background: var(--ac) !important; width: 18px; border-radius: 3px; box-shadow: none !important; }
.ob-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; text-align: left; }
.ob-step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--bd); background: var(--sf); font-size: var(--text-base); color: var(--tx2); }
.ob-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--ac) !important; color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 500; flex-shrink: 0; }

/* Welcome / Survey overlay */
.wl-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(14px) saturate(120%); animation: fdi 0.45s ease; }
.wl-card { background: var(--modal-bg); border: 1px solid var(--overlay-04); border-radius: 24px; padding: 36px 30px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 20px 56px rgba(0, 0, 0, 0.1); max-height: 92vh; overflow-y: auto; }

.wl-progress-wrap { height: 3px; background: var(--bd); border-radius: 3px; margin-bottom: 22px; overflow: hidden; display: none; }
.wl-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--ac), #38bfa0); transition: width 0.4s ease; }

.wl-gift { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.wl-step-num { font-size: var(--text-xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--mu); margin-bottom: 8px; }
.wl-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; color: var(--tx); margin-bottom: 10px; line-height: var(--lh-snug); letter-spacing: var(--ls-tight); }
.wl-sub { font-size: var(--text-sm); color: var(--mu); margin-bottom: 14px; line-height: var(--lh-normal); }

.wl-reward-box { background: linear-gradient(135deg, var(--ac-06), rgba(56, 191, 160, 0.04)); border: 1px solid var(--ac-15); border-radius: 14px; padding: 14px 16px; margin: 14px 0 20px; text-align: left; }
.wl-reward-label { font-size: var(--text-xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--ac); margin-bottom: 5px; font-weight: 600; }
.wl-reward-name { font-size: var(--text-md); font-weight: 600; color: var(--tx); margin-bottom: 4px; }
.wl-reward-desc { font-size: var(--text-sm); color: var(--mu); line-height: var(--lh-normal); }

.wl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.wl-opt { padding: 12px 10px; border: 1.5px solid var(--bd); border-radius: 12px; font-size: var(--text-sm); cursor: pointer; color: var(--tx); transition: all 0.22s ease; user-select: none; background: var(--sf); line-height: var(--lh-snug); box-shadow: 0 1px 2px var(--overlay-02); }
.wl-opt:hover { border-color: rgba(56, 191, 160,0.4); color: var(--tx); }
.wl-opt.sel { border-color: var(--ac); background: var(--ac-10); color: var(--ac); font-weight: 500; }

.wl-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.wl-scale-btn { padding: 10px 4px; border: 1.5px solid var(--bd); border-radius: 12px; font-size: var(--text-base); cursor: pointer; color: var(--tx); transition: all 0.22s ease; background: var(--sf); font-family: var(--font-body); box-shadow: 0 1px 2px var(--overlay-02); }
.wl-scale-btn:hover { border-color: rgba(56, 191, 160,0.4); }
.wl-scale-btn.sel { border-color: var(--ac); background: var(--ac-10); color: var(--ac); font-weight: 600; }

/* Analyzing state */
.wl-analyzing-orb { font-size: 38px; margin-bottom: 14px; animation: wlPulse 1.4s ease-in-out infinite; }
.wl-analyzing-dots { display: inline-flex; gap: 6px; margin-top: 16px; }
.wl-analyzing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); animation: wlDot 1.2s ease-in-out infinite; }
.wl-analyzing-dots span:nth-child(2) { animation-delay: 0.2s; background: #38bfa0; }
.wl-analyzing-dots span:nth-child(3) { animation-delay: 0.4s; background: #38bfa0; }

.wl-profile-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.wl-profile-tag { font-size: 10.5px; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--ac-08); border: 1px solid var(--ac-15); color: var(--ac); }


/* ================================================================
   21. HOME PANEL — Spotify Layout
   ================================================================ */
.home-greeting { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--tx); margin-bottom: var(--sp-7); font-weight: 400; line-height: var(--lh-tight); letter-spacing: var(--ls-tight); }

/* Wrapped teaser */
.wrapped-card {
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(145deg, rgba(56,191,160,0.08) 0%, rgba(18,32,50,0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--sp-10) 0 0;
  gap: var(--sp-4);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56,191,160,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.30), 0 8px 28px rgba(0,0,0,0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.wrapped-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(56,191,160,0.06), transparent 60%); pointer-events: none; }
.wrapped-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 36px var(--overlay-08); transform: translateY(-2px); }

/* Panel back button */
.panel-back-btn { background: none; border: none; cursor: pointer; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--mu); padding: 0 0 16px; display: flex; align-items: center; gap: 4px; transition: color 0.2s ease; letter-spacing: 0.01em; }
.panel-back-btn:hover { color: var(--tx); }

/* Start here banner */
.start-here-card { background: rgba(255,255,255,0.05); border-radius: 18px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 6px 24px rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.09); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.start-here-steps { display: flex; flex-direction: column; gap: 0; }
.start-step { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.start-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ac); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.start-step-text { flex: 1; }
.start-step-title { font-size: 13px; font-weight: 600; color: var(--tx); margin-bottom: 2px; }
.start-step-sub { font-size: 11px; color: var(--mu); line-height: 1.5; }
.start-step-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(56,191,160,0.35); background: rgba(56,191,160,0.10); color: #38bfa0; font-family: var(--font-body); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; }
.start-step-btn:hover { background: rgba(56,191,160,0.18); border-color: rgba(56,191,160,0.55); }
.start-step-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 12px 0; }
.start-step.done .start-step-num { background: #4ade80; }
.start-step.done .start-step-title { color: var(--mu); text-decoration: line-through; }
.start-step.done .start-step-btn { opacity: 0.35; pointer-events: none; }

.wrapped-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mu); margin-bottom: 5px; font-weight: 500; opacity: 0.8; }
.wrapped-title { font-family: 'Instrument Serif', serif; font-size: 23px; color: var(--tx); margin-bottom: 8px; line-height: 1.2; letter-spacing: -0.01em; }
.wrapped-stats { display: flex; gap: 18px; }
.wrapped-stat { text-align: center; }
.wrapped-stat-num { font-size: 20px; font-weight: 700; color: var(--tx); }
.wrapped-stat-lbl { font-size: 10px; color: var(--mu); }
.wrapped-emoji { font-size: 52px; opacity: 0.75; flex-shrink: 0; }

/* Weekly Summary Card */
.weekly-card {
  border-radius: 20px;
  padding: 22px 24px 20px;
  background: linear-gradient(145deg, rgba(56,191,160,0.07) 0%, rgba(16,28,48,0.85) 100%);
  margin: var(--sp-6) 0 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 8px 28px rgba(0,0,0,0.22);
  transition: all 0.3s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.weekly-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,255,255,0.03), transparent 60%); pointer-events: none; }
.weekly-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.weekly-label { font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--mu); opacity: 0.8; }
.weekly-range { font-size: var(--text-xs); color: var(--mu); opacity: 0.6; }
.weekly-stats { display: flex; gap: 20px; margin-bottom: 16px; }
.weekly-stat { flex: 1; }
.weekly-stat-num { font-size: var(--text-xl); font-weight: 700; color: var(--tx); line-height: var(--lh-tight); }
.weekly-stat-lbl { font-size: var(--text-xs); color: var(--mu); margin-top: 2px; }
.weekly-insight {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--tx2);
  line-height: var(--lh-snug);
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 14px;
  letter-spacing: var(--ls-tight);
}

/* Intent shortcuts */
.intent-label { font-size: 10px; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mu); margin-bottom: 14px; margin-top: 12px; }
.intent-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.intent-btn {
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--tx2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.intent-btn:hover { background: var(--sf2); border-color: var(--bdhi); color: var(--tx); }
.intent-btn:active { transform: scale(0.97); }

/* Quick access grid */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 52px; }
.qa-card { border-radius: 20px; padding: 28px 24px 22px; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; gap: 14px; }
.qa-card-forecast { background: linear-gradient(150deg, rgba(18, 30, 50, 0.85) 0%, rgba(25, 70, 80, 0.60) 100%); border: 1px solid rgba(56, 191, 160, 0.14); box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 8px 28px rgba(56,191,160,0.08); }
.qa-card-forecast:hover { box-shadow: 0 4px 12px rgba(56,191,160,0.16), 0 12px 40px rgba(56,191,160,0.12); transform: translateY(-2px); }
.qa-card-checkin { background: linear-gradient(150deg, rgba(18, 28, 50, 0.85) 0%, rgba(50, 30, 70, 0.55) 100%); border: 1px solid rgba(155,123,223,0.14); box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 4px 16px rgba(155,123,223,0.08); }
.qa-card-checkin:hover { box-shadow: 0 4px 12px rgba(155,123,223,0.16), 0 8px 28px rgba(155,123,223,0.12); transform: translateY(-2px); }

.qa-accent { height: 3px; border-radius: 2px; width: 28px; margin-bottom: 2px; }
.qa-name { font-family: 'Instrument Serif', serif; font-size: 19px; color: var(--tx); margin-bottom: 2px; line-height: 1.2; }
.qa-name-forecast { background: linear-gradient(120deg, #5b9ee8, #38bfa0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.qa-desc { font-size: 12px; color: var(--mu); line-height: 1.5; }
.qa-arrow { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; margin-top: auto; }
.qa-arrow-forecast { color: var(--ac); }
.qa-arrow-checkin { color: var(--tl, #38bfa0); }

/* Quick grid (3-col) */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.quick-card { background: rgba(255,255,255,0.06); border-radius: 16px; padding: 22px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.09); box-shadow: 0 1px 3px rgba(0,0,0,0.28); }
.quick-card:hover { box-shadow: 0 2px 6px var(--overlay-04), 0 8px 24px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.quick-card-art { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.quick-card-name { font-size: 13px; font-weight: 500; color: var(--tx); line-height: 1.2; }

/* ── Bento grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 52px;
}
.bento-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 60px;
}
.bento-grid-pro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 60px;
}

.bento-card {
  border-radius: 24px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 12px 32px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
  -webkit-tap-highlight-color: transparent;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.36), 0 24px 52px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.10); }
.bento-card:active { transform: scale(0.98); }

/* Gradient surfaces — 3-family system:
   Free tools  → blue-grey  (calm, accessible)
   Pro tools   → purple     (premium, matches Pro accent throughout app)
   Panic SOS   → warm mauve (distinct — emergency context)              */

/* Free — teal/sage dark glass family */
.bento-card[data-tool="breathing"]   { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }
.bento-card[data-action="chat"]      { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }
.bento-card[data-tool="grounding"]   { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }
.bento-card[data-tool="reframe"]     { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }
.bento-card[data-tool="worry"]       { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }
.bento-card[data-tool="stop"]        { background: linear-gradient(155deg, rgba(18, 32, 50, 0.82) 0%, rgba(30, 90, 78, 0.48) 100%); }

/* Pro — violet/indigo dark glass family */
.bento-card[data-tool="somatic"]     { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="cbt"]         { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="affirmations"]{ background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="exp"]         { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="pmr"]         { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="safeplace"]   { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }
.bento-card[data-tool="worrytime"]   { background: linear-gradient(155deg, rgba(18, 28, 50, 0.85) 0%, rgba(60, 36, 100, 0.48) 100%); }

/* Panic SOS — warm rose dark glass, distinct by design */
.bento-card[data-tool="panic"]       { background: linear-gradient(155deg, rgba(22, 20, 36, 0.88) 0%, rgba(100, 40, 40, 0.52) 100%); }

/* Sizes — free grid */
.bento-hero { grid-column: span 2; min-height: 240px; justify-content: flex-end; }
.bento-sm   { min-height: 172px; }
.bento-md   { min-height: 172px; }

/* Sizes — pro grid */
.bento-pro-hero {
  grid-column: span 2;
  min-height: 220px;
  justify-content: flex-end;
}
.bento-pro-tall { min-height: 220px; }
.bento-pro-sm   { min-height: 172px; }
.bento-pro-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px 22px;
}
.bento-pro-wide-left { display: flex; flex-direction: column; }
.bento-pro-wide-label {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(232, 237, 245, 0.40);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.bento-pro-wide .bento-badge { margin-top: 0; flex-shrink: 0; }

.bento-sos {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px 22px;
}

/* Typography */
.bento-eyebrow {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(232, 237, 245, 0.45);
  position: absolute;
  top: 18px;
  left: 24px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.bento-footer { display: flex; align-items: flex-end; justify-content: space-between; }
.bento-name { font-size: var(--text-md); font-weight: 600; color: var(--tx); margin-bottom: 3px; letter-spacing: var(--ls-tight); }
.bento-hero .bento-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 400; }
.bento-sub  { font-size: var(--text-xs); color: var(--mu); line-height: var(--lh-snug); }
.bento-badge {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill); margin-top: 8px; align-self: flex-start;
}
.bento-badge.free { background: rgba(91,143,217,0.15); color: var(--ac); }
.bento-badge.pro  { background: rgba(155,123,223,0.18); color: var(--pro); }

/* SOS card */
.bento-sos-tag   { font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(224, 120, 110, 0.65); margin-bottom: 4px; }
.bento-sos-title { font-family: var(--font-body); font-size: var(--text-md); font-weight: 600; color: var(--tx); line-height: 1.2; letter-spacing: var(--ls-tight); }
.bento-sos-desc  { font-size: 11px; color: var(--mu); margin-top: 3px; }
.bento-sos-cta   { font-size: 13px; font-weight: 600; color: var(--tx); opacity: 0.65; white-space: nowrap; padding-left: 16px; }

/* Pro section label */
.bento-section-label {
  font-size: var(--text-2xs); font-weight: 600; letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--mu); margin-bottom: var(--sp-3); margin-top: var(--sp-2);
}

/* App footer */
.app-footer {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 24px 0 32px; border-top: 1px solid var(--bd); margin-top: 8px;
  font-size: 11px; color: var(--mu);
}
.app-footer a { color: var(--mu); text-decoration: none; transition: color 0.2s; }
.app-footer a:hover { color: var(--tx); }

/* Tool shelves (kept for any other usage) */
.home-shelf { margin-bottom: 36px; }
.shelf-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.home-section-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 400; color: var(--tx); margin-bottom: var(--sp-4); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.shelf-see-all { font-size: 11px; color: var(--mu); cursor: pointer; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.2s; }
.shelf-see-all:hover { color: var(--tx); }
.shelf-scroll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }


/* ================================================================
   22. TOOL CARDS & TOOL MODAL
   ================================================================ */
.tool-card {
  cursor: pointer;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  padding: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 1px 3px rgba(0,0,0,0.28), 0 2px 10px rgba(0,0,0,0.22);
}
.tool-card:hover { box-shadow: 0 2px 6px var(--overlay-05), 0 10px 30px rgba(0, 0, 0, 0.07); transform: translateY(-3px); }
.tool-card:hover .tool-card-play { opacity: 1; transform: translateY(0); }

.tool-card-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.tool-card-art-label {
  font-family: 'Instrument Serif', serif;
  font-size: 16px;
  color: rgba(26, 36, 56, 0.55);
  letter-spacing: 0.03em;
  font-style: italic;
}

.tool-card-play {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--tx);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 12px var(--overlay-12);
  backdrop-filter: blur(8px);
}

.tool-card-name { font-size: 15px; font-weight: 600; color: var(--tx); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card-desc { font-size: 12px; color: var(--mu); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tool-card-badge { display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-bottom: 5px; }
.tool-card-badge.free { background: var(--ac-08); color: var(--ac); }
.tool-card-badge.pro { background: rgba(155, 123, 223, 0.10); color: var(--pro); }

/* Tool modal */
#toolModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px) saturate(120%);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fdi 0.25s ease;
}
#toolModal.open { display: flex; }

.tool-modal-box {
  background: #111a28;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  position: relative;
  animation: fu 0.28s ease both;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 20px 56px var(--overlay-12);
  border: 1px solid var(--overlay-04);
}

.tool-modal-hero { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; font-size: 72px; position: relative; border-radius: 20px 20px 0 0; }

.tool-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--overlay-08);
  border: none;
  color: var(--tx);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}
.tool-modal-close:hover { background: rgba(0, 0, 0, 0.14); }

.tool-modal-body { padding: 20px 22px 24px; }

.tool-modal-tag { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; margin-bottom: 8px; }
.tool-modal-tag.free { background: var(--ac-10); color: var(--ac); }
.tool-modal-tag.pro { background: var(--pro-12); color: var(--pro); }

.tool-modal-title { font-family: 'Instrument Serif', serif; font-size: 26px; color: var(--tx); margin-bottom: 4px; line-height: 1.2; }
.tool-modal-duration { font-size: 12px; color: var(--mu); margin-bottom: 12px; }
.tool-modal-desc { font-size: 13px; color: #4d5b70; line-height: 1.7; margin-bottom: 16px; }

.tool-modal-stats { display: flex; gap: 0; border-top: 1px solid var(--overlay-08); border-bottom: 1px solid var(--overlay-08); padding: 12px 0; margin-bottom: 16px; }
.tool-modal-stat { flex: 1; text-align: center; border-right: 1px solid var(--overlay-08); }
.tool-modal-stat:last-child { border-right: none; }
.tool-modal-stat-num { font-size: 18px; font-weight: 700; color: var(--tx); margin-bottom: 2px; }
.tool-modal-stat-lbl { font-size: 10px; color: var(--mu); text-transform: uppercase; letter-spacing: 0.06em; }

.tool-modal-start {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--tx);
  color: #f5f2ed;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(28, 37, 54, 0.15), 0 4px 12px rgba(28, 37, 54, 0.1);
}
.tool-modal-start:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(28, 37, 54, 0.2), 0 8px 20px rgba(28, 37, 54, 0.12); }


/* ================================================================
   23. FAQ
   ================================================================ */
.faq-item { border: 1px solid var(--bd); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--sf); transition: border-color 0.25s ease, box-shadow 0.25s ease; box-shadow: 0 1px 3px var(--overlay-02); }
.faq-item:hover { border-color: var(--bdhi); }
.faq-q { padding: 14px 18px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--tx); font-weight: 400; user-select: none; }
.faq-q::after { content: '\25BE'; font-size: 9px; color: var(--mu); transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 18px 14px; font-size: 12px; color: var(--mu); line-height: 1.85; }
.faq-item.open .faq-a { display: block; animation: fu 0.2s ease both; }


/* ================================================================
   24. SIDEBAR
   ================================================================ */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: rgba(240, 237, 232, 0.94) !important;
  backdrop-filter: blur(24px) saturate(140%) !important;
  border-right: 1px solid var(--overlay-05) !important;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  z-index: 10;
}

.sb-grp { margin-bottom: 14px; }
.sb-lbl { font-size: 9px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mu) !important; padding: 7px 12px 5px; opacity: 0.5; }

.sb-it {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px !important;
  font-size: 12.5px;
  color: var(--tx2) !important;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.sb-it:hover { color: var(--tx); background: var(--ac-06) !important; }
.sb-it.on { color: var(--ac) !important; background: var(--ac-10) !important; border-color: var(--ac-18) !important; }

.sb-it.sb-pro { color: var(--pro) !important; }
.sb-it.sb-pro.on { background: rgba(155, 123, 223, 0.10) !important; border-color: rgba(155, 123, 223, 0.2) !important; color: var(--pro) !important; }

.sb-ic { width: 18px; text-align: center; font-size: 13px; opacity: 0.5; flex-shrink: 0; }
.sb-it.on .sb-ic { opacity: 0.85; }


/* ================================================================
   25. JOURNEY BAR
   ================================================================ */
.jbar { position: relative; z-index: 49; display: block; background: var(--nav-bg); border-bottom: 1px solid var(--bd); padding: 7px 16px 9px; flex-shrink: 0; }
.jsteps { display: flex; align-items: center; max-width: 560px; margin: 0 auto; }

.jst { display: flex; align-items: center; gap: 6px; flex: 1; cursor: pointer; padding: 3px 5px; border-radius: 6px; transition: all 0.2s; }
.jst:hover { background: var(--sf2); }

.jsn { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; background: var(--sf2); border: 1px solid var(--bd); color: var(--mu); flex-shrink: 0; transition: all 0.25s; }
.jst.active .jsn { background: var(--ac) !important; border-color: var(--ac) !important; color: #fff; }
.jst.done .jsn { background: rgba(74, 171, 148, 0.15); border-color: rgba(74, 171, 148, 0.3); color: var(--ok); }

.jsl { font-size: 11px; color: var(--mu); transition: color 0.2s; white-space: nowrap; }
.jst.active .jsl { color: var(--ac); }
.jst.done .jsl { color: var(--ok); }

.jln { flex: 1; height: 1px; background: var(--bd); margin: 0 2px; min-width: 6px; max-width: 20px; transition: background 0.3s; }
.jln.done { background: rgba(56, 191, 160, 0.35) !important; }


/* ================================================================
   26. STORY MODAL
   ================================================================ */
#storyModal { display: none; position: fixed; inset: 0; z-index: 8000; flex-direction: column; background: var(--bg); }
#storyModal.open { display: flex; }

#storyModalBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(240, 237, 232, 0.94);
  backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--overlay-05);
  flex-shrink: 0;
}
#storyModalBar span { font-family: 'Instrument Serif', serif; font-size: 17px; color: var(--tx); }

#storyModalClose { background: none; border: none; color: rgba(0, 0, 0, 0.4); font-size: 22px; cursor: pointer; padding: 4px 8px; line-height: 1; }
#storyFrame { flex: 1; border: none; width: 100%; background: var(--bg); display: block; }


/* ================================================================
   27. SPLASH SCREEN
   ================================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #0e1520;
  pointer-events: all;
  transition: opacity 0.55s ease;
}
#splash.hidden { opacity: 0; pointer-events: none; }
#splash.done { display: none; }

.sp-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: #1a2540;
  border: 1px solid var(--ac-18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px var(--ac-10);
  animation: spLogoIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  margin-bottom: 20px;
}

.sp-title { font-family: 'Instrument Serif', serif; font-size: 46px; color: #e8edf5; letter-spacing: -0.8px; line-height: 1; animation: spFadeUp 0.8s 0.25s ease both; }
.sp-title span { color: #38bfa0; }
.sp-tagline { margin-top: 20px; text-align: center; line-height: 1.25; animation: spFadeUp 0.8s 0.45s ease both; }
.sp-tag-1 { font-family: 'Instrument Serif', serif; font-size: 22px; color: #d4dce9; letter-spacing: -0.3px; display: block; }
.sp-tag-2 { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 22px; background: linear-gradient(120deg, #38bfa0, #5b8fd9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.3px; display: block; }
.sp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ac); margin-top: 36px; animation: spPulse 1.4s 0.9s ease-in-out infinite both; box-shadow: 0 0 8px rgba(56, 191, 160, 0.4); }


/* ================================================================
   28. AGE GATE
   ================================================================ */
#ageGate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0e1520;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  text-align: center;
  transition: opacity 0.4s ease;
}
#ageGate.done { opacity: 0; pointer-events: none; }

.ag-icon { font-size: 36px; margin-bottom: 20px; line-height: 1; }
.ag-title { font-family: 'Instrument Serif', serif; font-size: 24px; color: var(--tx); margin-bottom: 12px; line-height: 1.3; letter-spacing: -0.01em; }
.ag-body { font-size: 13px; color: var(--mu); line-height: 1.75; max-width: 320px; margin-bottom: 8px; }
.ag-crisis { font-size: 12px; color: rgba(217, 112, 112, 0.85); background: rgba(217, 112, 112, 0.05); border: 1px solid rgba(217, 112, 112, 0.12); border-radius: 12px; padding: 12px 16px; max-width: 320px; margin-bottom: 30px; line-height: 1.65; }
.ag-btn { background: linear-gradient(145deg, #38bfa0, #2ea88c); border: none; border-radius: 14px; padding: 15px 40px; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; color: #fff; cursor: pointer; transition: all 0.25s ease; box-shadow: 0 2px 8px var(--ac-20), 0 6px 20px var(--ac-12); letter-spacing: 0.01em; }
.ag-btn:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 3px 10px var(--ac-25), 0 8px 28px var(--ac-15); }
.ag-sub { font-size: 11px; color: var(--mu); margin-top: 14px; max-width: 280px; line-height: 1.6; }

.ag-body-bold { color: var(--tx); }


/* ================================================================
   29. FLOATING SOS
   ================================================================ */
#sos-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--ac-20);
  color: var(--ac);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px var(--overlay-05), 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body.panel-grounding #sos-fab { display: none !important; }


/* ================================================================
   30. CALMING BACKGROUND BLOCKS
   ================================================================ */
#drift-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; transform: translateZ(0); -webkit-transform: translateZ(0); }

.db { position: absolute; border-radius: 28px; will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; opacity: 0.55 !important; }

.db1 { width: 180px; height: 100px; top: 10%; left: 6%; background: var(--ac-06) !important; border-radius: 24px; animation: drift1 32s ease-in-out infinite; }
.db2 { width: 130px; height: 75px; top: 52%; left: 70%; background: rgba(56, 191, 160, 0.05) !important; border-radius: 20px; animation: drift2 38s ease-in-out infinite; }
.db3 { width: 220px; height: 120px; top: 72%; left: 12%; background: rgba(56, 191, 160,0.05) !important; border-radius: 32px; animation: drift3 45s ease-in-out infinite; }
.db4 { width: 95px; height: 95px; top: 22%; left: 58%; background: rgba(56, 191, 160, 0.06) !important; border-radius: 50%; animation: drift4 28s ease-in-out infinite; }
.db5 { width: 150px; height: 85px; top: 4%; left: 68%; background: var(--ac-04) !important; border-radius: 20px; animation: drift1 36s ease-in-out infinite reverse; }
.db6 { width: 85px; height: 85px; top: 82%; left: 82%; background: rgba(56, 191, 160, 0.04) !important; border-radius: 50%; animation: drift2 30s ease-in-out infinite reverse; }

/* Community badge */
.bio-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #38bfa0; box-shadow: 0 0 6px rgba(56, 191, 160, 0.4); animation: pulse 2s infinite; flex-shrink: 0; }
.bio-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: var(--radius-pill); border: 1px solid var(--ac-25); background: var(--ac-06); font-size: 10px; color: var(--ac); font-weight: 600; letter-spacing: 0.04em; }


/* ================================================================
   31a. GLOBAL TOAST
   ================================================================ */
.global-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sf2, rgba(239,237,235,0.95));
  border: 1px solid var(--bd);
  color: var(--tx);
  font-size: 13px;
  font-weight: 400;
  padding: 10px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 9999;
  pointer-events: none;
  animation: fu 0.3s ease both;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

/* ================================================================
   31b. LIMIT POPUP (daily usage cap)
   ================================================================ */
.limit-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fdi 0.25s ease both;
}
.limit-popup-box {
  background: var(--modal-bg, #111a28);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 30px 28px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.limit-popup-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.limit-popup-msg {
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.7;
  margin-bottom: 18px;
}
.limit-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 24px;
  border-radius: 10px;
  border: none;
  background: var(--ac);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.limit-popup-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ================================================================
   31. ANIMATIONS & KEYFRAMES
   ================================================================ */
@keyframes fu { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fdi { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

@keyframes dp { 0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.25); } }

@keyframes orbPulse { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.35); opacity: 1; } }
@keyframes orbIn { 0% { transform: scale(0.75); opacity: 0.6; } 100% { transform: scale(1.3); opacity: 1; } }
@keyframes orbOut { 0% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(0.75); opacity: 0.6; } }
@keyframes panicRingPulse { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.5); opacity: 0.9; } }

@keyframes drift1 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 33% { transform: translate(45px, -65px) rotate(7deg); } 66% { transform: translate(-35px, 42px) rotate(-5deg); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 33% { transform: translate(-55px, 32px) rotate(-9deg); } 66% { transform: translate(38px, -48px) rotate(6deg); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(28px, -38px) scale(1.07); } }
@keyframes drift4 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 40% { transform: translate(-42px, -22px) rotate(-6deg); } 80% { transform: translate(32px, 28px) rotate(5deg); } }

@keyframes shimmerSlide { 0% { transform: translateX(-100%) skewX(-12deg); } 100% { transform: translateX(220%) skewX(-12deg); } }
@keyframes proGlow { 0%, 100% { box-shadow: 0 0 28px var(--ac-08), 0 4px 24px rgba(0, 0, 0, 0.06); } 50% { box-shadow: 0 0 44px rgba(56, 191, 160, 0.10), 0 4px 24px rgba(0, 0, 0, 0.06); } }
@keyframes proFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

@keyframes spLogoIn { from { opacity: 0; transform: scale(0.6) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes spFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spPulse { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.4); } }

@keyframes wlPulse { 0%, 100% { opacity: 0.4; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes wlDot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }


/* ================================================================
   32. SCROLLBAR GLOBAL
   ================================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--overlay-08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.14); }


/* ================================================================
   33. RESPONSIVE — Tablet (<=768px)
   ================================================================ */
@media (max-width: 768px) {
  .sidebar { width: 54px; padding: 12px 5px; }
  .sb-lbl { display: none; }
  .sb-it { padding: 9px; justify-content: center; font-size: 0; gap: 0; }
  .sb-ic { font-size: 16px; width: auto; opacity: 0.7; }
  .sb-it.on .sb-ic { opacity: 1; }
  .panel { padding: 20px 16px 80px; }
  .sp-main .panel { padding: 14px 14px 100px; }
  .shelf-scroll { grid-template-columns: repeat(2, 1fr); }
  .bento-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .bento-hero { grid-column: 1 / -1; min-height: 170px; }
  .bento-sos  { grid-column: 1 / -1; }
  .bento-grid-2 { gap: 9px; }
  .bento-grid-pro { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .bento-pro-hero { grid-column: 1 / -1; min-height: 170px; }
  .bento-pro-tall { min-height: 130px; }
  .bento-pro-wide { grid-column: 1 / -1; }
}


/* ================================================================
   34. RESPONSIVE — Mobile (<=480px)
   ================================================================ */
@media (max-width: 480px) {
  /* Hide desktop sidebar */
  .sidebar { display: none !important; }
  #sos-fab { display: none !important; }

  /* Top nav */
  .topnav { padding: 8px 12px; gap: 6px; }
  .logo { font-size: 15px; }
  .logo-icon { width: 26px !important; height: 26px !important; border-radius: 7px !important; }
  .logo-icon svg { width: 14px; height: 14px; }
  .nav-center { position: static; transform: none; flex: 1; justify-content: center; }
  nav.topnav { justify-content: space-between; gap: 4px; }
  .nav-home { display: none !important; }
  .nav-home + span { display: none !important; }
  .nav-signin { font-size: 11px; padding: 4px 6px; }
  .nav-getstarted { font-size: 11px; padding: 5px 12px; }
  .nav-signout { font-size: 11px; padding: 4px 6px; }
  #nav-right-in { gap: 0; }
  .navu { padding: 3px 8px 3px 4px; }
  .navu span { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

  /* Journey bar */
  .jbar { padding: 5px 12px 7px; }
  .jsteps { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .jsl { display: none; }
  .jsn { width: 18px; height: 18px; font-size: 9px; }

  /* Panels */
  .panel { padding: 14px 12px 96px; }
  .inner { gap: 10px; }

  /* Cards */
  .card { padding: 16px 15px; border-radius: 14px; }
  .card h2 { font-size: 17px; }
  .cdesc { font-size: 11.5px; }

  /* Forms */
  .irow { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px !important; }

  /* Bottom nav */
  #mob-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(10, 16, 26, 0.96);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -1px 0 var(--overlay-03), 0 -6px 24px var(--overlay-05);
    padding: 8px 4px max(20px, env(safe-area-inset-bottom)) 4px;
    overflow: visible;
    gap: 0;
    align-items: flex-start;
    justify-content: space-around;
  }

  .mbn-it {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px 4px 5px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.32);
    transition: color 0.22s, background 0.22s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    min-width: 0;
    position: relative;
  }
  .mbn-it.active { color: var(--ac); background: var(--ac-10); }
  .mbn-it.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--ac), #38bfa0);
    box-shadow: 0 0 6px rgba(56, 191, 160,0.3);
  }
  .mbn-it:active { transform: scale(0.9); opacity: 0.8; }

  .mbn-ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; line-height: 1; }
  .mbn-ic svg { width: 21px; height: 21px; transition: filter 0.22s, stroke 0.22s; }
  .mbn-it.active .mbn-ic svg { filter: drop-shadow(0 0 5px rgba(56, 191, 160, 0.5)); }
  .mbn-lb { font-size: 10px; letter-spacing: 0.01em; text-transform: uppercase; font-weight: 500; white-space: nowrap; line-height: 1; }

  /* SOS accent */
  .mbn-sos { color: rgba(217, 112, 112, 0.5); }
  .mbn-sos.active { color: #d97070; background: rgba(217, 112, 112, 0.1); }
  .mbn-sos.active::before { background: linear-gradient(90deg, #d97070, #d9914a); box-shadow: 0 0 8px rgba(217, 112, 112, 0.5); }
  .mbn-sos.active .mbn-ic svg { filter: drop-shadow(0 0 5px rgba(217, 112, 112, 0.5)); }

  /* Story accent */
  .mbn-story { color: rgba(155, 123, 223, 0.5); }
  .mbn-story.active { color: var(--pro); background: rgba(155, 123, 223, 0.1); }
  .mbn-story.active::before { background: linear-gradient(90deg, var(--pro), var(--ac)); box-shadow: 0 0 6px rgba(155, 123, 223, 0.3); }

  /* Pro accent */
  .mbn-pro { color: rgba(212, 168, 67, 0.6); }
  .mbn-pro.active { color: #d4a843; background: rgba(212, 168, 67, 0.08); }
  .mbn-pro.active::before { background: linear-gradient(90deg, #d4a843, #c99538); box-shadow: 0 0 6px rgba(212, 168, 67, 0.3); }
  .mbn-pro.active .mbn-ic svg { filter: drop-shadow(0 0 5px rgba(212, 168, 67, 0.3)); }

  /* Home */
  .home-greeting { font-size: var(--text-xl); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .shelf-scroll { grid-template-columns: repeat(2, 1fr); }
  .shelf-scroll.three-col { grid-template-columns: repeat(1, 1fr); }
  .wrapped-card { flex-direction: column; text-align: center; }
  .wrapped-emoji { font-size: 38px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-hero { grid-column: 1 / -1; min-height: 170px; }
  .bento-sos  { grid-column: 1 / -1; flex-direction: column; align-items: flex-start; gap: 10px; }
  .bento-sos-cta { padding-left: 0; }
  .bento-grid-pro { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bento-pro-hero { grid-column: 1 / -1; min-height: 160px; }
  .bento-pro-sm   { min-height: 110px; }
  .bento-pro-wide { flex-direction: column; align-items: flex-start; gap: 10px; min-height: auto; padding: 16px; }
  .bento-pro-wide .bento-badge { margin-top: 4px; }
  .qa-grid { grid-template-columns: 1fr; }
  .qa-card { flex-direction: row; align-items: center; padding: 16px; }
  .qa-arrow { display: none; }

  #sos-fab { bottom: 16px; right: 16px; width: 46px; height: 46px; font-size: 16px; }
}


/* ================================================================
   35. PERFORMANCE & ACCESSIBILITY
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  #drift-bg .db { animation: none !important; }
  .panel.on { animation: none !important; }
}

:focus-visible {
  outline: 2px solid var(--ac) !important;
  outline-offset: 2px !important;
  border-radius: 4px !important;
}

.panel, .main-wrap, .chat-msgs {
  -webkit-overflow-scrolling: touch;
}


/* ================================================================
   36. iOS NATIVE ADJUSTMENTS
   ================================================================ */
.ios-native .topnav {
  padding-top: calc(10px + env(safe-area-inset-top)) !important;
}

.ios-native #mob-nav {
  padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
}

/* Prevent text selection in native app */
.ios-native * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Re-enable selection for inputs */
.ios-native input,
.ios-native textarea,
.ios-native [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}


/* ================================================================
   37. V2 HTML — CLASS REPLACEMENTS FOR INLINE STYLES
   These classes replace inline style="" attributes from the
   monolithic app.html so the v2 HTML stays clean.
   ================================================================ */

/* ── Age Gate ── */
.age-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: #0e1520;
  display: none; /* JS shows after splash */
  flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 28px; text-align: center;
  transition: opacity 0.4s ease;
}
.age-gate.done { opacity: 0; pointer-events: none; }

/* ── Nav layout helpers ── */
.nav-out-group { display: flex; align-items: center; gap: 8px; }
.nav-in-group { display: none; align-items: center; gap: 10px; }
.nav-separator { color: var(--bd); font-size: 14px; padding: 0 2px; }
.nav-right-slot { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.nav-right-in-group { display: none; align-items: center; gap: 2px; }

/* ── Home panel inner (wider max-width) ── */
.inner-home { max-width: 1100px; }

/* ── Home section grouping ── */
.home-section { margin-bottom: var(--sp-6); }
.home-section-eyebrow {
  font-size: var(--text-2xs); font-weight: 600; letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--mu); margin-bottom: var(--sp-3);
}

/* ── Intent shortcuts ── */
.intent-label { font-size: var(--text-2xs); font-weight: 600; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--mu); margin-bottom: var(--sp-3); margin-top: var(--sp-2); }
.intent-grid { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: 0; }
.intent-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.10); border-radius: 100px;
  padding: 10px 18px; font-family: 'DM Sans', sans-serif; font-size: 13px;
  font-weight: 500; color: var(--tx); cursor: pointer; transition: all 0.2s ease;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.18);
}
.intent-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); box-shadow: 0 2px 8px rgba(0,0,0,0.28); }
.intent-btn:active { transform: scale(0.97); }

/* ── Quick access grid ── */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin: 0; }
.qa-card { border-radius: 20px; padding: 24px 22px 20px; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; gap: 12px; }
.qa-card-forecast {
  background: linear-gradient(150deg, rgba(18, 30, 50, 0.85) 0%, rgba(25, 70, 80, 0.60) 100%);
  border: 1px solid rgba(56, 191, 160, 0.14);
  box-shadow: 0 1px 3px rgba(0,0,0,0.28), 0 6px 24px rgba(56,191,160,0.08);
}
.qa-card-forecast:hover { box-shadow: 0 4px 12px rgba(56,191,160,0.16), 0 12px 36px rgba(56,191,160,0.12); transform: translateY(-2px); }
.qa-card-checkin { background: linear-gradient(150deg, rgba(18, 28, 50, 0.85) 0%, rgba(50, 30, 70, 0.55) 100%); border: 1px solid rgba(155,123,223,0.14); box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 6px 24px rgba(155,123,223,0.08); }
.qa-card-checkin:hover { box-shadow: 0 4px 12px rgba(155,123,223,0.16), 0 12px 36px rgba(155,123,223,0.12); transform: translateY(-2px); }
.qa-accent { height: 3px; border-radius: 2px; width: 28px; margin-bottom: 2px; }
.qa-accent-forecast { background: linear-gradient(90deg, var(--ac), #38bfa0); }
.qa-accent-checkin { background: linear-gradient(90deg, #38bfa0, var(--ac)); }
.qa-name { font-family: 'Instrument Serif', serif; font-size: 19px; color: var(--tx); margin-bottom: 2px; line-height: 1.2; }
.qa-name-forecast { background: linear-gradient(120deg, #5b9ee8, #38bfa0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.qa-desc { font-size: 12px; color: var(--mu); line-height: 1.5; }
.qa-arrow { font-size: 11px; font-weight: 500; letter-spacing: .04em; margin-top: auto; }
.qa-arrow-forecast { color: var(--ac); }
.qa-arrow-checkin { color: #38bfa0; }

/* ── Tool card art labels ── */
.tool-card-art-label {
  font-family: 'Instrument Serif', serif; font-size: 16px;
  color: rgba(232, 237, 245, 0.45); letter-spacing: .03em; font-style: italic;
}

/* ── Tool card art gradients ── */
.tool-card-art-breathing { background: linear-gradient(150deg, #1a2e44, #1e4a42, #1a3840); }
.tool-card-art-reframe { background: linear-gradient(150deg, #1e2640, #2e2244, #281e3c); }
.tool-card-art-worry { background: linear-gradient(150deg, #1a2e44, #1e3a34, #1a3030); }
.tool-card-art-panic { background: linear-gradient(150deg, #2a1e2a, #3a2028, #2e1c24); }
.tool-card-art-grounding { background: linear-gradient(150deg, #1a2e44, #1c3c34, #183430); }
.tool-card-art-chat { background: linear-gradient(150deg, #1a2e44, #1e2e48, #1c2c44); }
.tool-card-art-somatic { background: linear-gradient(150deg, #221e38, #2a1e3c, #261838); }
.tool-card-art-cbt { background: linear-gradient(150deg, #1e2640, #2a2434, #24202e); }
.tool-card-art-affirmations { background: linear-gradient(150deg, #1e1e38, #2c1e36, #281830); }
.tool-card-art-exp { background: linear-gradient(150deg, #1a2e44, #1e3834, #1a302e); }

/* ── Home Pro banner ── */
.home-pro-banner { display: none; margin-bottom: 44px; }
.home-pro-banner-inner {
  background: #1c1e2e;
  border: 1px solid var(--pro-25);
  border-radius: 20px; padding: 24px 26px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; transition: all 0.3s ease;
  box-shadow: 0 4px 24px var(--overlay-18), 0 1px 4px var(--overlay-12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.home-pro-banner-inner:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.home-pro-banner-left { display: flex; align-items: center; gap: 16px; }
.home-pro-banner-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(155, 123, 223, 0.20);
  border: 1px solid rgba(155, 123, 223, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.home-pro-banner-title { font-family: 'Instrument Serif', serif; font-size: 18px; color: #f0eef8; margin-bottom: 3px; }
.home-pro-banner-desc { font-size: 12px; color: rgba(200, 190, 220, 0.7); line-height: 1.5; }
.home-pro-banner-cta { font-size: 12px; color: #c4a8f0; font-weight: 600; flex-shrink: 0; letter-spacing: 0.02em; }

/* ── Forecast hero card ── */
.card-hero-forecast {
  padding: 28px 28px 24px !important;
  background: linear-gradient(145deg, var(--ac-06), rgba(56, 191, 160, 0.04), rgba(56, 191, 160,0.03)) !important;
  border-color: var(--ac-15) !important;
  box-shadow: 0 4px 24px var(--ac-08) !important;
}
.forecast-hero-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.forecast-hero-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.forecast-hero-label-text { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ac); font-weight: 700; }
.forecast-hero-badge { background: var(--ac-10); border: 1px solid var(--ac-20); border-radius: 20px; padding: 1px 8px; font-size: 9px; color: var(--ac); letter-spacing: .06em; }
.forecast-hero-title { font-family: 'Instrument Serif', serif; font-size: 23px; line-height: 1.25; color: var(--tx); margin-bottom: 6px; letter-spacing: -0.01em; }
.forecast-hero-desc { font-size: 12px; color: var(--mu); line-height: 1.6; }
.forecast-sos-btn { flex-shrink: 0; font-size: 11px; background: var(--ac-08); border-color: var(--ac-20); color: var(--ac); border-radius: 999px; padding: 6px 14px; }
.forecast-timeline-section { margin-bottom: 6px; }
.forecast-timeline-label { font-size: 10px; color: var(--mu); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.forecast-timeline-bars { display: flex; gap: 5px; align-items: flex-end; height: 48px; }
.forecast-risk-label { font-size: 11px; color: var(--mu); margin-top: 8px; text-align: center; line-height: 1.5; }
.forecast-pattern-profile { display: none; margin-top: 14px; padding: 10px 12px; background: rgba(56, 191, 160,0.05); border: 1px solid var(--ac-12); border-radius: 8px; }
.forecast-pattern-label { font-size: 9px; color: var(--ac); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 6px; }
.forecast-pattern-body { font-size: 11px; color: var(--tx2); line-height: 1.7; }

/* ── Forecast output header ── */
.forecast-output-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.forecast-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--mu); }
.forecast-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.forecast-dot-high { background: #d97070; }
.forecast-dot-med { background: #d4a843; margin-left: 4px; }
.forecast-dot-low { background: var(--ac); margin-left: 4px; }

/* ── Add event form layout ── */
.irow-event { align-items: flex-end; }
.fg-event-name { margin: 0; flex: 2; }
.fg-event-date { margin: 0; flex: 1; }
.fg-event-actions { flex-shrink: 0; padding-bottom: 1px; }
.schip-hidden { display: none; }

/* ── Anxiety slider section ── */
.anxiety-slider-section { margin-top: 12px; }
.fl-anxiety-level { display: flex; align-items: center; justify-content: space-between; }
.anxiety-val-display { font-size: 13px; font-weight: 600; color: var(--ac); }
.anxiety-range { width: 100%; margin-top: 6px; cursor: pointer; }
.anxiety-range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--mu); margin-top: 2px; }
.anxiety-range-labels-5 { padding: 0 2px; pointer-events: none; user-select: none; }
.anxiety-peak-preview { font-size: 11px; color: var(--ac); margin-top: 5px; font-weight: 500; min-height: 16px; }

/* ── Baseline note ── */
.ci-baseline-note {
  display: none; font-size: 11px; color: var(--ac);
  background: var(--ac-06); border: 1px solid var(--ac-15);
  border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; line-height: 1.5;
}

/* ── Empty state ── */
.empty-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.empty-desc { font-size: 12px; color: var(--mu); }
.ei { font-size: 28px; margin-bottom: 10px; }

/* ── Glance strip ── */
.glance-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card-glance { padding: 14px 12px; text-align: center; margin: 0; }
.glance-label { font-size: 10px; color: var(--mu); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; }
.glance-value { font-size: 20px; font-weight: 700; color: var(--ac); }
.glance-value-tx { color: var(--tx); }
.glance-value-pro { color: var(--pro); }
.glance-sub { font-size: 10px; color: var(--mu); }

/* ── AI insight strip ── */
.ai-insight-strip { display: none; gap: 8px; }

/* ── Persona circle card ── */
.persona-circle-card { display: none; }

/* ── Reflection ── */
.rep-notes { height: 74px; }
.journey-complete { text-align: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bd); }
.journey-complete-msg { font-size: 12px; color: var(--mu); margin-bottom: 10px; }

/* ── History card ── */
#histC { display: none; }

/* ── Pro hero layout helpers ── */
.pro-hero-badge-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pro-hero-subtitle { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); opacity: 0.8; }
.pro-hero-headline { font-family: 'Instrument Serif', serif; font-size: 25px; line-height: 1.25; color: var(--tx); margin-bottom: 10px; font-weight: 400; letter-spacing: -0.01em; }
.pro-hero-desc { font-size: 13px; color: var(--mu); line-height: 1.7; margin-bottom: 20px; }
.pro-trial-banner {
  display: none; background: linear-gradient(135deg, var(--ac-08), rgba(56, 191, 160, 0.05));
  border: 1px solid var(--ac-18); border-radius: 10px;
  padding: 10px 13px; margin-bottom: 14px; font-size: 12px; color: var(--ac); line-height: 1.6;
}
.pro-yearly-note { font-size: 11px; color: var(--mu); margin-bottom: 12px; display: none; }
.po-save-badge { font-size: 9px; background: rgba(74, 171, 148, 0.13); color: rgba(74, 171, 148, 0.85); padding: 1px 5px; border-radius: 8px; margin-left: 3px; }

/* ── PayPal ── */
.paypal-container { margin: 0 0 4px; }
.paypal-fallback-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; background: #0070ba; color: #fff; border-radius: 999px;
  text-decoration: none; font-family: 'DM Sans', sans-serif; font-size: 14px;
  font-weight: 500; margin-bottom: 8px; transition: background 0.2s;
}
.paypal-fallback-btn:hover { background: #005ea6; }
.paypal-fallback-btn svg { flex-shrink: 0; }

/* ── iOS Pro notice ── */
.ios-pro-notice {
  display: none; padding: 14px 16px;
  background: var(--ac-06); border: 1px solid var(--ac-15);
  border-radius: 14px; font-size: 13px; color: var(--tx); line-height: 1.6; text-align: center;
}
.ios-pro-notice-sub { font-size: 11px; color: var(--mu); }

/* ── IAP buttons ── */
.pro-payment-ios { display: none; }
.iap-purchase-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 20px; background: #000000; color: #ffffff;
  border: none; border-radius: 999px; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.25s ease; letter-spacing: 0.01em;
  -webkit-appearance: none; appearance: none;
}
/* Prevent iOS WebKit from dimming disabled button to near-invisible grey (Guideline 4 contrast) */
.iap-purchase-btn:disabled {
  opacity: 1 !important; -webkit-opacity: 1 !important;
  background: #333333 !important;
  color: #ffffff !important;
  cursor: wait;
}
/* Subscription disclosure (App Store Guideline 3.1.2c) */
.iap-disclosure {
  font-size: 10px; color: var(--mu); line-height: 1.6;
  text-align: center; margin: 4px 0 10px; padding: 0 4px;
}
/* Restore Purchases button (App Store Guideline 3.1.1) */
.iap-restore-btn {
  display: block; width: 100%; margin-top: 8px; padding: 10px 16px;
  background: none; border: 1px solid var(--bd); border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--tx2); cursor: pointer; transition: all 0.25s ease;
}
.iap-restore-btn:hover { border-color: var(--bdhi); color: var(--tx); }
.iap-status { display: none; padding: 10px 14px; border-radius: 12px; font-size: 12px; text-align: center; margin-bottom: 10px; }

/* ── Pro unlocked ── */
.pro-unlocked { display: none; }
.unb-icon { font-size: 16px; }
.unb-title { font-weight: 600; margin-bottom: 2px; }
.unb-desc { font-size: 11px; opacity: 0.75; }

/* ── Pro insights ── */
.pro-insights-section { display: none; }
.pro-insights-label { margin-bottom: 12px; padding-left: 2px; }
.pro-insight-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pro-insight-output { margin-top: 10px; }
.btn-full { width: 100%; font-size: 12px; }

/* ── Chat header ── */
.card-chat { padding: 20px 20px 16px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.chat-header-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, #7c9ef0, var(--pro));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 158, 240, 0.2), 0 6px 20px rgba(155, 123, 223, 0.15); flex-shrink: 0;
}
.chat-header-title { font-size: 16px; font-weight: 700; color: var(--tx); line-height: 1.2; }
.chat-header-sub { font-size: 11px; font-weight: 400; color: var(--mu); text-transform: uppercase; letter-spacing: .08em; }
.chat-header-methods { font-size: 11px; color: var(--ac); opacity: 0.8; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.chat-header-status { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 11px; color: #38bfa0; font-weight: 600; }
.chat-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #38bfa0; display: inline-block; animation: pulse 2s infinite; }

/* ── Check-in ── */
.ci-label-anxiety { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ci-anx-display { font-size: 13px; font-weight: 700; color: var(--mu); transition: color 0.3s, text-shadow 0.3s; }
.ci-slider-wrap { padding: 2px 0 4px; }
.ci-notes-section { }
.ci-notes { height: 72px; width: 100%; resize: none; }
.checkin-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.checkin-save { width: 100%; }
.ci-toggle-btn { background: transparent !important; border: none !important; box-shadow: none !important; color: rgba(255,255,255,0.35) !important; font-size: 13px !important; font-weight: 500 !important; padding: 6px !important; text-align: center; cursor: pointer; }
.ci-toggle-btn:hover { color: rgba(255,255,255,0.60) !important; }
#ciEveFields { display: none; }
#timelineCard { display: none; }
#ciHistCard { display: none; }

/* ── Learn panel ── */
.card-learn-hero { text-align: center; padding: 36px 30px; }
.learn-headline { font-size: 30px; margin-bottom: 12px; letter-spacing: -0.02em; line-height: 1.2; }
.learn-headline em { font-family: 'Instrument Serif', serif; color: var(--ac); font-style: italic; }
.cdesc-center { text-align: center; max-width: 480px; margin: 0 auto 24px; }
.learn-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.learn-stat-card { padding: 20px; border: 1px solid var(--bd); border-radius: 14px; background: var(--sf); }
.learn-stat-num { font-family: 'Instrument Serif', serif; font-size: 36px; color: var(--ac); line-height: 1; }
.learn-stat-desc { font-size: 11px; color: var(--mu); margin-top: 4px; }
.learn-body { font-size: 13px; color: var(--tx2); line-height: 1.9; margin-bottom: 14px; }
.learn-body:last-child { margin-bottom: 0; }
.learn-signs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.learn-sign-card { padding: 14px 16px; border: 1px solid var(--bd); border-radius: 12px; background: var(--sf); }
.learn-sign-name { font-size: 13px; color: var(--tx); margin-bottom: 3px; }
.learn-sign-desc { font-size: 11px; color: var(--mu); line-height: 1.55; }

/* ── Auth modal helpers ── */
#mAuth { display: none; }
#mVerify { display: none; }
#mPay { display: none; }
.mb-center { text-align: center; }
.verify-icon { font-size: 36px; margin-bottom: 12px; }
.fg-hidden { display: none; }
#cg { display: none; }

/* ── Payment modal ── */
.pymb-desc { font-size: 12px; color: var(--mu); margin-bottom: 14px; line-height: 1.5; }
.pysum-right { text-align: right; }
.paypal-modal-container { margin: 14px 0 10px; }
.paypal-status { display: none; padding: 10px 14px; border-radius: 12px; font-size: 12px; text-align: center; margin-bottom: 10px; }
.modal-pay-ios { display: none; margin-top: 14px; }

/* ── Onboarding ── */
#onboardOverlay { display: none; }

/* ── Welcome overlay ── */
#wlOverlay { display: none; }
.wl-full-btn { width: 100%; }
.wl-btn-disabled { opacity: 0.4; pointer-events: none; }
.wl-step-hidden { display: none; }
.wl-step-analyzing { padding: 10px 0; }
.wl-opt-wide { grid-column: span 2; }
.wl-opts-single { grid-template-columns: 1fr; }

/* ── Verify banner ── */
#vbn { display: none; }

/* ── Forecast button ── */
#fnBtn { display: none; margin-top: 10px; }

/* ── SOS fab hover (extends #sos-fab from section 29) ── */
#sos-fab:hover {
  transform: scale(1.1);
  border-color: rgba(56, 191, 160,0.5);
  box-shadow: 0 4px 20px var(--ac-15);
}

/* ── Responsive overrides for new classes ── */
@media (max-width: 768px) {
  .qa-grid { gap: 10px; }
}

@media (max-width: 480px) {
  .qa-grid { grid-template-columns: 1fr; }
  .qa-card { flex-direction: row; align-items: center; padding: 16px; }
  .qa-arrow { display: none; }
  .learn-stats-grid { grid-template-columns: 1fr; }
  .learn-signs-grid { grid-template-columns: 1fr; }
}
