@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy-950: #0B1330;
  --navy-900: #101A3D;
  --navy-800: #16214A;
  --navy-700: #1E2C5E;
  --gold-500: #C7A248;
  --gold-300: #E4CD8C;
  --gold-100: #F6EDD3;
  --parchment-100: #F8F3E7;
  --parchment-200: #F1E9D6;
  --ink-900: #201C14;
  --ink-700: #4A4436;
  --crimson-600: #8B2635;
  --crimson-700: #6E1D2A;
  --line: rgba(199,162,72,0.25);
  --shadow: 0 8px 30px rgba(11,19,48,0.25);
  --radius: 6px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy-950);
  color: var(--parchment-100);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout shell ---------- */
.app-shell {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-950);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--navy-950) 70%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--gold-300);
}
.brand .mark {
  width: 28px; height: 28px;
  border: 1.5px solid var(--gold-500);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-500);
}

.back-link { color: var(--gold-300); font-size: 0.9rem; font-weight: 500; }

main { flex: 1; padding: 0 0 100px; }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 6px;
  color: rgba(248,243,231,0.55);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
}
.tab.active { color: var(--gold-300); }
.tab svg { width: 20px; height: 20px; }

/* ---------- Hero / home ---------- */
.hero {
  padding: 28px 20px 20px;
  text-align: center;
}
.hero .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.1;
  margin: 10px 0 6px;
  color: var(--parchment-100);
}
.hero p.sub {
  color: rgba(248,243,231,0.65);
  font-size: 0.95rem;
  max-width: 46ch;
  margin: 0 auto;
}

.card {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 20px;
}
.card-gold {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  border: 1px solid var(--gold-500);
}

.today-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 600;
}
.today-ref {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 4px 0 10px;
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--gold-500);
  background: transparent;
  color: var(--gold-300);
  transition: background 0.15s, color 0.15s;
}
.btn-solid {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
}
.btn:active { transform: scale(0.98); }

/* Path / progress signature element */
.path-wrap { padding: 4px 20px 10px; }
.path-track {
  position: relative;
  height: 10px;
  background: var(--navy-800);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.path-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--crimson-700), var(--gold-500));
  border-radius: 999px;
}
.path-meta {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: rgba(248,243,231,0.6);
  margin-top: 6px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-300);
  letter-spacing: 0.02em;
  margin: 24px 20px 10px;
}

.grid-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
}
.tile {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.tile .tile-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--parchment-100); }
.tile .tile-sub { font-size: 0.78rem; color: rgba(248,243,231,0.55); margin-top: 2px; }

/* ---------- Reader ---------- */
.reader-controls {
  display: flex; gap: 8px; padding: 12px 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
select {
  background: var(--navy-800);
  color: var(--parchment-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.page {
  background: var(--parchment-100);
  color: var(--ink-900);
  margin: 16px 16px 0;
  border-radius: var(--radius);
  padding: 30px 24px 40px;
  box-shadow: var(--shadow);
}
.page h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--navy-900);
}
.page .chapter-ref { font-size: 0.8rem; color: var(--ink-700); margin-bottom: 18px; letter-spacing: 0.04em; text-transform: uppercase;}

.verse { line-height: 1.85; font-size: 1.08rem; font-family: var(--font-body); }
.verse .vnum {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78em;
  color: var(--gold-500);
  vertical-align: super;
  margin-right: 3px;
}
.verse.woj { color: var(--crimson-700); }
.verse.woj .vnum { color: var(--crimson-600); }

.dropcap::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  font-weight: 700;
  float: left;
  line-height: 0.78;
  padding: 0.03em 0.07em 0 0;
  color: var(--navy-800);
}

.chapter-nav { display: flex; justify-content: space-between; margin: 18px 16px 0; gap: 10px; }
.chapter-nav .btn { flex: 1; }

.legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: rgba(248,243,231,0.55);
  padding: 0 20px 8px;
}
.legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson-600); }

/* ---------- Plan ---------- */
.plan-list { padding: 8px 20px 0; }
.plan-day {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.plan-day.done { opacity: 0.55; }
.plan-day .num {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: var(--gold-300); flex-shrink: 0;
}
.plan-day.done .num { background: var(--gold-500); color: var(--navy-950); }
.plan-day .ref { font-weight: 600; font-size: 0.92rem; }
.plan-day .sub { font-size: 0.72rem; color: rgba(248,243,231,0.5); margin-top: 1px; }
.plan-day .actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-700); border: 1px solid var(--line);
  color: var(--gold-300);
}
.icon-btn.checked { background: var(--gold-500); color: var(--navy-950); border-color: var(--gold-500); }

/* ---------- Devotional ---------- */
.devo-card { padding: 26px 22px; }
.devo-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--gold-300); margin: 4px 0 14px; }
.devo-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--parchment-100);
  border-left: 3px solid var(--gold-500);
  padding-left: 14px;
  margin: 0 0 6px;
}
.devo-verse-ref { font-size: 0.78rem; color: var(--gold-500); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 18px; }
.devo-reflection { line-height: 1.75; color: rgba(248,243,231,0.88); font-size: 0.97rem; }
.devo-prayer {
  margin-top: 18px; padding: 14px 16px;
  background: var(--navy-700); border-radius: var(--radius);
  font-style: italic; font-size: 0.92rem; color: var(--gold-100);
}
.devo-prayer .label { font-style: normal; font-weight: 600; color: var(--gold-500); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; display:block; margin-bottom:6px;}

/* ---------- Revelation ---------- */
#rev-map { height: 320px; border-radius: var(--radius); margin: 4px 20px 0; border: 1px solid var(--line); }
.timeline { padding: 4px 20px 10px; }
.tl-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: none; }
.tl-range {
  font-family: var(--font-display); font-weight: 700; color: var(--gold-500);
  font-size: 0.78rem; white-space: nowrap; padding-top: 2px; min-width: 78px;
}
.tl-title { font-weight: 600; font-size: 0.98rem; margin-bottom: 3px; }
.tl-summary { font-size: 0.85rem; color: rgba(248,243,231,0.65); line-height: 1.55; }

.church-popup { font-family: var(--font-body); color: var(--ink-900); max-width: 220px; }
.church-popup h4 { font-family: var(--font-display); margin: 0 0 4px; color: var(--navy-900); font-size: 1.05rem; }
.church-popup .modern { font-size: 0.72rem; color: var(--ink-700); margin-bottom: 6px; }
.church-popup .tag { font-size: 0.75rem; margin: 3px 0; }
.church-popup .tag b { color: var(--crimson-700); }

/* ---------- Downloads ---------- */
.download-row { display: flex; gap: 10px; padding: 0 20px; }
.download-row .btn { flex: 1; }

footer.credit {
  text-align: center; padding: 20px; font-size: 0.72rem;
  color: rgba(248,243,231,0.4);
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.7rem; }
  .grid-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
