:root {
  --bg: #0A0907;
  --bg-card: #1a140f;
  --bg-elevated: #241c15;
  --gold: #d4a84b;
  --gold-light: #f0d78c;
  --gold-dim: #a07830;
  --text: #f5e6c8;
  --text-muted: #b8a88a;
  --border: #3a2e22;
  --accent: #c9a227;
  --success: #7a9e6a;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --font: 'Georgia', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Splash Screen ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0A0907;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow: hidden;
}

.splash-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  animation: splashFadeIn 1.2s ease;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-logo {
  font-family: var(--font);
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-shadow: 0 0 40px rgba(212, 168, 75, 0.45), 0 0 80px rgba(212, 168, 75, 0.2);
  margin-bottom: 18px;
}

.splash-latin {
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.splash-english {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 28px;
}

.splash-tagline {
  font-size: 0.85rem;
  color: var(--gold-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.splash-bar {
  width: 120px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin: 0 auto;
  overflow: hidden;
}

.splash-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px;
  animation: splashProgress 7s linear forwards;
}

@keyframes splashProgress {
  from { width: 0; }
  to { width: 100%; }
}

.app-hidden {
  opacity: 0;
  pointer-events: none;
}

.app-visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s ease;
}


#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 12, 9, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px rgba(212, 168, 75, 0.4);
}

.app-title {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.menu-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* Side Nav */
.side-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  background: var(--bg-card);
  z-index: 60;
  transition: right 0.28s ease;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-nav.open {
  right: 0;
}

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

.nav-logo {
  font-family: var(--font);
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.close-nav {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.side-nav ul {
  list-style: none;
  padding: 12px 0 32px;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.side-nav li {
  padding: 14px 22px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all 0.2s;
}

.side-nav li:hover,
.side-nav li.active {
  background: var(--bg-elevated);
  color: var(--gold);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Content */
.content {
  flex: 1;
  padding: 20px 16px 100px;
  overflow-y: auto;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: var(--font);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.card h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin: 16px 0 8px;
}

.verse {
  font-family: var(--font);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid var(--gold-dim);
}

.reference {
  font-size: 0.9rem;
  color: var(--gold);
  font-style: italic;
  margin-top: 8px;
}

.reflection, .prayer-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.date-badge {
  display: inline-block;
  background: var(--bg-elevated);
  color: var(--gold-dim);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #1a120b;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Bible Reader */
.bible-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

select, input[type="text"] {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  min-width: 120px;
}

.chapter-text {
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1.8;
}

.verse-num {
  color: var(--gold-dim);
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: 6px;
}

/* Journal */
.journal-entry {
  width: 100%;
  min-height: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 14px;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  resize: vertical;
}

.journal-list {
  margin-top: 20px;
}

.journal-item {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--gold-dim);
}

.journal-item .date {
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 6px;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  background: rgba(15, 12, 9, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 6px 0;
}

.nav-item .icon {
  font-size: 1.25rem;
}

.nav-item.active {
  color: var(--gold);
}

/* Today specific */
.hero {
  text-align: center;
  padding: 10px 0 20px;
}

.hero .logo-large {
  font-family: var(--font);
  font-size: 3rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-shadow: 0 0 40px rgba(212, 168, 75, 0.35);
  margin-bottom: 6px;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.quick-link {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.quick-link:hover {
  border-color: var(--gold-dim);
}

.quick-link .q-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}

.quick-link span {
  font-size: 0.9rem;
  color: var(--text);
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Responsive */
@media (min-width: 600px) {
  .content {
    padding: 28px 24px 110px;
  }
  .quick-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Font size variants */
[data-font="small"] .verse,
[data-font="small"] .chapter-text,
[data-font="small"] .prayer-text,
[data-font="small"] .reflection { font-size: 0.95rem; }
[data-font="medium"] .verse,
[data-font="medium"] .chapter-text { font-size: 1.15rem; }
[data-font="large"] .verse,
[data-font="large"] .chapter-text,
[data-font="large"] .prayer-text,
[data-font="large"] .reflection { font-size: 1.3rem; line-height: 1.75; }

/* Progress bar for plans */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.plan-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
}
.plan-day input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* Parchment / light theme */
[data-theme="parchment"] {
  --bg: #f4ecd8;
  --bg-card: #faf6eb;
  --bg-elevated: #efe6d0;
  --gold: #8b6914;
  --gold-light: #a67c00;
  --gold-dim: #6b5210;
  --text: #2c2416;
  --text-muted: #5c4e3a;
  --border: #d4c4a8;
}
[data-theme="parchment"] body,
[data-theme="parchment"] #app {
  background: var(--bg);
  color: var(--text);
}
[data-theme="parchment"] .header,
[data-theme="parchment"] .bottom-nav {
  background: rgba(244, 236, 216, 0.95);
  border-color: var(--border);
}
[data-theme="parchment"] .side-nav {
  background: var(--bg-card);
}
[data-theme="parchment"] .logo-text,
[data-theme="parchment"] .nav-logo {
  color: var(--gold);
  text-shadow: none;
}

/* Interactive reading plans */
.plan-day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.plan-day.done {
  border-color: var(--gold-dim);
  background: rgba(212, 168, 75, 0.08);
}
.plan-day.done .plan-open {
  color: var(--gold);
  text-decoration: line-through;
  opacity: 0.85;
}
.plan-check {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.plan-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
}
.plan-open {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}
.plan-open:hover {
  background: var(--bg-card);
  color: var(--gold);
}
.plan-status {
  margin: 8px 0 12px !important;
}

.inri-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow);
}
.inri-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bible-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.bible-nav-row .btn { flex-shrink: 0; padding: 8px 12px; font-size: 0.85rem; }
.prayer-item.done { opacity: 0.65; }
.prayer-item.done span { text-decoration: line-through; }
.journal-input { display: flex; gap: 8px; margin-top: 12px; }
.journal-input input {
  flex: 1; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 1rem;
}
.onboard {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10,9,7,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.onboard-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px; max-width: 340px;
  text-align: center; color: var(--text);
}
.onboard-card h2 { color: var(--gold); margin-bottom: 16px; }
.onboard-card p { margin: 8px 0; color: var(--text-muted); font-size: 0.95rem; }
.onboard-card .btn { margin-top: 20px; width: 100%; }

/* Book grid */
.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.book-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.book-chip.active, .book-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Install banner */
.install-banner {
  position: fixed;
  bottom: 70px;
  left: 12px;
  right: 12px;
  z-index: 90;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.9rem;
}
.install-banner span { flex: 1; }
.install-banner .btn { padding: 8px 12px; font-size: 0.85rem; }

/* Landscape */
@media (orientation: landscape) and (max-height: 500px) {
  .header { padding: 8px 16px; }
  .content { padding-bottom: 70px; }
  .splash-image { object-position: center 30%; }
}

/* Print-friendly devotion */
@media print {
  .header, .bottom-nav, .side-nav, .nav-overlay, .splash, .install-banner, .inri-toast, .btn-group, .menu-btn { display: none !important; }
  body, #app { background: white !important; color: black !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .verse, .prayer-text, .reflection { color: black !important; }
}

.gifts-section {
  border: 1px solid var(--gold-dim);
  background: linear-gradient(145deg, var(--bg-card), rgba(212,168,75,0.08));
}
.gifts-card {
  border-left: 3px solid var(--gold-dim);
}

.topic-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.topic-media .btn,
.topic-media a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.topic-audio-btn {
  background: var(--gold) !important;
  color: #1a120b !important;
  border: none !important;
}

.bible-verse { cursor: pointer; border-radius: 6px; padding: 4px 6px; margin: 0 -6px; }
.bible-verse.highlighted { background: rgba(212,168,75,0.22); }
.study-note {
  margin-top: 16px; padding: 12px 14px;
  background: var(--bg-elevated); border-left: 3px solid var(--gold);
  border-radius: 8px; font-size: 0.9rem; color: var(--text-muted);
}
.study-note strong { color: var(--gold); display: block; margin-bottom: 6px; }
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 600px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-col {
  background: var(--bg-elevated); padding: 12px; border-radius: 10px;
  max-height: 70vh; overflow-y: auto;
}
.compare-col h3 { color: var(--gold); margin-bottom: 10px; }
[data-large-tap="1"] .btn,
[data-large-tap="1"] .book-chip,
[data-large-tap="1"] .plan-open,
[data-large-tap="1"] .nav-item {
  min-height: 44px; padding: 12px 16px;
}
[data-reduce-motion="1"] * {
  animation: none !important; transition: none !important;
}

.study-item { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.study-item:last-child { border-bottom: none; margin-bottom: 0; }
.study-item h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.recipe-list { margin: 8px 0 0 1.1em; padding: 0; color: var(--text-muted); line-height: 1.55; }
.recipe-list li { margin-bottom: 4px; }
.meal-card h3 { font-size: 0.95rem; }

/* ---- Deeper verse study & daily inspiration ---- */
.insp-title { margin-top: 18px; font-size: 1.15rem; }
.insp-para { margin-bottom: 14px; }
.insp-box {
  background: var(--bg-elevated);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
}
.insp-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  font-family: var(--font-sans);
}
.verse-study {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.verse-study summary {
  cursor: pointer;
  color: var(--gold);
  font-family: var(--font);
  font-size: 0.98rem;
  padding: 6px 0;
  list-style: none;
}
.verse-study summary::-webkit-details-marker { display: none; }
.verse-study summary::before { content: '▸ '; }
.verse-study[open] summary::before { content: '▾ '; }
.study-block { margin-top: 14px; }
.word-note { margin-bottom: 12px; }
.word-head { margin-bottom: 3px; }
.word-kjv { color: var(--gold-light); font-family: var(--font); font-weight: bold; }
.word-orig { color: var(--gold-dim); font-style: italic; font-size: 0.9rem; }
.ref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-chip {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
.ref-chip:active { background: var(--bg-elevated); }

/* =====================================================================
   Immersive features: atmosphere, season, walk, map, narrator, memorize
   ===================================================================== */

/* ---- Time-of-day light (a soft glow behind the app) ---- */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  transition: background 2s ease;
}
#app { z-index: 1; }
[data-tod="dawn"] body::before {
  background: radial-gradient(120% 60% at 50% -10%, rgba(232, 140, 90, 0.22), transparent 70%),
              radial-gradient(80% 40% at 100% 0%, rgba(240, 200, 120, 0.10), transparent 70%);
}
[data-tod="day"] body::before {
  background: radial-gradient(120% 55% at 50% -10%, rgba(212, 168, 75, 0.10), transparent 70%);
}
[data-tod="evening"] body::before {
  background: radial-gradient(120% 60% at 50% -10%, rgba(200, 95, 40, 0.20), transparent 70%),
              radial-gradient(90% 50% at 0% 100%, rgba(120, 50, 90, 0.10), transparent 70%);
}
[data-tod="night"] body::before {
  background: radial-gradient(120% 60% at 50% -10%, rgba(60, 80, 160, 0.20), transparent 70%),
              radial-gradient(60% 35% at 50% 105%, rgba(230, 150, 60, 0.12), transparent 70%);
}
[data-theme="parchment"][data-tod="dawn"] body::before { background: radial-gradient(120% 60% at 50% -10%, rgba(230, 150, 110, 0.25), transparent 70%); }
[data-theme="parchment"][data-tod="evening"] body::before { background: radial-gradient(120% 60% at 50% -10%, rgba(200, 120, 60, 0.20), transparent 70%); }
[data-theme="parchment"][data-tod="night"] body::before { background: radial-gradient(120% 60% at 50% -10%, rgba(90, 100, 160, 0.18), transparent 70%); }

/* ---- Gentle word-by-word verse reveal ---- */
.verse .rw { opacity: 0; animation: rwIn 0.7s ease forwards; }
@keyframes rwIn { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }

/* ---- Header actions & ambient sound ---- */
.header-actions { display: flex; align-items: center; gap: 2px; }
.ambient-btn {
  background: none; border: 1px solid transparent; color: var(--gold-dim);
  font-size: 1.25rem; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
}
.ambient-btn.on { color: var(--gold); border-color: var(--gold-dim); box-shadow: 0 0 12px rgba(212, 168, 75, 0.35); }
.ambient-panel {
  position: fixed; top: 64px; right: max(12px, calc(50% - 348px)); z-index: 120;
  width: min(320px, calc(100vw - 24px));
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow);
}
.ambient-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.ambient-choice {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 12px; padding: 10px 6px; font-size: 0.8rem; cursor: pointer;
}
.ambient-choice span { font-size: 1.3rem; }
.ambient-choice.active { border-color: var(--gold); color: var(--gold-light); }
.ambient-choice.small { padding: 7px 4px; font-size: 0.72rem; }
.ambient-choice.small span { font-size: 1.05rem; }
.ambient-vol { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-muted); font-size: 0.85rem; }
.ambient-vol input { flex: 1; accent-color: var(--gold); }

/* ---- Church-year banner ---- */
.season-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 4px solid var(--season); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 18px;
}
.season-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--season); margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 10px var(--season); }
.season-label { color: var(--gold-light); font-family: var(--font); font-size: 1rem; }
.season-note { color: var(--text-muted); font-size: 0.85rem; line-height: 1.45; margin-top: 2px; }

/* ---- Daily Walk call to action ---- */
.walk-cta {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.18), rgba(212, 168, 75, 0.04)), var(--bg-card);
  border: 1px solid var(--gold-dim);
}
.walk-cta:active { transform: scale(0.99); }
.walk-cta-icon {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--bg); background: linear-gradient(135deg, var(--gold-dim), var(--gold));
}
.walk-cta-text { flex: 1; }
.walk-cta-title { font-family: var(--font); color: var(--gold-light); font-size: 1.1rem; }
.walk-cta-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.walk-cta-go { color: var(--gold); font-size: 1.4rem; }
.walk-cta.done { border-color: var(--border); background: var(--bg-card); }

/* ---- On location: map + timeline ---- */
.loc-when { margin-bottom: 12px; }
.map-wrap { border-radius: 10px; overflow: hidden; }
.geo-map { display: block; width: 100%; height: auto; max-height: 460px; }
.geo-land { fill: #2a2117; }
.geo-sea, .geo-island { stroke: #4a5d66; stroke-width: 0.8; }
.geo-sea { fill: #1d3440; }
.geo-island { fill: #2a2117; }
.geo-river { fill: none; stroke: #3c6475; stroke-width: 1.4; stroke-linejoin: round; }
.geo-region { font-family: var(--font); font-size: 11px; letter-spacing: 2.5px; fill: #8a7350; text-anchor: middle; }
.geo-region.small { font-size: 9px; letter-spacing: 2px; }
.geo-ctx { font-family: var(--font); font-size: 9.5px; font-style: italic; fill: #8a7350; }
.geo-ctx-dot { fill: #8a7350; }
.geo-dot { fill: var(--gold); stroke: #0a0907; stroke-width: 1.5; }
.geo-pulse { fill: none; stroke: var(--gold); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: geoPulse 2.4s ease-out infinite; }
@keyframes geoPulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }
.geo-place { font-family: var(--font); font-size: 12.5px; font-weight: bold; fill: var(--gold-light); paint-order: stroke; stroke: #0a0907; stroke-width: 3px; }
.geo-route { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 5 4; }
.geo-arrowhead { fill: var(--gold); }
.geo-frame { fill: none; stroke: var(--border); }
[data-theme="parchment"] .geo-land, [data-theme="parchment"] .geo-island { fill: #e3d2ad; }
[data-theme="parchment"] .geo-sea { fill: #9fbac6; }
[data-theme="parchment"] .geo-sea, [data-theme="parchment"] .geo-island { stroke: #7f9aa6; }
[data-theme="parchment"] .geo-river { stroke: #7f9aa6; }
[data-theme="parchment"] .geo-place { stroke: #faf6eb; fill: #5a3e10; }
[data-theme="parchment"] .geo-dot { stroke: #faf6eb; }
.loc-legend { color: var(--text-muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.5; }
.loc-legend strong { color: var(--gold-light); font-weight: normal; }
.era-strip { display: flex; gap: 3px; margin-top: 14px; }
.era { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-elevated); border: 1px solid var(--border); position: relative; }
.era.active { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(212, 168, 75, 0.5); }
.era-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.era-caption { margin-top: 6px; color: var(--gold); font-size: 0.82rem; letter-spacing: 0.04em; }
.loc-note { margin-top: 10px; color: var(--gold-dim); font-size: 0.75rem; font-style: italic; }

/* ---- Narrator player bar ---- */
.narrator-bar {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 130;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  width: min(560px, calc(100vw - 20px));
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--gold-dim); border-radius: 16px;
  padding: 8px 10px 8px 14px; box-shadow: var(--shadow);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.narrator-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.walk-open .narrator-bar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.nb-text { flex: 1; min-width: 0; }
.nb-title { color: var(--gold-light); font-family: var(--font); font-size: 0.92rem; }
.nb-now { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-btn { background: none; border: none; color: var(--gold); font-size: 1.05rem; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; }
.nb-main { background: var(--gold); color: var(--bg); }
.voice-select {
  width: 100%; padding: 10px; border-radius: 10px; font-size: 0.95rem;
  background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border);
}

/* ---- Memorize ---- */
.memo-steps { display: flex; gap: 6px; margin-bottom: 12px; }
.memo-step { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-elevated); }
.memo-step.on { background: var(--gold); }
.memo-verse { font-size: 1.3rem; line-height: 2; }
.mw.hidden { cursor: pointer; }
.mgap { color: var(--gold-dim); letter-spacing: 1px; }
.mw.peeked { color: var(--gold-light); }
.memo-hint { margin: 10px 0 4px; font-size: 0.92rem; }
.memo-input { min-height: 110px; }
.memo-success { color: var(--success); margin-top: 10px; line-height: 1.5; }
.memo-badge { margin-top: 12px; color: var(--success); font-size: 0.9rem; }
.memo-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.memo-item:last-child { border-bottom: none; }
.memo-date { color: var(--text-muted); font-size: 0.8rem; }

/* ---- The Daily Walk (full screen) ---- */
.walk-open, .walk-open body { overflow: hidden; }
.walk {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.walk::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(100% 60% at 50% 0%, rgba(212, 168, 75, 0.12), transparent 70%),
              radial-gradient(70% 40% at 50% 110%, rgba(230, 150, 60, 0.10), transparent 70%);
}
[data-tod="night"] .walk::before { background: radial-gradient(100% 60% at 50% 0%, rgba(70, 90, 170, 0.18), transparent 70%), radial-gradient(70% 40% at 50% 110%, rgba(230, 150, 60, 0.12), transparent 70%); }
[data-tod="dawn"] .walk::before { background: radial-gradient(100% 60% at 50% 0%, rgba(232, 140, 90, 0.20), transparent 70%); }
.walk > * { position: relative; }
.walk-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; max-width: 720px; width: 100%; margin: 0 auto; }
.walk-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--gold); font-size: 1rem; cursor: pointer;
}
.walk-icon.on { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.walk-dots { flex: 1; display: flex; gap: 5px; justify-content: center; }
.walk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: all 0.3s; }
.walk-dot.done { background: var(--gold-dim); }
.walk-dot.on { background: var(--gold); width: 20px; border-radius: 4px; }
.walk-step { text-align: center; color: var(--gold-dim); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 4px 0 2px; }
.walk-body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 22px 24px; max-width: 680px; width: 100%; margin: 0 auto; }
.walk-body.enter .walk-page { animation: walkIn 0.6s ease both; }
@keyframes walkIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.walk-page { flex: 1 0 auto; display: flex; flex-direction: column; }
.walk-center { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px 0; }
.walk-title { font-family: var(--font); color: var(--gold-light); font-size: 1.5rem; line-height: 1.35; margin: 26px 0 10px; font-weight: normal; }
.walk-sub { color: var(--text-muted); font-size: 1rem; line-height: 1.6; max-width: 420px; }
.walk-h { font-family: var(--font); color: var(--gold); font-size: 1.4rem; font-weight: normal; margin: 6px 0 14px; }
.walk-kicker { color: var(--gold-dim); font-size: 0.8rem; letter-spacing: 0.08em; margin-bottom: 10px; }
.walk-kicker[style] { border-left: 3px solid var(--season); padding-left: 8px; }
.walk-center .walk-kicker[style] { border-left: none; padding-left: 0; border-bottom: 2px solid var(--season); padding-bottom: 4px; }
.walk-verse { font-size: 1.55rem; line-height: 1.65; border: none; padding: 0; text-align: center; max-width: 560px; }
.walk-verse.benediction { font-size: 1.2rem; }
.walk-ref { font-size: 1rem; text-align: center; }
.walk-box { width: 100%; text-align: left; margin-top: 16px; }
.walk-box .reflection { font-size: 1.08rem; }
.walk-prayer { font-size: 1.12rem; line-height: 1.8; white-space: pre-line; }
.walk-prompt { font-style: italic; font-size: 1.05rem; margin-bottom: 12px; }
.walk-journal { min-height: 200px; }
.walk-cross { font-size: 2.6rem; color: var(--gold); text-shadow: 0 0 24px rgba(212, 168, 75, 0.6); margin-bottom: 18px; }
.walk-end-btns { justify-content: center; margin-top: 22px; }
.walk-sound { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 26px; width: 100%; max-width: 420px; }
.walk-nav { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px 16px; max-width: 720px; width: 100%; margin: 0 auto; border-top: 1px solid var(--border); }
.walk-nav .btn { min-width: 120px; }

/* breathing circle */
.breath { position: relative; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
.breath-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 75, 0.35), rgba(212, 168, 75, 0.05) 70%);
  border: 1px solid var(--gold-dim);
  transform: scale(0.55); transition: transform 4s ease-in-out;
}
.breath.in .breath-ring { transform: scale(1); }
.breath-word { position: relative; color: var(--gold-light); font-family: var(--font); font-size: 1rem; }

@media (max-width: 380px) {
  .walk-verse { font-size: 1.35rem; }
  .walk-sound { grid-template-columns: repeat(3, 1fr); }
}
[data-reduce-motion="1"] .breath-ring { transition: none; transform: scale(0.85); }

/* Prayers in movements */
.prayer-ref { font-size: 0.85rem; color: var(--gold-dim); margin-bottom: 14px; font-style: italic; }
.prayer-body .prayer-para { font-size: 1.1rem; line-height: 1.8; margin-bottom: 16px; }
.prayer-body .prayer-para:last-child { margin-bottom: 18px; }
.walk-prayer { white-space: pre-line; }

/* =====================================================================
   Bible reader, highlights & notes, plans, prayer list, reminders
   ===================================================================== */
#search-scope { padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); }
.offline-tag { font-size: 0.7rem; color: var(--gold-dim); border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; vertical-align: middle; font-family: var(--font-sans); }
.chapter-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 6px; }
.keep-going { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem; }
.keep-going input { accent-color: var(--gold); width: 18px; height: 18px; }
.tap-hint { font-size: 0.78rem; color: var(--gold-dim); margin: 4px 0 10px; }
.bible-verse { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: 0 -4px 8px; transition: background 0.3s; }
.bible-verse.reading { background: rgba(212, 168, 75, 0.16); box-shadow: inset 3px 0 0 var(--gold); }
.bible-verse.flash { animation: verseFlash 2.4s ease; }
@keyframes verseFlash { 0%, 60% { background: rgba(212, 168, 75, 0.35); } 100% { background: transparent; } }
.note-mark { color: var(--gold); font-size: 0.8rem; margin-left: 4px; }
.hl-gold { background: rgba(230, 190, 80, 0.28); }
.hl-green { background: rgba(110, 180, 110, 0.26); }
.hl-blue { background: rgba(90, 150, 220, 0.26); }
.hl-rose { background: rgba(220, 110, 140, 0.26); }
.bible-verse.highlighted { background: rgba(230, 190, 80, 0.28); }
.hl-swatch-gold { background: #e6be50; } .hl-swatch-green { background: #6eb46e; } .hl-swatch-blue { background: #5a96dc; } .hl-swatch-rose { background: #dc6e8c; }

.verse-sheet { position: fixed; inset: 0; z-index: 150; }
.vs-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.2s; }
.vs-panel {
  position: absolute; left: 50%; bottom: 0; width: min(600px, 100%); transform: translate(-50%, 100%);
  background: var(--bg-card); border: 1px solid var(--border); border-bottom: none; border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); transition: transform 0.25s ease; max-height: 85vh; overflow-y: auto;
}
.verse-sheet.open .vs-backdrop { opacity: 1; }
.verse-sheet.open .vs-panel { transform: translate(-50%, 0); }
.vs-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 10px; }
.vs-ref { color: var(--gold); font-family: var(--font); font-size: 1.05rem; }
.vs-text { color: var(--text); line-height: 1.6; margin: 6px 0 12px; font-family: var(--font); }
.vs-colors { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.vs-color { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.vs-color.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg-card) inset; }
.vs-clear { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); font-size: 0.9rem; }
.vs-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vs-actions button { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 11px 6px; font-size: 0.85rem; cursor: pointer; }
.vs-note textarea { width: 100%; min-height: 110px; margin-top: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 10px; font-size: 1rem; }

.search-hit { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 10px 2px; color: var(--text); cursor: pointer; }
.sh-ref { display: block; color: var(--gold); font-size: 0.85rem; margin-bottom: 2px; }
.sh-text { font-family: var(--font); line-height: 1.55; }
.search-hit mark { background: rgba(230, 190, 80, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }

.marks-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mf { display: flex; align-items: center; gap: 6px; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted); border-radius: 18px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; }
.mf.on { border-color: var(--gold); color: var(--gold-light); }
.mf-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.marks-sort { margin-top: 10px; color: var(--text-muted); font-size: 0.85rem; }
.linkish { background: none; border: none; color: var(--gold-dim); cursor: pointer; padding: 2px; font-size: inherit; text-decoration: underline; }
.linkish.on { color: var(--gold-light); text-decoration: none; }
.mark-item { cursor: pointer; border-left: 4px solid var(--border); }
.hl-edge-gold { border-left-color: #e6be50; } .hl-edge-green { border-left-color: #6eb46e; } .hl-edge-blue { border-left-color: #5a96dc; } .hl-edge-rose { border-left-color: #dc6e8c; }
.mark-ref { color: var(--gold); font-family: var(--font); display: flex; justify-content: space-between; gap: 8px; }
.mark-date { color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-sans); }
.mark-text { font-family: var(--font); line-height: 1.6; margin-top: 6px; border-radius: 4px; padding: 2px 4px; }
.mark-note { margin-top: 8px; color: var(--text-muted); font-style: italic; line-height: 1.5; }

.plans-heading { color: var(--gold-dim); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 22px 4px 10px; font-weight: normal; }
.active-plan { border-color: var(--gold-dim); }
.active-tag { font-size: 0.7rem; background: var(--gold); color: var(--bg); border-radius: 10px; padding: 2px 8px; vertical-align: middle; font-family: var(--font-sans); }
.plan-day.partial .plan-open { color: var(--gold-light); }
.pd-num { color: var(--gold-dim); font-size: 0.8rem; margin-right: 4px; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.plan-chip { border: 1px solid var(--border); border-radius: 14px; padding: 4px 10px; font-size: 0.82rem; color: var(--text-muted); }
.plan-chip.done { border-color: var(--gold-dim); color: var(--gold-light); }
.plan-chip.done::before { content: '✓ '; }
.plan-cta { cursor: pointer; }
.plan-toggle { margin-top: 8px; }
.num-input { width: 74px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.plan-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 10px; padding: 10px 12px; margin: 8px 0 10px; }
.plan-banner > div { flex: 1; min-width: 160px; }
.pb-ref { color: var(--text); font-size: 0.92rem; }
.pb-done { color: var(--success); font-size: 0.9rem; }

.prayer-tabs { display: flex; gap: 8px; margin-top: 14px; }
.pt { flex: 1; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted); border-radius: 10px; padding: 9px; cursor: pointer; font-size: 0.9rem; }
.pt.on { border-color: var(--gold); color: var(--gold-light); }
.pi-row { display: flex; align-items: center; gap: 10px; }
.pi-check input { width: 22px; height: 22px; accent-color: var(--gold); }
.pi-main { flex: 1; min-width: 0; }
.pi-text { color: var(--text); font-size: 1.02rem; }
.pi-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
.pi-del { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 4px 6px; }
.pi-answer-form textarea { width: 100%; min-height: 80px; margin-top: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 10px; }
.prayer-item.done .pi-text { color: var(--gold-light); }
.prayer-item.answered { border-left: 4px solid var(--success); }
.pi-note { margin-top: 8px; font-style: italic; color: var(--text); line-height: 1.55; }
.faithful .verse { text-align: center; }
.walk-prayers { display: flex; flex-direction: column; gap: 8px; }
.walk-prayer-item { display: flex; align-items: center; gap: 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 1.05rem; cursor: pointer; }
.walk-prayer-item input { width: 22px; height: 22px; accent-color: var(--gold); }
.walk-prayer-item.done { border-color: var(--gold-dim); color: var(--gold-light); }

.rem-time { display: flex; align-items: center; gap: 10px; color: var(--text); margin: 6px 0 12px; }
.rem-time input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); font-size: 1rem; }
.rem-toggle { display: flex; align-items: center; gap: 10px; color: var(--text); margin: 6px 0; }
.rem-toggle input { width: 20px; height: 20px; accent-color: var(--gold); }
.rem-status { font-size: 0.85rem; }
