/* ============================================================
   BEAUTIFUL BEING — CSS
   Palette: Cream · Blush · Dusty Rose · Terra Cotta · Deep Umber
   Fonts: Cinzel (display) · Cormorant Garamond (body/italic)
   ============================================================ */

:root {
  --cream: #f5f0e8;
  --cream-dark: #ece4d4;
  --parchment: #e8dcc8;
  --blush: #e8c4aa;
  --rose: #d4917a;
  --dusty-rose: #c07860;
  --terra: #a05640;
  --umber: #5c2e1a;
  --deep: #2a1208;
  --gold: #c8a060;
  --gold-light: #e0c080;
  --sage: #8a9478;
  --sage-light: #b8c4a8;

  --bg: var(--cream);
  --bg2: var(--cream-dark);
  --bg3: var(--parchment);
  --text-primary: var(--deep);
  --text-secondary: var(--umber);
  --text-muted: #7a5840;
  --accent: var(--dusty-rose);
  --accent2: var(--gold);
  --border: rgba(160,86,64,0.15);
  --shadow: rgba(42,18,8,0.12);

  --sidebar-w: 300px;
  --topbar-h: 60px;
  --font-display: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-serif: 'EB Garamond', serif;

  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #1a0e08;
  --bg2: #221408;
  --bg3: #2e1a0e;
  --text-primary: #f0e8d8;
  --text-secondary: #d4b898;
  --text-muted: #9a8070;
  --accent: #d4917a;
  --accent2: #c8a060;
  --border: rgba(212,145,122,0.18);
  --shadow: rgba(0,0,0,0.4);
  --blush: rgba(212,145,122,0.15);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ====== SPLASH ====== */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(ellipse at 30% 20%, #e8c4a8 0%, #d4a880 30%, #c07860 60%, #8a4830 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.splash-bloom {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,220,0.4) 0%, transparent 70%);
  animation: bloom-pulse 4s ease-in-out infinite;
}
.splash-bloom { width: 600px; height: 600px; top: -150px; right: -150px; }
.splash-bloom--2 { width: 400px; height: 400px; bottom: -100px; left: -100px; animation-delay: 1.5s; background: radial-gradient(circle, rgba(255,220,180,0.35) 0%, transparent 70%); }
.splash-bloom--3 { width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 0.8s; background: radial-gradient(circle, rgba(255,255,240,0.2) 0%, transparent 70%); }

@keyframes bloom-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.splash-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
  animation: splash-rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes splash-rise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-petal-ring {
  width: 140px; height: 140px; margin: 0 auto 2rem;
  animation: slow-spin 20s linear infinite;
}
@keyframes slow-spin { to { transform: rotate(360deg); } }
.petal-svg { width: 100%; height: 100%; }

.splash-eyebrow {
  font-family: var(--font-display);
  font-size: 0.65rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: rgba(255,245,225,0.75);
  margin-bottom: 0.75rem;
}

.splash-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 400; line-height: 1.05;
  color: #fff5e0;
  text-shadow: 0 2px 40px rgba(42,18,8,0.3);
  margin-bottom: 1.25rem;
}
.splash-title em { font-style: italic; color: #fff0d0; font-family: var(--font-body); font-size: 1.15em; }

.splash-sub {
  font-family: var(--font-body);
  font-size: 1.05rem; font-style: italic;
  color: rgba(255,245,225,0.8);
  line-height: 1.7; margin-bottom: 2.5rem;
}

.splash-enter {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: rgba(255,245,225,0.15);
  border: 1px solid rgba(255,245,225,0.5);
  color: #fff5e0;
  font-family: var(--font-display);
  font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem; border-radius: 60px;
  cursor: pointer; transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.splash-enter:hover {
  background: rgba(255,245,225,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(42,18,8,0.25);
}

/* ====== LAYOUT ====== */
.hidden { display: none !important; }
.app { display: flex; min-height: 100vh; }

/* ====== SIDEBAR ====== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }

.sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--terra), var(--gold), var(--dusty-rose));
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem; letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.sidebar-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 1rem;
  cursor: pointer; padding: 0.25rem; line-height: 1;
  transition: color 0.2s;
}
.sidebar-close:hover { color: var(--accent); }

.sidebar-search {
  padding: 1rem 1.25rem;
  position: relative; flex-shrink: 0;
}
.sidebar-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none; transition: border-color 0.2s;
}
.sidebar-search input::placeholder { color: var(--text-muted); font-style: italic; }
.sidebar-search input:focus { border-color: var(--accent); }
.search-icon { position: absolute; left: 2rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

.nav-label {
  padding: 0 1.25rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted);
  flex-shrink: 0;
}

.nav-list {
  list-style: none;
  overflow-y: auto; flex: 1;
  padding: 0 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.nav-list li a,
.nav-list li button.nav-btn {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem; line-height: 1.3;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.nav-list li a:hover, .nav-list li a.active,
.nav-list li button.nav-btn:hover, .nav-list li button.nav-btn.active {
  background: var(--blush);
  color: var(--text-primary);
}
.nav-list li a .nav-num,
.nav-list li button.nav-btn .nav-num {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--accent); min-width: 1.5rem; flex-shrink: 0;
}

.nav-list li a.special-link,
.nav-list li button.nav-btn.special-link { color: var(--accent); font-style: italic; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-quote {
  font-family: var(--font-body);
  font-size: 0.85rem; font-style: italic;
  color: var(--text-muted); line-height: 1.6;
}

.overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(42,18,8,0.5);
  backdrop-filter: blur(2px);
}

/* ====== MAIN CONTENT ====== */
.main-content {
  flex: 1;
  margin-left: 0;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ====== TOPBAR ====== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  backdrop-filter: blur(12px);
}

.menu-btn {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  padding: 4px; transition: opacity 0.2s;
}
.menu-btn span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s;
}
.menu-btn:hover { opacity: 0.7; }

.topbar-title {
  font-family: var(--font-display);
  font-size: 0.85rem; letter-spacing: 0.08em;
  color: var(--text-secondary);
  flex: 1; text-align: center;
}

.topbar-actions { display: flex; gap: 0.5rem; }
.icon-btn {
  background: none; border: none;
  color: var(--text-secondary);
  cursor: pointer; padding: 0.4rem; border-radius: 6px;
  transition: all 0.2s; display: flex; align-items: center;
}
.icon-btn:hover { color: var(--accent); background: var(--blush); }

/* ====== CONTENT AREA ====== */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* ====== HOME SCREEN ====== */
.home-screen { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }

.home-hero {
  text-align: center; padding: 2.5rem 1rem 2rem;
  position: relative;
}

.home-flower {
  width: 100px; height: 100px; margin: 0 auto 1.5rem;
  animation: gentle-float 6s ease-in-out infinite;
}
@keyframes gentle-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 400; line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.home-hero h1 em { font-family: var(--font-body); font-style: italic; font-size: 1.1em; color: var(--accent); }

.home-duality {
  display: flex; gap: 1rem; margin: 1.5rem 0;
  flex-wrap: wrap; justify-content: center;
}
.duality-card {
  flex: 1; min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.duality-card .dc-label {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.5rem;
}
.duality-card .dc-title {
  font-family: var(--font-body);
  font-size: 1.3rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.4rem;
}
.duality-card .dc-desc {
  font-size: 0.9rem; font-style: italic;
  color: var(--text-muted); line-height: 1.6;
}

.home-intro {
  font-size: 1.05rem; line-height: 1.9; color: var(--text-secondary);
  text-align: center; margin-bottom: 2rem;
  font-style: italic;
}

/* FLOWER DIVIDER */
.flower-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.5rem 0; opacity: 0.5;
}
.flower-divider::before, .flower-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.flower-divider span { font-size: 1.2rem; color: var(--accent); }

/* CHAPTER GRID */
.chapter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.chapter-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
  cursor: pointer; transition: all 0.3s;
  position: relative; overflow: hidden;
}
.chapter-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.chapter-card:hover::before { transform: scaleX(1); }
.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--accent);
}

.cc-number {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 0.5rem;
}
.cc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.cc-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 500;
  color: var(--text-primary); margin-bottom: 0.4rem;
  line-height: 1.3;
}
.cc-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ====== CHAPTER VIEW ====== */
.chapter-view { max-width: 700px; margin: 0 auto; padding: 1.5rem; }

.chapter-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.ch-eyebrow {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.5rem;
}
.ch-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.ch-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 400; color: var(--text-primary);
  line-height: 1.2; margin-bottom: 0.75rem;
}
.ch-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem; font-style: italic;
  color: var(--text-muted); line-height: 1.6;
}

/* SECTION CONTENT */
.section-block {
  margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(20px);
  animation: section-appear 0.6s ease forwards;
}
.section-block:nth-child(1) { animation-delay: 0.1s; }
.section-block:nth-child(2) { animation-delay: 0.2s; }
.section-block:nth-child(3) { animation-delay: 0.3s; }
.section-block:nth-child(4) { animation-delay: 0.4s; }
.section-block:nth-child(5) { animation-delay: 0.5s; }
.section-block:nth-child(6) { animation-delay: 0.6s; }
.section-block:nth-child(7) { animation-delay: 0.7s; }

@keyframes section-appear {
  to { opacity: 1; transform: none; }
}

.section-block h2 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section-block h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent); margin-bottom: 0.5rem; margin-top: 1rem;
}

.section-block p {
  font-size: 1.05rem; line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

/* PULLQUOTE */
.pullquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg2);
  border-radius: 0 12px 12px 0;
}
.pullquote p {
  font-family: var(--font-body);
  font-size: 1.2rem; font-style: italic;
  color: var(--text-primary); margin-bottom: 0.4rem;
  line-height: 1.7;
}
.pullquote cite {
  font-size: 0.85rem; color: var(--accent);
  font-style: normal; font-family: var(--font-display);
  letter-spacing: 0.06em;
}

/* TRIVIA / FACT BOX */
.fact-box {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.25rem 1.5rem;
  margin: 1.5rem 0; position: relative; overflow: hidden;
}
.fact-box::before {
  content: '✦';
  position: absolute; top: 0.75rem; right: 1rem;
  color: var(--accent); opacity: 0.4; font-size: 1.5rem;
}
.fact-box .fact-label {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.5rem;
}
.fact-box p { font-size: 0.95rem; color: var(--text-secondary); margin: 0; }

/* PRACTICE / RITUAL CARD */
.practice-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
  margin: 1rem 0;
}
.practice-card .pc-tag {
  display: inline-block;
  background: var(--accent); color: #fff5e0;
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  margin-bottom: 0.75rem;
}
.practice-card h4 {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.practice-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; margin: 0; }

/* ACTIVITY STEPS */
.activity-steps {
  list-style: none; margin: 1rem 0;
}
.activity-steps li {
  display: flex; gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7;
}
.activity-steps li:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-display);
  font-size: 0.7rem; color: var(--accent);
  min-width: 1.5rem; margin-top: 0.1rem;
}

/* FLOWER LANGUAGE TABLE */
.flower-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
}
.flower-table th {
  font-family: var(--font-display);
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  padding: 0.6rem 0.75rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.flower-table td {
  padding: 0.7rem 0.75rem; font-size: 0.95rem;
  color: var(--text-secondary); line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.flower-table tr:last-child td { border-bottom: none; }
.flower-table tr:hover td { background: var(--bg2); }

/* PROVOCATIVE THOUGHT */
.provocative {
  background: var(--deep);
  color: var(--cream);
  border-radius: 16px; padding: 2rem;
  margin: 2rem 0; text-align: center;
  position: relative; overflow: hidden;
}
[data-theme="dark"] .provocative { background: rgba(212,145,122,0.15); border: 1px solid var(--border); }
.provocative::before {
  content: '❝';
  position: absolute; top: 0.75rem; left: 1rem;
  font-size: 3rem; opacity: 0.15; color: var(--gold);
  line-height: 1;
}
.provocative p {
  font-family: var(--font-body);
  font-size: 1.2rem; font-style: italic;
  line-height: 1.7; margin: 0;
  color: #f0e0c8;
}
[data-theme="dark"] .provocative p { color: var(--text-primary); }

/* WISDOM GRID */
.wisdom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem; margin: 1rem 0;
}
.wisdom-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem;
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.6; font-style: italic;
  position: relative;
}
.wisdom-item::before { content: '✦ '; color: var(--accent); font-style: normal; font-size: 0.7rem; }

/* TIMELINE */
.timeline { margin: 1.5rem 0; padding-left: 1.5rem; border-left: 2px solid var(--border); }
.timeline-entry { margin-bottom: 1.5rem; position: relative; }
.timeline-entry::before {
  content: '';
  position: absolute; left: -1.6rem; top: 0.4rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.timeline-era {
  font-family: var(--font-display);
  font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.2rem;
}
.timeline-entry p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* ====== TOC VIEW ====== */
.toc-view { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }
.toc-title {
  font-family: var(--font-display);
  font-size: 1.8rem; color: var(--text-primary);
  margin-bottom: 0.5rem; text-align: center;
}
.toc-subtitle {
  text-align: center; font-style: italic;
  color: var(--text-muted); margin-bottom: 2rem; font-size: 1rem;
}
.toc-list { list-style: none; }
.toc-list li {
  border-bottom: 1px solid var(--border);
}
.toc-list li a {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0.5rem;
  text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.toc-list li a:hover { padding-left: 1rem; }
.toc-num {
  font-family: var(--font-display);
  font-size: 0.7rem; color: var(--accent);
  min-width: 2rem; margin-top: 0.2rem; flex-shrink: 0;
}
.toc-info { flex: 1; }
.toc-name {
  font-family: var(--font-display);
  font-size: 1.05rem; color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.toc-tagline { font-size: 0.9rem; font-style: italic; color: var(--text-muted); }
.toc-arrow {
  color: var(--accent); opacity: 0;
  transition: opacity 0.2s; font-size: 1.2rem;
  margin-top: 0.1rem;
}
.toc-list li a:hover .toc-arrow { opacity: 1; }

/* ====== FLOWER ORACLE ====== */
.oracle-view { max-width: 500px; margin: 0 auto; padding: 2rem 1.5rem; text-align: center; }
.oracle-title {
  font-family: var(--font-display);
  font-size: 1.8rem; color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.oracle-sub { font-style: italic; color: var(--text-muted); margin-bottom: 2rem; }

.oracle-bloom {
  width: 180px; height: 180px; margin: 0 auto 2rem;
  cursor: pointer; transition: transform 0.3s;
}
.oracle-bloom:hover { transform: scale(1.05) rotate(5deg); }
.oracle-bloom svg { width: 100%; height: 100%; }

.oracle-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem;
  margin-bottom: 1.5rem;
  min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all 0.5s;
}
.oracle-flower-name {
  font-family: var(--font-display);
  font-size: 1.3rem; color: var(--accent);
  margin-bottom: 0.75rem;
}
.oracle-meaning {
  font-size: 1.05rem; font-style: italic;
  color: var(--text-secondary); line-height: 1.8;
}
.oracle-guidance {
  font-size: 0.9rem; color: var(--text-muted);
  margin-top: 0.75rem; line-height: 1.6;
}

.oracle-btn {
  background: linear-gradient(135deg, var(--terra), var(--dusty-rose));
  border: none; color: #fff5e0;
  font-family: var(--font-display);
  font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.9rem 2.5rem;
  border-radius: 60px; cursor: pointer; transition: all 0.3s;
}
.oracle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(160,86,64,0.35);
}

/* ====== RITUALS VIEW ====== */
.rituals-view { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }
.rituals-title {
  font-family: var(--font-display);
  font-size: 1.8rem; color: var(--text-primary);
  margin-bottom: 0.4rem; text-align: center;
}
.rituals-sub { text-align: center; font-style: italic; color: var(--text-muted); margin-bottom: 2rem; }

.ritual-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 1.5rem;
}
.rtab {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font-display);
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.5rem 1rem;
  border-radius: 30px; cursor: pointer; transition: all 0.2s;
}
.rtab.active, .rtab:hover {
  background: var(--accent); color: #fff5e0; border-color: var(--accent);
}

.ritual-content { display: none; }
.ritual-content.active { display: block; }

/* SEARCH RESULTS */
.search-results { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }
.search-results h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-primary); margin-bottom: 1rem; }
.search-result-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
  margin-bottom: 0.75rem; cursor: pointer; transition: all 0.2s;
}
.search-result-item:hover { border-color: var(--accent); transform: translateX(4px); }
.sri-chapter { font-family: var(--font-display); font-size: 0.65rem; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.2rem; }
.sri-title { font-size: 1rem; color: var(--text-primary); margin-bottom: 0.3rem; }
.sri-snippet { font-size: 0.88rem; font-style: italic; color: var(--text-muted); line-height: 1.5; }
mark { background: rgba(200,120,96,0.2); color: var(--accent); border-radius: 2px; padding: 0 2px; }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  height: 64px;
  backdrop-filter: blur(12px);
}
.bnav-btn {
  flex: 1; background: none; border: none;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; font-family: var(--font-display);
  font-size: 0.55rem; letter-spacing: 0.08em;
}
.bnav-btn:hover, .bnav-btn.active {
  color: var(--accent);
}
.bnav-btn svg { transition: transform 0.2s; }
.bnav-btn:hover svg { transform: translateY(-2px); }

/* CHAPTER NAV ARROWS */
.chapter-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem 0 1rem; margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.cnav-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-secondary); font-family: var(--font-display);
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.7rem 1.2rem; border-radius: 30px;
  cursor: pointer; transition: all 0.2s;
}
.cnav-btn:hover { background: var(--accent); color: #fff5e0; border-color: var(--accent); }
.cnav-btn:disabled { opacity: 0.3; pointer-events: none; }

/* PROGRESS BAR */
.reading-progress {
  position: fixed; top: 60px; left: 0; right: 0;
  height: 2px; z-index: 99;
  background: transparent;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terra), var(--gold));
  width: 0%; transition: width 0.2s;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* RESPONSIVE */
@media (min-width: 768px) {
  .sidebar { transform: translateX(0); }
  .main-content { margin-left: var(--sidebar-w); }
  .menu-btn { display: none; }
  .overlay { display: none !important; }
  .sidebar-close { display: none; }
  .bottom-nav { left: var(--sidebar-w); }
}

@media (max-width: 480px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .home-duality { flex-direction: column; }
  .wisdom-grid { grid-template-columns: 1fr; }
}

/* UTILITY */
.text-accent { color: var(--accent); }
.italic { font-style: italic; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ORACLE ANIMATION */
@keyframes oracle-bloom {
  0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.05) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.oracle-card.blooming { animation: oracle-bloom 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* HABIT TRACKER IN RITUALS */
.habit-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin: 1rem 0;
}
.habit-cell {
  aspect-ratio: 1; border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: var(--text-muted);
}
.habit-cell.done { background: var(--accent); border-color: var(--accent); color: #fff5e0; }
.habit-cell:hover { border-color: var(--accent); }

/* ============================================================
   EXPANDED: ORACLE & RITUAL TIMER STYLES
   ============================================================ */

/* ── ORACLE EXPANDED ── */
.oracle-view { max-width: 680px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

.oracle-header { text-align: center; padding: 1.5rem 0 1rem; }
.oracle-bloom-spin {
  width: 160px; height: 160px; margin: 0 auto 1.5rem;
  cursor: pointer; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  animation: slow-spin 25s linear infinite;
}
.oracle-bloom-spin:hover { transform: scale(1.1) rotate(20deg); animation: none; }
.oracle-title { font-family: var(--font-display); font-size: 2rem; color: var(--text-primary); margin-bottom: 0.3rem; }
.oracle-sub { font-style: italic; color: var(--text-muted); margin-bottom: 1rem; font-size: 1rem; }
.oracle-instruction {
  display: flex; align-items: center; gap: 0.5rem; justify-content: center;
  flex-wrap: wrap; font-family: var(--font-display);
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.oracle-dot { color: var(--accent); }

/* Oracle Card */
.oracle-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 0; margin-bottom: 1.25rem;
  overflow: hidden;
}
.oracle-card-inner { padding: 1.75rem; }
.oracle-card-top {
  display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem;
}
.oracle-emoji { font-size: 2.5rem; flex-shrink: 0; line-height: 1; }
.oracle-flower-name {
  font-family: var(--font-display); font-size: 1.4rem;
  color: var(--text-primary); line-height: 1.2;
}
.oracle-flower-family {
  font-size: 0.82rem; font-style: italic;
  color: var(--accent); margin-top: 0.2rem;
}
.oracle-astro {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.oracle-astro span {
  font-family: var(--font-display); font-size: 0.62rem;
  letter-spacing: 0.1em; color: var(--text-muted);
  background: var(--bg3); padding: 0.25rem 0.6rem;
  border-radius: 20px; border: 1px solid var(--border);
}
.oracle-meaning-text {
  font-size: 1.05rem; line-height: 1.9;
  color: var(--text-secondary); margin-bottom: 1.25rem;
  font-style: italic;
}
.oracle-shadow-section {
  background: var(--bg3); border-radius: 10px; padding: 1rem 1.25rem;
  margin-bottom: 1.25rem; border-left: 3px solid var(--border);
}
.oracle-shadow-label {
  font-family: var(--font-display); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.4rem;
}
.oracle-shadow-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

.oracle-guidance-block {
  background: linear-gradient(135deg, rgba(200,120,80,0.12), rgba(200,160,80,0.08));
  border: 1px solid rgba(200,120,80,0.2);
  border-radius: 12px; padding: 1.1rem 1.25rem;
}
.oracle-guidance-label {
  font-family: var(--font-display); font-size: 0.62rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.oracle-guidance-text { font-size: 1rem; color: var(--text-primary); line-height: 1.8; }

/* Oracle Actions */
.oracle-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.25rem; }
.oracle-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.8rem 1.75rem; border-radius: 60px;
  cursor: pointer; transition: all 0.3s ease; border: none;
}
.oracle-btn--primary {
  background: linear-gradient(135deg, var(--terra), var(--dusty-rose));
  color: #fff5e0;
}
.oracle-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(160,86,64,0.35); }
.oracle-btn--secondary {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-secondary);
}
.oracle-btn--secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Oracle Details */
.oracle-details { margin-bottom: 1.5rem; }
.oracle-details-inner {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
}
.oracle-detail-row {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.oracle-detail-row:last-child { border-bottom: none; }
.odr-label {
  font-family: var(--font-display); font-size: 0.6rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.4rem;
}
.odr-value { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; }
.oracle-affirmation {
  font-family: var(--font-body); font-style: italic;
  font-size: 1.1rem; color: var(--text-primary);
}
.oracle-trivia { font-style: italic; }

/* Oracle All Grid */
.oracle-all-section { margin-top: 0.5rem; }
.oracle-all-title {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--text-primary); text-align: center; margin-bottom: 0.3rem;
}
.oracle-all-sub {
  text-align: center; font-style: italic; color: var(--text-muted);
  font-size: 0.88rem; margin-bottom: 1rem;
}
.oracle-family-filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center; margin-bottom: 1rem;
}
.ofam-btn {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 20px; cursor: pointer;
  transition: all 0.2s;
}
.ofam-btn.active, .ofam-btn:hover { background: var(--accent); color: #fff5e0; border-color: var(--accent); }

.oracle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.oracle-mini-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.9rem 0.75rem;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.oracle-mini-card:hover, .oracle-mini-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  transform: translateY(-2px);
}
.oracle-mini-card.selected { box-shadow: 0 0 0 2px var(--accent); }
.omc-emoji { font-size: 1.6rem; margin-bottom: 0.35rem; }
.omc-name {
  font-family: var(--font-display); font-size: 0.72rem;
  color: var(--text-primary); margin-bottom: 0.15rem; line-height: 1.3;
}
.omc-family { font-size: 0.68rem; color: var(--text-muted); font-style: italic; }

/* ── RITUALS EXPANDED ── */
.rituals-view { max-width: 700px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

.rituals-hero { text-align: center; padding: 1.5rem 0 1.5rem; }
.rituals-hero-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.rituals-title { font-family: var(--font-display); font-size: 1.8rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.rituals-sub { font-style: italic; color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }

.ritual-tabs {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  justify-content: center; margin-bottom: 1.75rem;
}
.rtab {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 30px;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center;
  padding: 0.5rem 1rem; gap: 0.15rem;
}
.rtab-icon { font-size: 1.1rem; }
.rtab-label { font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.rtab.active, .rtab:hover { background: var(--accent); color: #fff5e0; border-color: var(--accent); }

.rituals-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

/* Ritual Card */
.ritual-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; transition: border-color 0.2s;
}
.ritual-card:hover { border-color: rgba(192,120,96,0.3); }

.ritual-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; cursor: pointer; user-select: none;
  transition: background 0.2s;
}
.ritual-card-header:hover { background: rgba(200,120,80,0.04); }
.rch-left { flex: 1; }
.rc-tag {
  display: inline-block; background: var(--accent); color: #fff5e0;
  font-family: var(--font-display); font-size: 0.55rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.15rem 0.55rem; border-radius: 20px;
  margin-bottom: 0.4rem;
}
.rc-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--text-primary); margin-bottom: 0.3rem; }
.rc-meta { display: flex; gap: 0.5rem; align-items: center; }
.rc-duration, .rc-steps {
  font-family: var(--font-display); font-size: 0.62rem;
  letter-spacing: 0.08em; color: var(--text-muted);
}
.rch-right { flex-shrink: 0; margin-left: 1rem; }
.rc-expand-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.25rem;
  transition: transform 0.3s, color 0.2s; display: flex;
}
.rc-expand-btn:hover { color: var(--accent); }

.ritual-card-body { padding: 0 1.5rem 1.5rem; }

.rc-philosophy {
  background: var(--bg3); border-radius: 12px;
  padding: 1.1rem 1.25rem; margin-bottom: 1.5rem;
}
.rc-phil-label {
  font-family: var(--font-display); font-size: 0.58rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.rc-philosophy p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8; margin: 0 0 0.5rem; }
.rc-origin { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* Timer Wrap */
.ritual-timer-wrap {}

/* Overall Progress */
.rtimer-overall-progress {
  height: 3px; background: var(--bg3);
  border-radius: 2px; margin-bottom: 1.25rem; overflow: hidden;
}
.rtimer-op-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--terra), var(--gold));
  border-radius: 2px; transition: width 0.5s ease;
}

/* Timer Steps */
.rtimer-steps { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }

.rtimer-step {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem; transition: all 0.3s;
  background: var(--bg);
}
.rtimer-step.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(200,120,80,0.06), rgba(200,160,80,0.04));
  box-shadow: 0 2px 12px rgba(200,120,80,0.12);
}
.rtimer-step.done {
  opacity: 0.55; border-color: var(--border);
}
.rtimer-step.done .rts-num { color: var(--sage); }

.rts-header {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem;
}
.rts-num {
  font-family: var(--font-display); font-size: 0.65rem;
  color: var(--accent); min-width: 1.5rem; flex-shrink: 0;
}
.rts-title {
  font-family: var(--font-display); font-size: 0.88rem;
  color: var(--text-primary); flex: 1;
}
.rts-time {
  font-family: var(--font-display); font-size: 1rem;
  color: var(--accent); min-width: 3.5rem; text-align: right;
  font-weight: 500; letter-spacing: 0.05em;
  transition: color 0.3s;
}
.rtimer-step.active .rts-time { color: var(--terra); font-size: 1.15rem; }

.rts-instructions {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: 0.65rem;
  display: none;
}
.rtimer-step.active .rts-instructions { display: block; }

.rts-progress-wrap {
  height: 2px; background: var(--bg3);
  border-radius: 1px; margin-bottom: 0.6rem;
  display: none; overflow: hidden;
}
.rtimer-step.active .rts-progress-wrap { display: block; }
.rts-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 1px; transition: width 0.8s linear;
}

.rts-step-controls {
  display: none; gap: 0.4rem; align-items: center;
}
.rtimer-step.active .rts-step-controls { display: flex; }
.rts-btn {
  background: none; border: 1px solid var(--border);
  font-family: var(--font-display); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); padding: 0.3rem 0.7rem;
  border-radius: 20px; cursor: pointer; transition: all 0.2s;
}
.rts-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.rts-btn:disabled { opacity: 0.35; pointer-events: none; }
.rts-play { border-color: var(--accent); color: var(--accent); }
.rts-play:hover { background: var(--accent); color: #fff5e0 !important; }

/* Timer Controls */
.rtimer-controls {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.rtc-btn {
  flex: 1; min-width: 120px;
  border: none; font-family: var(--font-display);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 1.5rem; border-radius: 30px;
  cursor: pointer; transition: all 0.3s;
}
.rtc-start {
  background: linear-gradient(135deg, var(--terra), var(--dusty-rose));
  color: #fff5e0;
}
.rtc-start:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(160,86,64,0.3); }
.rtc-reset {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted);
}
.rtc-reset:hover { border-color: var(--accent); color: var(--accent); }

.rtimer-total {
  text-align: center; font-family: var(--font-display);
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

/* Habit Tracker Block */
.habit-tracker-block {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem; margin-top: 1.5rem;
}
.htb-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.4rem;
}
.htb-count {
  font-family: var(--font-display); font-size: 0.72rem;
  letter-spacing: 0.1em; color: var(--accent);
}
.htb-sub {
  font-size: 0.85rem; color: var(--text-muted);
  font-style: italic; margin-bottom: 1rem;
}
.habit-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 0.75rem; }
.habit-cell {
  aspect-ratio: 1; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
}
.habit-cell:hover { border-color: var(--accent); }
.habit-cell.done { background: var(--accent); border-color: var(--accent); }
.hc-day {
  font-family: var(--font-display); font-size: 0.65rem;
  letter-spacing: 0.05em; color: var(--text-muted);
}
.habit-cell.done .hc-day { color: rgba(255,245,220,0.8); }
.hc-check { font-size: 0.6rem; color: rgba(255,245,220,0.9); }
.habit-streak-msg {
  font-size: 0.85rem; font-style: italic; color: var(--text-muted);
  text-align: center; line-height: 1.6; min-height: 1.2rem;
}

