/* ============================================
   SACRED FLOW — Boho spiritual juice cleanse app
   Palette: sun-baked terracotta, sage, moon-milk cream, gold
   ============================================ */

:root,
[data-theme='light'] {
  /* Surfaces — cream, oat, dusk */
  --color-bg: #f5ede1;
  --color-surface: #fbf5e9;
  --color-surface-2: #f2e7d3;
  --color-surface-offset: #ebdcc1;
  --color-surface-offset-2: #e4d1ae;
  --color-divider: #d9c3a1;
  --color-border: #c8ac82;

  /* Text — cacao, walnut */
  --color-text: #3a2a1a;
  --color-text-muted: #7a5a3f;
  --color-text-faint: #b39876;
  --color-text-inverse: #fbf5e9;

  /* Primary — sage green (plant medicine) */
  --color-primary: #6b8e5a;
  --color-primary-hover: #557148;
  --color-primary-active: #3f5535;
  --color-primary-highlight: #d7e0c8;

  /* Terracotta accent (sun, ceremony) */
  --color-accent: #b6552e;
  --color-accent-hover: #984222;
  --color-accent-highlight: #eecdb9;

  /* Gold (halo, warmth) */
  --color-gold: #c99a3d;
  --color-gold-hover: #a97e28;
  --color-gold-highlight: #efdcae;

  /* Plum (root chakra depth) */
  --color-plum: #6d3a55;
  --color-plum-highlight: #dcc3ce;

  /* Guru swatches */
  --guru-skin: #d9b184;
  --guru-skin-line: #b08757;
  --guru-hair: #2b1c11;
  --guru-robe: #b6552e;
  --guru-robe-fold: #8a3d1e;
  --guru-line: #3a2a1a;
  --guru-beard-line: #6b563f;

  --radius-sm: 0.5rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(58, 42, 26, 0.08);
  --shadow-md: 0 8px 24px rgba(58, 42, 26, 0.1);
  --shadow-lg: 0 24px 60px rgba(58, 42, 26, 0.18);

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-script: 'Caveat', cursive;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

[data-theme='dark'] {
  --color-bg: #150e08;
  --color-surface: #221912;
  --color-surface-2: #2b2118;
  --color-surface-offset: #322619;
  --color-surface-offset-2: #3d2e1e;
  --color-divider: #4a3826;
  --color-border: #5a4530;

  --color-text: #ecdcc0;
  --color-text-muted: #b09472;
  --color-text-faint: #75593a;
  --color-text-inverse: #1a130c;

  --color-primary: #a3c184;
  --color-primary-hover: #b8d199;
  --color-primary-active: #c9dbaf;
  --color-primary-highlight: #3f4a2f;

  --color-accent: #e08561;
  --color-accent-hover: #f09772;
  --color-accent-highlight: #4a2b1c;

  --color-gold: #e8c26a;
  --color-gold-hover: #f2d287;
  --color-gold-highlight: #4a3818;

  --color-plum: #b98194;
  --color-plum-highlight: #4a2c39;

  --guru-skin: #c9a67a;
  --guru-skin-line: #9a7a4f;
  --guru-hair: #1a0f06;
  --guru-robe: #e08561;
  --guru-robe-fold: #b05a38;
  --guru-line: #2a1c0e;
  --guru-beard-line: #55432e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] body {
  background-image:
    radial-gradient(circle at 15% 8%, rgba(232, 194, 106, 0.10), transparent 42%),
    radial-gradient(circle at 85% 92%, rgba(163, 193, 132, 0.08), transparent 45%),
    radial-gradient(circle at 50% 45%, rgba(224, 133, 97, 0.05), transparent 60%),
    radial-gradient(circle at 70% 20%, rgba(185, 129, 148, 0.05), transparent 40%);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201, 154, 61, 0.14), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(107, 142, 90, 0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(182, 85, 46, 0.06), transparent 60%);
  overflow-x: hidden;
  position: relative;
}

img, svg { display: block; max-width: 100%; }

button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
}

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

::selection {
  background: var(--color-gold-highlight);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

[hidden] { display: none !important; }

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

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sun-mandala {
  position: absolute;
  top: -220px;
  right: -220px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0deg, rgba(201, 154, 61, 0.18) 8deg, transparent 16deg,
                            transparent 22deg, rgba(201, 154, 61, 0.18) 30deg, transparent 38deg,
                            transparent 44deg, rgba(201, 154, 61, 0.14) 52deg, transparent 60deg,
                            transparent 68deg, rgba(201, 154, 61, 0.16) 76deg, transparent 84deg);
  mask: radial-gradient(circle, transparent 100px, black 130px, black 260px, transparent 300px);
  animation: sunSpin 120s linear infinite;
  opacity: 0.9;
}

@keyframes sunSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.floating-glyph {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(107, 142, 90, 0.25);
  animation: drift 24s ease-in-out infinite;
}

.floating-glyph::before,
.floating-glyph::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(201, 154, 61, 0.2);
}
.floating-glyph::after {
  inset: 18px;
  border-color: rgba(182, 85, 46, 0.15);
}

.glyph-1 { top: 20%; left: -60px; width: 200px; height: 200px; animation-delay: 0s; }
.glyph-2 { bottom: 10%; right: 20%; width: 140px; height: 140px; animation-delay: -8s; }
.glyph-3 { top: 60%; left: 40%; width: 90px; height: 90px; animation-delay: -14s; opacity: 0.6; }

/* Sacred geometry — flower & seed of life, slowly drifting */
.geometry {
  position: absolute;
  color: var(--color-accent);
  opacity: 0.08;
}
[data-theme='dark'] .geometry { opacity: 0.07; color: var(--color-gold); }

.flower-of-life {
  bottom: -140px;
  left: -120px;
  width: 520px;
  height: 520px;
  animation: geoDrift 90s ease-in-out infinite;
}

.seed-of-life {
  top: 8%;
  right: 6%;
  width: 300px;
  height: 300px;
  color: var(--color-primary);
  animation: geoDrift 70s ease-in-out infinite reverse;
}

@keyframes geoDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(24px, -18px) rotate(14deg); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -20px) rotate(180deg); }
}

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) clamp(var(--space-5), 5vw, var(--space-12));
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-accent);
}

.brand svg { transition: transform var(--transition-interactive); }
.brand:hover svg { transform: rotate(30deg); }

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: var(--font-script);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.day-picker {
  display: inline-flex;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.day-chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
}

.day-chip:hover { color: var(--color-text); }

.day-chip.active {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-interactive);
}
.icon-btn:hover {
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* ============================================
   LAYOUT
   ============================================ */

.layout {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) clamp(var(--space-5), 5vw, var(--space-12)) var(--space-16);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   INTRO / HERO
   ============================================ */

.intro {
  padding: var(--space-6) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.intro::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-gold-highlight), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.eyebrow {
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
  line-height: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 1rem + 2.7vw, 3rem);
  line-height: 1.06;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.hero-title::first-letter {
  font-style: italic;
  font-weight: 500;
  font-size: 1.32em;
  color: var(--color-accent);
  line-height: 0.9;
}

.hero-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 52ch;
}

/* Intro is a two-column altar: words left, lotus right */
.intro {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  justify-content: space-between;
}

.intro-text { min-width: 0; }

@media (max-width: 640px) {
  .intro { flex-direction: column; align-items: flex-start; }
  .lotus-progress { align-self: center; }
}

/* ---- Lotus progress: 6 petals, one blooms per phase ---- */
.lotus-progress {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.lotus-petal {
  fill: var(--color-surface-offset);
  stroke: var(--color-border);
  stroke-width: 1;
  transition: fill 700ms cubic-bezier(0.16, 1, 0.3, 1), stroke 700ms ease, filter 700ms ease;
}

.lotus-petal.bloomed {
  fill: var(--color-gold);
  stroke: var(--color-gold-hover);
  filter: drop-shadow(0 0 5px rgba(201, 154, 61, 0.55));
}

[data-theme='dark'] .lotus-petal { fill: var(--color-surface-offset); }
[data-theme='dark'] .lotus-petal.bloomed { fill: var(--color-gold); }

.lotus-vein {
  fill: none;
  stroke: var(--color-text-faint);
  stroke-width: 0.6;
  opacity: 0.55;
  pointer-events: none;
}

.lotus-heart {
  fill: var(--color-accent);
  opacity: 0.85;
}

.lotus-water {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1;
  opacity: 0.5;
  stroke-linecap: round;
}
.lotus-water.faint { opacity: 0.25; }

.progress-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: var(--font-script);
  font-size: 1.05rem;
}

/* ---- Moon chip ---- */
.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 4px 14px 4px 8px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
  color: var(--color-plum);
  background: var(--color-surface-2);
  font-family: var(--font-script);
  font-size: 1rem;
  transition: all var(--transition-interactive);
}

.moon-chip.full {
  border-color: var(--color-gold);
  color: var(--color-gold-hover);
  box-shadow: 0 0 18px rgba(201, 154, 61, 0.3);
}

[data-theme='dark'] .moon-chip { color: var(--color-plum); }
[data-theme='dark'] .moon-chip.full { color: var(--color-gold); }

/* ============================================
   PHASES / RITUAL CARDS
   ============================================ */

.phases {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.phase {
  position: relative;
  padding: var(--space-5) var(--space-6);
  padding-left: calc(var(--space-6) + 46px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-interactive);
  overflow: hidden;
}

.phase:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold);
}

.phase.done {
  background: linear-gradient(135deg, var(--color-primary-highlight), var(--color-surface));
  border-color: var(--color-primary);
}

.phase.done .phase-title {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.phase-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
}

.phase.done .phase-icon {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.phase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.phase-kind {
  font-family: var(--font-script);
  font-size: 1.05rem;
  color: var(--color-accent);
  line-height: 1;
}

.phase-time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.phase-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 2px 0;
  transition: color var(--transition-interactive);
}

.phase-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.phase-tags {
  display: flex;
  gap: 6px;
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

.phase-tag {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-divider);
  letter-spacing: 0.03em;
}

.phase-tag.fasted { color: var(--color-plum); border-color: var(--color-plum-highlight); background: var(--color-plum-highlight); }
.phase-tag.juice { color: var(--color-primary); border-color: var(--color-primary-highlight); background: var(--color-primary-highlight); }

/* ============================================
   CLOSING
   ============================================ */

.closing {
  margin-top: var(--space-10);
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.closing-flourish {
  margin: 0 auto var(--space-4);
  color: var(--color-gold);
  opacity: 0.8;
}

.closing-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.reset-btn {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  transition: all var(--transition-interactive);
}
.reset-btn:hover {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ============================================
   SIDE PANEL
   ============================================ */

.side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: var(--space-4);
}

@media (max-width: 960px) {
  .side { position: static; }
}

.side-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.side-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.15;
}

.body-clock {
  margin: var(--space-3) auto;
  max-width: 220px;
  color: var(--color-primary);
}

.stat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stat-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
}

.stat-list li div { display: flex; flex-direction: column; gap: 2px; }
.stat-list li strong { color: var(--color-text); font-weight: 600; font-size: 0.95rem; }
.stat-list li em {
  font-family: var(--font-script);
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.3;
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  margin-top: 8px;
  box-shadow: 0 0 12px var(--color-gold);
  flex-shrink: 0;
}

.mantra-card {
  background: linear-gradient(135deg, var(--color-surface), var(--color-plum-highlight));
  border-color: var(--color-plum);
}

.mantra {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-text);
  line-height: 1.35;
  margin: var(--space-2) 0 var(--space-3);
}

.mini-btn {
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  transition: all var(--transition-interactive);
}
.mini-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.mini-btn.ghost { border-color: transparent; }

.rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.rules li { padding-left: var(--space-4); position: relative; }
.rules li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 0.7rem;
  top: 4px;
}
.rules strong { color: var(--color-text); font-weight: 600; }

/* ============================================
   GURU
   ============================================ */

.guru-wrap {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 50;
}

.guru-toggle {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-gold);
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(201, 154, 61, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-interactive);
  animation: guruFloat 4.5s ease-in-out infinite;
  overflow: visible;
}

.guru-toggle .guru-svg-slot { width: 62px; height: 62px; margin-top: 6px; }
.guru-toggle.gold-pulse { border-color: var(--color-gold-hover); box-shadow: var(--shadow-lg), 0 0 26px rgba(201, 154, 61, 0.55); }

.guru-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg), 0 0 0 10px rgba(201, 154, 61, 0.18);
}

@keyframes guruFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.guru-bubble {
  position: absolute;
  right: 0;
  bottom: 90px;
  width: min(360px, 92vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  transform-origin: bottom right;
  animation: bubbleIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.guru-bubble::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-gold), transparent 40%, var(--color-primary) 100%);
  z-index: -1;
  opacity: 0.35;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.guru-avatar {
  position: relative;
  margin: 0 auto var(--space-3);
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-gold-highlight), transparent 65%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guru-avatar .guru-svg-slot { width: 96px; height: 96px; }

.guru-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: var(--space-1);
}

.guru-message {
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: center;
  line-height: 1.5;
  font-style: italic;
  font-family: var(--font-display);
  margin-bottom: var(--space-4);
}

.guru-breath {
  display: none;
  padding: var(--space-4) 0;
  justify-content: center;
}
.guru-breath.active { display: flex; }

.breath-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-highlight), transparent 70%);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  animation: breathe 12s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.75); }
  33% { transform: scale(1.1); }
  50% { transform: scale(1.1); }
  75% { transform: scale(0.9); }
}

.guru-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-2);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 240ms ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 42, 26, 0.5);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(600px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  animation: modalIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-interactive);
}
.modal-close:hover {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.modal-head {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-5);
  padding-right: var(--space-8);
}

.modal-emoji {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-gold-highlight), var(--color-surface-offset));
  border: 1px solid var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

#modalTitle {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.1;
  margin-top: 2px;
}

.modal-sub {
  font-family: var(--font-script);
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.2;
  margin-top: 4px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

@media (max-width: 560px) {
  .modal-grid { grid-template-columns: 1fr; }
}

.section-label {
  font-family: var(--font-script);
  color: var(--color-accent);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.ingredient-list,
.benefit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.ingredient-list li {
  padding: 6px 10px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
  color: var(--color-text);
}

.benefit-list li {
  padding-left: var(--space-4);
  position: relative;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.benefit-list li::before {
  content: '◈';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 0.75rem;
  top: 4px;
}

.modal-note {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
  color: var(--color-primary-active);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: var(--space-5);
  border-left: 3px solid var(--color-primary);
}

[data-theme='dark'] .modal-note { color: var(--color-primary); }

.modal-foot {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.primary-btn {
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: all var(--transition-interactive);
  box-shadow: var(--shadow-sm);
}
.primary-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.ghost-btn {
  padding: var(--space-3) var(--space-5);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
}
.ghost-btn:hover { color: var(--color-accent); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .topbar { padding: var(--space-4); }
  .day-picker .day-chip { padding: var(--space-2) var(--space-3); font-size: 0.85rem; }
  .hero-title { font-size: 1.75rem; }
  .phase { padding: var(--space-4); padding-left: calc(var(--space-4) + 40px); }
  .phase-icon { left: var(--space-3); }
  .guru-wrap { bottom: var(--space-4); right: var(--space-4); }
  .guru-toggle { width: 60px; height: 60px; }
}

/* ============================================
   BABA PRANA — the living guru figure
   ============================================ */

.guru-svg-slot { display: inline-flex; }
.guru-fig { width: 100%; height: 100%; overflow: visible; }

/* breathing — chest rise/fall, synced 4s cycle */
.g-body {
  transform-origin: 60px 128px;
  animation: guruBreath 4s ease-in-out infinite;
}
@keyframes guruBreath {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  40% { transform: scaleY(1.028) scaleX(1.012); }
  60% { transform: scaleY(1.028) scaleX(1.012); }
}

/* head bobs gently with the breath */
.g-head {
  transform-origin: 60px 60px;
  animation: guruHeadBob 4s ease-in-out infinite;
}
@keyframes guruHeadBob {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-1.3px); }
  60% { transform: translateY(-1.3px); }
}

/* third eye glow — same 4s rhythm as the breath */
.g-third-glow {
  transform-origin: 60px 44px;
  animation: thirdGlow 4s ease-in-out infinite;
}
.g-third-eye {
  transform-origin: 60px 44px;
  animation: thirdEyeCore 4s ease-in-out infinite;
}
@keyframes thirdGlow {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
@keyframes thirdEyeCore {
  0%, 100% { opacity: 0.75; filter: drop-shadow(0 0 0 var(--color-gold)); }
  50% { opacity: 1; filter: drop-shadow(0 0 5px var(--color-gold)); }
}

/* dashed sacred-geometry halo, slow rotation */
.g-halo-spin {
  transform-origin: 60px 46px;
  animation: haloSpin 26s linear infinite;
}
@keyframes haloSpin { to { transform: rotate(360deg); } }

/* blink — quick squeeze of the serene eyes */
.g-eyes { transform-origin: 60px 50px; transition: transform 90ms ease; }
.g-eyes.blink { transform: scaleY(0.12); }

/* mala beads */
.g-bead {
  fill: var(--color-gold);
  opacity: 0.9;
}
.g-guru-bead { fill: var(--color-plum); }

/* pranam — a gentle bow when the bubble opens */
.guru-fig.pranam .g-head {
  animation: pranamBow 1.3s cubic-bezier(0.4, 0, 0.2, 1) 1;
}
.guru-fig.pranam .g-body {
  animation: pranamBody 1.3s cubic-bezier(0.4, 0, 0.2, 1) 1;
}
@keyframes pranamBow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35%, 60% { transform: translateY(7px) rotate(6deg); }
}
@keyframes pranamBody {
  0%, 100% { transform: scaleY(1); }
  35%, 60% { transform: scaleY(0.96); }
}

/* om waves — sound arcs pulsing outward from the guru */
.guru-om-waves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.guru-om-waves i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  opacity: 0;
  animation: omWave 5s ease-out infinite;
}
.guru-om-waves i:nth-child(2) { animation-delay: 1.6s; }
.guru-om-waves i:nth-child(3) { animation-delay: 3.2s; }
@keyframes omWave {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* thought bubble — brief celebration above the toggle */
.guru-thought {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 8px;
  max-width: 220px;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-gold);
  border-radius: 18px 18px 4px 18px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-script);
  font-size: 1.05rem;
  color: var(--color-text);
  white-space: nowrap;
  animation: thoughtIn 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 60;
}
.guru-thought::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-gold);
  opacity: 0.7;
}
.guru-thought.leaving {
  animation: thoughtOut 400ms ease forwards;
}
@keyframes thoughtIn {
  from { opacity: 0; transform: translateY(10px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes thoughtOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.92); }
}

/* typewriter caret while Baba speaks */
.guru-message.typing::after {
  content: '▍';
  color: var(--color-gold);
  animation: caretBlink 0.8s steps(1) infinite;
  margin-left: 1px;
  font-style: normal;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* ============================================
   PHASE CARD ORNAMENTS
   ============================================ */

.phase-botanical {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  color: var(--color-gold-hover);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity var(--transition-interactive), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.phase:nth-child(odd) .phase-botanical { color: var(--color-primary); }
.phase:hover .phase-botanical { opacity: 0.9; transform: rotate(-6deg) scale(1.08); }
.phase.done .phase-botanical { opacity: 0.28; }
[data-theme='dark'] .phase-botanical { color: var(--color-gold); }
[data-theme='dark'] .phase:nth-child(odd) .phase-botanical { color: var(--color-primary); }

.phase-roman {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--color-gold-hover);
  margin-right: 2px;
}
[data-theme='dark'] .phase-roman { color: var(--color-gold); }

.phase-head { padding-right: 48px; }

/* ============================================
   MANDALA BODY-CLOCK ORNAMENTS
   ============================================ */

.hour-ring {
  transform-origin: 110px 110px;
  animation: hourSpin 240s linear infinite;
}
@keyframes hourSpin { to { transform: rotate(360deg); } }

#mandalaPetals { color: var(--color-gold-hover); }
[data-theme='dark'] #mandalaPetals { color: var(--color-gold); }

.chakra-node .chakra-core,
.chakra-node .chakra-ring,
.chakra-node .chakra-aura {
  transition: opacity 700ms ease, r 700ms ease;
}
.chakra-node.lit .chakra-core { opacity: 1; }
.chakra-node.lit .chakra-ring { opacity: 0.9; }
.chakra-node.lit .chakra-aura {
  opacity: 0.4;
  animation: chakraPulse 3.4s ease-in-out infinite;
}
.chakra-aura {
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes chakraPulse {
  0%, 100% { opacity: 0.22; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.25); }
}

.clock-caption {
  font-family: var(--font-script);
  font-size: 0.95rem;
  color: var(--color-text-faint);
  text-align: center;
  line-height: 1.35;
  margin: calc(-1 * var(--space-2)) auto var(--space-4);
  max-width: 30ch;
}

/* ============================================
   MODAL AURA + MANTRA WAVE + PETAL BURST
   ============================================ */

.modal-emoji-wrap { position: relative; flex-shrink: 0; }

.modal-emoji { position: relative; z-index: 1; }

.modal-emoji-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed var(--color-gold);
  opacity: 0.65;
  animation: auraSpin 14s linear infinite;
}
.modal-emoji-wrap::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  opacity: 0.25;
  animation: auraBreath 4s ease-in-out infinite;
}
@keyframes auraSpin { to { transform: rotate(360deg); } }
@keyframes auraBreath {
  0%, 100% { transform: scale(0.94); opacity: 0.15; }
  50% { transform: scale(1.04); opacity: 0.4; }
}

.mantra-wave {
  animation: mantraBreathe 2.4s ease-in-out 1;
}
@keyframes mantraBreathe {
  0%, 100% { letter-spacing: 0; transform: scale(1); }
  40% { letter-spacing: 0.035em; transform: scale(1.02); }
}

.petal-burst {
  position: fixed;
  z-index: 200;
  pointer-events: none;
}
.petal-particle {
  position: absolute;
  width: 11px;
  height: 15px;
  will-change: transform, opacity;
}

/* ============================================
   RESPONSIVE ADDENDA
   ============================================ */

@media (max-width: 640px) {
  .guru-toggle { width: 64px; height: 64px; }
  .guru-toggle .guru-svg-slot { width: 52px; height: 52px; margin-top: 5px; }
  .phase-botanical { width: 36px; height: 36px; top: 8px; right: 10px; }
  .phase-head { padding-right: 38px; }
  .guru-thought { max-width: 180px; white-space: normal; font-size: 0.95rem; }
}

/* ============================================
   LOCK SCREEN — speak the name to enter
   ============================================ */

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 154, 61, 0.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(107, 142, 90, 0.18), transparent 55%),
    linear-gradient(160deg, #f5ede1 0%, #e8c98d 60%, #b6552e 130%);
  color: var(--color-text);
  overflow: hidden;
  animation: lockFade 500ms ease;
}
[data-theme='dark'] .lock-screen {
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 154, 61, 0.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(107, 142, 90, 0.15), transparent 55%),
    linear-gradient(160deg, #1a130c 0%, #322619 60%, #b6552e 160%);
}

@keyframes lockFade { from { opacity: 0; } to { opacity: 1; } }

.lock-screen.unlocked {
  animation: lockOut 700ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes lockOut {
  to { opacity: 0; transform: scale(1.03); filter: blur(6px); }
}

.lock-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lock-mandala {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  top: -180px;
  right: -220px;
  border: 1px dashed rgba(58, 42, 26, 0.3);
  animation: sunSpin 90s linear infinite;
}
.lock-mandala::before,
.lock-mandala::after {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 154, 61, 0.35);
}
.lock-mandala::after { inset: 90px; border-color: rgba(182, 85, 46, 0.3); }
.lock-mandala-2 {
  top: auto; right: auto;
  bottom: -260px; left: -260px;
  width: 520px; height: 520px;
  animation-duration: 140s;
  animation-direction: reverse;
  opacity: 0.55;
}

.lock-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  padding: var(--space-8) var(--space-6);
  background: rgba(251, 245, 233, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 154, 61, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: lockCardIn 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme='dark'] .lock-card {
  background: rgba(34, 25, 18, 0.85);
  border-color: rgba(232, 194, 106, 0.35);
}

@keyframes lockCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.lock-crest {
  color: var(--color-accent);
  margin: 0 auto var(--space-4);
  display: block;
  animation: crestBreathe 4s ease-in-out infinite;
}
@keyframes crestBreathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.lock-eyebrow {
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
  line-height: 1;
}

.lock-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1rem + 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.lock-sub {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  font-size: 1.05rem;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lock-form input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-align: center;
  transition: all var(--transition-interactive);
}
[data-theme='dark'] .lock-form input {
  background: rgba(0, 0, 0, 0.35);
}
.lock-form input::placeholder { color: var(--color-text-faint); }
.lock-form input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 61, 0.18);
  background: rgba(255, 255, 255, 0.85);
}
[data-theme='dark'] .lock-form input:focus { background: rgba(0, 0, 0, 0.55); }

.lock-form input.shake {
  animation: shake 500ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-color: var(--color-accent);
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.lock-btn {
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-interactive);
}
.lock-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lock-error {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent);
  font-size: 0.95rem;
}

.lock-hint {
  margin-top: var(--space-5);
  font-family: var(--font-script);
  font-size: 1rem;
  color: var(--color-text-faint);
  letter-spacing: 0.02em;
}
