/* ============================================================
   Clearspring — "Springwater"

   Cheltenham is a spa town built on its springs; the church is
   Clearspring. The look is clear water and morning light: cool
   mineral whites, deep pool teal, turquoise used only as light.
   Fonts are self-hosted so the app looks right offline too.
   ============================================================ */

@font-face { font-family: "Literata"; src: url("fonts/literata.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #F5F8F7;          /* mineral white — cool, never cream */
  --surface: #FFFFFF;
  --surface-2: #E8F0EE;   /* limestone */
  --ink: #0B2E2F;         /* deep pool */
  --muted: #56716F;
  --line: #DAE5E2;
  --white: #FFFFFF;
  --accent: #0B7A71;      /* text-safe spring teal, 5:1 on --bg */
  --accent-soft: #19A79B;
  --on-accent: #FFFFFF;
  --accent-fill: #0B2E2F; /* filled/selected things are deep pool */
  --on-accent-fill: #FFFFFF;
  --spring: #19A79B;      /* bright turquoise — dots, bars, numerals only */
  --wash: rgba(25,167,155,0.12);
  --glass: rgba(255,255,255,0.8);
  --quest-deep: #06201F;
  --quest-mid: #0D5C5E;
  --quest-ember: #2DD4BF;
  --shadow-sm: 0 1px 2px rgba(11,46,47,0.06);
  --shadow-md: 0 8px 24px -16px rgba(11,46,47,0.30);
  --shadow-lg: 0 18px 40px -20px rgba(11,46,47,0.40);
  --invert-bg: #0B2E2F;
  --invert-ink: #F5F8F7;
  --invert-muted: rgba(245,248,247,0.7);
  --danger: #B42318;
  --success: #2E7D32;

  /* Shape: soft and generous, like water-worn stone. */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  /* Type scale. */
  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.96875rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.125rem;

  /* Two voices. Literata (made for long reading on screens) speaks for
     scripture and headings; Figtree does everything you tap. */
  --display: "Literata", Georgia, serif;
  --emph: "Literata", Georgia, serif;
  --reading: "Literata", Georgia, serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --label: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #061719;          /* night water */
  --surface: #0C2326;
  --surface-2: #12302F;
  --ink: #E7F2F0;
  --muted: #8DA8A5;
  --line: #1A3A3C;
  --white: #0C2326;
  --accent: #5FDCCB;
  --accent-soft: #8DE9DC;
  --on-accent: #061719;
  --accent-fill: #5FDCCB;
  --on-accent-fill: #061719;
  --spring: #3CC9B8;
  --wash: rgba(95,220,203,0.13);
  --glass: rgba(12,35,38,0.8);
  --quest-deep: #041514;
  --quest-mid: #0A4A4C;
  --quest-ember: #5EEAD4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 26px -16px rgba(0,0,0,0.7);
  --shadow-lg: 0 18px 40px -18px rgba(0,0,0,0.8);
  --invert-bg: #11393A;
  --invert-ink: #E7F2F0;
  --invert-muted: rgba(231,242,240,0.7);
  --danger: #F87171;
  --success: #4ADE80;
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #061719;          /* night water */
    --surface: #0C2326;
    --surface-2: #12302F;
    --ink: #E7F2F0;
    --muted: #8DA8A5;
    --line: #1A3A3C;
    --white: #0C2326;
    --accent: #5FDCCB;
    --accent-soft: #8DE9DC;
    --on-accent: #061719;
    --accent-fill: #5FDCCB;
    --on-accent-fill: #061719;
    --spring: #3CC9B8;
    --wash: rgba(95,220,203,0.13);
    --glass: rgba(12,35,38,0.8);
    --quest-deep: #041514;
    --quest-mid: #0A4A4C;
    --quest-ember: #5EEAD4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 10px 26px -16px rgba(0,0,0,0.7);
    --shadow-lg: 0 18px 40px -18px rgba(0,0,0,0.8);
    --invert-bg: #11393A;
    --invert-ink: #E7F2F0;
    --invert-muted: rgba(231,242,240,0.7);
    --danger: #F87171;
    --success: #4ADE80;
  }
}

/* Colour changes shouldn't flash when switching theme */
html[data-theme] body,
html[data-theme] .bible-row,
html[data-theme] .game-tile,
html[data-theme] .qa-card {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}


* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- Hero ---------- */

.hero {
  padding: 3rem 1.5rem 2.25rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-arch { max-width: 34rem; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: block;
  height: clamp(2.4rem, 8vw, 3.2rem);
  width: auto;
  margin: 0 auto;
}

.tagline {
  color: var(--muted);
  margin: 1rem 0 0;
  font-size: var(--fs-md);
}

/* ---------- Board / schedule ---------- */

.board {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.day-group { margin-bottom: 2.5rem; }

.day-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-md);
  margin: 0 0 .5rem;
  color: var(--ink);
}

.day-rule {
  height: 1px;
  background: var(--line);
  margin-bottom: 1rem;
}

.card {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.card:last-child { border-bottom: none; }

.card-time {
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--ink);
  min-width: 4.6rem;
  padding-top: .125rem;
}

.card-body { flex: 1; }

.card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  background: var(--ink);
  padding: .125rem .5rem;
  border-radius: var(--r-full);
  margin-bottom: .375rem;
}

.card.event .card-tag {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  margin: 0 0 .25rem;
}

.card-location, .card-desc {
  margin: .125rem 0;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.5;
}

.card-recurring {
  display: inline-block;
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-sub { font-size: var(--fs-base); }

.site-footer {
  text-align: center;
  padding: 2rem 0 3rem;
}
.site-footer a {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

/* ---------- Flash messages ---------- */

.flash {
  max-width: 40rem;
  margin: 1rem auto 0;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
}
.flash p { margin: .25rem 0; }

/* ---------- Auth / admin ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 22rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.auth-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-xl);
  margin: 0 0 1.5rem;
}

form label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 1rem 0 .375rem;
}

form input, form select, form textarea {
  width: 100%;
  padding: .75rem .75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-base);
}

form input:focus, form select:focus, form textarea:focus {
  border-color: var(--ink);
}

.btn-primary, .btn-ghost, .btn-danger {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
  margin-top: 1.5rem;
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-danger {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-primary.small, .btn-ghost.small, .btn-danger.small {
  padding: .375rem .75rem;
  font-size: var(--fs-xs);
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
}

.admin-page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  margin: .25rem 0 0;
}

.admin-actions { display: flex; gap: .5rem; }

.admin-table { border-top: 1px solid var(--line); }

.admin-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.admin-row-date {
  display: flex;
  flex-direction: column;
  min-width: 6rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.mono { font-family: var(--mono); }

.admin-row-main { flex: 1; min-width: 10rem; }
.admin-row-main strong { display: block; font-family: var(--display); font-weight: 700; font-size: var(--fs-md); margin-top: .25rem; }
.admin-row-loc { font-size: var(--fs-sm); color: var(--muted); }

.admin-row-actions { display: flex; gap: .5rem; }
.admin-row-actions form { margin: 0; }

.event-form { max-width: 26rem; margin-top: 1.5rem; }
.form-row { display: flex; gap: 1rem; }
.form-row > div { flex: 1; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; align-items: center; }
.form-actions .btn-primary { width: auto; margin-top: 0; }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.filter-chips { display: flex; gap: .5rem; }

.chip {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  padding: .375rem .75rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  font-weight: 600;
}

.subscribe-btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: .5rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Calendar grid ---------- */

.calendar {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 2.5rem;
  background: var(--surface);
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.cal-month-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-md);
  margin: 0;
}

.cal-nav-btn {
  font-family: var(--mono);
  font-size: var(--fs-md);
  color: var(--ink);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: .375rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .25rem;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--fs-sm);
}

.cal-day.out-of-month { color: var(--muted); opacity: 0.4; }

.cal-day.is-today .cal-day-num {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-full);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cal-day.has-events { background: var(--surface-2); }

.cal-dots { display: flex; gap: .25rem; }

.dot {
  width: 5px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--ink);
}
.dot.event {
  background: transparent;
  border: 1px solid var(--ink);
  width: 4px;
  height: 4px;
}

/* ---------- Add to calendar ---------- */

.card-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}

.add-to-cal {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink);
}

/* ---------- Site nav — floating glass tab bar ---------- */

.site-nav {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: calc(100% - 32px);
  max-width: 560px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: .25rem;
  padding: .5rem .5rem;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--label);
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.site-nav a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  padding: .375rem .125rem;
  border-radius: var(--r-sm);
  transition: color 0.25s ease, background-color 0.25s ease;
}

.site-nav a.active {
  color: var(--on-accent-fill);
  background: var(--accent-fill);
  font-weight: 700;
}

body { padding-bottom: 0; }
body.has-tabbar { padding-bottom: 5.5rem; }

/* ---------- Small page hero (non-home pages) ---------- */

.hero-small { padding: 2.5rem 1.5rem 2rem; }
.page-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  margin: 0;
}

.section-label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 1rem;
}

/* ---------- Q&A ---------- */

.qa-card, .qa-admin-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--surface);
}

.qa-question {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-md);
  margin: 0 0 .375rem;
}

.qa-meta {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
  margin: 0 0 .75rem;
}

.qa-answer {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  padding-left: 1rem;
  border-left: 2px solid var(--ink);
}

.qa-answer-form { margin-top: .5rem; }
.qa-answer-form textarea { margin-bottom: .5rem; }

.qa-admin-actions { display: flex; gap: .5rem; }
.qa-admin-card form:last-child { margin-top: .75rem; }

@media (max-width: 480px) {
  .hero { padding: 2.25rem 1.25rem 1.75rem; }
  .card { gap: .75rem; }
}

/* ---------- Games hub ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1rem;
}

.game-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .375rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
}

.game-tile-emoji { font-size: var(--fs-2xl); }
.game-tile-title { font-family: var(--display); font-weight: 700; font-size: var(--fs-base); }
.game-tile-desc { font-size: var(--fs-xs); color: var(--muted); }

.game-tile-soon { opacity: 0.5; }

.game-note {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ---------- Home ---------- */

.verse-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  background: var(--invert-bg);
  color: var(--white);
}
.verse-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.5;
  margin: 0 0 .5rem;
}
.verse-ref {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.75;
  margin: 0;
}

.home-section { margin-bottom: 2rem; }
.home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .75rem;
}
.home-see-all {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
  text-decoration: none;
}



.placeholder-card {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.6;
}

.quicklink-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.quicklink-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: 1rem .375rem;
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-family: var(--mono);
  text-align: center;
}
.quicklink-emoji { font-size: var(--fs-lg); }

/* ---------- Bible reader ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: .5rem;
}
.book-tile {
  padding: .75rem .5rem;
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-base);
  text-align: center;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.8rem, 1fr));
  gap: .5rem;
}
.chapter-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-base);
}

.reader-text {
  font-family: var(--display);
  font-size: var(--fs-md);
  line-height: 1.85;
}
.reader-text p { margin: 0 0 .75rem; }
.verse-num {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
  margin-right: .25rem;
}
.reader-note {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
}
.reader-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.translation-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.verse-line { position: relative; padding-right: 1.5rem; }
.save-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--fs-base);
  color: var(--muted);
  vertical-align: middle;
  margin-left: .25rem;
  line-height: 1;
}
.save-star.is-saved { color: var(--ink); }

/* ============================================================
   WARMTH LAYER — softer, cleaner, more editorial
   Overrides that sit on top of the base styles above.
   ============================================================ */

/* Softer, warmer section labels (were hard uppercase mono) */
.section-label,
.eyebrow {
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: var(--fs-2xs);
  color: var(--accent);
}

/* Headings: warm serif, more character */
.page-title,
.hero h1,
.qa-question,
.verse-text,
.game-tile-title,
.book-tile,
.home-event-title,
.mm-win p {
  font-family: var(--display);
  letter-spacing: -0.01em;
}

/* Hero softening */
.hero {
  border-bottom: none;
  padding-bottom: 1.5rem;
}
.hero-small { padding: 2.5rem 1.5rem 1.5rem; }
.tagline { color: var(--muted); }

/* Cards: soft shadow + warmer corners instead of hard borders */
.verse-card {
  border: none;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--invert-bg), var(--surface-2));
  box-shadow: var(--shadow-lg);
}
.verse-text { font-weight: 500; }

.game-tile,
.book-tile,
.chapter-tile,
.quicklink-tile {
  border: none;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.game-tile:hover,
.book-tile:hover,
.quicklink-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.chapter-tile { border-radius: var(--r-md); }

.qa-card,
.qa-admin-card {
  border: none;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.placeholder-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

/* Cards on the calendar/agenda */
.card { border-color: var(--line); }
.card-tag {
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  border-radius: var(--r-full);
}

/* Calendar container softening */
.calendar {
  border: none;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.cal-day.is-today .cal-day-num,
.cal-day.has-events { border-radius: var(--r-md); }

/* Buttons: pill-shaped, warmer */
.btn-primary {
  background: var(--accent);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  border-radius: var(--r-full);
  border-color: var(--line);
}
.btn-danger { border-radius: var(--r-full); }

/* Chips / filter pills */
.chip {
  font-family: var(--label);
  border-radius: var(--r-full);
  border-color: var(--line);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.subscribe-btn {
  border-radius: var(--r-full);
  border-color: var(--accent-soft);
  color: var(--accent);
}

/* Bottom tab bar styling now lives in the floating glass block above.
   (Former warm-override removed so it doesn't conflict.) */

/* Reader typography — warmer, more readable */
.reader-text { font-family: var(--reading); font-weight: 400; }
.verse-num { color: var(--accent); font-family: var(--label); font-weight: 600; }
.save-star.is-saved { color: var(--accent); }

/* Day labels on calendar */
.day-label { font-family: var(--display); }

/* Verse reference small caps */
.verse-ref,
.reader-note,
.qa-meta,
.card-time,
.mono {
  font-family: var(--label);
}

/* ============================================================
   V2 — EDITORIAL HOME: photographic hero, bento grid, motion
   ============================================================ */

/* Anything marked hidden stays hidden, whatever display a class gives it.
   (Without this, a card styled display:flex showed even while empty.) */
[hidden] { display: none !important; }

/* --- Motion primitives --- */
/* Only hidden once motion.js is running (it adds .motion-ok), so if the
   script is slow, blocked or out of date, everything is simply visible. */
.motion-ok [data-load]:not(.in), .motion-ok [data-reveal]:not(.in) {
  opacity: 0;
  transform: translateY(18px);
}
[data-load], [data-reveal] {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-load].in, [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-load], [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --- Hero --- */
.v2-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.v2-hero-bg {
  position: absolute;
  inset: 0;
  background: url("/static/hero-worship.jpg") center top/cover no-repeat;
  transform: scale(calc(1 + (var(--scroll, 0) * 0.08)));
  transition: transform 0.1s linear;
  z-index: -3;
}
.v2-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(20, 24, 30, 0.12) 0%,
    rgba(20, 24, 30, 0.0) 45%,
    rgba(20, 24, 30, 0.30) 100%);
  z-index: -2;
}
.v2-hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 20%;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 96%);
  z-index: -1;
}
.v2-hero-inner {
  width: 100%;
  padding: 0 1rem 1.5rem;
  text-align: center;
}
.v2-hero-panel {
  margin: 0 auto;
  max-width: 22rem;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: var(--r-lg);
  background: rgba(18, 21, 27, 0.68);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}
.v2-eyebrow {
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--accent-soft);
  margin: 0 0 1rem;
}
.v2-hero-logo {
  height: clamp(2.4rem, 11vw, 3.4rem);
  width: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: brightness(0) invert(1) drop-shadow(0 2px 16px rgba(0,0,0,0.4));
}
.v2-hero-sub {
  font-family: var(--display);
  font-size: clamp(1.02rem, 4.2vw, 1.3rem);
  font-weight: 500;
  color: #FBF8F3;
  margin: 0 0 1.25rem;
  font-style: italic;
}
/* Hero call-to-action.
   These colours are deliberately fixed rather than themed. The button sits on
   a photograph with a dark scrim, which looks identical in light and dark
   mode — so tying it to var(--ink) made it follow the app theme while its
   actual backdrop never changed. In dark mode that put near-white text on a
   cream background: a contrast ratio of 1.1:1, effectively invisible.

   Bright turquoise with near-black text is 10.6:1 and unmistakably the brand
   colour. Note the text is BLACK: white on turquoise is 1.9:1 and fails. */
.v2-hero-cta {
  display: inline-block;
  background: #2DD4BF;
  color: #06201F;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  padding: .75rem 1.75rem;
  border-radius: var(--r-full);
  text-decoration: none;
  /* A hairline keeps the edge defined over the brighter parts of the photo. */
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.v2-hero-cta:hover {
  background: #E8E8EA;
}
.v2-hero-cta:active { transform: scale(0.96); }
.v2-hero-cta:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

.v2-main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  position: relative;
}

/* --- Verse centerpiece --- */
.v2-verse {
  position: relative;
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  margin-bottom: 1rem;
}
.v2-verse-mark {
  font-family: var(--display);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--accent-soft);
  opacity: 0.5;
  display: block;
  height: 2.2rem;
}
.v2-verse-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.3rem, 5.5vw, 1.75rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.v2-verse-ref {
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

/* --- Bento grid --- */
.v2-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.v2-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .375rem;
  padding: 1.25rem;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), box-shadow 0.22s ease;
  min-height: 9.5rem;
}
.v2-cell:active { transform: scale(0.975); }
@media (hover: hover) {
  .v2-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}
.v2-cell-emoji { font-size: var(--fs-2xl); }
.v2-cell-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.v2-cell-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: .125rem 0 0;
  line-height: 1.4;
}
.v2-arrow {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  margin-top: .25rem;
}
.v2-arrow.light { color: rgba(255,255,255,0.92); }

/* Feature cell spans full width, has media band */
.v2-cell-feature {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  min-height: 7.5rem;
}
.v2-cell-feature-media {
  flex: 0 0 38%;
  background: url("/static/sermon-latest.jpg") center/cover no-repeat;
  position: relative;
}
.v2-cell-feature-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20,24,30,0.1), rgba(20,24,30,0.45));
}
.v2-cell-feature-media::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.95);
  font-size: var(--fs-lg);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.v2-cell-feature-body {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
}

/* Tall cell spans two rows on the right */
.v2-cell-tall { grid-row: span 2; justify-content: flex-start; }

/* Accent cell — deep, inverted */
.v2-cell-accent {
  background: linear-gradient(155deg, var(--accent), var(--quest-mid));
  color: #fff;
}
.v2-cell-accent .v2-cell-title { color: #fff; }

.v2-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-2xs);
  font-weight: 700;
  padding: .25rem .5rem;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink);
}
.v2-tag.service { background: var(--ink); color: var(--bg); }
.v2-tag.event { background: var(--accent); color: #fff; }

/* --- Sections --- */
.v2-section { margin-bottom: 2.5rem; }
.v2-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.v2-section-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin: 0;
  letter-spacing: -0.01em;
}
.v2-section-link {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.v2-empty { color: var(--muted); font-size: var(--fs-base); }

/* --- Event list --- */
.v2-events { display: flex; flex-direction: column; gap: .75rem; }
.v2-event {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.v2-event:active { transform: scale(0.985); }
@media (hover: hover) {
  .v2-event:hover { transform: translateX(3px); box-shadow: var(--shadow-lg); }
}
.v2-event-when {
  flex: 0 0 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  padding: .375rem 0;
  background: var(--surface);
  border-radius: var(--r-md);
}
.v2-event-day {
  font-family: var(--label);
  text-transform: none;
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  font-weight: 700;
  color: var(--accent);
}
.v2-event-date {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--ink);
}
.v2-event-body { flex: 1; min-width: 0; }
.v2-event-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  margin: .25rem 0 .125rem;
  line-height: 1.2;
}
.v2-event-meta { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.v2-event-chevron {
  font-size: var(--fs-xl);
  color: var(--muted);
  opacity: 0.5;
  font-family: var(--display);
}

/* ============================================================
   V2 — SECONDARY PAGES: richer hero + tiles (Community/Bible/More/Watch/Games)
   ============================================================ */

/* Refined secondary hero with subtle gradient wash */
.hero-small {
  position: relative;
  padding: 3rem 1.5rem 1.75rem;
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(25,167,155,0.08), transparent 60%);
  border-bottom: none;
}
.hero-small .page-title {
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  line-height: 1.02;
}

/* Upgrade the tile grid into a warmer bento-ish feel */
.game-grid {
  gap: .75rem;
}
.game-tile {
  position: relative;
  align-items: flex-start;
  text-align: left;
  padding: 1.25rem 1.25rem 1.25rem;
  border-radius: var(--r-lg);
  min-height: 8.5rem;
  justify-content: flex-end;
  gap: .25rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.game-tile::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -30%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(25,167,155,0.06), transparent 70%);
  pointer-events: none;
}
.game-tile-emoji {
  font-size: var(--fs-2xl);
  margin-bottom: auto;
}
.game-tile-title {
  font-size: var(--fs-md);
  line-height: 1.1;
}
.game-tile-desc {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.game-tile-soon {
  background: var(--surface);
  box-shadow: none;
  border: 1px solid var(--line);
}
.game-tile-soon .game-tile-emoji { opacity: 0.55; }

/* Give live (non-soon) tiles a small "enter" arrow that slides on hover */
.game-tile:not(.game-tile-soon)::after {
  content: "→";
  position: absolute;
  right: 1.1rem;
  bottom: 1.15rem;
  font-family: var(--label);
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
@media (hover: hover) {
  .game-tile:not(.game-tile-soon):hover::after { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   BIBLE SECTION — rebuilt. Content-first, list-based, no emoji.
   Benchmark: YouVersion. Restraint over decoration.
   ============================================================ */

.icn { display: block; flex: none; }

.bible {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

/* Header: title + search, no oversized hero */
.bible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.bible-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-2xl);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.bible-search {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
}

/* Verse of the day — the page's hero content */
.votd {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
/* On Home the page already supplies top spacing, so drop it here to avoid
   doubling up. The Bible page keeps its own padding. */
.home-main .votd { padding-top: 0; }
.votd-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 .75rem;
}
.votd-text {
  font-family: var(--display);
  font-size: var(--fs-lg);
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.votd-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.votd-ref {
  font-family: var(--label);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}
.votd-action {
  font-family: var(--label);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* Section blocks */
.bible-block { margin-bottom: 2rem; }
.bible-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.bible-h2 {
  font-family: var(--display);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.bible-more {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* Horizontal plan rail — varies layout rhythm vs vertical lists */
.plan-rail {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .25rem;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  scrollbar-width: none;
}
.plan-rail::-webkit-scrollbar { display: none; }
.plan-card {
  flex: 0 0 9.5rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease;
}
.plan-card:active { background: var(--surface-2); }
.plan-card-days {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.plan-card-title {
  font-family: var(--display);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
}
.plan-card-sub {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.35;
}

/* Devotional feature — editorial, text-led */
.devo-feature {
  display: block;
  padding: 1.25rem 1.25rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--invert-bg);
  color: var(--invert-ink);
  text-decoration: none;
  transition: transform 0.18s ease;
}
.devo-feature:active { transform: scale(0.985); }
.devo-feature-ref {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-soft);
}
.devo-feature-title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: .375rem 0 .5rem;
  letter-spacing: -0.01em;
}
.devo-feature-excerpt {
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0 0 1rem;
  color: var(--invert-muted);
}
.devo-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--invert-ink);
}

/* Utility list rows — a real list, not tiles */
.bible-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.bible-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.bible-row:active { background: var(--surface); }
.bible-row-icon {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--accent);
  flex: none;
}
.bible-row-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.bible-row-title { font-family: var(--body); font-weight: 600; font-size: var(--fs-base); }
.bible-row-sub { font-size: var(--fs-xs); color: var(--muted); }
.bible-row > .icn { color: var(--muted); opacity: 0.6; }

/* --- Back button in bible header --- */
.bible-back {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: -.5rem;
  color: var(--ink);
  text-decoration: none;
}

/* --- Book search + list --- */
.book-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.book-search input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--body);
  font-size: var(--fs-base);
  color: var(--ink);
  padding: 0;
  outline: none;
  -webkit-appearance: none;
}
.book-search input::placeholder { color: var(--muted); }

.book-group-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 1.5rem 0 .5rem;
}
.book-group-label:first-child { margin-top: 0; }

.book-list { display: flex; flex-direction: column; }
.book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.book-row:active { background: var(--surface); }
.book-row-name { font-size: var(--fs-base); font-weight: 500; }
.book-row-meta {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.book-empty { color: var(--muted); font-size: var(--fs-base); padding: 1.5rem 0; text-align: center; }

/* --- Chapter picker --- */
.chapter-hint {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 0 0 1rem;
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr));
  gap: .5rem;
}
.chapter-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 500;
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease;
}
.chapter-cell:active { background: var(--accent); color: #fff; }

/* ============================================================
   READER — text is the interface
   ============================================================ */

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.reader-bar-back {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  color: var(--ink); text-decoration: none;
  margin-left: -.375rem;
}
.reader-bar-ref {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--ink);
  padding: 0;
  letter-spacing: -0.01em;
}
.reader-bar-trans { display: flex; gap: .25rem; }
.trans-pill {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: .25rem .5rem;
  border-radius: var(--r-md);
  color: var(--muted);
  text-decoration: none;
}
.trans-pill.on { background: var(--ink); color: var(--bg); }

.reader {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Flowing scripture text — verses inline, like a real Bible page */
.scripture {
  font-family: var(--reading);
  font-size: var(--fs-md);
  line-height: 1.9;
  color: var(--ink);
  letter-spacing: 0;
}
.v {
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s ease;
  padding: 0.05em 0;
}
.v.saved { background: rgba(25,167,155, 0.10); }
.v.sel { background: rgba(25,167,155, 0.22); }
.vn {
  font-family: var(--label);
  font-size: 0.6em;
  font-weight: 700;
  color: var(--accent);
  vertical-align: super;
  line-height: 0;
  margin-right: 0.18em;
  font-variant-numeric: tabular-nums;
}

.reader-credit {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.reader-error {
  padding: 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.6;
}
.reader-error strong { color: var(--ink); }

.reader-paging {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: 2rem;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .5rem 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--body);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.page-btn:active { background: var(--surface); }

/* Verse action sheet */
.vsheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.24s cubic-bezier(0.16,1,0.3,1);
}
.vsheet.up { transform: translateY(0); }
.vsheet-inner {
  background: var(--invert-bg);
  color: var(--invert-ink);
  border-radius: var(--r-md);
  padding: 1rem 1rem 1rem;
  box-shadow: var(--shadow-lg);
}
.vsheet-ref {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-soft);
  margin: 0 0 .75rem;
}
.vsheet-actions { display: flex; gap: .5rem; }
.vsheet-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .75rem .5rem;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--invert-ink) 18%, transparent);
  background: color-mix(in srgb, var(--invert-ink) 6%, transparent);
  color: var(--invert-ink);
  font-family: var(--body);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.vsheet-btn:active { background: color-mix(in srgb, var(--invert-ink) 16%, transparent); }

/* Reader pages hide the bottom tab bar chrome conflict */
body.has-tabbar .vsheet { bottom: 3.6rem; }

/* --- Bible section shared lede + plan stack --- */
.bible-lede {
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.bible-lede--flush { margin: 0; }

.plan-stack { display: flex; flex-direction: column; }
.plan-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.plan-item:first-child { border-top: 1px solid var(--line); }
.plan-item:active { background: var(--surface); }
.plan-item-body { flex: 1; min-width: 0; }
.plan-item-days {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.plan-item-title {
  font-family: var(--display);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: .25rem 0 .125rem;
  letter-spacing: -0.01em;
}
.plan-item-sub { font-size: var(--fs-sm); color: var(--muted); margin: 0; line-height: 1.4; }
.plan-item > .icn { color: var(--muted); opacity: 0.55; }

/* --- Saved verses --- */
.saved-list { display: flex; flex-direction: column; }
.saved-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.saved-item:first-child { border-top: 1px solid var(--line); }
.saved-item-ref {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.saved-item-text {
  font-family: var(--display);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 .75rem;
}
.saved-item-remove {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.saved-item-remove:active { color: var(--ink); }

.saved-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.saved-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  margin-bottom: 1rem;
}
.saved-empty-title {
  font-family: var(--display);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 .375rem;
}
.saved-empty-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}
.saved-empty-cta {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* --- Devotional reading view --- */
.devo-read { padding-bottom: 1rem; }
.devo-read-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.devo-read-title {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 .75rem;
}
.devo-read-ref {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.devo-read-body {
  font-family: var(--display);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--ink);
}
.devo-read-body p { margin: 0 0 1rem; }

.devo-archive-head {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 2.25rem 0 .5rem;
}
.devo-archive-list { display: flex; flex-direction: column; }
.devo-archive-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.devo-archive-row:first-child { border-top: 1px solid var(--line); }
.devo-archive-row:active { background: var(--surface); }
.devo-archive-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.devo-archive-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-base); }
.devo-archive-ref { font-family: var(--label); font-size: var(--fs-xs); color: var(--muted); }
.devo-archive-row > .icn { color: var(--muted); opacity: 0.55; }

/* ============================================================
   PRAYER
   ============================================================ */

.prayer-cta {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--invert-bg);
  color: var(--invert-ink);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: 2rem;
}
.prayer-cta > span { flex: 1; }
.prayer-cta .icn { color: var(--accent-soft); }
.prayer-cta > .icn:last-child { color: var(--invert-muted); }

.prayer-block { margin-bottom: 2.25rem; }
.prayer-h2 {
  font-family: var(--display);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

/* Praise reports rail */
.praise-rail {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -1.25rem;
  padding: 0 1.25rem .25rem;
  scrollbar-width: none;
}
.praise-rail::-webkit-scrollbar { display: none; }
.praise-card {
  flex: 0 0 15rem;
  scroll-snap-align: start;
  padding: 1rem 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.praise-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.praise-body {
  font-family: var(--display);
  font-size: var(--fs-base);
  line-height: 1.55;
  margin: .5rem 0 .5rem;
}
.praise-author { font-size: var(--fs-xs); color: var(--muted); margin: 0; }

/* Prayer request list */
.prayer-list { display: flex; flex-direction: column; }
.prayer-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.prayer-item:first-child { border-top: 1px solid var(--line); }
.prayer-body {
  font-family: var(--display);
  font-size: var(--fs-md);
  line-height: 1.6;
  margin: 0 0 .75rem;
  color: var(--ink);
}
.prayer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.prayer-author {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.pray-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.pray-btn .icn { color: var(--accent); }
.pray-btn.done {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pray-btn.done .icn { color: #fff; }
.pray-count { font-variant-numeric: tabular-nums; opacity: 0.75; }

/* Prayer form */
.prayer-form { margin-bottom: 2rem; }
.pf-label {
  display: block;
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  margin: 1.25rem 0 .5rem;
  padding: 0;
}
.prayer-form textarea,
.prayer-form input[type="text"],
.journal-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--body);
  font-size: var(--fs-base);
  color: var(--ink);
  resize: vertical;
}
.prayer-form textarea:focus,
.prayer-form input:focus,
.journal-form textarea:focus { border-color: var(--accent); outline: none; }

.pf-group { border: none; padding: 0; margin: 0; }
.pf-radio {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: .5rem;
  cursor: pointer;
  background: var(--white);
}
.pf-radio input { margin-top: .25rem; accent-color: var(--accent); }
.pf-radio-body { display: flex; flex-direction: column; gap: .125rem; }
.pf-radio-title { font-weight: 600; font-size: var(--fs-base); }
.pf-radio-sub { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.pf-radio:has(input:checked) { border-color: var(--accent); background: var(--surface); }

.pf-chips { display: flex; gap: .5rem; }
.pf-chip {
  flex: 1;
  text-align: center;
  padding: .5rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
}
.pf-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.pf-chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pf-chip:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.pf-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  border: none;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  cursor: pointer;
}

/* Crisis support note */
.crisis-note {
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}
.crisis-line {
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin: 0 0 .5rem;
  color: var(--ink);
  font-weight: 500;
}
.crisis-list { list-style: none; margin: 0; padding: 0; }
.crisis-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .25rem 0;
  font-size: var(--fs-sm);
}
.crisis-list span { color: var(--muted); }
.crisis-list a { font-weight: 700; color: var(--accent); text-decoration: none; }

.prayer-sent { text-align: center; padding: 2.5rem 1rem; }
.prayer-sent-title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: 0 0 .5rem;
}
.prayer-sent-sub {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--muted);
  max-width: 20rem;
  margin: 0 auto 1.5rem;
}

/* Journal */
.journal-privacy {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.journal-privacy .icn { color: var(--accent); flex: none; margin-top: .125rem; }
.journal-form { margin-bottom: 2rem; }
.journal-list { display: flex; flex-direction: column; }
.journal-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.journal-item:first-child { border-top: 1px solid var(--line); }
.journal-item.answered .journal-body { color: var(--muted); }
.journal-meta {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 .375rem;
}
.journal-body {
  font-family: var(--display);
  font-size: var(--fs-base);
  line-height: 1.6;
  margin: 0 0 .5rem;
}
.journal-actions { display: flex; gap: 1rem; }
.journal-action {
  background: none; border: none; padding: 0;
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.journal-action:active { color: var(--ink); }

/* Admin prayer */
.admin-alert {
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.prayer-admin.held { border-left: 3px solid var(--accent); }
.prayer-admin-reason {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.prayer-admin-tag {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 .375rem;
}

/* ============================================================
   SERMONS / WATCH
   ============================================================ */

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.live-block { margin-bottom: 1.5rem; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--danger);
  margin: 0 0 .5rem;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Search + filters */
.sermon-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--muted);
  margin-bottom: 1rem;
}
.sermon-search input {
  flex: 1;
  border: none; background: none; outline: none;
  font-family: var(--body);
  font-size: var(--fs-base);
  color: var(--ink);
  -webkit-appearance: none;
}
.filter-row {
  display: flex;
  gap: .375rem;
  overflow-x: auto;
  margin: 0 -1.25rem 1.5rem;
  padding: 0 1.25rem .25rem;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  flex: none;
  padding: .375rem .75rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.filter-pill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-pill.clear { color: var(--accent); border-color: var(--accent); }

/* Featured sermon */
.sermon-feature {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 1.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sermon-feature:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-md);
}
.sermon-feature-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.sermon-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sermon-play {
  position: absolute;
  display: grid; place-items: center;
  width: 3.2rem; height: 3.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}
.sermon-feature-body { padding: 1rem 1rem 1.25rem; }
.sermon-tag {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.sermon-feature-title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: .375rem 0 .25rem;
  line-height: 1.2;
}
.sermon-feature-meta { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

.sermon-result-count {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 0 0 .75rem;
}

/* Archive list */
.sermon-list { display: flex; flex-direction: column; }
.sermon-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.sermon-row:first-child { border-top: 1px solid var(--line); }
.sermon-row:active { background: var(--surface); }
.sermon-row-thumb {
  flex: none;
  width: 4.2rem;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.sermon-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sermon-row-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.sermon-row-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-base); line-height: 1.25; }
.sermon-row-meta { font-size: var(--fs-xs); color: var(--muted); }
.sermon-row-passage {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--accent);
}
.sermon-row > .icn { color: var(--muted); opacity: 0.5; flex: none; }

/* Sermon detail */
.sermon-title {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 .375rem;
}
.sermon-meta { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 1rem; }
.sermon-chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1.25rem; }
.sermon-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .375rem .75rem;
  border-radius: var(--r-full);
  background: var(--surface);
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.sermon-chip.passage { background: var(--accent); color: #fff; }
.sermon-summary {
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 1.75rem;
}
.sermon-external {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--invert-bg);
  color: var(--invert-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: 1.5rem;
}
.sermon-external > span { flex: 1; }

.sermon-h3 {
  font-family: var(--display);
  font-size: var(--fs-base);
  font-weight: 600;
  margin: 0 0 .75rem;
}
.audio-block { margin-bottom: 2rem; }
.audio-player { width: 100%; margin-bottom: .75rem; }
.audio-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.audio-action {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.audio-action.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.audio-action.subtle { color: var(--muted); }
.audio-action:disabled { opacity: 0.5; cursor: default; }
.audio-note {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--muted);
  margin: .75rem 0 0;
}

/* Notes */
.notes-block { margin-bottom: 2rem; }
.notes-privacy { font-size: var(--fs-xs); color: var(--muted); margin: 0 0 .75rem; }
.notes-saved {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--accent);
}
#sermonNotes {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
}
#sermonNotes:focus { border-color: var(--accent); outline: none; }
.notes-actions { display: flex; gap: 1rem; margin-top: .5rem; }

/* Admin extras */
.admin-panel {
  padding: 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.admin-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 0;
  font-size: var(--fs-base);
}
.admin-check input { width: auto; accent-color: var(--accent); }
.field-hint {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: .375rem 0 0;
  line-height: 1.4;
}

.video-fallback {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: -.75rem 0 1.5rem;
  text-align: center;
}
.video-fallback a { color: var(--accent); font-weight: 600; }

/* ============================================================
   HOME — aligned to the app-wide list style
   ============================================================ */

.home-main { padding-top: 1.25rem; }

.home-live {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: #FBEDEA;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 2rem;
}
.home-live > span:nth-child(2) { flex: 1; }
.home-live .icn { color: var(--danger); opacity: 0.6; }

.home-events { display: flex; flex-direction: column; }
.home-event {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem .125rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.home-event:first-child { border-top: 1px solid var(--line); }
.home-event:active { background: var(--surface); }
.home-event-when {
  flex: none;
  width: 2.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .375rem 0;
  border-radius: var(--r-md);
  background: var(--surface);
}
.home-event-day {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.home-event-date {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.05;
}
.home-event-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.home-event-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-base); line-height: 1.25; }
.home-event-meta { font-size: var(--fs-xs); color: var(--muted); }
.home-event > .icn { color: var(--muted); opacity: 0.5; flex: none; }

/* Home reuses .sermon-feature but without the "latest message" tag row */
.home-main .sermon-feature { margin-bottom: 0; }

/* ============================================================
   GIVING
   ============================================================ */

.give-actions { display: flex; flex-direction: column; gap: .5rem; }
.give-primary, .give-secondary {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  text-decoration: none;
}
.give-primary { background: var(--invert-bg); color: var(--invert-ink); }
.give-primary .icn:first-child { color: var(--accent-soft); }
.give-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.give-secondary .icn:first-child { color: var(--accent); }
.give-primary > span, .give-secondary > span { flex: 1; display: flex; flex-direction: column; gap: .125rem; }
.give-primary strong, .give-secondary strong { font-family: var(--body); font-weight: 600; font-size: var(--fs-base); }
.give-primary small { font-size: var(--fs-xs); color: var(--invert-muted); }
.give-secondary small { font-size: var(--fs-xs); color: var(--muted); }
.give-primary > .icn:last-child { color: var(--invert-muted); }
.give-secondary > .icn:last-child { color: var(--muted); opacity: 0.6; }

.give-secure {
  display: flex;
  align-items: flex-start;
  gap: .375rem;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--muted);
  margin: 1rem 0 0;
}
.give-secure .icn { color: var(--accent); flex: none; margin-top: .125rem; }

.charity-note {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* Campaigns */
.campaign-list { display: flex; flex-direction: column; gap: .75rem; }
.campaign-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.campaign-card:active { background: var(--surface); }
.campaign-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-md); line-height: 1.2; }
.campaign-blurb { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.campaign-bar {
  display: block;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
  margin-top: .25rem;
}
.campaign-bar.big { height: 9px; }
.campaign-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--r-full); }
.campaign-figures {
  display: flex;
  align-items: baseline;
  gap: .375rem;
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.campaign-figures strong { font-size: var(--fs-base); color: var(--ink); font-weight: 700; }
.campaign-figures.big { margin-top: .5rem; }
.campaign-figures.big strong { font-size: var(--fs-lg); font-family: var(--display); }

.campaign-detail-title {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}
.campaign-progress { margin-bottom: 1.25rem; }
.campaign-closes {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.campaign-body { font-size: var(--fs-base); line-height: 1.7; margin-bottom: 1.75rem; }
.campaign-body p { margin: 0 0 1rem; }

/* Gift Aid */
.giftaid-hero { text-align: center; padding: 1.5rem 0 1.5rem; }
.giftaid-figure {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1;
}
.giftaid-strap {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  margin: .75rem auto 0;
  max-width: 22rem;
}
.giftaid-example {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.giftaid-example-row {
  display: flex;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-base);
}
.giftaid-example-row:last-child { border-bottom: none; }
.giftaid-example-row span { color: var(--muted); }
.giftaid-example-row strong { font-family: var(--display); font-weight: 600; }
.giftaid-example-row.total { background: var(--surface); }
.giftaid-example-row.total span { color: var(--ink); font-weight: 600; }
.giftaid-example-row.total strong { color: var(--accent); font-size: var(--fs-md); }

.giftaid-body { font-size: var(--fs-base); line-height: 1.65; color: var(--ink); margin: 0 0 1rem; }
.giftaid-footnote {
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--muted);
  margin: 1.5rem 0 0;
  padding: 1rem 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
}
.giftaid-footnote a { color: var(--accent); font-weight: 600; }

/* ============================================================
   MINISTRIES
   ============================================================ */

.ministry-tagline {
  font-family: var(--display);
  font-size: var(--fs-md);
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}
.ministry-facts {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: 1.5rem;
}
.ministry-fact {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-base);
}
.ministry-fact-icon { color: var(--accent); flex: none; display: grid; place-items: center; }
.ministry-body { font-size: var(--fs-base); line-height: 1.7; margin-bottom: 1.75rem; }
.ministry-body p { margin: 0 0 1rem; }

.ministry-contact {
  padding: 1.25rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-top: 1.75rem;
}
.ministry-contact .bible-h2 { margin-bottom: .75rem; }
.ministry-contact-name { font-weight: 600; font-size: var(--fs-base); margin: 0 0 .75rem; }
.ministry-contact-links { display: flex; flex-direction: column; gap: .5rem; }
.ministry-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  word-break: break-word;
}
.ministry-contact-btn .icn { color: var(--accent); flex: none; }

.ministry-safeguard {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--muted);
  margin: 1.5rem 0 0;
  padding: .75rem 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
}
.ministry-safeguard .icn { color: var(--accent); flex: none; margin-top: .125rem; }

/* ============================================================
   RESOURCES
   ============================================================ */

.resource-group-blurb {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.45;
  margin: -.5rem 0 1rem;
}

.resource-article { padding-bottom: 1rem; }
.resource-article-title {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 .5rem;
}
.resource-article-summary {
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 .5rem;
}
.resource-article-author {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.5rem;
}
.resource-article-body {
  font-family: var(--display);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--ink);
}
.resource-article-body p { margin: 0 0 1rem; }
.resource-h3 {
  font-family: var(--display);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 1.75rem 0 .5rem;
  letter-spacing: -0.01em;
}
.resource-note {
  font-family: var(--body);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface);
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  border-left: 3px solid var(--accent-soft);
}
.resource-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0 1.5rem;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.notif-warning {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.notif-warning .icn { color: var(--accent); flex: none; margin-top: .125rem; }
.notif-warning strong { display: block; margin-bottom: .125rem; }

.notif-status {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
  margin: .75rem 0 0;
}

.notif-list { display: flex; flex-direction: column; margin-top: 1.5rem; }
.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem .125rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.notif-row:first-child { border-top: 1px solid var(--line); }
.notif-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; }
.notif-title { font-weight: 600; font-size: var(--fs-base); }
.notif-sub { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.notif-check {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .125rem;
  accent-color: var(--accent);
}

.notif-privacy {
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--muted);
  margin: 1.75rem 0 0;
  padding: 1rem 1rem;
  background: var(--surface);
  border-radius: var(--r-md);
}

.notif-counts { display: flex; flex-direction: column; }
.notif-count-row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.notif-count-row:last-child { border-bottom: none; }
.notif-count-row strong { font-family: var(--label); font-variant-numeric: tabular-nums; }

/* Notification diagnostics */
.check-list { display: flex; flex-direction: column; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem .125rem;
  border-bottom: 1px solid var(--line);
}
.check-row:first-child { border-top: 1px solid var(--line); }
.check-mark {
  font-weight: 700;
  font-size: var(--fs-base);
  flex: none;
  width: 1.2rem;
  text-align: center;
}
.check-row.ok .check-mark { color: var(--success); }
.check-row.bad .check-mark { color: var(--danger); }
.check-body { flex: 1; display: flex; flex-direction: column; gap: .25rem; }
.check-label { font-weight: 600; font-size: var(--fs-base); }
.check-fix {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-family: var(--label);
}

.data-path {
  font-family: var(--label);
  font-size: var(--fs-xs);
  word-break: break-all;
  background: var(--white);
  padding: .75rem .75rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin: 0;
}

/* ---- Multi-verse selection & word highlights ---- */

.vsheet-hint {
  font-size: var(--fs-xs);
  color: var(--invert-muted);
  margin: -.375rem 0 .75rem;
}

.vsheet-actions { flex-wrap: wrap; }
.vsheet-btn { min-width: 4.5rem; }

/* A highlighted word or phrase inside the scripture text */
mark.hl {
  background: rgba(212, 175, 55, 0.38);
  color: inherit;
  padding: 0.05em 0.08em;
  border-radius: var(--r-sm);
}

/* Let people select text normally — needed for phrase highlighting */
.scripture {
  -webkit-user-select: text;
  user-select: text;
}

/* The hidden attribute must win over display:flex on buttons */
.vsheet-btn[hidden] { display: none !important; }

/* ============================================================
   STUDY ASSISTANT
   ============================================================ */

.study-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .75rem 1rem;
  border-radius: var(--r-full);
  border: none;
  background: var(--invert-bg);
  color: var(--invert-ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
.study-fab .icn { color: var(--accent-soft); }
.study-fab:active { transform: scale(0.96); }

.study-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 24, 30, 0.45);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.study-panel.up { opacity: 1; }
.study-inner {
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.study-panel.up .study-inner { transform: translateY(0); }

.study-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.study-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  margin: 0;
}
.study-ref {
  font-family: var(--label);
  font-size: var(--fs-xs);
  color: var(--accent);
  margin: .125rem 0 0;
}
.study-close {
  background: none;
  border: none;
  font-size: var(--fs-md);
  color: var(--muted);
  cursor: pointer;
  padding: .25rem .375rem;
}

.study-disclaimer {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border-left: 3px solid var(--accent-soft);
  padding: .75rem .75rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
}

.study-thread {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .25rem 0 .75rem;
  min-height: 8rem;
}

.study-suggestions { display: flex; flex-direction: column; gap: .5rem; }
.study-chip {
  text-align: left;
  padding: .75rem .75rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.study-chip:active { background: var(--surface); }

.study-bubble {
  max-width: 88%;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  line-height: 1.6;
}
.study-bubble p { margin: 0 0 .5rem; }
.study-bubble p:last-child { margin-bottom: 0; }
/* Your own messages.

   This previously paired background:var(--ink) with color:var(--invert-ink).
   Those two look opposed but aren't: in dark mode both resolve to near-white,
   giving a contrast ratio of 1.00:1 — the text was there, painted in exactly
   the background colour.

   The accent works in both themes and, unlike --invert-bg, keeps the bubble
   clearly distinct from the page behind it. The text colour flips with it:
   deep turquoise takes white, bright turquoise takes near-black. */
.study-bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: var(--r-sm);
}
.study-bubble.ai {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border-bottom-left-radius: var(--r-sm);
}
.study-bubble.thinking { opacity: 0.6; font-style: italic; }

.study-form {
  display: flex;
  gap: .5rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: .75rem;
}
.study-form input {
  flex: 1;
  padding: .75rem 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--body);
  font-size: var(--fs-base);
  color: var(--ink);
  outline: none;
}
.study-form input:focus { border-color: var(--accent); }
.study-send {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  flex: none;
}
.study-send:disabled { opacity: 0.5; }

/* A hidden panel must not swallow clicks meant for the button underneath */
.study-panel[hidden] { display: none !important; }

/* ============================================================
   NAVIGATION FEEL — smooth transitions, instant tap response
   ============================================================ */

/* Cross-page view transitions. Supported browsers slide between pages
   instead of flashing white; others simply ignore this. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vt-out 0.18s cubic-bezier(0.4, 0, 1, 1) both;
  }
  ::view-transition-new(root) {
    animation: vt-in 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(10px); }
}

/* The bottom tab bar shouldn't slide with the page — it's persistent chrome */
.site-nav { view-transition-name: tabbar; }
::view-transition-old(tabbar),
::view-transition-new(tabbar) { animation: none; opacity: 1; }

/* Instant response to a tap, before the server has replied */
.pressed {
  transform: scale(0.985);
  opacity: 0.75;
  transition: transform 0.08s ease, opacity 0.08s ease;
}
.chapter-cell.pressed,
.plan-card.pressed { transform: scale(0.94); }

/* Thin loading bar for slower navigations */
.nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
}
.nav-progress.active {
  opacity: 1;
  width: 70%;
  transition: width 1.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.nav-progress.done {
  width: 100%;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.3s ease 0.1s;
}

/* ---- Continue reading card ---- */

.continue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--invert-bg);
  color: var(--invert-ink);
  text-decoration: none;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}
.continue-body { flex: 1; min-width: 0; }
.continue-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-soft);
  margin: 0 0 .25rem;
}
.continue-ref {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  margin: 0;
  line-height: 1.15;
}
.continue-note {
  font-size: var(--fs-xs);
  color: var(--invert-muted);
  margin: .25rem 0 0;
}
.continue-card .icn { color: var(--invert-muted); flex: none; }

/* ---- Recent books strip ---- */

.recent-strip {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  margin: 0 -1.25rem 1.5rem;
  padding: 0 1.25rem .25rem;
  scrollbar-width: none;
}
.recent-strip::-webkit-scrollbar { display: none; }
.recent-chip {
  flex: none;
  padding: .5rem .75rem;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
}
.recent-chip:active { background: var(--surface-2); }

/* ============================================================
   SETTINGS
   ============================================================ */

.set-block { margin-bottom: 2.25rem; }
.set-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 1rem;
}
.set-hint {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--muted);
  margin: .75rem 0 0;
}

/* Theme picker */
.theme-choices { display: flex; gap: .5rem; }
.theme-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem .5rem;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--body);
  min-height: 44px;
}
.theme-option.on {
  border-color: var(--accent);
  background: var(--surface);
}
.theme-name { font-size: var(--fs-xs); font-weight: 600; }
.theme-swatch {
  display: flex;
  width: 2.6rem;
  height: 1.7rem;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.theme-swatch span { flex: 1; }
.theme-swatch.light span:first-child { background: #F5F8F7; }
.theme-swatch.light span:last-child  { background: #0B2E2F; }
.theme-swatch.dark  span:first-child { background: #061719; }
.theme-swatch.dark  span:last-child  { background: #5FDCCB; }
.theme-swatch.auto  span:first-child { background: #F5F8F7; }
.theme-swatch.auto  span:last-child  { background: #061719; }

/* Text size picker */
.set-row { display: flex; padding: 0 0 .75rem; }
.set-row-body { display: flex; flex-direction: column; gap: .125rem; }
.set-row-title { font-weight: 600; font-size: var(--fs-base); }
.set-row-sub { font-size: var(--fs-xs); color: var(--muted); }

.size-choices { display: flex; gap: .5rem; }
.size-option {
  flex: 1;
  min-height: 46px;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
}
.size-option.on { border-color: var(--accent); background: var(--surface); }
.size-option[data-size="small"]  { font-size: var(--fs-sm); }
.size-option[data-size="normal"] { font-size: var(--fs-base); }
.size-option[data-size="large"]  { font-size: var(--fs-lg); }
.size-option[data-size="xlarge"] { font-size: 1.45rem; }

.set-preview {
  font-family: var(--display);
  line-height: 1.75;
  color: var(--ink);
  background: var(--surface);
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  margin: 1rem 0 0;
  font-size: var(--reading-size, 1.05rem);
}

.set-danger {
  width: 100%;
  min-height: 46px;
  padding: .75rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: none;
  color: var(--danger);
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  cursor: pointer;
}
[data-theme="dark"] .set-danger { color: var(--danger); }

/* ---- Reading text size, applied app-wide ---- */

html { --reading-size: 1.12rem; }
html[data-text-size="small"]  { --reading-size: 0.98rem; }
html[data-text-size="normal"] { --reading-size: 1.12rem; }
html[data-text-size="large"]  { --reading-size: 1.3rem; }
html[data-text-size="xlarge"] { --reading-size: 1.5rem; }

.scripture,
.resource-article-body,
.devo-read-body,
.qa-answer {
  font-size: var(--reading-size);
}

/* ============================================================
   TOUCH TARGETS — every tappable thing at least 44px tall
   (Apple HIG and Android guidance both use 44–48px)
   ============================================================ */

.site-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .375rem .125rem;
}

.bible-row,
.book-row,
.sermon-row,
.plan-item,
.home-event,
.devo-archive-row,
.admin-row-actions a,
.admin-row-actions button {
  min-height: 44px;
}

.chapter-cell { min-height: 44px; min-width: 44px; }

.trans-pill,
.filter-pill,
.recent-chip,
.chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.bible-back,
.bible-search,
.reader-bar-back,
.study-close {
  min-width: 44px;
  min-height: 44px;
}

.pray-btn,
.audio-action,
.journal-action,
.saved-item-remove {
  min-height: 40px;
}

/* Small text buttons need padding rather than a taller box, so they don't
   look oversized next to their labels */
.journal-action,
.saved-item-remove {
  padding: .5rem 0;
}

/* ---- Visible focus for keyboard and switch-control users ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Secondary inline links are still tap targets on a phone. Give them a
   comfortable hit area using padding, so the visual size stays small. */
.bible-more,
.votd-action,
.home-see-all,
.section-link,
.v2-section-link,
.site-footer a,
.bible-lede a,
.reader-credit a,
.study-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-block: .5rem;
}

/* The eyebrow back-links sit above page titles */
.eyebrow a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-block: .375rem;
}

/* Calendar month arrows are frequently tapped */
.cal-nav-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.subscribe-btn { min-height: 40px; display: inline-flex; align-items: center; }
.site-footer a { min-height: 44px; }

/* ============================================================
   STORE
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.product-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-bottom: .125rem;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1.25;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: .375rem;
  flex-wrap: wrap;
}
.product-price {
  font-family: var(--label);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--ink);
}
.product-price-note { font-size: var(--fs-xs); color: var(--muted); }
.product-price-row.big { margin-bottom: .5rem; }
.product-price-row.big .product-price { font-size: var(--fs-lg); font-family: var(--display); }

.product-stock {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: .25rem .5rem;
  border-radius: var(--r-full);
  background: var(--invert-bg);
  color: var(--invert-ink);
}
.product-stock.out { background: var(--danger); color: var(--bg); }
.product-stock.low { background: var(--accent); color: #fff; }

.product-stock-line {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}
.product-stock-line.out { color: var(--danger); }
[data-theme="dark"] .product-stock-line.out { color: var(--danger); }

/* Featured item */
.product-feature {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.product-feature-media { display: block; aspect-ratio: 16/10; background: var(--surface); }
.product-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-feature-body { display: block; padding: 1rem 1rem 1.25rem; }
.product-tag {
  display: inline-block;
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  margin-bottom: .25rem;
}
.product-feature-name {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin-bottom: .25rem;
}
.product-feature-sub {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: .5rem;
}

/* Detail page */
.product-hero {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1.25rem;
  max-height: 20rem;
}
.product-hero img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-name {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 .5rem;
}
.product-summary {
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.product-body { font-size: var(--fs-base); line-height: 1.7; margin-bottom: 1.5rem; }
.product-body p { margin: 0 0 1rem; }


/* ============================================================
   MERGED FROM THE DESIGN PASS
   Reading plan detail (was unstyled), devotional typography,
   games hero palette, leaderboard styles.
   ============================================================ */

/* Devotional reading — editorial typography, previously unstyled (just
   inherited browser defaults). A drop cap on the opening line nods to the
   illuminated-manuscript tradition of devotional reading without being twee. */
.devo-body {
  max-width: 34rem;
  margin: 0 auto;
}

.devo-body p {
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.78;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.devo-single p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 3.6rem;
  font-weight: 600;
  float: left;
  line-height: 0.82;
  padding: .125rem .5rem 0 .125rem;
  color: var(--accent);
}

.lb-publish { margin-top: .75rem; }

.lb-publish-result { font-size: var(--fs-sm); color: var(--muted); margin-top: .25rem; }

.lb-view-link { display: inline-block; margin-top: .5rem; font-size: var(--fs-sm); color: var(--accent); }

/* ============================================================
   Kids Games — signature bleed hero
   Full-bleed so it breaks past the app's usual padded container;
   the motifs are the actual game pieces (sling stone, shield,
   manna dove, trivia star/target) rather than generic shapes.
   ============================================================ */
.quest-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 2.5rem 1.25rem 2.25rem;
  margin: 0 calc(-1 * (100vw - 100%) / 2 - 1px) 0 calc(-1 * (100vw - 100%) / 2 - 1px);
  width: 100vw;
  background:
    radial-gradient(120% 90% at 18% 0%, var(--quest-mid) 0%, var(--quest-deep) 55%, #241a34 100%);
  color: var(--white);
}

.quest-hero-back {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  margin-bottom: 1.5rem;
}

.quest-hero-motifs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.quest-hero-motifs span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: calc(2.6rem * var(--s, 1));
  transform:
    translate(-50%, -50%)
    rotate(var(--r))
    translateY(calc(var(--scroll, 0) * -18px));
  opacity: 0.22;
  filter: saturate(0.85);
  transition: transform 0.1s linear;
}

.quest-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  margin: 0 auto;
  text-align: center;
}

.quest-hero-eyebrow {
  font-family: var(--label);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--quest-ember);
  margin: 0 0 .5rem;
}

.quest-hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 10vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}

.quest-hero-sub {
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 auto;
  max-width: 22rem;
}

/* Reading plan detail — progress bar + day checklist. Previously unstyled. */
.plan-progress { margin-bottom: 1.75rem; }

.plan-progress-bar {
  height: 0.5rem;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: .5rem;
}

.plan-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  border-radius: var(--r-full);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plan-progress-count {
  font-family: var(--label);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}

.plan-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }

.plan-day {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.plan-day.done { background: var(--surface-2); border-color: var(--accent-soft); }

.plan-check {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.plan-check-box {
  opacity: 0;
  font-size: var(--fs-base);
  line-height: 1;
  color: var(--white);
  transition: opacity 0.15s ease;
}

.plan-day.done .plan-check { background: var(--accent); border-color: var(--accent); }

.plan-day.done .plan-check-box { opacity: 1; }

.plan-day-body { flex: 1; min-width: 0; padding-top: .125rem; }

.plan-day-label {
  display: block;
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-bottom: .375rem;
}

.plan-day-passages { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }

.plan-passage {
  font-family: var(--display);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent-soft);
  line-height: 1.3;
}

span.plan-passage { color: var(--muted); border-bottom-color: var(--line); }

/* Leaderboard */
.lb-publish { margin-top: .75rem; }

.lb-publish-result { font-size: var(--fs-sm); color: var(--muted); margin-top: .25rem; }

.lb-view-link { display: inline-block; margin-top: .5rem; font-size: var(--fs-sm); color: var(--accent); }

/* ---------- App loading splash ---------- */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s ease;
}
.app-splash-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-splash-hide {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .app-splash-video { display: none; }
}

/* Lists inside a study answer. The model uses them for "different traditions
   read this differently", so they need to sit tidily inside the bubble. */
.study-bubble ul {
  margin: 0 0 .5rem;
  padding-left: 1.25rem;
}
.study-bubble ul:last-child { margin-bottom: 0; }
.study-bubble li { margin-bottom: .25rem; }
.study-bubble li:last-child { margin-bottom: 0; }
.study-bubble strong { font-weight: 600; }

/* ---------- Global back button ----------
   Sits above content but below the tab bar, and clears the notch on phones.
   Pages that draw their own back link inside their header opt out of this
   in the template rather than hiding it here, so there's never a hidden
   button sitting under the layout catching taps. */
.global-back {
  position: sticky;
  top: calc(0.6rem + env(safe-area-inset-top));
  z-index: 40;
  margin: .5rem 0 -2.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: .125rem;
  font-family: var(--body);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: .375rem 1rem .375rem .5rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, background 0.2s ease;
}
.global-back:active { transform: scale(0.95); }
.global-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Give the following content room, since the button overlaps upward. */
.global-back + * { padding-top: 2.5rem; }
@media (prefers-reduced-motion: reduce) {
  .global-back { transition: none; }
}

/* Publisher attribution under scripture. Small, but it has to be legible —
   licensed translations require the notice to be shown, not buried. */
.reader-copyright {
  font-size: var(--fs-2xs);
  line-height: 1.5;
  color: var(--muted);
  margin: .375rem 0 0;
  max-width: 34rem;
}

.reader-fallback {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: .5rem .75rem;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: .75rem 0 0;
  max-width: 34rem;
}

/* ============================================================
   Direction overrides
   Appended so these win over the earlier rules without having to
   unpick 4,000 lines. Everything above still supplies layout.
   ============================================================ */

/* ---------- Typography ---------- */

body { font-family: var(--body); }

h1, h2, h3, h4,
.page-title, .hero h1, .section-title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* The signature. One word of a heading in italic serif inside the sans.
   Wrap it in <em> and it happens: <h1>There is a place <em>for you</em></h1> */
h1 em, h2 em, .page-title em, .statement em {
  font-family: var(--emph);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.06em;
}

/* Eyebrows become structural labels rather than decorative italics. */
.eyebrow {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* Numerals get a real monospace at last — scores, streaks, verse numbers,
   timers. The old build declared a --mono that was just Inter. */
.vn, .mm-stats strong, .bs-stats strong, .ls-stats strong,
.pg-num, .lb-score, .board .slot i {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

/* Scripture keeps a serif, because reading a chapter is a different act
   from tapping a menu. */
.scripture {
  font-family: var(--emph);
  font-style: normal;
}

/* ---------- Shape ---------- */

/* Collapse eight radii onto three. */
.card, .bible-row, .game-tile, .qa-card, .st-item, .em-card,
.pg-badge, .pg-stat, .vs-map-btn, .ls-cell, .bs-choice, .vb-answer {
  border-radius: var(--r-md);
}
.btn-primary, .btn-ghost, .v2-hero-cta, .cta, .study-chip, .vsheet-btn {
  border-radius: var(--r-sm);
}
.study-bubble, .avatar, .live-badge, .pill { border-radius: var(--r-full); }

/* ---------- Buttons ---------- */

.btn-primary, .v2-hero-cta {
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  border: 0;
  box-shadow: none;
}
.btn-ghost {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

/* ---------- Surfaces ---------- */

/* Cards lose their tint and shadow; a hairline is enough. */
.card, .bible-row, .qa-card, .st-item, .em-card, .pg-badge {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* The hero is a photograph with type on it, not a tinted panel. */
.hero-arch .page-title, .v2-hero h1 {
  font-size: clamp(2rem, 9vw, 2.9rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

/* Statement band, the way both reference sites break up a page. */
.statement-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.25rem;
  margin: 1.5rem -1.25rem;
}
.statement-band p {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-xl);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 .375rem;
}
.statement-band small { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Chat bubbles ---------- */
/* Ink is now the accent, so the earlier per-theme text colour is wrong. */
.study-bubble.me { background: var(--accent); color: var(--on-accent); }
[data-theme="dark"] .study-bubble.me { color: var(--on-accent); }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .study-bubble.me { color: var(--on-accent); }
}

/* Badge icons, same reason. */
.pg-badge.got .pg-badge-icon { background: var(--accent); color: var(--on-accent); }
[data-theme="dark"] .pg-badge.got .pg-badge-icon { color: var(--on-accent); }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .pg-badge.got .pg-badge-icon { color: var(--on-accent); }
}

/* Hero statement, replacing the logo lockup on the home screen. */
.v2-hero-statement {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 10vw, 3.1rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  margin: 0 0 .5rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.v2-hero-statement em {
  font-family: var(--emph);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.01em;
}
/* The hero sits on a photograph in both themes, so these stay fixed —
   tying them to --ink is what made the old CTA invisible in dark mode. */
.v2-hero-sub { color: rgba(255,255,255,0.72); }
.v2-eyebrow {
  color: rgba(255,255,255,0.55);
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.v2-hero-cta {
  background: #FFFFFF;
  color: #08080A;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  padding: .75rem 1.5rem;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.v2-hero-cta:hover { background: #E8E8EA; }

/* ============================================================
   Kids Games — tiles and in-game polish
   ============================================================ */

.quest-main { padding-top: 1.5rem; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  margin-bottom: 2rem;
}
@media (min-width: 34rem) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

.game-cell { position: relative; }

.game-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1 / 1.06;
  padding: .75rem;
  border-radius: var(--r-md);
  text-decoration: none;
  color: #FFFFFF;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: var(--shadow-md);
}
/* A soft light source at the top so the tiles read as objects rather than
   flat swatches, which matters when nine sit together. */
.game-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 60% at 25% 0%,
              rgba(255, 255, 255, 0.20) 0%, transparent 60%);
}
.game-tile:active { transform: scale(0.96); }

.game-emoji {
  font-size: var(--fs-2xl);
  line-height: 1;
  margin-bottom: auto;
  /* Emoji rather than icons: a child recognises a sheep before they can read
     "Lost Sheep", and the icon set has no shepherd, stone or playing card. */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.game-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.game-desc {
  font-size: var(--fs-2xs);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  margin-top: .125rem;
}

/* The leaderboard, tucked into the corner rather than given its own row. */
.game-cup {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.30);
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
  transition: background 0.2s ease, transform 0.14s ease;
}
.game-cup:active { transform: scale(0.9); }
.game-cup:focus-visible,
.game-tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- In-game ---------- */

/* Win panels lift in rather than appearing, and the message gets room. */
.mm-win {
  animation: win-rise 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes win-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* Confetti sits above the game but below any dialog. */
#gameConfetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

@media (prefers-reduced-motion: reduce) {
  .game-tile, .game-cup { transition: none; }
  .mm-win { animation: none; }
}

/* ---------- Offline fallback page ---------- */
.offline-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.offline-inner { max-width: 30rem; padding: 2rem 1.5rem; }
.offline-emoji { color: var(--accent); margin: 0 0 .375rem; opacity: 0.9; }
.offline-title { font-family: var(--display); font-size: var(--fs-2xl); margin: 0 0 .5rem; color: var(--ink); }
.offline-lead { color: var(--muted); font-size: var(--fs-md); line-height: 1.55; margin: 0 0 1.5rem; }
.offline-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.offline-note { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; opacity: 0.85; }

/* ============================================================
   Bible reader — reading controls (Aa)
   ============================================================ */
.reader-aa-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: none; background: none; color: var(--ink); cursor: pointer; font-family: var(--display); font-weight: 700; font-size: var(--fs-md); border-radius: var(--r-sm); }
.reader-aa-btn:hover { background: var(--surface-2); }
.reader-aa-panel { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: calc(100% - 2rem); max-width: 22rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 1rem; }
.reader-aa-panel[hidden] { display: none; }
.reader-aa-row + .reader-aa-row { margin-top: 1rem; }
.reader-aa-label { font-family: var(--label); font-size: var(--fs-2xs); letter-spacing: 0; text-transform: none; color: var(--muted); margin: 0 0 .5rem; }
.reader-aa-opts { display: flex; gap: .375rem; }
.reader-aa-opt { flex: 1; min-height: 44px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r-sm); cursor: pointer; font-family: var(--display); display: flex; align-items: center; justify-content: center; }
.reader-aa-opt.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); font-weight: 700; }
.reader-aa-opt.size-s { font-size: var(--fs-sm); }
.reader-aa-opt.size-m { font-size: var(--fs-base); }
.reader-aa-opt.size-l { font-size: var(--fs-lg); }
.reader-aa-opt.size-xl { font-size: 1.45rem; } /* deliberately off-scale: must read bigger than L */
.reader-aa-opt.bg-sepia { background: #F4ECD8; color: #3A3222; border-color: #E0D4B8; }
.reader-aa-opt.bg-night { background: #03100F; color: #C9DAD7; border-color: #1A3A3C; }
.reader-aa-opt.bg-sepia.on, .reader-aa-opt.bg-night.on { outline: 2px solid var(--accent-fill); outline-offset: 1px; }

.scripture[data-reading-bg="sepia"] { background: #F4ECD8; color: #3A3222; padding: 1.25rem 1rem; border-radius: var(--r-md); }
.scripture[data-reading-bg="sepia"] .vn { color: #9A7B3A; }
.scripture[data-reading-bg="night"] { background: #03100F; color: #C9DAD7; padding: 1.25rem 1rem; border-radius: var(--r-md); }
.scripture[data-reading-bg="night"] .vn { color: #6BA8A0; }
[data-theme="dark"] .scripture[data-reading-bg="sepia"] { background: #1A1712; color: #D4C5A8; }
[data-theme="dark"] .scripture[data-reading-bg="sepia"] .vn { color: #B89968; }

/* ============================================================
   Dark-mode contrast fixes
   ============================================================ */
[data-theme="dark"] .home-live .icn { color: var(--danger); opacity: 0.9; }
[data-theme="dark"] .live-badge { color: var(--danger); }
[data-theme="dark"] .check-row.ok .check-mark { color: var(--success); }
[data-theme="dark"] .check-row.bad .check-mark { color: var(--danger); }

/* ============================================================
   Bible search page
   ============================================================ */
.bible-search-page { padding-bottom: 2rem; }

.bsearch-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .5rem .5rem;
  margin-bottom: 1.25rem;
}
.bsearch-icon { display: flex; color: var(--muted); flex: none; }
.bsearch-input {
  flex: 1;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-base);
  min-width: 0;
  padding: .25rem 0;
}
.bsearch-input:focus { outline: none; }
.bsearch-input::placeholder { color: var(--muted); }
.bsearch-go {
  flex: none;
  border: none;
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  font-family: var(--label);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: .5rem 1rem;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.bsearch-count {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 .75rem;
}

.bsearch-results { list-style: none; margin: 0; padding: 0; }
.bsearch-hit { margin-bottom: .5rem; }
.bsearch-hit-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "ref chev" "text chev";
  gap: .125rem .5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .75rem 1rem;
  text-decoration: none;
  color: var(--ink);
}
.bsearch-hit-plain { grid-template-columns: 1fr; grid-template-areas: "ref" "text"; }
.bsearch-hit-ref {
  grid-area: ref;
  font-family: var(--label);
  font-weight: 600;
  font-size: var(--fs-2xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.bsearch-hit-text {
  grid-area: text;
  font-family: var(--reading);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
}
.bsearch-hit-chev { grid-area: chev; color: var(--muted); display: flex; }

.bsearch-empty, .bsearch-hint {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}
.bsearch-empty-emoji { color: var(--accent); opacity: 0.6; margin: 0 0 .5rem; }
.bsearch-empty-title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  color: var(--ink);
  margin: 0 0 .5rem;
}
.bsearch-empty-note { font-size: var(--fs-base); line-height: 1.55; max-width: 24rem; margin: 0 auto; }

.bsearch-hint { text-align: left; background: var(--surface); border-radius: var(--r-md); padding: 1.25rem; }
.bsearch-hint-line { display: flex; align-items: flex-start; gap: .5rem; font-size: var(--fs-base); line-height: 1.5; margin: 0 0 .75rem; color: var(--ink); }
.bsearch-hint-line:last-child { margin-bottom: 0; }
.bsearch-hint-icon { color: var(--accent); flex: none; display: flex; margin-top: .125rem; }

/* ---------- Bible page: inline search bar ---------- */
.bible-searchbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .75rem .75rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bible-searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bible-searchbar-icon {
  display: flex;
  color: var(--muted);
  flex: none;
}
.bible-searchbar-input {
  flex: 1;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-base);
  min-width: 0;
  padding: .125rem 0;
}
.bible-searchbar-input:focus { outline: none; }
.bible-searchbar-input::placeholder { color: var(--muted); }
/* Hide the browser's default search clear/decoration for a clean look */
.bible-searchbar-input::-webkit-search-decoration,
.bible-searchbar-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Home: Add to home screen + Share buttons ---------- */
.home-actions {
  display: flex;
  gap: .75rem;
  margin: 1.75rem 0 .5rem;
}
.home-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  padding: 1rem .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--body);
  transition: border-color 0.2s, transform 0.1s;
}
.home-action-btn:hover { border-color: var(--accent); }
.home-action-btn:active { transform: scale(0.98); }
.home-action-icon { display: flex; color: var(--accent); }
.home-action-label {
  font-family: var(--label);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}
.home-action-btn[hidden] { display: none; }

/* The iPhone "how to add" instruction sheet */
.a2hs-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}
.a2hs-sheet[hidden] { display: none; }
.a2hs-sheet-inner {
  position: relative;
  width: 100%;
  max-width: 24rem;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1.5rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
}
.a2hs-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: var(--fs-xl);
  line-height: 1;
  cursor: pointer;
  padding: .25rem .375rem;
}
.a2hs-title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1rem;
}
.a2hs-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.7;
}
.a2hs-steps li { margin-bottom: .5rem; }
.a2hs-hint { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Reader: Listen (text-to-speech) ---------- */
.reader-listen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--r-sm);
}
.reader-listen-btn:hover { background: var(--surface-2); }
.reader-listen-btn.is-playing { color: var(--accent); }
.reader-listen-btn[hidden] { display: none; }

/* The verse currently being spoken — a soft accent wash so it's clearly
   "this is being read now" (distinct from the brown tap-selection). */
.scripture .v.tts-reading {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: var(--r-sm);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* ============================================================
   Consistency layer
   One rule per idea, applied everywhere. If something new is
   added to the app, it should pick from these — not invent.

   Shape     actions --r-sm · cards & tiles --r-md
             overlays & sheets --r-lg · toggles & chips --r-full
   Selected  --accent-fill with --on-accent-fill (same as the tab bar)
   Touch     44px minimum for anything you tap
   Motion    0.15–0.2s ease; press = scale(0.98)
   ============================================================ */

/* ---- Action buttons: one shape, one height, one voice ---- */
.btn-primary, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  box-shadow: none;
  transition: transform .15s ease, background-color .2s ease,
              border-color .2s ease, color .2s ease, opacity .2s ease;
}
.btn-primary.small, .btn-ghost.small, .btn-danger.small {
  min-height: 36px;
  font-size: var(--fs-2xs);
  padding: .375rem .75rem;
}
.btn-primary:hover { opacity: 0.92; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-primary:active, .btn-ghost:active, .btn-danger:active,
.v2-hero-cta:active, .bsearch-go:active, .give-primary:active,
.give-secondary:active, .vsheet-btn:active, .chip:active,
.trans-pill:active, .filter-pill:active { transform: scale(0.98); }

.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-danger:focus-visible,
.chip:focus-visible, .trans-pill:focus-visible, .filter-pill:focus-visible,
.bible-row:focus-visible, .home-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bsearch-go { border-radius: var(--r-sm); min-height: 36px; }

/* ---- Toggles: always pills ---- */
.chip, .trans-pill, .filter-pill, .recent-chip { border-radius: var(--r-full); }
.trans-pill { padding: .25rem .625rem; }
.reader-bar-ref { white-space: nowrap; flex-shrink: 0; }

/* ---- Selected state: one look everywhere ---- */
.chip.active,
.trans-pill.on,
.filter-pill.on,
.size-option.on,
.reader-aa-opt.on {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent-fill);
  font-weight: 700;
}

/* ---- Overlays & sheets: one larger radius ---- */
.vsheet-inner, .a2hs-sheet-inner, .reader-aa-panel { border-radius: var(--r-lg); }

/* ---- Carousels: snap cards to the page margin, not the screen edge ---- */
.plan-rail, .praise-rail { scroll-padding-inline: 1.25rem; }

/* ---- Calendar uses the standard page header now ---- */
.cal-top { padding-bottom: 0; max-width: 40rem; }
.cal-board { padding-top: .5rem; }

/* ---- Footer link: body type, not typewriter ---- */
.site-footer a {
  font-family: var(--body);
  font-size: var(--fs-xs);
  border-bottom: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

/* ---- "Coming soon" lists (Community, More) — were unstyled ---- */
.coming-head {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 2.5rem 0 .75rem;
}
.coming-list {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.coming-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
}
.coming-row + .coming-row { border-top: 1px dashed var(--line); }
.coming-icon { display: flex; color: var(--muted); }
.coming-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.coming-title { font-family: var(--body); font-weight: 600; font-size: var(--fs-base); color: var(--muted); }
.coming-sub { font-size: var(--fs-xs); color: var(--muted); opacity: 0.8; }
.coming-row::after {
  content: "Soon";
  flex: none;
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: .25rem .5rem;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--muted);
}

/* ---- Small tags & labels that were missing styles ---- */
.devo-feature-video-badge, .devo-archive-video-badge, .plan-item-video-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: .375rem;
  padding: .125rem .5rem;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}
.video-frame-label {
  font-family: var(--label);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.staff-link { text-align: center; margin: 2.5rem 0 0; font-size: var(--fs-xs); }
.staff-link a { color: var(--muted); text-underline-offset: 3px; }
.form-hint { font-size: var(--fs-xs); color: var(--muted); margin: .25rem 0 0; }
.checkbox-row { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); }

/* ============================================================
   Springwater layer
   Sits last so it wins. Two voices (Literata reads, Figtree acts),
   sentence case throughout, soft shapes, turquoise used as light.
   ============================================================ */

body { font-family: var(--body); font-size: var(--fs-base); line-height: 1.5; }
::selection { background: var(--wash); }

/* ---- Titles: Literata, calm weight ---- */
.page-title, .bible-title, .admin-header h1, .hero h1,
.hero-arch .page-title, .v2-hero h1 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.bible-title { font-size: var(--fs-2xl); }

/* Section titles */
.bible-h2, .vs-h2, .av-h2, .em-h2, .st-h2, .prayer-h2, .sermon-title,
h2.section-label, .bible-block-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: none;
}

/* Small kickers: plain, quiet, sentence case */
.eyebrow, .v2-eyebrow, .votd-label, .set-label, .coming-head,
.video-frame-label, .reader-aa-label, .book-group-label, .devo-read-label,
.continue-label, .rs-eyebrow, .quest-hero-eyebrow, .cs-promo-label {
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* Card titles share the reading voice */
.devo-feature-title, .sermon-feature-title, .plan-item-title,
.plan-card-title, .campaign-title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- Grouped lists: one panel, hairline dividers ---- */
.bible-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  gap: 0;
}
.bible-list > .bible-row {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: .875rem 1rem;
  margin: 0;
}
.bible-list > .bible-row + .bible-row { border-top: 1px solid var(--line); }
.bible-list > .bible-row:active { background: var(--surface-2); }
.bible-row-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 12px;
  background: var(--wash);
  color: var(--accent);
}
.bible-row-title { font-size: var(--fs-md); }
.bible-row-sub { font-size: var(--fs-sm); }

/* ---- Cards ---- */
.card, .qa-card, .st-item, .em-card, .pg-badge, .plan-card, .praise-card,
.continue-card, .sermon-feature, .give-primary, .give-secondary, .calendar {
  border-radius: var(--r-md);
}
.card, .qa-card, .st-item, .em-card, .plan-card, .praise-card { box-shadow: none; }

/* ---- Buttons: pills, sentence case, one voice ---- */
.btn-primary, .btn-ghost, .btn-danger, .v2-hero-cta {
  min-height: 46px;
  padding: 0 1.25rem;
  border-radius: var(--r-full);
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: 0;
  text-transform: none;
}
.btn-primary { background: var(--accent-fill); color: var(--on-accent-fill); border: 0; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-primary.small, .btn-ghost.small, .btn-danger.small { min-height: 36px; font-size: var(--fs-sm); padding: 0 .875rem; }
.bsearch-go { border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font-family: var(--body); font-weight: 600; }
.subscribe-btn { font-family: var(--body); font-weight: 600; }

/* Toggles */
.chip, .trans-pill, .filter-pill, .recent-chip {
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0;
}

/* ---- Inputs ---- */
input[type="text"], input[type="email"], input[type="search"], input[type="password"],
input[type="tel"], input[type="url"], input[type="number"], textarea, select {
  font-family: var(--body);
  font-size: 1rem; /* 16px stops iPhone zooming in on focus */
  border-radius: var(--r-sm);
}
.bible-searchbar, .bsearch-form { border-radius: var(--r-full); padding-left: 1rem; }

/* ---- Tab bar: frosted glass, icons with labels, a dot for "here" ---- */
.site-nav {
  height: 66px;
  padding: 0 .375rem;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.site-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 4px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  min-height: 0;
}
.site-nav a .icn, .site-nav a svg { width: 22px; height: 22px; }
.site-nav a::after { content: ""; width: 5px; height: 5px; border-radius: 3px; margin-top: 1px; background: transparent; }
.site-nav a.active { background: transparent; color: var(--accent); font-weight: 700; }
.site-nav a.active::after { background: var(--spring); }
.site-nav a:active { transform: scale(0.94); }
body.has-tabbar { padding-bottom: 6.5rem; }
.study-fab { bottom: calc(6rem + env(safe-area-inset-bottom)); }

/* ---- Floating back button ---- */
.global-back {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-family: var(--body);
  font-weight: 600;
  color: var(--ink);
}

/* ---- Overlays ---- */
.vsheet-inner, .a2hs-sheet-inner, .reader-aa-panel, .study-inner { border-radius: var(--r-lg); }
.study-panel { background: rgba(6,23,25,0.45); }

/* ---- Selected verse: a wash of light ---- */
.scripture .v.sel, .v.sel {
  background: var(--wash);
  box-shadow: 0 0 0 3px var(--wash);
  border-radius: 3px;
}

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

/* ============================================================
   Home — Springwater
   ============================================================ */

.sw-hero { position: relative; }
.sw-hero-photo {
  position: relative;
  height: min(78vw, 340px);
  overflow: hidden;
}
.sw-hero-img {
  position: absolute; inset: 0;
  background: url("/static/hero-worship.jpg") center 18%/cover no-repeat;
  transform: scale(calc(1 + (var(--scroll, 0) * 0.06)));
  transform-origin: center top;
}
/* Dark at the top for the status bar and wordmark, clear in the middle,
   dissolving into the page at the bottom. */
.sw-hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6,23,25,.82) 0%, rgba(6,23,25,.35) 28%, rgba(6,23,25,0) 45%,
    rgba(6,23,25,0) 58%, var(--bg) 100%);
}
.sw-wordmark {
  position: absolute; z-index: 1;
  top: calc(env(safe-area-inset-top) + 1.125rem); left: 1.25rem;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem;
  letter-spacing: -0.01em; color: #FFFFFF;
}
.sw-wordmark span { color: #5FDCCB; }

.sw-hero-text {
  position: relative;
  max-width: 34rem; margin: -1.25rem auto 0;
  padding: 0 1.25rem;
}
/* The original signature headline: heavy, tight Archivo with the *marked*
   phrase in italic Instrument Serif. Kept by request. */
.sw-hero-title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.1rem, 10vw, 3.1rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 0;
  max-width: 12ch;
  color: var(--ink);
}
.sw-hero-title em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  color: inherit;
}
.sw-hero-when { margin: .875rem 0 0; font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.sw-hero-where { margin: .125rem 0 0; color: var(--muted); font-size: var(--fs-base); line-height: 1.45; }
.sw-hero-actions { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.125rem; }
.sw-hero-actions .sw-cta { width: auto; margin: 0; }

.home-main { padding-top: 1.5rem; }

/* Continue reading */
.continue-card {
  display: flex; align-items: center; gap: .875rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: .875rem 1rem;
  color: var(--ink); text-decoration: none; box-shadow: none;
  margin-bottom: .875rem;
}
.continue-card::before {
  content: ""; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 12px;
  background: var(--wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319A79B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5.5C4.5 4 8 4 12 6c4-2 7.5-2 10-.5V19c-2.5-1.5-6-1.5-10 .5-4-2-7.5-2-10-.5z'/%3E%3Cpath d='M12 6v13.5'/%3E%3C/svg%3E") center/22px no-repeat;
}
.continue-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.continue-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.continue-ref { font-family: var(--body); font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.continue-note { font-size: var(--fs-sm); color: var(--muted); }
.continue-card > .icn { color: var(--muted); }

/* Verse of the day — the one place the water-light shows */
.votd {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 1.375rem 1.375rem 1.125rem;
  background:
    radial-gradient(120% 70% at 85% 0%, var(--wash), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, var(--wash), transparent 65%),
    var(--surface);
}
.votd::before {
  content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: repeating-radial-gradient(circle at 70% 20%, transparent 0 22px, var(--wash) 23px 24px, transparent 25px 46px);
  opacity: .6;
  -webkit-mask-image: radial-gradient(60% 50% at 75% 15%, #000, transparent 70%);
          mask-image: radial-gradient(60% 50% at 75% 15%, #000, transparent 70%);
  animation: sw-ripple 14s ease-in-out infinite alternate;
}
@keyframes sw-ripple { from { transform: scale(1); } to { transform: scale(1.06) translate(-1%, 1%); } }
.votd > * { position: relative; }
.votd-label { margin: 0; }
.votd-text {
  font-family: var(--reading);
  font-size: 1.4rem; line-height: 1.38; letter-spacing: -0.01em;
  font-weight: 420; color: var(--ink);
  margin: .625rem 0 .875rem;
}
.votd-foot { display: flex; justify-content: space-between; align-items: center; }
.votd-ref { font-weight: 600; color: var(--accent); font-size: var(--fs-base); font-family: var(--body); letter-spacing: 0; text-transform: none; }
.votd-action {
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-full); padding: .5rem .875rem;
  background: var(--glass);
}

/* Section heads */
.bible-block { margin-top: 2.25rem; }
.bible-block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .75rem; }
.bible-more { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; font-family: var(--body); letter-spacing: 0; text-transform: none; }

/* What's on — dates set like a printed diary */
.home-events { display: flex; flex-direction: column; }
.home-event {
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 0; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink); background: none; border-radius: 0; box-shadow: none;
}
.home-event:first-child { border-top: 0; }
.home-event-when { width: 3rem; flex: none; display: flex; flex-direction: column-reverse; align-items: center; text-align: center; }
.home-event-date { font-family: var(--display); font-size: 1.6rem; font-weight: 500; line-height: 1; color: var(--ink); background: none; border: 0; padding: 0; width: auto; height: auto; transform: none; }
.home-event-day { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; margin-top: .125rem; }
.home-event-body { flex: 1; display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.home-event-title { font-weight: 600; font-size: var(--fs-md); }
.home-event-meta { font-size: var(--fs-sm); color: var(--muted); }
.home-event > .icn { color: var(--muted); opacity: .6; }

/* Devotional feature */
.devo-feature { border-radius: var(--r-lg); padding: 1.375rem; }
.devo-feature-ref { font-family: var(--body); font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; color: var(--accent-soft); }
.devo-feature-title { font-size: var(--fs-lg); margin: .375rem 0 .5rem; }
.devo-feature-cta { font-family: var(--body); font-weight: 600; letter-spacing: 0; text-transform: none; }

.home-main > .bible-list { margin-top: 2.25rem; }
.home-actions { margin-top: 1rem; }
.home-action-btn { border-radius: var(--r-md); background: var(--surface); }
.home-action-label { font-family: var(--body); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }

.home-live { border-radius: var(--r-md); }

/* ============================================================
   Bible reader — Springwater
   ============================================================ */

html { --reading-size: 1.16rem; }
html[data-text-size="small"]  { --reading-size: 1rem; }
html[data-text-size="normal"] { --reading-size: 1.16rem; }
html[data-text-size="large"]  { --reading-size: 1.34rem; }
html[data-text-size="xlarge"] { --reading-size: 1.56rem; }

.reader-bar {
  gap: .25rem;
  padding: .375rem .625rem;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.reader-bar-ref {
  display: inline-flex; align-items: center; gap: .25rem;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
  padding: .375rem .375rem; border-radius: var(--r-sm); margin-right: auto;
  min-height: 44px;
}
.reader-bar-ref .icn { color: var(--muted); }

/* Translation: one quiet button that opens a menu, not four pills */
.trans-menu { position: relative; }
.trans-current {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .25rem;
  height: 34px; padding: 0 .75rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--body); font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
}
.trans-current::-webkit-details-marker { display: none; }
.trans-current .icn { color: var(--muted); transition: transform .2s ease; }
.trans-menu[open] .trans-current .icn { transform: rotate(180deg); }
.trans-list {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30;
  min-width: 15rem; padding: .375rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.trans-item {
  display: flex; align-items: baseline; gap: .75rem;
  padding: .625rem .75rem; border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink);
}
.trans-item b { font-weight: 700; font-size: var(--fs-sm); width: 2.5rem; flex: none; }
.trans-item span { font-size: var(--fs-sm); color: var(--muted); }
.trans-item:hover, .trans-item:active { background: var(--surface-2); }
.trans-item.on { background: var(--wash); }
.trans-item.on b { color: var(--accent); }

.reader-listen-btn, .reader-aa-btn {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px;
  border-radius: var(--r-full); color: var(--ink); background: transparent;
}
.reader-aa-btn { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }

/* Text */
.reader { max-width: 36rem; padding: 1.75rem 1.5rem 7rem; }
.reader-book {
  margin: 0 0 .5rem;
  font-family: var(--body); font-weight: 600; font-size: var(--fs-sm); color: var(--muted);
}
.scripture {
  font-family: var(--reading);
  font-size: var(--reading-size);
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: 0;
  hanging-punctuation: first;
}
/* The memorable moment: the chapter opens like a printed Bible */
.chap-num {
  float: left;
  font-family: var(--display);
  font-weight: 300;
  font-size: 3.4em;
  line-height: .82;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin: .14em .22em 0 -.04em;
}
.scripture .vn {
  font-family: var(--body);
  font-size: .58em;
  font-weight: 700;
  color: var(--accent);
  margin-right: .2em;
}
/* The first verse number sits beside the big numeral already */
.chap-num + .v .vn { display: none; }
.v { border-radius: 3px; }
.v.sel { background: var(--wash); box-shadow: 0 0 0 3px var(--wash); }
.v.saved { background: none; text-decoration: underline; text-decoration-color: var(--spring); text-decoration-thickness: 2px; text-underline-offset: 5px; }

.reader-credit, .reader-copyright, .reader-fallback { font-family: var(--body); font-size: var(--fs-sm); color: var(--muted); letter-spacing: 0; text-transform: none; }
.reader-paging .page-btn { border-radius: var(--r-full); font-family: var(--body); font-weight: 600; background: var(--surface); }

/* Sepia & night keep their own paper */
.scripture[data-reading-bg="sepia"] .chap-num { color: #9A7B3A; }
.scripture[data-reading-bg="night"] .chap-num { color: #6BA8A0; }
.reader-listen-btn svg[hidden], [hidden] > svg[hidden], svg[hidden] { display: none !important; }

/* ---- One fill for primary actions & "done" states (deep pool / lit teal) ---- */
.pf-submit, .study-send, .pray-btn.done, .audio-action.done, .study-bubble.me,
.chapter-cell:active, .chip.active {
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  border-color: var(--accent-fill);
}
.pf-submit { min-height: 50px; font-size: var(--fs-md); }

/* ---- Headings breathe ---- */
.bible-h2, .vs-h2, .av-h2, .em-h2, .st-h2, .prayer-h2, .sermon-title, h2.section-label {
  line-height: 1.25;
}
.bible-block > .bible-h2 { margin-bottom: .375rem; }
.resource-group-blurb { margin: 0 0 1rem; }
main.bible > .bible-h2, .gift-aid .bible-h2, article .bible-h2 { margin-bottom: .5rem; }
.quest-hero-title { color: #FFFFFF; font-weight: 600; }

/* ---- Study help: long answers stay inside their bubble ---- */
.study-thread { min-width: 0; }
.study-bubble {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  border-radius: var(--r-md);
}
.study-bubble.ai {
  max-width: 100%;
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.study-bubble.me { border-bottom-right-radius: 6px; max-width: 85%; }
.study-bubble ul, .study-bubble ol { margin: 0 0 .625rem; padding-left: 1.25rem; }
.study-bubble ol li::marker { color: var(--accent); font-weight: 700; }
.study-bubble ul li::marker { color: var(--accent); }
.study-bubble a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.study-bubble strong { font-weight: 700; }
.study-bubble p + ul, .study-bubble p + ol { margin-top: -.125rem; }

/* ============================================================
   Original words — Hebrew & Greek word study
   ============================================================ */
.vsheet-glyph { font-family: "Times New Roman", "Noto Serif Hebrew", Georgia, serif; font-size: 1.25rem; line-height: 20px; height: 20px; }

.ws-panel {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(6,23,25,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .24s ease;
}
.ws-panel.up { opacity: 1; }
.ws-inner {
  width: 100%; max-width: 40rem; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 1rem 1rem 0;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(0.16,1,0.3,1);
}
.ws-panel.up .ws-inner { transform: translateY(0); }
.ws-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 .25rem .75rem; }
.ws-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-lg); margin: 0; }
.ws-ref { font-weight: 600; font-size: var(--fs-sm); color: var(--accent); margin: .125rem 0 0; }
.ws-close { width: 44px; height: 44px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.ws-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 .25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.ws-hint, .ws-loading, .ws-empty { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 .75rem; }

.ws-verse + .ws-verse { margin-top: 1.5rem; }
.ws-verse-ref { font-weight: 700; font-size: var(--fs-sm); color: var(--muted); margin: 0 0 .5rem; }
.ws-line {
  font-family: "SBL Hebrew", "Noto Serif Hebrew", "Times New Roman", "Literata", Georgia, serif;
  font-size: 1.45rem; line-height: 1.7; margin: 0 0 .875rem;
  padding: .75rem 1rem; border-radius: var(--r-md);
  background:
    radial-gradient(120% 80% at 90% 0%, var(--wash), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.ws-line:lang(grc) { font-family: "Literata", "Gentium Plus", Georgia, "Times New Roman", serif; font-size: 1.25rem; }

.ws-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.ws-word + .ws-word { border-top: 1px solid var(--line); }
.ws-word-btn {
  width: 100%; display: flex; align-items: center; gap: .875rem;
  padding: .75rem 1rem; background: none; border: 0; text-align: left;
  color: var(--ink); cursor: pointer; font: inherit; min-height: 56px;
}
.ws-word.open .ws-word-btn { background: var(--wash); }
.ws-orig {
  flex: none; min-width: 4.5rem; max-width: 42%;
  font-family: "SBL Hebrew", "Noto Serif Hebrew", "Times New Roman", Georgia, serif;
  font-size: 1.5rem; line-height: 1.2; text-align: right; color: var(--ink);
  overflow-wrap: anywhere;
}
.ws-orig:lang(grc) { font-family: "Literata", "Gentium Plus", Georgia, serif; font-size: 1.2rem; text-align: left; }
.ws-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.ws-translit { font-family: var(--display); font-style: italic; font-size: var(--fs-base); color: var(--accent); }
.ws-gloss { font-weight: 600; font-size: var(--fs-base); overflow-wrap: anywhere; }
.ws-num { flex: none; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.ws-detail { padding: .25rem 1rem 1rem; background: var(--wash); }
.ws-lemma-line { display: flex; align-items: baseline; gap: .625rem; flex-wrap: wrap; margin: 0 0 .25rem; }
.ws-lemma { font-family: "SBL Hebrew", "Noto Serif Hebrew", "Times New Roman", Georgia, serif; font-size: 1.6rem; }
.ws-lemma:lang(grc) { font-family: "Literata", Georgia, serif; font-size: 1.3rem; }
.ws-lemma-tr { font-family: var(--display); font-style: italic; color: var(--accent); }
.ws-meta { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; margin: 0 0 .5rem; }
.ws-meaning { font-family: var(--display); font-size: var(--fs-md); font-weight: 600; margin: 0 0 .5rem; }
.ws-def { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.ws-def p { margin: 0 0 .25rem; }
.ws-credit { font-size: var(--fs-xs); color: var(--muted); margin: 1.25rem 0 0; text-align: center; }
.ws-panel[hidden] { display: none !important; }

/* ============================================================
   Reference pages — verse pages & word pages
   ============================================================ */
.vp-title { font-size: var(--fs-xl); text-align: center; }
.vp-main {
  position: relative; overflow: hidden;
  margin-top: .5rem; padding: 1.5rem 1.375rem 1rem;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background:
    radial-gradient(120% 70% at 90% 0%, var(--wash), transparent 60%),
    var(--surface);
}
.vp-main-text {
  font-family: var(--reading); font-size: 1.45rem; line-height: 1.5;
  letter-spacing: -0.01em; margin: 0 0 1rem; color: var(--ink);
}
.vp-main-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.vp-code { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.vp-tools { display: flex; gap: .5rem; }
.vp-tool {
  display: inline-flex; align-items: center; gap: .375rem;
  min-height: 40px; padding: 0 .875rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  font: 600 var(--fs-sm) var(--body); text-decoration: none; cursor: pointer;
}
.vp-tool .icn { color: var(--accent); }
.vp-section { margin-top: 2rem; }
.vp-section > .bible-h2 { margin: 0 0 .75rem; }
.vp-count { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.vp-hint { font-size: var(--fs-sm); color: var(--muted); margin: -.25rem 0 .75rem; }

.vp-trans { display: flex; flex-direction: column; gap: 1rem; }
.vp-trans-row { display: grid; grid-template-columns: 2.75rem 1fr; gap: .75rem; align-items: baseline; }
.vp-trans-code { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.vp-trans-text { margin: 0; font-family: var(--reading); font-size: var(--fs-md); line-height: 1.6; }

.vp-paging { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1.25rem; }
.vp-page {
  display: inline-flex; align-items: center; gap: .25rem; min-height: 40px; padding: 0 .75rem;
  border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
  max-width: 38%; overflow: hidden; text-overflow: ellipsis;
}
.vp-page span { overflow: hidden; text-overflow: ellipsis; }
.vp-page-mid { max-width: none; color: var(--accent); }
.vp-page .icn { flex: none; color: var(--muted); }

/* Interlinear: each word a small stacked card */
.vp-interlinear { display: flex; flex-wrap: wrap; gap: .5rem; }
.il-word {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-width: 4.25rem; max-width: 100%; padding: .625rem .625rem .5rem;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; gap: .125rem;
}
a.il-word:active, a.il-word:hover { border-color: var(--accent); background: var(--wash); }
.il-orig { font-family: "SBL Hebrew", "Noto Serif Hebrew", "Times New Roman", Georgia, serif; font-size: 1.45rem; line-height: 1.25; }
.il-orig:lang(grc) { font-family: "Literata", "Gentium Plus", Georgia, serif; font-size: 1.15rem; }
.il-tr { font-family: var(--display); font-style: italic; font-size: var(--fs-xs); color: var(--accent); }
.il-gloss { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.il-num { font-size: .6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.vp-xref-text {
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vp-more { display: none !important; }
.vp-showall { width: 100%; margin-top: .75rem; }

/* Word pages */
.wp-hero { text-align: center; padding: 1.5rem 0 .5rem; }
.wp-lang { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin: 0 0 .75rem; }
.wp-lemma {
  font-family: "SBL Hebrew", "Noto Serif Hebrew", "Times New Roman", Georgia, serif;
  font-size: 3.25rem; font-weight: 400; line-height: 1.15; margin: 0; color: var(--ink);
}
.wp-lemma:lang(grc) { font-family: "Literata", "Gentium Plus", Georgia, serif; font-size: 2.75rem; }
.wp-translit { font-family: var(--display); font-style: italic; font-size: var(--fs-lg); color: var(--accent); margin: .25rem 0 0; }
.wp-meaning { font-family: var(--display); font-weight: 600; font-size: var(--fs-xl); margin: .75rem 0 0; letter-spacing: -0.01em; }

.wp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.5rem; }
.wp-stat {
  display: flex; flex-direction: column; align-items: center; padding: .875rem .5rem;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
}
.wp-stat b { font-family: var(--display); font-size: var(--fs-xl); font-weight: 500; line-height: 1.1; }
.wp-stat span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }

.wp-renderings { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wp-renderings li {
  display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .375rem .375rem .875rem;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); font-weight: 600;
}
.wp-renderings b { font-size: var(--fs-xs); background: var(--wash); color: var(--accent); border-radius: var(--r-full); padding: .125rem .5rem; }

.wp-def {
  padding: 1rem 1.125rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-sm); line-height: 1.6; overflow-wrap: anywhere;
}
.wp-def p { margin: 0 0 .25rem; }
.wp-related { font-size: var(--fs-sm); color: var(--muted); margin: .75rem 0 0; }
.wp-related a { color: var(--accent); font-weight: 600; }

.wp-books { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.wp-books li { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: .75rem; font-size: var(--fs-sm); }
.wp-book { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.wp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--spring); }
.wp-books b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.wp-as { font-style: normal; font-weight: 600; color: var(--accent); font-size: var(--fs-sm); margin-left: .25rem; }
.wp-paging { margin-top: 1rem; }

/* ============================================================
   Memorise — hub & path
   ============================================================ */
.mz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .25rem; }
.mz-stat {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .125rem; padding: .875rem .5rem; min-height: 6.5rem;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: center;
}
.mz-stat b { font-family: var(--display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.1; }
.mz-stat span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.mz-streak svg { color: var(--line); }
.mz-streak.lit svg { color: #F59E0B; }
.mz-ring { transform: rotate(-90deg); }
.mz-ring circle { fill: none; stroke-width: 5; }
.mz-ring-bg { stroke: var(--surface-2); }
.mz-ring-fg { stroke: var(--spring); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.mz-goal b { font-size: var(--fs-md); }
.mz-level b { font-size: var(--fs-xl); }
.mz-lvbar { display: block; width: 70%; height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: .375rem; overflow: hidden; }
.mz-lvbar i { display: block; height: 100%; background: var(--spring); border-radius: 3px; }

.mz-review {
  display: flex; align-items: center; gap: .875rem; margin-top: 1rem;
  padding: 1rem; border-radius: var(--r-lg); text-decoration: none;
  background: var(--accent-fill); color: var(--on-accent-fill);
}
.mz-review[hidden] { display: none; }
.mz-review-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: rgba(255,255,255,0.14); flex: none; }
.mz-review-body { flex: 1; display: flex; flex-direction: column; }
.mz-review-body b { font-size: var(--fs-md); }
.mz-review-body small { font-size: var(--fs-sm); opacity: .8; }
.mz-review-go { font-weight: 700; padding: .5rem .875rem; border-radius: var(--r-full); background: var(--bg); color: var(--ink); }

.mz-unit { margin-top: 2.25rem; }
.mz-unit-head {
  padding: 1rem 1.125rem; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--wash), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.mz-unit-n { font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.mz-unit-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-lg); margin: .125rem 0 0; }

/* Zig-zag path, like stepping stones */
.mz-path { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.mz-node-wrap { display: flex; justify-content: center; transform: translateX(calc(sin(var(--i) * 1.2rad) * 26%)); }
@supports not (transform: translateX(calc(sin(1rad) * 1%))) {
  .mz-node-wrap:nth-child(4n+2) { transform: translateX(22%); }
  .mz-node-wrap:nth-child(4n) { transform: translateX(-22%); }
}
.mz-node { display: flex; flex-direction: column; align-items: center; gap: .375rem; text-decoration: none; color: var(--ink); width: 9rem; }
.mz-node-disc {
  position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 14%, var(--surface-2));
  transition: transform .12s ease, box-shadow .12s ease;
}
.mz-node:active .mz-node-disc { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 14%, var(--surface-2)); }
.mz-node-disc svg { display: none; }
.mz-node.locked .mz-ico-lock { display: block; }
.mz-node.current .mz-ico-book, .mz-node.due .mz-ico-book { display: block; }
.mz-node.done .mz-ico-star { display: block; }
.mz-node.current .mz-node-disc { background: var(--spring); color: #fff; box-shadow: 0 5px 0 #0B7A71; }
.mz-node.current .mz-node-disc::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 3px solid var(--spring); opacity: .35; animation: mz-pulse 2s ease-in-out infinite;
}
@keyframes mz-pulse { 50% { transform: scale(1.08); opacity: .15; } }
.mz-node.done .mz-node-disc { background: var(--accent-fill); color: #F6D365; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent-fill) 70%, #000); }
.mz-node.due .mz-node-disc { background: #F6D365; color: #5A4300; box-shadow: 0 5px 0 #C9A227; }
.mz-node.locked { cursor: default; }
.mz-node.locked .mz-node-label { color: var(--muted); }
.mz-node-label { font-size: var(--fs-sm); font-weight: 600; text-align: center; }
.mz-node.current .mz-node-label::after { content: "Start"; display: block; font-size: var(--fs-xs); color: var(--accent); font-weight: 700; }
.mz-node.due .mz-node-label::after { content: "Review"; display: block; font-size: var(--fs-xs); color: #B08A00; font-weight: 700; }

.mz-pips { display: inline-flex; gap: 3px; }
.mz-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.mz-pips i.on { background: var(--spring); border-color: var(--spring); }
.mz-node.locked .mz-pips, .mz-node.current .mz-pips { visibility: hidden; }
.mz-pips.big i { width: 12px; height: 12px; }
.bible-row .mz-pips { flex: none; }

.mz-howto { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.mz-howto .bible-h2 { color: var(--ink); margin-bottom: .5rem; }
.mz-howto b { color: var(--ink); }
.mz-trans { display: flex; flex-direction: column; gap: .375rem; margin-top: 1rem; color: var(--ink); font-weight: 600; }
.mz-trans select { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.mz-local { margin-top: .75rem; font-size: var(--fs-xs); }

/* ============================================================
   Memorise — lesson
   ============================================================ */
.ls { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 36rem; margin: 0 auto; }
.ls-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .75rem;
  padding: calc(.75rem + env(safe-area-inset-top)) 1rem .75rem; background: var(--bg);
}
.ls-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); flex: none; }
.ls-progress { flex: 1; height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.ls-progress i { display: block; height: 100%; width: 0; border-radius: 7px; background: var(--spring); transition: width .4s cubic-bezier(.3,1.3,.5,1); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.25); }
.ls-trans { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); min-width: 2rem; text-align: right; }

.ls-stage { flex: 1; padding: 1rem 1.25rem 8rem; }
.ls-stage.ls-in { animation: ls-in .3s ease both; }
@keyframes ls-in { from { opacity: 0; transform: translateX(18px); } }
.ls-prompt { font-family: var(--display); font-weight: 600; font-size: var(--fs-xl); line-height: 1.2; margin: .5rem 0 .25rem; letter-spacing: -0.01em; }
.ls-ref { font-weight: 600; color: var(--accent); margin: 0 0 1.25rem; font-size: var(--fs-sm); }
.ls-tip { color: var(--muted); font-size: var(--fs-base); line-height: 1.55; }
.ls-card {
  margin: 1rem 0; padding: 1.5rem 1.375rem; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(120% 80% at 90% 0%, var(--wash), transparent 60%), var(--surface);
}
.ls-verse { font-family: var(--reading); font-size: 1.4rem; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.ls-verse-sm { font-size: 1.2rem; margin-bottom: 1.25rem; }
.ls-card-ref { margin: .75rem 0 0; font-weight: 600; color: var(--accent); }
.ls-listen { min-height: 44px; padding: 0 1.25rem; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--fs-base) var(--body); cursor: pointer; }
.ls-context { color: var(--muted); font-family: var(--reading); font-size: var(--fs-md); margin: 0 0 .75rem; }

.ls-answer {
  min-height: 7.5rem; display: flex; flex-wrap: wrap; align-content: flex-start; gap: .5rem;
  padding: .75rem 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line);
  background: repeating-linear-gradient(transparent 0 3.2rem, var(--line) 3.2rem calc(3.2rem + 1px), transparent calc(3.2rem + 1px) 3.7rem);
}
.ls-answer.good { border-color: var(--spring); }
.ls-answer.bad { border-color: var(--danger); }
.ls-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.ls-tile {
  min-height: 46px; padding: .5rem .875rem; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 1.05rem var(--body); cursor: pointer;
  box-shadow: 0 3px 0 var(--line); transition: transform .08s ease;
}
.ls-tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }

.ls-gap { display: inline-block; min-width: 4rem; border-bottom: 3px solid var(--spring); color: var(--accent); font-weight: 600; text-align: center; padding: 0 .25rem; }
.ls-choices { display: flex; flex-direction: column; gap: .625rem; }
.ls-choice {
  min-height: 56px; padding: .75rem 1rem; border-radius: 14px; text-align: left;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 1.05rem var(--body); cursor: pointer; box-shadow: 0 3px 0 var(--line);
}
.ls-choice.on { border-color: var(--spring); background: var(--wash); box-shadow: 0 3px 0 var(--spring); }
.ls-choice.good { border-color: var(--spring); }
.ls-choice.bad { border-color: var(--danger); box-shadow: 0 3px 0 var(--danger); }

.ls-letters { font-size: 1.25rem; line-height: 1.9; }
.ls-hidden-word {
  color: transparent; border-radius: 4px;
  background: linear-gradient(var(--surface-2), var(--surface-2)) left bottom / 100% 6px no-repeat;
  transition: color .2s ease;
}
.ls-hidden-word.cursor { background: linear-gradient(var(--spring), var(--spring)) left bottom / 100% 4px no-repeat; }
.ls-hidden-word.shown { color: var(--ink); background: none; }
.ls-hidden-word.helped { color: var(--danger); background: none; }
.ls-hidden-word.shake { animation: ls-shake .3s ease; }
@keyframes ls-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ls-type {
  display: block; width: 100%; margin-top: 1.25rem; padding: .875rem 1rem; text-align: center;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  font: 600 1.25rem var(--body);
}
.ls-type:focus { outline: none; border-color: var(--spring); }
.ls-help { margin-top: .75rem; background: none; border: 0; color: var(--accent); font: 600 var(--fs-sm) var(--body); cursor: pointer; padding: .5rem; }
.ls-letters, .ls-type { display: block; }
.ls-stage .ls-help { display: block; margin-left: auto; margin-right: auto; }

.ls-footer, .ls-feedback {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.ls-footer[hidden], .ls-feedback[hidden] { display: none; }
.ls-fb-inner, .ls-footer { max-width: 36rem; margin: 0 auto; }
.ls-check {
  display: block; width: 100%; max-width: 36rem; margin: 0 auto; min-height: 52px; border: 0; border-radius: 16px;
  background: var(--spring); color: #fff; font: 700 1.05rem var(--body); cursor: pointer;
  box-shadow: 0 4px 0 #0B7A71; transition: transform .08s ease;
}
.ls-check:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0B7A71; }
.ls-check:disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: default; }
.ls-feedback { animation: ls-up .22s ease both; }
@keyframes ls-up { from { transform: translateY(100%); } }
.ls-feedback.good { background: color-mix(in srgb, var(--spring) 16%, var(--bg)); border-top-color: var(--spring); }
.ls-feedback.bad { background: color-mix(in srgb, var(--danger) 12%, var(--bg)); border-top-color: var(--danger); }
.ls-fb-title { font-family: var(--display); font-weight: 600; font-size: var(--fs-lg); margin: 0 0 .25rem; }
.ls-feedback.good .ls-fb-title { color: var(--accent); }
.ls-feedback.bad .ls-fb-title { color: var(--danger); }
.ls-fb-body { margin: 0 0 .875rem; font-size: var(--fs-base); line-height: 1.5; }
.ls-fb-body:empty { margin: 0 0 .5rem; }
.ls-feedback.bad .ls-check { background: var(--danger); box-shadow: 0 4px 0 color-mix(in srgb, var(--danger) 70%, #000); }

.ls-result { position: relative; text-align: center; padding-top: 2rem; }
.ls-result-kicker { font-weight: 600; color: var(--accent); margin: 0; }
.ls-result-title { font-family: var(--display); font-weight: 600; font-size: 2.25rem; margin: .25rem 0 .25rem; letter-spacing: -0.02em; }
.ls-result-ref { color: var(--muted); font-weight: 600; margin: 0 0 1.5rem; }
.ls-result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1.5rem; }
.ls-rs { padding: 1rem .5rem; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: .125rem; }
.ls-rs b { font-family: var(--display); font-size: var(--fs-xl); font-weight: 600; }
.ls-rs span { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.ls-rs.lit { border-color: #F59E0B; }
.ls-rs.lit b { color: #D97706; }
.ls-result-note { color: var(--muted); margin: 1rem 0 1.75rem; }
.ls-done { width: 100%; }
.ls-confetti {
  position: absolute; top: 30%; width: 8px; height: 12px; border-radius: 2px; pointer-events: none;
  animation: ls-pop 1.1s cubic-bezier(.2,.7,.4,1) both;
}
@keyframes ls-pop {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--r)); opacity: 0; }
}

/* ---- Verse menu: a grid of tools ---- */
.vsheet-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.vsheet-btn {
  flex-direction: column; gap: .25rem; min-width: 0; min-height: 64px;
  padding: .625rem .25rem; font-size: var(--fs-xs); font-weight: 600; border-radius: 14px;
}
.vsheet-btn[hidden] { display: none; }
.vsheet-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vsheet-glyph { font-size: 1.3rem; line-height: 20px; height: 20px; }
.vsheet-done { grid-column: 1 / -1; min-height: 48px; flex-direction: row; font-size: var(--fs-base); }
.mz-promo {
  display: flex; align-items: center; gap: .875rem; margin: 1rem 0 0; padding: 1rem 1.125rem;
  border-radius: var(--r-lg); text-decoration: none; color: var(--on-accent-fill); background: var(--accent-fill);
  position: relative; overflow: hidden;
}
.mz-promo::before {
  content: ""; position: absolute; inset: -60%; pointer-events: none; opacity: .5;
  background: repeating-radial-gradient(circle at 85% 15%, transparent 0 20px, rgba(255,255,255,.08) 21px 22px, transparent 23px 42px);
}
.mz-promo > * { position: relative; }
.mz-promo-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: rgba(255,255,255,.14); flex: none; }
.mz-promo-body { flex: 1; display: flex; flex-direction: column; }
.mz-promo-body b { font-family: var(--display); font-size: var(--fs-md); font-weight: 600; }
.mz-promo-body small { font-size: var(--fs-sm); opacity: .82; }
.mz-promo-streak { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; padding: .375rem .75rem; border-radius: var(--r-full); background: rgba(255,255,255,.16); }
.mz-promo-streak::before { content: ""; width: 14px; height: 16px; background: #F59E0B; clip-path: path("M7 0c.6 2.4 3 3.3 3 6.6A3 3 0 0 1 4 6.6c0-1.5.7-2.4 1.5-3 .1 1.2.7 1.8 1.3 1.8C6.5 3.6 6.2 1.8 7 0z"); transform: scale(1.4); }
.mz-promo-streak[hidden] { display: none; }
.ws-more {
  display: inline-flex; align-items: center; margin-top: .75rem; min-height: 40px; padding: 0 1rem;
  border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
}

/* ============================================================
   Wave 1 — reader foundations
   ============================================================ */
@font-face { font-family: "OpenDyslexic"; src: url("fonts/opendyslexic.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url("fonts/opendyslexic-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --wj: #B42318; }
[data-theme="dark"] { --wj: #F87171; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] { --wj: #F87171; } }

/* Font, spacing, layout */
.scripture[data-font="sans"] { font-family: var(--body); }
.scripture[data-font="easy"] { font-family: "OpenDyslexic", var(--body); font-size: calc(var(--reading-size) * .88); letter-spacing: -.03em; word-spacing: -.2em; }
.scripture[data-font="easy"] .sec-h, .scripture[data-font="easy"] .sec-refs, .scripture[data-font="easy"] .ps-title, .scripture[data-font="easy"] .vn, .scripture[data-font="easy"] .fn { word-spacing: normal; letter-spacing: 0; }
.scripture[data-space="compact"] { line-height: 1.55; }
.scripture[data-space="normal"] { line-height: 1.72; }
.scripture[data-space="airy"] { line-height: 2.05; }
.scripture[data-layout="lines"] .v { display: block; margin-bottom: .45em; }
.scripture[data-layout="lines"] .pbr { display: none; }
.scripture[data-layout="lines"] .chap-num { float: none; display: block; margin: 0 0 .2em; }
.scripture[data-layout="lines"] .chap-num + .v .vn { display: inline; }

/* Paragraphs and poetry */
.pbr { display: block; height: .7em; }
.pbr.stanza { height: 1.1em; }
/* Each poetic line is its own block with a hanging indent, so a long
   line that wraps tucks in under itself, as in a printed Bible. */
.ql { display: flow-root; text-indent: -1.6em; padding-left: 1.6em; }
.ql2 { padding-left: 3.2em; }
.ql3 { padding-left: 4.8em; }
.ql + .pbr, .ql + .ql { margin: 0; }
.scripture.has-fmt .v:first-of-type .pbr:first-child { display: none; }

/* Words of Jesus */
.wj { color: var(--wj); }
.scripture[data-reading-bg="sepia"] .wj { color: #A12C1C; }
.scripture[data-reading-bg="night"] .wj { color: #F2928A; }
.no-red .wj { color: inherit; }

/* Switches */
.no-vn .vn { display: none; }
.no-heads .sec-h, .no-heads .ps-title, .no-heads .sec-refs { display: none; }
.no-notes .fn, .no-notes ~ .fn-list { display: none; }

/* Headings */
.sec-h { font-family: var(--body); font-weight: 700; font-size: .78em; line-height: 1.35; color: var(--ink); margin: 1.6em 0 .35em; letter-spacing: 0; clear: none; }
.scripture > .sec-h:first-child { margin-top: 0; }
.ps-title { font-style: italic; color: var(--muted); font-size: .9em; margin: .2em 0 .6em; }
.sec-refs { font-family: var(--body); font-size: .68em; color: var(--muted); margin: -.1em 0 .6em; }
.sec-refs a { color: var(--accent); text-decoration: none; }
.sec-refs a:hover { text-decoration: underline; }
.scripture[data-reading-bg] .sec-h { color: inherit; }

/* Footnotes */
.fn { appearance: none; border: 0; background: none; padding: 0 .12em; margin: 0; cursor: pointer; font-family: var(--body); font-weight: 700; font-size: .58em; line-height: 1; vertical-align: super; color: var(--accent); font-style: italic; min-width: 0; min-height: 0; }
.fn:hover, .fn:focus-visible { text-decoration: underline; }
.fn-pop { position: absolute; z-index: 50; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: .75rem .9rem; font-family: var(--body); font-size: var(--fs-sm); line-height: 1.5; }
.fn-pop[hidden] { display: none; }
.fn-pop p { margin: 0; }
.fn-list { margin: 2rem 0 0; font-family: var(--body); font-size: var(--fs-sm); color: var(--muted); }
.fn-list summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: .5rem 0; }
.fn-list ol { margin: .25rem 0 0; padding: 0; list-style: none; }
.fn-ref { font-weight: 600; color: var(--ink); margin-right: .25rem; }
.fn-list li { margin: .25rem 0; }
.fn-list li b { color: var(--accent); margin-right: .35rem; }

/* Reading time and progress */
.reader-time { font-weight: 500; }
.reader-time::before { content: "·"; margin: 0 .45em; }
.reader-bar { position: sticky; }
.reader-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; overflow: hidden; }
.reader-progress i { display: block; height: 100%; background: var(--spring); transform-origin: left center; transform: scaleX(0); transition: transform .12s linear; }

/* Aa panel: switches and scroll */
.reader-aa-panel { max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; }
.reader-aa-opt.font-serif { font-family: var(--reading); }
.reader-aa-opt.font-sans { font-family: var(--body); }
.reader-aa-opt.font-easy { font-family: "OpenDyslexic", var(--body); font-size: .78em; white-space: nowrap; letter-spacing: -.02em; }
.reader-aa-opts .reader-aa-opt { font-size: var(--fs-sm); }
.reader-aa-switches { display: grid; gap: .1rem; }
.rsw { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; font-family: var(--body); font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.rsw[hidden] { display: none; }
.rsw input { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 26px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .2s ease; margin: 0; }
.rsw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.rsw input:checked { background: var(--accent); }
.rsw input:checked::after { transform: translateX(16px); }
.rsw input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Continue reading */
.page-btn.page-next { flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.2; padding-top: .5rem; padding-bottom: .5rem; }
.page-next small { font-size: var(--fs-2xs); font-weight: 500; color: var(--muted); }
.page-next span { font-family: var(--display); font-weight: 600; }
body.swipe-next .reader { transform: translateX(-12px); opacity: .5; transition: transform .2s ease, opacity .2s ease; }
body.swipe-prev .reader { transform: translateX(12px); opacity: .5; transition: transform .2s ease, opacity .2s ease; }

/* Listening bar */
.audio-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(5.25rem + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: .3rem; flex-wrap: nowrap; justify-content: center; width: max-content; max-width: calc(100% - 2rem); padding: .375rem .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-full); box-shadow: var(--shadow-lg); font-family: var(--body); }
.audio-bar[hidden] { display: none; }
.audio-bar button { appearance: none; border: 0; cursor: pointer; font-family: var(--body); }
.ab-stop { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent-fill); display: inline-flex; align-items: center; justify-content: center; }
.ab-label { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); min-width: 2.5rem; text-align: center; }
.ab-chip { height: 32px; padding: 0 .7rem; border-radius: var(--r-full); background: var(--surface-2); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; }
.ab-chip[aria-pressed="false"] { color: var(--muted); }
.ab-chip[aria-pressed="true"] { background: var(--wash); color: var(--accent); }
.ab-chip { white-space: nowrap; }
.ab-resume { height: 34px; padding: 0 .9rem; border-radius: var(--r-full); background: var(--accent); color: #fff; font-weight: 700; font-size: var(--fs-sm); }

/* ============================================================
   Wave 2 — your own study
   ============================================================ */
:root {
  --hl-sun: rgba(245, 197, 24, .42); --hl-spring: rgba(25, 167, 155, .30); --hl-sky: rgba(59, 130, 246, .26);
  --hl-rose: rgba(236, 72, 153, .24); --hl-lilac: rgba(139, 92, 246, .26);
  --sw-sun: #F5C518; --sw-spring: #19A79B; --sw-sky: #3B82F6; --sw-rose: #EC4899; --sw-lilac: #8B5CF6;
}
[data-theme="dark"] {
  --hl-sun: rgba(245, 197, 24, .30); --hl-spring: rgba(95, 220, 203, .26); --hl-sky: rgba(96, 165, 250, .30);
  --hl-rose: rgba(244, 114, 182, .28); --hl-lilac: rgba(167, 139, 250, .30);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --hl-sun: rgba(245, 197, 24, .30); --hl-spring: rgba(95, 220, 203, .26); --hl-sky: rgba(96, 165, 250, .30);
    --hl-rose: rgba(244, 114, 182, .28); --hl-lilac: rgba(167, 139, 250, .30);
  }
}
mark.hl, mark.hl[data-c="sun"] { background: var(--hl-sun); }
mark.hl[data-c="spring"] { background: var(--hl-spring); }
mark.hl[data-c="sky"] { background: var(--hl-sky); }
mark.hl[data-c="rose"] { background: var(--hl-rose); }
mark.hl[data-c="lilac"] { background: var(--hl-lilac); }
mark.hl { -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Colour picker in the verse menu */
.hl-swatches { display: flex; align-items: center; gap: .625rem; padding: .25rem 0 .875rem; flex-wrap: wrap; }
.hl-swatches[hidden] { display: none; }
.hl-sw { appearance: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.hl-sw-sun { background: var(--sw-sun); } .hl-sw-spring { background: var(--sw-spring); } .hl-sw-sky { background: var(--sw-sky); }
.hl-sw-rose { background: var(--sw-rose); } .hl-sw-lilac { background: var(--sw-lilac); }
.hl-sw.on { outline: 3px solid var(--invert-ink); outline-offset: 2px; }
.hl-sw-none { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--invert-ink); border: 1.5px solid color-mix(in srgb, var(--invert-ink) 35%, transparent); box-shadow: none; }
.hl-sw-none[hidden] { display: none; }
.hl-sw:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

/* A note marker at the end of a verse */
.note-mark { appearance: none; display: inline-flex; align-items: center; justify-content: center; vertical-align: .15em;
  width: 1.35em; height: 1.35em; margin: 0 .1em 0 .2em; padding: 0; border: 0; border-radius: 50%;
  background: var(--wash); color: var(--accent); cursor: pointer; font-size: .72em; line-height: 1; min-width: 0; min-height: 0; }
.note-mark svg { width: .95em; height: .95em; }
.note-mark:hover, .note-mark:focus-visible { background: var(--accent); color: var(--on-accent-fill, #fff); }
.scripture[data-reading-bg="sepia"] .note-mark { background: rgba(154,123,58,.16); color: #7A5E24; }

/* ---------- Note editor sheet ---------- */
.ne { position: fixed; inset: 0; z-index: 60; }
.ne[hidden] { display: none; }
.ne-scrim { position: absolute; inset: 0; background: rgba(4, 20, 21, .42); opacity: 0; transition: opacity .2s ease; }
.ne.up .ne-scrim { opacity: 1; }
.ne-inner { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 36rem; max-height: 88vh; overflow-y: auto;
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg);
  padding: 1rem 1.125rem calc(1rem + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .24s cubic-bezier(.16,1,.3,1); }
.ne.up .ne-inner { transform: translateY(0); }
html.ne-open { overflow: hidden; }
.ne-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.ne-kicker { margin: 0; font: 600 var(--fs-2xs) var(--body); color: var(--muted); }
.ne-ref { margin: .1rem 0 0; font: 600 var(--fs-lg) var(--display); color: var(--ink); }
.ne-x { appearance: none; border: 0; background: var(--surface-2); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.ne-quote { margin: .25rem 0 .875rem; padding: .625rem .875rem; border-left: 3px solid var(--spring); background: var(--wash); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font: 400 var(--fs-sm)/1.55 var(--reading); color: var(--ink); max-height: 7.5em; overflow-y: auto; }
.ne-quote[hidden] { display: none; }
.ne-text, .jx-area, .jx-input, .jx-select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: var(--r-md); padding: .75rem .875rem; font: 400 var(--fs-base)/1.55 var(--body); resize: vertical; }
.ne-text:focus, .jx-area:focus, .jx-input:focus, .jx-select:focus, .ne-tag-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.ne-label { margin: .875rem 0 .375rem; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.ne-tags { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; padding: .375rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.ne-tag { appearance: none; border: 0; cursor: pointer; padding: .3rem .6rem; border-radius: var(--r-full); background: var(--wash); color: var(--accent); font: 600 var(--fs-xs) var(--body); }
.ne-tag::after { content: " ×"; opacity: .6; }
.ne-tag-input { flex: 1; min-width: 9rem; border: 0; background: transparent; color: var(--ink); font: 400 var(--fs-sm) var(--body); padding: .35rem .25rem; border-radius: var(--r-sm); }
.ne-sugg { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; }
.ne-sugg:empty { display: none; }
.ne-sugg-chip { appearance: none; border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; padding: .25rem .55rem; border-radius: var(--r-full); font: 600 var(--fs-xs) var(--body); }
.ne-foot { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.ne-status { flex: 1; font-size: var(--fs-xs); color: var(--muted); }
.ne-del { appearance: none; border: 0; background: none; color: var(--danger, #B42318); font: 600 var(--fs-sm) var(--body); cursor: pointer; padding: .5rem 0; }
.ne-del[hidden] { display: none; }
.ne-save { appearance: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 1.25rem; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-sm) var(--body); }

/* ---------- Verse page: your notes ---------- */
.vp-addnote { appearance: none; display: inline-flex; align-items: center; gap: .375rem; min-height: 36px; padding: 0 .875rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.vp-addnote .icn { color: var(--accent); }
.vp-notes { display: grid; gap: .5rem; }
.vp-notes .vp-hint { margin: 0; }
.vp-note { appearance: none; text-align: left; display: grid; gap: .25rem; width: 100%; padding: .875rem 1rem; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--line); border-left: 3px solid var(--spring); background: var(--surface); color: var(--ink); font-family: var(--body); }
.vp-note-ref { font-size: var(--fs-2xs); font-weight: 700; color: var(--accent); }
.vp-note-text { font-size: var(--fs-sm); line-height: 1.5; white-space: pre-wrap; }
.vp-note-tags { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }

/* ---------- Study journal & sermon notes editors ---------- */
.jx { padding-bottom: 7rem; }
.jx-status { min-width: 2.4rem; text-align: right; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.jx-intro { margin: 0 0 1.25rem; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.jx-intro b { color: var(--ink); }
.jx-step { margin: 0 0 1.375rem; }
.jx-step-head { display: flex; align-items: center; gap: .625rem; margin-bottom: .5rem; }
.jx-letter { width: 30px; height: 30px; border-radius: 9px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--display); }
.jx-step-title { font: 700 var(--fs-base) var(--body); color: var(--ink); margin: 0; }
.jx-plain { display: block; margin-bottom: .5rem; }
.jx-ref-row { display: flex; gap: .5rem; }
.jx-ref-row .jx-input { flex: 1; min-width: 0; }
.jx-select { width: auto; padding-right: .5rem; }
.jx-btn { appearance: none; border: 0; cursor: pointer; padding: 0 1rem; border-radius: var(--r-md); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-sm) var(--body); white-space: nowrap; }
.jx-btn:disabled { opacity: .6; }
.jx-error { margin: .5rem 0 0; font-size: var(--fs-sm); color: var(--danger, #B42318); }
.jx-error[hidden] { display: none; }
.jx-passage { margin-top: .5rem; font-family: var(--reading); background: var(--wash); border-color: transparent; }
.jx-links { margin: .5rem 0 0; font-size: var(--fs-sm); }
.jx-links:empty { display: none; }
.jx-links a, .ref-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.jx-links a:hover, .ref-link:hover { text-decoration: underline; }
.jx-help { margin: 0 0 .5rem; font-size: var(--fs-sm); color: var(--muted); }
.jx-help summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
.jx-help summary::-webkit-details-marker { display: none; }
.jx-help summary::before { content: "+ "; }
.jx-help[open] summary::before { content: "– "; }
.jx-help ul { margin: .375rem 0 0; padding-left: 1.2rem; line-height: 1.6; }
.jx-meta { display: grid; gap: .75rem; }
.jx-title { font: 600 var(--fs-xl) var(--display); border-color: transparent; background: transparent; padding-left: 0; }
.jx-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.jx-mini { display: grid; gap: .3rem; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.jx-big { min-height: 16rem; }
.jx-mentioned { margin-top: .75rem; }
.jx-mentioned[hidden] { display: none; }
.jx-mentioned-title { margin: 0 0 .375rem; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.jx-mentioned-list { display: flex; flex-wrap: wrap; gap: .375rem; }
.jx-chip { padding: .35rem .7rem; border-radius: var(--r-full); background: var(--wash); color: var(--accent); font: 600 var(--fs-xs) var(--body); text-decoration: none; }
.jx-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.jx-delete { appearance: none; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: .375rem; color: var(--danger, #B42318); font: 600 var(--fs-sm) var(--body); padding: .5rem 0; }
.jx-delete[hidden] { visibility: hidden; display: inline-flex; }
.jx-done { min-height: 48px; padding: 0 1.75rem; display: inline-flex; align-items: center; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--body); text-decoration: none; }

/* ---------- My study ---------- */
.ms { padding-bottom: 7rem; }
.ms-export { position: relative; }
.ms-export-btn { list-style: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.ms-export-btn::-webkit-details-marker { display: none; }
.ms-export[open] .ms-export-btn { background: var(--surface-2); }
.ms-export-menu { position: absolute; right: 0; top: calc(100% + .375rem); z-index: 30; width: min(18.5rem, calc(100vw - 2rem)); padding: .375rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.ms-export-menu button, .ms-restore { appearance: none; display: grid; gap: .1rem; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: .625rem .75rem; border-radius: var(--r-sm); color: var(--ink); font-family: var(--body); }
.ms-export-menu button:hover, .ms-restore:hover { background: var(--surface-2); }
.ms-export-menu b { font-size: var(--fs-sm); }
.ms-export-menu span { font-size: var(--fs-xs); color: var(--muted); }
.ms-new { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1rem; }
.ms-new-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border-radius: var(--r-md); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: 600 var(--fs-sm) var(--body); }
.ms-new-btn .icn { color: var(--accent); }
.ms-new-btn::before { content: "+"; font-weight: 700; color: var(--accent); margin-right: -.25rem; }
.ms-search { display: flex; align-items: center; gap: .5rem; padding: 0 .875rem; min-height: 46px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.ms-search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 400 var(--fs-base) var(--body); min-height: 44px; outline: none; }
.ms-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-filters { display: flex; gap: .375rem; overflow-x: auto; margin: .875rem -1.25rem 0; padding: 0 1.25rem .25rem; scrollbar-width: none; }
.ms-filters::-webkit-scrollbar { display: none; }
.ms-filters button, .ms-colors button:not(.ms-dot), .ms-sort-btn { appearance: none; flex: none; cursor: pointer; min-height: 36px; padding: 0 .875rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--fs-sm) var(--body); white-space: nowrap; }
.ms-filters button.on, .ms-colors button.on:not(.ms-dot) { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.ms-sub { margin: .625rem 0 1rem; display: grid; gap: .5rem; }
.ms-colors { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ms-colors[hidden] { display: none; }
.ms-dot { appearance: none; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.ms-dot.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.ms-dot-sun { background: var(--sw-sun); } .ms-dot-spring { background: var(--sw-spring); } .ms-dot-sky { background: var(--sw-sky); }
.ms-dot-rose { background: var(--sw-rose); } .ms-dot-lilac { background: var(--sw-lilac); }
.ms-tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.ms-tags[hidden] { display: none; }
.ms-tag { appearance: none; border: 0; cursor: pointer; padding: .3rem .65rem; border-radius: var(--r-full); background: var(--wash); color: var(--accent); font: 600 var(--fs-xs) var(--body); }
.ms-tag.on { background: var(--accent); color: var(--on-accent-fill, #fff); }
.ms-sort { display: flex; align-items: center; justify-content: space-between; }
.ms-count { font: 600 var(--fs-sm) var(--body); color: var(--muted); }
.ms-sort-btn { min-height: 32px; font-size: var(--fs-xs); }
.ms-sort-btn::before { content: "⇅ "; color: var(--accent); }
.ms-list { display: grid; gap: .75rem; }
.ms-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .875rem 1rem 1rem; display: grid; gap: .5rem; }
.ms-card-top { display: flex; align-items: center; gap: .5rem; }
.ms-kind { font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.ms-highlight .ms-kind::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .35em; vertical-align: -.02em; background: var(--sw-sun); }
.ms-highlight[data-c="spring"] .ms-kind::before { background: var(--sw-spring); }
.ms-highlight[data-c="sky"] .ms-kind::before { background: var(--sw-sky); }
.ms-highlight[data-c="rose"] .ms-kind::before { background: var(--sw-rose); }
.ms-highlight[data-c="lilac"] .ms-kind::before { background: var(--sw-lilac); }
.ms-when { font-size: var(--fs-2xs); color: var(--muted); font-weight: 500; }
.ms-when:not(:empty)::before { content: "· "; }
.ms-actions { margin-left: auto; display: flex; gap: .125rem; }
.ms-act { appearance: none; border: 0; background: none; cursor: pointer; padding: .3rem .5rem; border-radius: var(--r-sm); color: var(--muted); font: 600 var(--fs-xs) var(--body); text-decoration: none; }
.ms-act:hover { background: var(--surface-2); color: var(--ink); }
.ms-act.danger:hover { color: var(--danger, #B42318); }
.ms-ref { font: 600 var(--fs-base) var(--display); color: var(--ink); text-decoration: none; }
a.ms-ref:hover { color: var(--accent); }
.ms-title { margin: 0; font: 600 var(--fs-lg) var(--display); }
.ms-title a { color: var(--ink); text-decoration: none; }
.ms-meta { margin: -.25rem 0 0; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.ms-quote { margin: 0; padding: .125rem 0 .125rem .875rem; border-left: 3px solid var(--line); font: 400 var(--fs-sm)/1.6 var(--reading); color: var(--ink); }
.ms-highlight .ms-quote { border-left-color: var(--sw-sun); background: linear-gradient(90deg, var(--hl-sun), transparent 85%); padding: .375rem .75rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ms-highlight[data-c="spring"] .ms-quote { border-left-color: var(--sw-spring); background: linear-gradient(90deg, var(--hl-spring), transparent 85%); }
.ms-highlight[data-c="sky"] .ms-quote { border-left-color: var(--sw-sky); background: linear-gradient(90deg, var(--hl-sky), transparent 85%); }
.ms-highlight[data-c="rose"] .ms-quote { border-left-color: var(--sw-rose); background: linear-gradient(90deg, var(--hl-rose), transparent 85%); }
.ms-highlight[data-c="lilac"] .ms-quote { border-left-color: var(--sw-lilac); background: linear-gradient(90deg, var(--hl-lilac), transparent 85%); }
.ms-vnote .ms-quote, .ms-soap .ms-quote { border-left-color: var(--spring); }
.ms-body { margin: 0; font-size: var(--fs-sm); line-height: 1.6; white-space: pre-wrap; color: var(--ink); }
.ms-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ms-sec { display: grid; gap: .1rem; }
.ms-sec-label { font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.ms-sec-text { margin: 0; font-size: var(--fs-sm); line-height: 1.55; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ms-card-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.ms-privacy { margin: 1.5rem 0 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.ms-privacy a { color: var(--accent); font-weight: 600; }
.ms-print { display: none; }
@media print {
  body.ms-printing > *:not(.ms-print) { display: none !important; }
  body.ms-printing .ms-print { display: block; color: #000; font-family: Georgia, serif; }
  .ms-print h1 { font-size: 22pt; margin: 0; } .ms-print .msp-date, .ms-print .msp-kind { color: #555; font-size: 9pt; font-family: Arial, sans-serif; }
  .ms-print .msp-item { break-inside: avoid; border-top: 1px solid #ccc; padding-top: 10pt; margin-top: 12pt; }
  .ms-print h2 { font-size: 14pt; margin: 0 0 2pt; } .ms-print h3 { font-size: 10pt; margin: 8pt 0 2pt; font-family: Arial, sans-serif; }
  .ms-print blockquote { margin: 6pt 0; padding-left: 10pt; border-left: 2pt solid #999; font-style: italic; }
  .ms-print p { white-space: pre-wrap; margin: 4pt 0; font-size: 11pt; line-height: 1.45; }
}

/* ============================================================
   Wave 3 — the reference library
   ============================================================ */
.lib { padding-bottom: 7rem; }
.lib-head { align-items: flex-start; }
.lib-head-text { flex: 1; min-width: 0; text-align: center; }
.lib-kicker { margin: .35rem 0 0; font: 600 var(--fs-2xs) var(--body); color: var(--accent); }
.lib-title { overflow-wrap: anywhere; }
.lib-sub-title { margin: -.5rem 0 1rem; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.lib-note { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; margin: 0 0 1rem; }
.lib-note a, .lib-more, .lib-credits a { color: var(--accent); font-weight: 600; text-decoration: none; }
.lib-more { display: inline-block; margin-top: .75rem; font-size: var(--fs-sm); }
.lib-source { margin: 1.25rem 0 0; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.5; }
.lib-credits { text-align: center; font-size: var(--fs-xs); margin-top: 2rem; }
.lib-section { margin-top: 1.75rem; }
.lib-section > .bible-h2, .lib-sub { margin: 0 0 .75rem; }

.lib-search { display: flex; align-items: center; gap: .5rem; padding: 0 .875rem; min-height: 48px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); margin-bottom: 1rem; }
.lib-search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 400 var(--fs-base) var(--body); min-height: 46px; outline: none; min-width: 0; }
.lib-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.lib-suggest { margin: -.5rem 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .375rem; box-shadow: var(--shadow-lg); }
.lib-suggest[hidden] { display: none; }
.lib-suggest-h { margin: .5rem .625rem .25rem; font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.lib-suggest-row { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem .625rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.lib-suggest-row:hover { background: var(--surface-2); }
.lib-suggest-row small { color: var(--muted); font-size: var(--fs-2xs); white-space: nowrap; }
.lib-suggest-none { margin: .5rem .625rem; font-size: var(--fs-sm); color: var(--muted); }

.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.lib-tile { display: grid; gap: .2rem; align-content: start; padding: .875rem .9rem; min-height: 5.25rem; border-radius: var(--r-md); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.lib-tile b { font: 600 var(--fs-base) var(--display); }
.lib-tile span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.lib-tile:hover { border-color: var(--accent); }

.lib-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.lib-chip { display: inline-flex; align-items: baseline; gap: .35rem; padding: .4rem .75rem; border-radius: var(--r-full); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: 600 var(--fs-sm) var(--body); }
.lib-chip small { font-weight: 500; color: var(--muted); font-size: var(--fs-2xs); }
.lib-chip:hover { border-color: var(--accent); color: var(--accent); }
.lib-chip.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.lib-chip-person::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--spring); align-self: center; }
.lib-chip-place::before { content: ""; width: .5em; height: .5em; border-radius: 2px; transform: rotate(45deg); background: #C9862B; align-self: center; }
.lib-chip-quote { border-style: dashed; }
.lib-related { margin: 0 0 1rem; }

.lib-letters { display: flex; flex-wrap: wrap; gap: .2rem; margin: 0 0 1rem; }
.lib-letters a { width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink); font: 600 var(--fs-sm) var(--body); }
.lib-letters a.on { background: var(--accent-fill); color: var(--on-accent-fill); }
.lib-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.lib-index-cols { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.lib-index a { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.lib-index a small { color: var(--muted); font-size: var(--fs-2xs); }
.lib-index a:hover { color: var(--accent); }

.lib-meaning { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--r-md); background: var(--wash); font: 400 var(--fs-base) var(--reading); font-style: italic; }
.lib-meaning span { display: block; font: 700 var(--fs-2xs) var(--body); font-style: normal; color: var(--accent); margin-bottom: .15rem; }
.lib-article { font: 400 var(--fs-base)/1.7 var(--reading); color: var(--ink); }
.lib-article p { margin: 0 0 .9rem; }
.lib-article a { color: var(--accent); text-decoration: none; font-family: var(--body); font-size: .9em; font-weight: 600; white-space: nowrap; }
.lib-article a:hover { text-decoration: underline; }
.lib-article h4 { font: 700 var(--fs-base) var(--body); margin: 1.5rem 0 .5rem; color: var(--ink); }
.lib-article h3 { font: 600 var(--fs-lg) var(--display); margin: 1.5rem 0 .5rem; }
.lib-sense { margin: 1rem 0 .25rem !important; font: 700 var(--fs-sm) var(--body); color: var(--accent); }
.lib-card-link { display: grid; gap: .15rem; margin: 1.25rem 0 0; padding: .875rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lib-card-link b { font-size: var(--fs-sm); }
.lib-card-link span { font-size: var(--fs-xs); color: var(--muted); }
.lib-card-link:hover { border-color: var(--accent); }
.lib-paging { margin-top: 1.5rem; }

.lib-facts { margin: 0 0 .5rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.lib-facts > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.lib-facts dt { font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.lib-facts dd { margin: 0; font-size: var(--fs-sm); }
.lib-facts a { color: var(--accent); font-weight: 600; text-decoration: none; }

.lib-refs { display: grid; gap: .5rem; }
.lib-refs-book { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; font-size: var(--fs-sm); }
.lib-refs-name { font-weight: 600; color: var(--muted); }
.lib-refs-list a { color: var(--accent); text-decoration: none; font-weight: 600; }
.lib-more-refs summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: var(--fs-sm); margin-bottom: .75rem; }

/* family tree */
.ft { display: grid; gap: .5rem; justify-items: center; padding: 1rem .75rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.ft-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .375rem; position: relative; }
.ft-row + .ft-row::before { content: ""; position: absolute; top: -.5rem; left: 50%; width: 1px; height: .5rem; background: var(--line); }
.ft-label { width: 100%; text-align: center; font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.ft-node { padding: .35rem .7rem; border-radius: var(--r-full); background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 600 var(--fs-sm) var(--body); }
.ft-node:hover { border-color: var(--accent); }
.ft-small .ft-node { font-size: var(--fs-xs); padding: .25rem .6rem; }
.ft-me { padding: .5rem 1rem; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--display); }
.ft-amp { font-size: var(--fs-xs); color: var(--muted); }
.ft-spouse { border-color: var(--spring); }
.ft-sibs { margin-top: .25rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.ft-sibs::before { display: none; }

/* timeline */
.tl-jump { margin: 0 0 1rem; }
.tl-era { margin-top: 1.75rem; scroll-margin-top: 5rem; }
.tl-era-title { font: 600 var(--fs-lg) var(--display); margin: 0 0 .75rem; }
.tl { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .75rem; }
.tl-item { position: relative; display: grid; grid-template-columns: 4.75rem 1fr; gap: .5rem; }
.tl-item::before { content: ""; position: absolute; left: calc(-1rem - 5px); top: .4rem; width: 8px; height: 8px; border-radius: 50%; background: var(--spring); }
.tl-when { font: 600 var(--fs-xs) var(--body); color: var(--muted); padding-top: .1rem; }
.tl-body { display: grid; gap: .1rem; }
.tl-title { color: var(--ink); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
a.tl-title:hover { color: var(--accent); }
.tl-ref, .tl-people { font-size: var(--fs-xs); color: var(--muted); }
.tl-people a { color: var(--accent); text-decoration: none; }
.tl-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.tl-mini li { display: grid; grid-template-columns: 4.75rem 1fr; gap: .1rem .5rem; font-size: var(--fs-sm); }
.tl-mini a { color: var(--ink); font-weight: 600; text-decoration: none; }
.tl-mini small { grid-column: 2; color: var(--muted); font-size: var(--fs-xs); }

/* harmony + compare */
.lib-wide { max-width: 60rem; }
.hm { display: grid; font-size: var(--fs-xs); border-top: 1px solid var(--line); }
.hm-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)); gap: .375rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hm-head { position: sticky; top: 3.5rem; background: var(--bg); z-index: 2; font-weight: 700; color: var(--muted); }
.hm-title { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.hm-title a { color: var(--ink); text-decoration: none; }
.hm-title a::after { content: " ⇆"; color: var(--accent); font-size: .85em; }
.hm-cell a { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
@media (max-width: 520px) {
  .hm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hm-title { grid-column: 1 / -1; }
  .hm-head span:first-child { display: none; }
}
.cmp-trans { margin: 0 0 1rem; font-size: var(--fs-sm); color: var(--muted); }
.cmp-trans select { margin-left: .375rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: .3rem .5rem; font: inherit; }
.cmp { display: grid; gap: 1rem; }
@media (min-width: 720px) { .cmp-2 { grid-template-columns: 1fr 1fr; } .cmp-3 { grid-template-columns: repeat(3, 1fr); } .cmp-4 { grid-template-columns: repeat(4, 1fr); } }
.cmp-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; }
.cmp-ref { margin: 0 0 .5rem; font: 600 var(--fs-base) var(--display); }
.cmp-ref a { color: var(--ink); text-decoration: none; }
.cmp-text { margin: 0; font: 400 var(--fs-base)/1.7 var(--reading); }
.cmp-text sup { font: 700 .6em var(--body); color: var(--accent); margin: 0 .15em 0 .1em; }

/* OT in NT */
.otnt { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.otnt li { display: grid; grid-template-columns: 8.5rem 1rem 1fr; gap: .375rem; font-size: var(--fs-sm); align-items: baseline; }
.otnt a { color: var(--accent); text-decoration: none; font-weight: 600; }
.otnt-nt { color: var(--ink) !important; }
.otnt-arrow { color: var(--muted); }

/* creeds */
.creed p { margin: 0 0 1rem; }
.cat-q { padding: .875rem 0; border-bottom: 1px solid var(--line); }
.cat-n { margin: 0 !important; font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.cat-question { margin: .15rem 0 .4rem !important; font: 600 var(--fs-base) var(--body); }
.cat-answer p { margin: 0 0 .5rem; }
.creed-ch { font: 600 var(--fs-lg) var(--display); margin: 1.75rem 0 .75rem; scroll-margin-top: 5rem; }
.creed-sec { display: grid; grid-template-columns: 2rem 1fr; gap: .25rem; }
.creed-n { font: 700 var(--fs-xs) var(--body); color: var(--accent); padding-top: .3rem; }
.creed-sec > p:first-of-type { grid-column: 2; }
.creed-sec > p { grid-column: 2; }

/* commentary */
.cm-tabs { display: flex; flex-wrap: wrap; gap: .375rem; margin: 0 0 1rem; }
.cm-jump { margin: 0 0 1.25rem; }
.cm-vh { margin: 1.75rem 0 .5rem; font: 700 var(--fs-sm) var(--body); scroll-margin-top: 5rem; }
.cm-vh a { color: var(--accent); text-decoration: none; font-size: 1em; }
.cm-outline { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .3rem; font: 400 var(--fs-sm) var(--body); }
.cm-outline li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .75rem; background: var(--surface); border-radius: var(--r-sm); }
.cm-outline span { color: var(--muted); white-space: nowrap; }
.vp-cm { padding: 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: .75rem; }
.vp-cm-head { margin: 0 0 .5rem; font-size: var(--fs-xs); color: var(--muted); }
.vp-cm-head b { color: var(--accent); }
.vp-cm-body { font-size: var(--fs-sm); max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.vp-cm-body.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.vp-cm-more { appearance: none; border: 0; background: none; padding: 0; color: var(--accent); font: 600 var(--fs-sm) var(--body); cursor: pointer; margin-right: 1rem; }

/* verse peek */
.lib-peek { position: absolute; z-index: 55; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: .875rem 1rem; }
.lib-peek[hidden] { display: none; }
.lib-peek-ref { margin: 0 0 .25rem; font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.lib-peek-text { margin: 0 0 .5rem; font: 400 var(--fs-sm)/1.6 var(--reading); max-height: 12em; overflow-y: auto; }
.lib-peek-go { font: 600 var(--fs-xs) var(--body); color: var(--accent); text-decoration: none; }

/* topics (Nave's) */
.lib-topic { display: grid; gap: .1rem; font-size: var(--fs-sm); line-height: 1.6; }
.tp-row { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.tp-row.d1 { padding-left: 1rem; } .tp-row.d2 { padding-left: 2rem; } .tp-row.d3 { padding-left: 3rem; }
.tp-label { font-weight: 600; color: var(--ink); }
.tp-label::first-letter { text-transform: uppercase; }
.tp-refs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.tp-see { color: var(--accent); }

/* maps */
.lib-map { position: relative; height: 15rem; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin: 0 0 1rem; touch-action: none; }
.lib-map-tall { height: 19rem; }
.lib-map-full { height: calc(100vh - 15rem); min-height: 22rem; }
.bmap { --land: #EFE6D2; --land-line: #D9CCAF; --sea: #CFE6E8; --river: #8EC3CC; --dot: #B4651E; --label: #3A2E1C; --halo: rgba(239,230,210,.92); background: var(--sea); }
[data-theme="dark"] .bmap { --land: #1D2A26; --land-line: #2F403A; --sea: #0B1A1D; --river: #2E5C63; --dot: #E7A55B; --label: #E8E2D2; --halo: rgba(29,42,38,.92); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .bmap { --land: #1D2A26; --land-line: #2F403A; --sea: #0B1A1D; --river: #2E5C63; --dot: #E7A55B; --label: #E8E2D2; --halo: rgba(29,42,38,.92); } }
.bmap-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.bmap-svg:active { cursor: grabbing; }
.bmap-sea { fill: var(--sea); }
.bmap-land { fill: var(--land); stroke: var(--land-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.bmap-lake { fill: var(--sea); stroke: var(--river); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bmap-river { fill: none; stroke: var(--river); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.bmap-route { fill: none; stroke: #D1495B; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0; }
.bmap-dot { fill: var(--dot); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bmap-mark.main .bmap-dot { fill: #D1495B; }
.bmap-mark { cursor: pointer; }
.bmap-label { font-family: var(--body); font-weight: 600; fill: var(--label); paint-order: stroke; stroke: var(--halo); stroke-linejoin: round; }
.bmap-mark.main .bmap-label { font-weight: 700; }
.bmap-ctl { position: absolute; right: .5rem; top: .5rem; display: grid; gap: 1px; border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow-lg); }
.bmap-ctl button { appearance: none; border: 0; width: 36px; height: 36px; background: var(--surface); color: var(--ink); font: 600 1.2rem var(--body); cursor: pointer; }
.bmap-credit { position: absolute; left: .5rem; bottom: .35rem; font: 500 10px var(--body); color: var(--label); opacity: .7; }
.bmap-pop { position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); display: flex; align-items: baseline; gap: .5rem; padding: .55rem .9rem; border-radius: var(--r-full);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); text-decoration: none; font-size: var(--fs-sm); white-space: nowrap; }
.bmap-pop[hidden] { display: none; }
.bmap-pop span { color: var(--muted); font-size: var(--fs-xs); }
.bmap-pop i { font-style: normal; color: var(--accent); font-weight: 600; font-size: var(--fs-xs); }

/* reader: chapter study panel + cross-reference markers */
.ch-study { margin: 2rem 0 0; padding: 1.125rem 1rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); font-family: var(--body); }
.ch-study-title { margin: 0 0 .75rem; font: 600 var(--fs-lg) var(--display); }
.ch-study-cm { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.ch-study-btn { display: grid; gap: .1rem; padding: .7rem .85rem; border-radius: var(--r-md); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; }
.ch-study-btn b { font-size: var(--fs-sm); }
.ch-study-btn span { font-size: var(--fs-2xs); opacity: .85; }
.ch-study-h { margin: .875rem 0 .4rem; font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.ch-study-map { margin-top: .75rem; height: 13rem; }
.ch-study .lib-chip { font-size: var(--fs-xs); padding: .3rem .6rem; }
.xr { display: none; }
.show-xr .xr { display: inline-block; vertical-align: super; margin-left: .1em; font: 700 .6em var(--body); color: var(--accent); text-decoration: none; line-height: 1; padding: 0 .15em; }
.lib-clamp { max-height: 16em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.lib-clamp.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.bmap-hit { fill: transparent; }
.bmap-label { pointer-events: none; }
.bmap-label.main { font-weight: 700; }

/* ============================================================
   Wave 4 — plans and habits
   ============================================================ */
.pls, .pl, .pb, .td, .rs { padding-bottom: 7rem; }
.pls-stats { width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); }
.pls-group { margin-top: 1.75rem; }
.pls-group > .bible-h2 { margin: 0 0 .5rem; }
.pls-mine { margin: 0 0 1.25rem; }
.pls-mine-list { display: grid; gap: .625rem; margin-bottom: .75rem; }
.pls-make { display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px dashed var(--accent); margin: 0 0 1rem; }
.pls-make b { display: block; font-size: var(--fs-base); }
.pls-make small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: .1rem; }
.pls-make > span:nth-child(2) { flex: 1; }
.pls-make-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--wash); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.plan-card-more { justify-content: center; text-align: center; background: var(--wash); }

/* "Your plans" card */
.pmc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .875rem 1rem; display: grid; gap: .625rem; }
.pmc-head { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.pmc-emoji { font-size: 1.5rem; line-height: 1; }
.pmc-titles { display: grid; min-width: 0; }
.pmc-titles b { font: 600 var(--fs-base) var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmc-titles small { font-size: var(--fs-xs); color: var(--muted); }
.pmc-titles small.behind { color: #B4651E; }
.pmc-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pmc-bar i { display: block; height: 100%; background: var(--spring); border-radius: 99px; }
.pmc-today { display: flex; align-items: center; gap: .625rem; padding: .5rem .25rem 0; border-top: 1px solid var(--line); }
.pmc-k { font: 700 var(--fs-2xs) var(--body); color: var(--accent); flex: none; }
.pmc-links { flex: 1; display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.pmc-links a { color: var(--ink); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.pmc-links a:hover { color: var(--accent); }
.pmc-tick { appearance: none; border: 1.5px solid var(--line); background: var(--bg); color: var(--muted); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.pmc-tick:hover { border-color: var(--accent); color: var(--accent); }
.pmc-done { margin: 0; font-size: var(--fs-sm); color: var(--accent); font-weight: 600; }

/* the church plan */
.church-plan { display: grid; gap: .2rem; padding: 1rem 1.125rem; border-radius: var(--r-lg); text-decoration: none; margin: 0 0 1rem;
  background: var(--accent-fill); color: var(--on-accent-fill); position: relative; overflow: hidden; }
.church-plan::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(95,220,203,.35), transparent 70%); }
.church-plan-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.church-plan-t { font: 600 var(--fs-lg) var(--display); }
.church-plan-n { font-size: var(--fs-sm); opacity: .85; }
.church-plan-today { font-size: var(--fs-sm); opacity: .9; }
.church-plan-today:empty { display: none; }
.church-plan-cta { justify-self: start; margin-top: .4rem; padding: .35rem .8rem; border-radius: var(--r-full); background: rgba(255,255,255,.16); font: 700 var(--fs-xs) var(--body); }

/* one plan */
.pl-head-emoji { font-size: 1.6rem; }
.pl-title { font: 600 var(--fs-2xl) var(--display); text-align: center; margin: 0 0 .25rem; line-height: 1.15; }
.pl-sub { text-align: center; color: var(--muted); margin: 0 0 .25rem; font-size: var(--fs-sm); }
.pl-meta { text-align: center; color: var(--accent); font: 600 var(--fs-xs) var(--body); margin: 0 0 1.25rem; }
.pl-h { font: 600 var(--fs-lg) var(--display); margin: 0 0 .75rem; }
.pl-start, .pl-on { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.125rem; margin: 0 0 1.5rem; }
.pl-start[hidden], .pl-on[hidden], .pl-foot[hidden] { display: none; }
.pl-field { display: grid; gap: .35rem; margin: 0 0 1rem; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.pl-field input[type=date] { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r-md); padding: .65rem .8rem; font: 400 var(--fs-base) var(--body); }
.pl-days { display: flex; gap: .35rem; }
.pl-day { appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 700 var(--fs-sm) var(--body); cursor: pointer; }
.pl-day.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pl-ends { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 1rem; }
.pl-go, .pb-go { appearance: none; border: 0; width: 100%; min-height: 50px; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--body); cursor: pointer; }
.pl-church-note { margin: .75rem 0 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.pl-progress { display: flex; align-items: center; gap: 1rem; }
.pl-ring { position: relative; width: 64px; height: 64px; flex: none; }
.pl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.pl-ring-fg { fill: none; stroke: var(--spring); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.pl-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 var(--fs-sm) var(--body); }
.pl-count { margin: 0; font: 600 var(--fs-base) var(--body); }
.pl-state { margin: .15rem 0 0; font-size: var(--fs-sm); color: var(--accent); font-weight: 600; }
.pl-state.behind { color: #B4651E; }
.pl-catchup { margin-top: 1rem; padding: .875rem 1rem; border-radius: var(--r-md); background: rgba(180,101,30,.08); border: 1px solid rgba(180,101,30,.25); }
.pl-catchup[hidden] { display: none; }
.pl-catchup p { margin: 0 0 .6rem; font-size: var(--fs-sm); }
.pl-catchup-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pl-catchup-actions button { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .5rem .9rem; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.pl-catchup-hint { margin: .6rem 0 0 !important; font-size: var(--fs-xs) !important; color: var(--muted); }
.pl-today:empty { display: none; }
.pl-today-card { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.pl-today-k { margin: 0; font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.pl-today-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pl-today-go { padding: .55rem 1.1rem; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; font: 700 var(--fs-sm) var(--body); }
.pl-today-tick { appearance: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: .55rem 1rem; border-radius: var(--r-full); font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.pl-today-min { font-size: var(--fs-xs); color: var(--muted); margin-left: auto; }
.pl-passages { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.pl-passage { color: var(--ink); text-decoration: none; font: 600 var(--fs-base) var(--display); }
.pl-passage:hover { color: var(--accent); }
.pl-list-head { display: flex; align-items: center; justify-content: space-between; }
.pl-jump { appearance: none; border: 0; background: none; color: var(--accent); font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.pl-jump[hidden] { display: none; }
.pl-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.pl-row { display: flex; gap: .875rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.pl-row.today { background: var(--wash); margin: 0 -.75rem; padding: .75rem; border-radius: var(--r-md); border-bottom-color: transparent; }
.pl-row.done .pl-row-body { opacity: .55; }
.pl-row.skipped .pl-row-body { opacity: .55; }
.pl-check { appearance: none; flex: none; width: 30px; height: 30px; margin-top: .1rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pl-row.done .pl-check { background: var(--spring); border-color: var(--spring); color: #fff; }
.pl-row.missed .pl-check { border-color: #D9A06B; }
.pl-row-body { flex: 1; min-width: 0; }
.pl-row-top { margin: 0 0 .15rem; display: flex; gap: .5rem; align-items: baseline; font-size: var(--fs-xs); color: var(--muted); }
.pl-row-top b { color: var(--ink); font-size: var(--fs-xs); }
.pl-row-tag { padding: 0 .4rem; border-radius: 99px; background: var(--surface-2); }
.pl-row .pl-passage { font-size: var(--fs-sm); }
.pl-foot { margin-top: 1rem; }
.pl-note { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.pl-note a { color: var(--accent); font-weight: 600; }
.pl-cal { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 1.5rem; font-size: var(--fs-sm); }
.pl-cal input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: .4rem .5rem; font: inherit; margin-left: .35rem; }
.pl-cal-btn { padding: .55rem 1rem; border-radius: var(--r-full); border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-weight: 600; }
.pl-stop { appearance: none; border: 0; background: none; color: var(--danger, #B42318); font: 600 var(--fs-sm) var(--body); cursor: pointer; padding: 0; }
.pl-missing { text-align: center; color: var(--muted); }
.pl-missing a { color: var(--accent); }

/* builder */
.pb-form { display: grid; gap: 1.5rem; }
.pb-step { border: 0; padding: 0; margin: 0; }
.pb-step legend { font: 600 var(--fs-lg) var(--display); margin-bottom: .75rem; padding: 0; }
.pb-step legend small { font: 400 var(--fs-sm) var(--body); color: var(--muted); }
.pb-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.pb-opt[hidden] { display: none; }
.pb-opt input, .pb-book input { position: absolute; opacity: 0; pointer-events: none; }
.pb-opt span { display: inline-block; padding: .55rem .95rem; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.pb-opt input:checked + span { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pb-opt input:focus-visible + span, .pb-book input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pb-books { margin-top: 1rem; }
.pb-books[hidden] { display: none; }
.pb-books-h { margin: .75rem 0 .4rem; font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.pb-book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .3rem; }
.pb-book { position: relative; }
.pb-book span { display: block; padding: .45rem .6rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.pb-book input:checked + span { background: var(--wash); border-color: var(--accent); color: var(--accent); }
.pb-len label { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-sm); }
.pb-len input { width: 6rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: .6rem .75rem; font: 600 var(--fs-lg) var(--body); }
.pb-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.pb-presets button { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .4rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.pb-estimate { margin: .75rem 0 0; font-size: var(--fs-sm); color: var(--accent); font-weight: 600; min-height: 1.4em; }
.pb-title { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: .7rem .85rem; font: 400 var(--fs-base) var(--body); }
.pb-error { color: var(--danger, #B42318); font-size: var(--fs-sm); margin: 0; }
.pb-error[hidden] { display: none; }
.pb-note { text-align: center; font-size: var(--fs-xs); color: var(--muted); margin: -.75rem 0 0; }

/* today */
.td-date { text-align: center; margin: -.5rem 0 1rem; color: var(--muted); font-size: var(--fs-sm); }
.td-rhythm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; margin: 0 0 1rem; }
.td-rhythm-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.td-dot { display: grid; justify-items: center; gap: .3rem; }
.td-dot i { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: block; }
.td-dot.on i { background: var(--spring); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.td-dot.now i { outline: 2px solid var(--accent); outline-offset: 2px; }
.td-dot.future i { opacity: .45; }
.td-dot small { font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.td-rhythm-text { margin: .75rem 0 0; text-align: center; font-size: var(--fs-sm); }
.td .pls-mine > .bible-h2 { margin: 0 0 .5rem; }
.td-card { display: grid; gap: .15rem; padding: .875rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); margin: 0 0 .75rem; }
.td-card[hidden] { display: none; }
.td-card-k { font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.td-card-t { font: 600 var(--fs-base) var(--display); }
.td-votd { margin-top: 1rem; }
.td-links { text-align: center; font-size: var(--fs-sm); margin-top: 1.5rem; }
.td-links a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* stats */
.rs-hero { display: flex; align-items: center; gap: 1.25rem; padding: 1.125rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.rs-ring { position: relative; width: 120px; height: 120px; flex: none; }
.rs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rs-ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.rs-ring-fg { fill: none; stroke: var(--spring); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.rs-ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rs-ring-in b { font: 600 1.6rem var(--display); }
.rs-ring-in small { font-size: var(--fs-2xs); color: var(--muted); }
.rs-nums { margin: 0; display: grid; gap: .5rem; flex: 1; }
.rs-nums div { display: grid; }
.rs-nums dt { font-size: var(--fs-2xs); color: var(--muted); font-weight: 600; }
.rs-nums dd { margin: 0; font: 600 var(--fs-base) var(--body); }
.rs-section { margin-top: 1.75rem; }
.rs-section .bible-h2 { margin: 0 0 .75rem; }
.rs-heat { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.rs-week { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.rs-h { display: block; aspect-ratio: 1; border-radius: 3px; }
.rs-h.l0, .rs-legend .l0 { background: var(--surface-2); }
.rs-h.l1, .rs-legend .l1 { background: rgba(25,167,155,.35); }
.rs-h.l2, .rs-legend .l2 { background: rgba(25,167,155,.65); }
.rs-h.l3, .rs-legend .l3 { background: var(--spring); }
.rs-h.f { background: transparent; }
.rs-legend { display: flex; align-items: center; gap: 3px; justify-content: flex-end; font-size: var(--fs-2xs); color: var(--muted); margin: .4rem 0 0; }
.rs-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.rs-legend span { margin: 0 .25rem; }
.rs-edit { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .35rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.rs-edit[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.rs-hint { font-size: var(--fs-xs); color: var(--muted); margin: 0 0 .75rem; }
.rs-testament { font: 700 var(--fs-2xs) var(--body); color: var(--muted); margin: 1rem 0 .4rem; }
.rs-book { display: grid; grid-template-columns: 6.5rem 2.6rem 1fr; gap: .5rem; align-items: start; padding: .3rem 0; }
.rs-book-name { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-book-name.done { color: var(--accent); }
.rs-book-name.done::after { content: " ✓"; }
.rs-book-n { font-size: var(--fs-2xs); color: var(--muted); text-align: right; padding-top: 1px; }
.rs-cells { display: flex; flex-wrap: wrap; gap: 2px; padding-top: 3px; }
.rs-cell { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-2); display: block; }
.rs-cell.on { background: var(--spring); }
.rs-map.editing .rs-cell { width: 14px; height: 14px; outline: 1px dashed var(--line); }
.rs-note { margin-top: 1.5rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; line-height: 1.5; }

/* reader: plan bar + mark as read */
.plan-bar { margin: 1.75rem 0 0; padding: 1rem; border-radius: var(--r-lg); background: var(--wash); border: 1px solid rgba(25,167,155,.25); font-family: var(--body); display: grid; gap: .65rem; }
.plan-bar[hidden] { display: none; }
.plan-bar-head { display: flex; gap: .5rem; align-items: center; text-decoration: none; color: var(--ink); font: 700 var(--fs-sm) var(--body); }
.plan-bar-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.plan-bar-chip { padding: .3rem .65rem; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 600 var(--fs-xs) var(--body); }
.plan-bar-chip.read { background: var(--spring); border-color: var(--spring); color: #fff; }
.plan-bar-chip.read::before { content: "✓ "; }
.plan-bar-chip.here { outline: 2px solid var(--accent); outline-offset: 1px; }
.plan-bar-next { justify-self: start; padding: .55rem 1.1rem; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; font: 700 var(--fs-sm) var(--body); }
.read-mark { margin: 1.25rem 0 0; display: flex; justify-content: center; }
.read-mark-btn { appearance: none; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .55rem 1.1rem; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.read-mark-btn.on { background: var(--wash); color: var(--accent); border-color: rgba(25,167,155,.35); }

/* notification time */
.notif-time-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0 1rem 0; font-size: var(--fs-sm); color: var(--muted); }
.notif-time-row[hidden] { display: none; }
.notif-time-row input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: .45rem .6rem; font: 600 var(--fs-sm) var(--body); }

/* memory collections */
.mz-colls { margin-top: 2rem; }
.mz-colls .bible-h2 { margin: 0 0 .25rem; }
.mz-colls-sub { margin: 0 0 .75rem; color: var(--muted); font-size: var(--fs-sm); }
.mz-coll { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: .5rem; overflow: hidden; }
.mz-coll summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; cursor: pointer; }
.mz-coll summary::-webkit-details-marker { display: none; }
.mz-coll-emoji { font-size: 1.3rem; }
.mz-coll-title { flex: 1; font: 600 var(--fs-base) var(--display); }
.mz-coll-count { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.mz-coll[open] summary { border-bottom: 1px solid var(--line); }
.mz-coll .bible-list { padding: 0 1rem; }
.pls-make[hidden] { display: none; }

/* ============================================================
   Wave 5 — prayer and devotional
   ============================================================ */
.pr { padding-bottom: 7rem; }
.pr-nav { display: flex; gap: .25rem; padding: .25rem; margin: 0 0 1.25rem; border-radius: var(--r-full); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.pr-nav::-webkit-scrollbar { display: none; }
.pr-nav a { flex: 1; text-align: center; white-space: nowrap; padding: .55rem .7rem; border-radius: var(--r-full); text-decoration: none; color: var(--muted); font: 600 var(--fs-sm) var(--body); }
.pr-nav a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.prayer-now-link { display: flex; align-items: center; gap: .6rem; margin: -.5rem 0 1.75rem; padding: .75rem 1rem; border-radius: var(--r-md); background: var(--wash); color: var(--ink); text-decoration: none; font: 600 var(--fs-sm) var(--body); }
.prayer-now-link span { flex: 1; }
.prayer-now-link .icn { color: var(--accent); }
.prayer-update { margin: -.25rem 0 .75rem; padding: .55rem .8rem; border-radius: var(--r-sm); background: var(--wash); font-size: var(--fs-sm); line-height: 1.5; }
.prayer-update b { color: var(--accent); }
.praise-update { font-size: var(--fs-sm); margin: 0 0 .5rem; color: var(--ink); font-style: italic; }
.prayer-keep { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line); margin-left: auto; margin-right: .5rem; }
.prayer-keep:hover { color: var(--accent); border-color: var(--accent); }
.prayer-own { margin-top: .75rem; padding: .75rem; border-radius: var(--r-md); border: 1px dashed var(--accent); display: grid; gap: .5rem; }
.prayer-own-k { margin: 0; font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.prayer-own textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .65rem; background: var(--bg); color: var(--ink); font: 400 var(--fs-sm) var(--body); }
.prayer-own-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.prayer-own-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .4rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.prayer-own-btn.primary { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.prayer-own-btn.quiet { border-color: transparent; color: var(--muted); }
.prayer-own-msg { margin: 0; font-size: var(--fs-xs); color: var(--accent); }
.prayer-own-msg:empty { display: none; }

/* My prayers */
.pr-now { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: .75rem; padding: 1rem 1.125rem; border-radius: var(--r-lg);
  background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; margin: 0 0 1.25rem; position: relative; overflow: hidden; }
.pr-now::before { content: ""; position: absolute; inset: auto -30px -60px auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(95,220,203,.3), transparent 70%); }
.pr-now-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.pr-now-t { grid-column: 1; font: 600 var(--fs-lg) var(--display); }
.pr-now .icn { grid-row: 1 / 3; grid-column: 2; }
.pr-add { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; display: grid; gap: .75rem; margin: 0 0 1.5rem; }
.pr-kind { display: flex; gap: .4rem; }
.pr-kind input { position: absolute; opacity: 0; pointer-events: none; }
.pr-kind span { display: inline-block; padding: .4rem .85rem; border-radius: var(--r-full); border: 1px solid var(--line); font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.pr-kind input:checked + span { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pr-kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pr-add textarea, .pr-add input[type=text], .pr-answer-form textarea, .pr-edit { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-md); padding: .65rem .8rem; background: var(--bg); color: var(--ink); font: 400 var(--fs-base) var(--body); resize: vertical; }
.pr-add-more { display: grid; gap: .65rem; }
.pr-add-more[hidden] { display: none; }
.pr-cats, .pr-catfilter { display: flex; flex-wrap: wrap; gap: .35rem; }
.pr-catfilter { margin: 0 0 1rem; }
.pr-catfilter:empty { display: none; }
.pr-cat { appearance: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r-full); padding: .35rem .75rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.pr-cat.on { background: var(--wash); color: var(--accent); border-color: var(--accent); }
.pr-days-row { display: flex; align-items: center; gap: .6rem; font: 600 var(--fs-xs) var(--body); color: var(--muted); }
.pr-days { display: flex; gap: .25rem; }
.pr-day { appearance: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 700 var(--fs-xs) var(--body); cursor: pointer; }
.pr-day.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pr-days-hint { margin: -.25rem 0 0; font-size: var(--fs-2xs); color: var(--muted); }
.pr-add-btn { appearance: none; border: 0; min-height: 46px; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--body); cursor: pointer; }
.pr-filter { display: flex; gap: .4rem; margin: 0 0 .75rem; }
.pr-filter button { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .45rem .9rem; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.pr-filter button.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pr-list { display: grid; gap: .65rem; }
.pr-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem 1rem; display: grid; gap: .45rem; }
.pr-card.answered { border-left: 4px solid #D4A72C; }
.pr-card.thanks { border-left: 4px solid var(--spring); }
.pr-card-top { margin: 0; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.pr-who { font: 600 var(--fs-base) var(--display); }
.pr-tag { font: 700 var(--fs-2xs) var(--body); color: var(--accent); background: var(--wash); padding: .1rem .5rem; border-radius: 99px; }
.pr-tag.thanks { color: #0B6B4F; }
.pr-text { margin: 0; font-size: var(--fs-base); line-height: 1.55; white-space: pre-wrap; }
.pr-answer { padding: .55rem .75rem; border-radius: var(--r-sm); background: rgba(212,167,44,.12); font-size: var(--fs-sm); }
.pr-answer b { color: #8A6A10; }
[data-theme="dark"] .pr-answer b { color: #E6C35C; }
.pr-answer p { margin: .2rem 0 0; }
.pr-meta { margin: 0; font-size: var(--fs-2xs); color: var(--muted); }
.pr-acts { display: flex; flex-wrap: wrap; gap: .35rem; }
.pr-acts[hidden] { display: none; }
.pr-act { appearance: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r-full); padding: .35rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.pr-act.primary { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.pr-act.primary.done { background: var(--wash); color: var(--accent); border-color: transparent; }
.pr-act.danger { border-color: transparent; color: var(--muted); }
.pr-answer-form { display: grid; gap: .4rem; }

/* Pray now + practices (calm, focused screens) */
.ps { min-height: 100vh; padding: 0 1.25rem 8rem; max-width: 36rem; margin: 0 auto; box-sizing: border-box;
  background: radial-gradient(120% 60% at 50% -10%, rgba(25,167,155,.14), transparent 60%); }
.ps-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; position: sticky; top: 0; z-index: 5; }
.ps-x, .ps-sound { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-decoration: none; cursor: pointer; font-size: 1rem; }
.ps-dots { display: flex; gap: 6px; }
.ps-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: all .3s; }
.ps-dots i.past { background: var(--spring); opacity: .5; }
.ps-dots i.on { background: var(--spring); width: 20px; border-radius: 4px; }
.ps-step[hidden] { display: none; }
.ps-step.in .ps-box { animation: psIn .45s ease both; }
@keyframes psIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-step.in .ps-box { animation: none; } }
.ps-intro { padding-top: 2rem; text-align: center; }
.ps-box { padding-top: 1.5rem; display: grid; gap: 1rem; }
.ps-k { margin: 0; font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.ps-t { margin: 0; font: 600 var(--fs-2xl) var(--display); line-height: 1.2; }
.ps-t-line { font-size: var(--fs-xl); font-style: italic; }
.ps-p { margin: 0; font-size: var(--fs-base); line-height: 1.6; color: var(--ink); }
.ps-small { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.ps-scripture { margin: 0; padding: 1rem 1.125rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.ps-scripture p { margin: 0 0 .5rem; font: 400 var(--fs-lg)/1.6 var(--reading); }
.ps-scripture sup { font: 700 .55em var(--body); color: var(--accent); margin-right: .15em; }
.ps-scripture.big p { font-size: 1.3rem; }
.ps-scripture.gold { background: rgba(212,167,44,.1); border-color: rgba(212,167,44,.35); }
.ps-ref { font: 600 var(--fs-xs) var(--body); color: var(--accent); text-decoration: none; }
.ps-prayer { margin: 0; font: 400 1.25rem/1.6 var(--reading); }
.ps-orig summary { cursor: pointer; font: 600 var(--fs-sm) var(--body); color: var(--accent); }
.ps-orig .ps-scripture { margin-top: .5rem; }
.ps-len { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 1rem; }
.ps-len button, .pp-phrase { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .55rem 1rem; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.ps-len button.on, .pp-phrase.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.ps-go { appearance: none; display: inline-flex; justify-content: center; align-items: center; border: 0; min-height: 52px; padding: 0 2rem; border-radius: var(--r-full); background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--body); cursor: pointer; text-decoration: none; width: 100%; max-width: 20rem; margin: .5rem auto 0; }
.ps-alt { display: block; margin-top: 1rem; text-align: center; color: var(--accent); font: 600 var(--fs-sm) var(--body); text-decoration: none; background: none; border: 0; cursor: pointer; }
.ps-foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: .75rem; padding: .75rem 1.25rem calc(.75rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); z-index: 50; max-width: 36rem; margin: 0 auto; }
.ps-foot[hidden] { display: none; }
.ps-back, .ps-next { appearance: none; min-height: 50px; border-radius: var(--r-full); font: 700 var(--fs-base) var(--body); cursor: pointer; }
.ps-back { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 1.25rem; }
.ps-back[hidden] { visibility: hidden; display: inline-block; }
.ps-next { flex: 1; max-width: 16rem; border: 0; background: var(--accent-fill); color: var(--on-accent-fill); }
.ps-names { display: flex; flex-wrap: wrap; gap: .35rem; }
.ps-names span { padding: .35rem .75rem; border-radius: var(--r-full); background: var(--wash); color: var(--accent); font: 600 var(--fs-sm) var(--body); }
.ps-thanks { display: flex; gap: .4rem; }
.ps-thanks input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-full); padding: .7rem 1rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-base) var(--body); }
.ps-thanks button { appearance: none; border: 0; border-radius: var(--r-full); padding: 0 1.1rem; background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-sm) var(--body); cursor: pointer; }
.ps-thanks-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.ps-thanks-list.old { color: var(--muted); font-size: var(--fs-sm); }
.ps-asks { display: grid; gap: .5rem; }
.ps-ask, .ps-wall { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; align-items: center; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.ps-ask b { grid-column: 1; font: 600 var(--fs-base) var(--display); }
.ps-ask p, .ps-wall p { grid-column: 1; margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.ps-ask.done { opacity: .6; }
.ps-pray { grid-column: 2; grid-row: 1 / span 3; appearance: none; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: var(--r-full); padding: .45rem .9rem; font: 700 var(--fs-xs) var(--body); cursor: pointer; white-space: nowrap; }
.ps-pray:disabled { background: var(--wash); border-color: transparent; }
.ps-link { appearance: none; border: 0; background: none; color: var(--accent); font: 600 var(--fs-sm) var(--body); cursor: pointer; justify-self: start; padding: 0; }
.ps-link[hidden], .ps-assure[hidden] { display: none; }
.ps-assure { display: grid; gap: .5rem; }
.ps-input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-md); padding: .75rem .9rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-base)/1.5 var(--body); resize: vertical; }
.ps-done { text-align: center; padding-top: 3rem; }
.ps-done-links { display: grid; gap: .25rem; justify-items: center; }
/* breathing circle */
.ps-breathe { position: relative; height: 13rem; display: grid; place-items: center; }
.ps-breathe.big { height: 17rem; }
.ps-breathe i { position: absolute; width: 9rem; height: 9rem; border-radius: 50%; background: radial-gradient(circle, rgba(25,167,155,.45), rgba(25,167,155,.12) 70%); transform: scale(.65); transition: transform 5s ease-in-out; }
.ps-breathe.big i { width: 12rem; height: 12rem; }
.ps-breathe:not(.out) i { transform: scale(1); }
.ps-breathe.out i { transform: scale(.65); }
.ps-breathe-t { position: relative; font: 500 var(--fs-lg) var(--reading); text-align: center; max-width: 14rem; }
@media (prefers-reduced-motion: reduce) { .ps-breathe i { transition: none; } }
/* countdown */
.ps-timer { display: grid; justify-items: center; }
.pt { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.pt svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pt-bg { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.pt-fg { fill: none; stroke: var(--spring); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.pt-n { font: 600 1.4rem var(--body); margin-top: -.6rem; }
.pt-btn { position: absolute; bottom: 22px; appearance: none; border: 0; background: none; color: var(--muted); font: 600 var(--fs-2xs) var(--body); cursor: pointer; }
.pt.done .pt-n { color: var(--accent); }
/* practices */
.pp-list { display: grid; gap: .6rem; }
.pp-card { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pp-emoji { font-size: 1.6rem; width: 2.5rem; text-align: center; }
.pp-body { flex: 1; display: grid; gap: .15rem; }
.pp-body b { font: 600 var(--fs-base) var(--display); }
.pp-body span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.pp-body small { font: 600 var(--fs-2xs) var(--body); color: var(--accent); }
.pp-choose { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 1.25rem 0 0; font: 600 var(--fs-sm) var(--body); color: var(--muted); }
.pp-choose select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: .5rem .7rem; font: 600 var(--fs-sm) var(--body); }
.pp-phrases { display: grid; gap: .4rem; margin: 1.25rem 0 0; }
.pp-phrase { border-radius: var(--r-md); font-family: var(--reading); font-weight: 500; }
.pp-name { display: grid; gap: .4rem; margin: 1.5rem auto 1rem; max-width: 20rem; font: 600 var(--fs-sm) var(--body); color: var(--muted); }
.pp-name input { border: 1px solid var(--line); border-radius: var(--r-full); padding: .75rem 1rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-base) var(--body); text-align: center; }

/* devotionals */
.devo-page-k { font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.devo-share { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.devo-article .devo-read-title { font-size: var(--fs-2xl); margin-bottom: .35rem; }
.devo-meta { margin: 0 0 1.25rem; font-size: var(--fs-sm); color: var(--muted); }
.devo-meta .devo-read-ref { display: inline; }
.devo-reflect { margin: 1.5rem 0; padding: 1.125rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.devo-reflect-t { margin: 0 0 .5rem; font: 600 var(--fs-lg) var(--display); }
.devo-qs { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: var(--fs-sm); line-height: 1.5; }
.devo-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem; }
.devo-act { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 0 .75rem; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.devo-act .icn { color: var(--accent); }
.devo-act.on { background: var(--wash); color: var(--accent); border-color: transparent; }
.devo-more { display: inline-block; margin-top: .5rem; color: var(--accent); font: 600 var(--fs-sm) var(--body); text-decoration: none; }
.devo-search { margin: .5rem 0 .75rem; }
.devo-archive-row[hidden] { display: none; }
.devo-archive-row.read .devo-archive-title::after { content: " ✓"; color: var(--accent); font-family: var(--body); font-size: .85em; }
.pr-kind label, .pb-opt { position: relative; }
.pr-kind input, .pb-opt input { left: 0; top: 0; width: 1px; height: 1px; margin: 0; }

/* ============================================================
   Wave 6 — grow, exploring faith, everyday faith, Sunday
   ============================================================ */
.gw { padding-bottom: 7rem; }
.gw-read .gw-article { display: grid; gap: .9rem; }
.gw-k { margin: 0; font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.gw-h1 { margin: 0; font: 600 var(--fs-2xl)/1.2 var(--display); }
.gw-h3 { margin: .75rem 0 0; font: 700 var(--fs-xs) var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gw-p { margin: 0; font: 400 var(--fs-base)/1.65 var(--body); }
.gw-lead { font: 400 var(--fs-lg)/1.55 var(--reading); }
.gw-note { margin: .5rem 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.gw-note:empty { display: none; }
.gw-draft { margin: 1.5rem 0 0; font-size: var(--fs-xs); color: var(--muted); }
.gw-list { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: var(--fs-sm); line-height: 1.5; }
.gw-scripture { margin: 0; }
.gw-scripture p { font-size: var(--fs-base); }
.gw-scripture.big p { font-size: 1.2rem; }
.gw-more { border: 1px solid var(--line); border-radius: var(--r-md); padding: .65rem .9rem; background: var(--surface); }
.gw-more > summary { cursor: pointer; font: 600 var(--fs-sm) var(--body); color: var(--accent); list-style: none; display: flex; align-items: center; gap: .4rem; }
.gw-more > summary::-webkit-details-marker { display: none; }
.gw-more > summary::after { content: "+"; margin-left: auto; font-weight: 700; }
.gw-more[open] > summary::after { content: "–"; }
.gw-more[open] > summary { margin-bottom: .65rem; }
.gw-more .ps-scripture { background: var(--bg); }
.gw-try { margin: 1rem 0; padding: 1rem 1.1rem; border-radius: var(--r-lg); background: var(--wash); display: grid; gap: .4rem; }
.gw-try h3 { margin: 0; font: 600 var(--fs-base) var(--display); }
.gw-try p, .gw-try ul { margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.gw-try ul { padding-left: 1.1rem; display: grid; gap: .3rem; }
.gw-try a { color: var(--accent); font-weight: 600; }
.gw-chip { display: inline-flex; align-items: center; gap: .35rem; justify-self: start; padding: .45rem .85rem; border-radius: var(--r-full); background: var(--wash); color: var(--accent); text-decoration: none; font: 600 var(--fs-sm) var(--body); }
.gw-btn { appearance: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 42px; padding: 0 1rem; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.gw-btn .icn { color: var(--accent); }
.gw-btn[hidden] { display: none; }
.gw-done { appearance: none; min-height: 50px; border-radius: var(--r-full); border: 0; background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-base) var(--body); cursor: pointer; margin-top: .5rem; }
.gw-done.on { background: var(--wash); color: var(--accent); }
.gw-pager { display: flex; justify-content: space-between; gap: .75rem; margin: 1.5rem 0 0; }
.gw-pg { display: inline-flex; align-items: center; gap: .25rem; color: var(--accent); text-decoration: none; font: 600 var(--fs-sm) var(--body); max-width: 48%; }
.gw-pg.next { margin-left: auto; text-align: right; }
.gw-empty { padding: 1.5rem 1rem; text-align: center; border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--line); color: var(--muted); margin: 0 0 1rem; }
.gw-empty p { margin: .25rem 0; }
.gw-empty b { color: var(--ink); }
.gw-empty[hidden] { display: none; }
.gw-thanks { display: grid; gap: .2rem; padding: .9rem 1rem; border-radius: var(--r-md); background: var(--wash); margin: 0 0 1rem; font-size: var(--fs-sm); }
.gw-thanks b { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* path cards and progress */
.gw-paths { display: grid; gap: .75rem; margin: 0 0 1.5rem; }
@media (min-width: 560px) { .gw-paths { grid-template-columns: 1fr 1fr; } }
.gw-path { display: grid; gap: .3rem; padding: 1.1rem 1.15rem; border-radius: var(--r-lg); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; position: relative; overflow: hidden; }
.gw-path::before { content: ""; position: absolute; inset: auto -40px -70px auto; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(95,220,203,.3), transparent 70%); }
.gw-path.alt { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.gw-path.alt::before { background: radial-gradient(circle, rgba(25,167,155,.14), transparent 70%); }
.gw-path-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.gw-path-t { font: 600 var(--fs-lg) var(--display); }
.gw-path-s { font-size: var(--fs-sm); line-height: 1.45; opacity: .9; }
.gw-path-p { font: 600 var(--fs-xs) var(--body); }
.gw-path .gw-bar { background: rgba(255,255,255,.22); }
.gw-path .gw-bar i { background: currentColor; }
.gw-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.gw-bar i { display: block; height: 100%; width: 0; background: var(--spring); border-radius: 3px; transition: width .4s ease; }
.gw-bar-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.gw-bar-row .gw-path-p { color: var(--muted); }
.gw-steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.gw-step { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.gw-step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); color: var(--accent); font: 700 var(--fs-sm) var(--body); }
.gw-step-n .icn { display: none; }
.gw-step.ticked .gw-step-n { background: var(--accent-fill); color: var(--on-accent-fill); }
.gw-step.ticked .gw-step-n b { display: none; }
.gw-step.ticked .gw-step-n .icn { display: block; }
.gw-step-b { flex: 1; display: grid; gap: .1rem; }
.gw-step-b b { font: 600 var(--fs-base) var(--display); }
.gw-step-b small { font-size: var(--fs-xs); color: var(--muted); }
.gw-step > .icn { color: var(--muted); opacity: .6; }
.gw-qs { margin: 0; padding-left: 1.3rem; display: grid; gap: .9rem; }
.gw-qs li { font-size: var(--fs-base); line-height: 1.5; }
.gw-qs label { display: block; margin-bottom: .35rem; }
.gw-qs.plain { gap: .6rem; }
.gw-answer { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem .75rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-sm)/1.5 var(--body); resize: vertical; }

/* the church year */
.gw-season { display: grid; gap: .25rem; margin: 0 0 .9rem; padding: .95rem 1.1rem; border-radius: var(--r-lg); text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); }
.gw-season.s-purple { border-left-color: #7B4FA8; }
.gw-season.s-gold { border-left-color: #D4A72C; }
.gw-season.s-red { border-left-color: #C2412D; }
.gw-season.s-green { border-left-color: #3E8E5A; }
.gw-season-k { font: 700 var(--fs-2xs) var(--body); color: var(--muted); }
.gw-season-t { font: 600 var(--fs-lg) var(--display); }
.gw-season-s { font-size: var(--fs-sm); line-height: 1.45; color: var(--muted); }
.gw-season-cta { font: 700 var(--fs-xs) var(--body); color: var(--accent); }

/* check-in */
.ci-form { display: grid; gap: 1rem; }
.ci-form[hidden], .gw-results[hidden], #ciIntro[hidden] { display: none; }
.ci-area { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: .9rem; }
.ci-area legend { padding: 0 .35rem; font: 600 var(--fs-base) var(--display); }
.ci-q p { margin: 0 0 .45rem; font-size: var(--fs-sm); line-height: 1.45; }
.ci-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; }
.ci-scale label { position: relative; }
.ci-scale input { position: absolute; opacity: 0; left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.ci-scale span { display: grid; place-items: center; min-height: 40px; padding: .2rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); font: 600 var(--fs-2xs) var(--body); text-align: center; cursor: pointer; line-height: 1.2; }
.ci-scale input:checked + span { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.ci-scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gw-results { display: grid; gap: .75rem; }
.ci-bars { display: grid; gap: .55rem; }
.ci-bar { display: grid; grid-template-columns: 9.5rem 1fr 1.2rem; align-items: center; gap: .6rem; font-size: var(--fs-sm); }
.ci-bar-t { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.ci-bar-t i { display: block; height: 100%; background: var(--spring); border-radius: 5px; }
.ci-bar-d { font-weight: 700; color: var(--muted); text-align: center; }
.ci-bar-d.up { color: #0B8A5F; }
.ci-bar-d.down { color: #B8641A; }
.ci-next { display: grid; gap: .5rem; }
.ci-next-card { display: grid; gap: .3rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--wash); }
.ci-next-card a { color: var(--accent); font: 600 var(--fs-sm) var(--body); text-decoration: none; }
.ci-history { margin: 0; padding-left: 1.1rem; font-size: var(--fs-sm); }
.ci-acts { display: flex; gap: .5rem; }
@media (max-width: 420px) { .ci-bar { grid-template-columns: 7.5rem 1fr 1rem; } }

/* gifts */
#gfIntro[hidden], .gf-quiz[hidden], #gfResults[hidden] { display: none; }
.gf-quiz { display: grid; gap: 1.25rem; padding-top: .5rem; }
.gf-q { margin: 0; min-height: 5.5rem; font: 500 var(--fs-xl)/1.4 var(--reading); }
.gf-scale { display: grid; gap: .45rem; }
.gf-scale button { appearance: none; min-height: 50px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--fs-base) var(--body); cursor: pointer; }
.gf-scale button.on { border-color: var(--accent); color: var(--accent); }
.gf-scale button:active { background: var(--wash); }
.gf-cards { display: grid; gap: .6rem; margin: .5rem 0; }
.gf-card { padding: 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .4rem; }
.gf-card h3 { margin: 0; font: 600 var(--fs-lg) var(--display); }
.gf-card p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.gf-use b { color: var(--accent); }
.gf-refs a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* story writer */
.st-parts { display: grid; gap: 1rem; }
.st-part { display: grid; gap: .35rem; margin: 0 0 1rem; }
.st-part > label { font: 600 var(--fs-lg) var(--display); display: flex; align-items: center; gap: .5rem; }
.st-n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--wash); color: var(--accent); font: 700 var(--fs-xs) var(--body); }
.st-prompt { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.st-hint { margin: 0; font-size: var(--fs-2xs); color: var(--muted); }
.st-count { margin: 0 0 1rem; font: 600 var(--fs-xs) var(--body); color: var(--accent); }
.st-count:empty { display: none; }
.st-preview, .st-church { margin: 1.25rem 0; }
.st-preview[hidden], .st-church[hidden] { display: none; }
.st-text { padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); font: 400 var(--fs-base)/1.7 var(--reading); }
.st-text p { margin: 0 0 .8rem; }
.st-text p:last-child { margin: 0; }
.st-acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.st-form { display: grid; gap: .75rem; }
.st-form label { display: grid; gap: .3rem; font: 600 var(--fs-sm) var(--body); }
.st-form input[type=text] { border: 1px solid var(--line); border-radius: var(--r-md); padding: .65rem .8rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-base) var(--body); }
.st-form .st-consent { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; line-height: 1.45; }
.st-form .st-consent input { margin-top: .25rem; }
.gw-story { padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin: 0 0 .75rem; }
.gw-story h2 { margin: 0 0 .5rem; font: 600 var(--fs-lg) var(--display); }
.gw-story-body { font: 400 var(--fs-base)/1.7 var(--reading); }
.gw-story-body p { margin: 0 0 .75rem; }
.gw-story-by { margin: 0; font: 600 var(--fs-xs) var(--body); color: var(--muted); }

/* rhythm */
.rh-group { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: .75rem; }
.rh-group legend { padding: 0 .35rem; font: 600 var(--fs-base) var(--display); }
.rh-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rh-chip.on { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
#rhBuild[hidden], .rh-mine[hidden], .rh-today[hidden] { display: none; }
.rh-today { padding: 1.1rem; border-radius: var(--r-lg); background: var(--wash); margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.rh-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.rh-tick { appearance: none; width: 100%; display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 var(--fs-base) var(--body); text-align: left; cursor: pointer; }
.rh-tick i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .8rem; font-weight: 700; }
.rh-tick.on i { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent-fill); }
.rh-tick.on span { color: var(--muted); }
.rh-tick small { margin-left: auto; font-size: var(--fs-2xs); color: var(--muted); }
.rh-summary { display: grid; gap: .6rem; }
.rh-sum { padding: .8rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.rh-sum b { font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.rh-sum ul { margin: .35rem 0 0; padding-left: 1.1rem; font-size: var(--fs-sm); display: grid; gap: .2rem; }

/* next steps */
.gw-jump { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.25rem; }
.gw-jump a { padding: .4rem .8rem; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 var(--fs-xs) var(--body); }
.gw-ns { padding: 1.1rem 1.15rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin: 0 0 .75rem; display: grid; gap: .6rem; scroll-margin-top: 4rem; }
.gw-ns h2 { margin: 0; font: 600 var(--fs-lg) var(--display); }
.gw-ns-body p, .gw-try div p { margin: 0 0 .6rem; font-size: var(--fs-sm); line-height: 1.6; }
.gw-ns-body p:last-child { margin: 0; }

/* family */
.fm-qs { display: grid; gap: .5rem; }
.fm-qs p { margin: 0; padding: .75rem .9rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-base); line-height: 1.5; }
.fm-tag { display: block; font: 700 var(--fs-2xs) var(--body); color: var(--accent); margin-bottom: .2rem; }

/* exploring faith */
.fq-list { display: grid; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.fq-row { display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; text-decoration: none; color: var(--ink); font: 500 var(--fs-base) var(--display); }
.fq-row + .fq-row { border-top: 1px solid var(--line); }
.fq-row span { flex: 1; }
.fq-row .icn { color: var(--muted); }
.fq-row.more { color: var(--accent); font: 600 var(--fs-sm) var(--body); }
.fq-row[hidden] { display: none; }
.fq-search { margin: 0 0 .75rem; }
.gs-panels { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.gs-panel { position: relative; padding: 1.15rem 1.15rem 1.15rem 3.6rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .6rem; }
.gs-panel h2 { margin: 0; font: 600 var(--fs-xl) var(--display); }
.gs-n { position: absolute; left: 1rem; top: 1.1rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-sm) var(--body); }
.gs-panel .ps-scripture { background: var(--bg); padding: .75rem .9rem; }
.gs-respond { margin: 1.5rem 0; padding: 1.25rem; border-radius: var(--r-lg); background: var(--wash); display: grid; gap: .75rem; }
.gs-respond h2 { margin: 0; font: 600 var(--fs-xl) var(--display); }
.gs-prayer { padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--surface); }
.gs-acts { display: grid; justify-items: center; }
.gs-share { text-align: center; display: grid; justify-items: center; gap: .5rem; }
.bs-chapters { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .4rem; margin: 0 0 1rem; scrollbar-width: none; }
.bs-chapters::-webkit-scrollbar { display: none; }
.bs-chapters a { flex: none; display: inline-flex; gap: .35rem; align-items: center; padding: .4rem .75rem; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 var(--fs-xs) var(--body); white-space: nowrap; }
.bs-chapters b { color: var(--accent); }
.bs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bs-item { display: grid; grid-template-columns: 2.4rem 1fr; gap: .75rem; scroll-margin-top: 4rem; }
.bs-n { position: relative; display: flex; justify-content: center; }
.bs-n::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: var(--line); }
.bs-item:first-child .bs-n::before { top: 1rem; }
.bs-item:last-child .bs-n::before { bottom: auto; height: 1rem; }
.bs-n b { position: relative; z-index: 1; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-sm) var(--body); }
.bs-b { padding: .2rem 0 1.75rem; display: grid; gap: .55rem; }
.bs-b h2 { margin: 0; font: 600 var(--fs-xl) var(--display); }
.gl-letters { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1rem; }
.gl-letters a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--accent); font: 700 var(--fs-xs) var(--body); }
.gl-list { margin: 0; display: grid; gap: .5rem; }
.gl-item { padding: .8rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 4rem; position: relative; }
.gl-item[hidden] { display: none; }
.gl-anchor { position: absolute; top: -4rem; }
.gl-item dt { font: 600 var(--fs-lg) var(--display); margin: 0 0 .2rem; }
.gl-item dd { margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.gl-ref { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sh-names { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; }
.sh-names li { display: flex; align-items: center; justify-content: space-between; padding: .55rem .85rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font: 600 var(--fs-base) var(--display); }
.sh-five { margin: 0 0 1.5rem; }
.sh-tips { display: grid; gap: .5rem; }
@media (min-width: 560px) { .sh-tips { grid-template-columns: 1fr 1fr; } }
.sh-tip { padding: .85rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.sh-tip b { font: 600 var(--fs-base) var(--display); }
.sh-tip p { margin: .25rem 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.sh-starters { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.sh-starters li { padding: .7rem .95rem; border-radius: var(--r-md); background: var(--wash); font: 400 var(--fs-base)/1.45 var(--reading); }
.sh-verses { display: grid; gap: .5rem; }
.sh-invite { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* feelings */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.fl-grid.small { grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .35rem; }
.fl-chip { display: flex; align-items: center; gap: .55rem; padding: .85rem .9rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 var(--fs-base) var(--body); }
.fl-grid.small .fl-chip { padding: .55rem .7rem; font-size: var(--fs-sm); }
.fl-chip span { font-size: 1.3rem; }
.fl-chip.urgent { border-color: rgba(194,65,45,.4); }
.fl-help { margin: 0 0 1.25rem; padding: 1.1rem; border-radius: var(--r-lg); background: rgba(194,65,45,.08); border: 1px solid rgba(194,65,45,.3); display: grid; gap: .5rem; }
.fl-help h2 { margin: 0; font: 600 var(--fs-lg) var(--display); }
.fl-help p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.fl-help ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.fl-help li { display: grid; padding: .6rem .8rem; border-radius: var(--r-md); background: var(--surface); }
.fl-help li a { text-decoration: none; color: var(--ink); font-size: var(--fs-base); }
.fl-help li a span { color: #B3261E; font-weight: 700; }
[data-theme="dark"] .fl-help li a span { color: #F2A196; }
.fl-help li small { font-size: var(--fs-xs); color: var(--muted); }
.fl-help a { color: var(--accent); font-weight: 600; }
.gw-read > .ps-scripture, .gw-read > .gw-scripture { margin-bottom: .65rem; }
.fl-note { margin-bottom: 1rem; }

/* before sleep: always calm and dim, whatever the theme */
.nt { --bg: #0B1620; --surface: #122230; --surface-2: #1B2D3D; --ink: #DCE6EE; --muted: #8FA3B3; --line: #223647; --accent: #9CC7E8; --wash: rgba(156,199,232,.1); --accent-fill: #31546E; --on-accent-fill: #F1F6FA;
  background: radial-gradient(120% 50% at 50% -10%, rgba(120,150,200,.18), transparent 60%), #0B1620; color: var(--ink); min-height: 100vh; max-width: none; }
.nt > * { max-width: 34rem; margin-left: auto; margin-right: auto; }
.nt-moon { font-size: 1.4rem; }
.nt-steps { display: grid; gap: 2rem; padding-top: 1rem; }
.nt-step { display: grid; gap: .75rem; }
.nt-t { margin: 0; font: 600 var(--fs-xl) var(--display); }
.nt-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: var(--fs-sm); color: var(--muted); }
.nt-amen { margin: 0; text-align: center; font: 500 1.4rem var(--reading); }
.nt .ps-sound.on { background: var(--accent-fill); color: var(--on-accent-fill); }
.nt .ps-small a { color: var(--accent); }
.nt .pp-choose { justify-content: flex-start; margin: 0; }

/* fasting */
.fs-now { padding: 1.15rem; border-radius: var(--r-lg); background: var(--wash); display: grid; gap: .65rem; margin: 0 0 1.5rem; }
.fs-now[hidden], #fsGuide[hidden], .fs-plan[hidden], #fsPast[hidden], .fs-reflect[hidden] { display: none; }
.fs-time { margin: 0; font: 600 var(--fs-base) var(--body); color: var(--accent); }
.fs-acts { display: flex; flex-wrap: wrap; gap: .4rem; }
.fs-reflect { display: grid; gap: .5rem; }
.fs-reflect label { font: 600 var(--fs-sm) var(--body); }
#fsGuide { display: grid; gap: .9rem; margin: 0 0 1.5rem; }
.fs-safety { padding: 1rem 1.1rem; border-radius: var(--r-lg); background: rgba(212,167,44,.12); border: 1px solid rgba(212,167,44,.4); }
.fs-safety b { font: 700 var(--fs-sm) var(--body); }
.fs-safety p { margin: .35rem 0 0; font-size: var(--fs-sm); line-height: 1.55; }
.fs-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .6rem; }
.fs-steps p { margin: .15rem 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
#fsForm { display: grid; gap: .85rem; }
.fs-label { margin: 0; font: 600 var(--fs-sm) var(--body); }
.fs-kinds { display: grid; gap: .4rem; }
.fs-kind { position: relative; }
.fs-kind input { position: absolute; opacity: 0; left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.fs-kind > span { display: grid; gap: .1rem; padding: .75rem .9rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.fs-kind b { font: 600 var(--fs-base) var(--display); }
.fs-kind small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.fs-kind input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--wash); }
.fs-kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fs-check { display: flex; gap: .55rem; align-items: flex-start; font-size: var(--fs-sm); line-height: 1.45; }
.fs-check[hidden] { display: none; }
.fs-check input { margin-top: .2rem; }
.fs-field { display: grid; gap: .3rem; font: 600 var(--fs-sm) var(--body); }
.fs-when { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 420px) { .fs-when { grid-template-columns: 1fr; } }
.fs-history { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.fs-history li { padding: .8rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .2rem; font-size: var(--fs-sm); }
.fs-history li span { color: var(--muted); }
.fs-history li p { margin: .2rem 0 0; font-style: italic; }

/* praying for the world */
.wd-card { text-align: center; padding: 1.5rem 1rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .35rem; margin: 0 0 1.25rem; }
.wd-flag { margin: 0; font-size: 3.5rem; line-height: 1; }
.wd-nav { display: flex; justify-content: center; gap: 1rem; margin-top: .5rem; }
.wd-nav a { display: inline-flex; align-items: center; gap: .2rem; color: var(--accent); font: 600 var(--fs-sm) var(--body); text-decoration: none; }
.wd-prompts { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: .5rem; counter-reset: wd; }
.wd-prompts li { padding: .85rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.wd-prompts b { font: 600 var(--fs-base) var(--display); }
.wd-prompts p { margin: .2rem 0 .4rem; font-size: var(--fs-sm); line-height: 1.5; }
.wd-prompts summary { cursor: pointer; font: 600 var(--fs-xs) var(--body); color: var(--accent); }
.wd-prompts .ps-scripture { margin-top: .5rem; background: var(--bg); padding: .65rem .8rem; }
.wd-all { columns: 2; margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: 1.8; }
.gw > .ps-go { display: flex; }

/* Sunday */
.sn-head { display: grid; gap: .35rem; margin: 0 0 1rem; }
.sn-by { margin: 0; font: 600 var(--fs-sm) var(--body); color: var(--muted); }
.sn-passage { margin: 0 0 1.25rem; }
.sn-passage .gw-chip { margin-top: .6rem; }
.sn-outline { padding: 1.1rem 1.15rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin: 0 0 1.25rem; }
.sn-outline-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.sn-outline-top .bible-h2 { margin: 0; }
.sn-h { margin: 1.1rem 0 .4rem; font: 600 var(--fs-lg) var(--display); }
.sn-line { margin: 0 0 .6rem; font: 400 var(--fs-base)/2 var(--body); }
.sn-blank { border: 0; border-bottom: 2px solid var(--accent); background: var(--wash); color: var(--ink); border-radius: 4px 4px 0 0; padding: .1rem .3rem; font: 600 var(--fs-base) var(--body); max-width: 100%; min-width: 4rem; }
.sn-blank:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sn-blank.ok { border-bottom-color: #0B8A5F; background: rgba(11,138,95,.1); }
.sn-blank.revealed::placeholder { color: var(--accent); opacity: .65; }
.sn-mine { display: grid; gap: .45rem; margin: 0 0 1.25rem; }
.sn-mine .bible-h2 { margin: 0 0 .2rem; }
.sn-label { font: 600 var(--fs-sm) var(--body); margin-top: .4rem; }
.sn-acts { display: flex; gap: .5rem; margin: 1.25rem 0; }
.sn-card { display: grid; gap: .2rem; margin: 0 0 1rem; padding: .95rem 1.1rem; border-radius: var(--r-lg); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; }
.sn-card-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.sn-card-t { font: 600 var(--fs-lg) var(--display); }
.sn-card-s { font-size: var(--fs-sm); opacity: .9; }
.sermon-more { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 1rem; }
.ch-talks { margin: 1rem 0; display: grid; gap: .4rem; }
.ch-talk { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); margin: 0 0 .4rem; }
.ch-talk .icn { color: var(--accent); flex: none; }
.ch-talk span { display: grid; gap: .1rem; }
.ch-talk b { font: 600 var(--fs-base) var(--display); }
.ch-talk small { font-size: var(--fs-xs); color: var(--muted); }
@media print {
  .site-nav, .global-back, .bible-head, .sn-acts, .gw-btn { display: none !important; }
  .gw { padding: 0; }
}

/* ============================================================
   Wave 7 — groups, account and sync
   ============================================================ */
.gr-sub { margin: -.75rem 0 1rem; text-align: center; font: 600 var(--fs-sm) var(--body); color: var(--muted); }
.gr-tabs { margin-bottom: 1rem; }
.gr-signin { padding: 1.25rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .6rem; margin: 0 0 1.25rem; }
.gr-signin h2 { margin: 0; font: 600 var(--fs-xl) var(--display); }
.gr-signin p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; }
.gr-acts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gr-signin .ps-go { margin: .25rem 0 0; }
.gr-what { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.gr-what li { padding: .8rem 1rem; border-radius: var(--r-md); background: var(--wash); font-size: var(--fs-sm); line-height: 1.5; }
.gr-list { display: grid; gap: .5rem; margin: 0 0 1.5rem; }
.gr-card { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.gr-card-emoji { font-size: 1.6rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--wash); }
.gr-card-b { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.gr-card-b b { font: 600 var(--fs-base) var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-card-b small { font-size: var(--fs-xs); color: var(--muted); }
.gr-card > .icn { color: var(--muted); opacity: .6; }
.gr-badge { min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px; background: var(--accent-fill); color: var(--on-accent-fill); font: 700 var(--fs-2xs) var(--body); display: grid; place-items: center; }
.gr-box { margin: 0 0 1.25rem; }
.gr-box .bible-h2 { margin-top: 0; }
.gr-form { display: grid; gap: .75rem; }
.gr-form label { display: grid; gap: .3rem; font: 600 var(--fs-sm) var(--body); }
.gr-form input[type=text], .gr-form input[type=date], .gr-form select, .gr-form textarea,
.gr-compose textarea, .gr-compose input[type=text] { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-md); padding: .65rem .8rem; background: var(--bg); color: var(--ink); font: 400 var(--fs-base) var(--body); }
.gr-form .ps-go { margin: .25rem 0 0; }
.gr-kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.gr-kinds legend { font: 600 var(--fs-sm) var(--body); margin-bottom: .35rem; padding: 0; }
.gr-kind { position: relative; }
.gr-kind input { position: absolute; opacity: 0; left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.gr-kind span { display: inline-block; padding: .45rem .8rem; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--bg); font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.gr-kind input:checked + span { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.gr-kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gr-safe { margin-top: 1.5rem; }
.gr-invite { text-align: center; display: grid; gap: .6rem; padding: 1.5rem 1.25rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.gr-invite-emoji { margin: 0; font-size: 3rem; line-height: 1; }
.gr-invite .ps-go { margin: .25rem auto 0; }
/* composer */
.gr-compose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem; display: grid; gap: .6rem; margin: 0 0 1rem; }
.gr-compose-tabs { display: flex; gap: .3rem; }
.gr-compose-tabs button { appearance: none; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: var(--r-full); padding: .35rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.gr-compose-tabs button.on { background: var(--wash); color: var(--accent); border-color: var(--accent); }
.gr-pane { display: grid; gap: .55rem; }
.gr-pane[hidden] { display: none; }
.gr-pane label { display: grid; gap: .3rem; font: 600 var(--fs-sm) var(--body); }
.gr-compose.gr-pane { margin-bottom: 1rem; }
/* posts */
.gr-feed { display: grid; gap: .65rem; margin: 0 0 1.25rem; }
.gp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .85rem 1rem .75rem; display: grid; gap: .55rem; scroll-margin-top: 5rem; }
.gp.new { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.gp.flash { animation: gpFlash 1.6s ease; }
@keyframes gpFlash { 0% { background: var(--wash); } 100% { background: var(--surface); } }
.gp.gp-prayer { border-left: 4px solid var(--spring); }
.gp.answered { border-left-color: #D4A72C; }
.gp-head { display: flex; align-items: center; gap: .6rem; }
.gp-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); color: var(--accent); font: 700 var(--fs-sm) var(--body); }
.gp-who { flex: 1; display: grid; min-width: 0; }
.gp-who b { font: 600 var(--fs-base) var(--display); }
.gp-who small { font-size: var(--fs-2xs); color: var(--muted); }
.gp-menu { position: relative; }
.gp-menu > summary { list-style: none; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-weight: 700; }
.gp-menu > summary::-webkit-details-marker { display: none; }
.gp-menu-list { position: absolute; right: 0; top: 34px; z-index: 5; min-width: 13rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .3rem; display: grid; }
.gp-menu-list button { appearance: none; width: 100%; border: 0; background: none; text-align: left; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--ink); font: 500 var(--fs-sm) var(--body); cursor: pointer; }
.gp-menu-list button:hover { background: var(--wash); }
.gp-body { font-size: var(--fs-base); line-height: 1.55; overflow-wrap: anywhere; }
.gp-body p { margin: 0 0 .5rem; }
.gp-body p:last-child { margin: 0; }
.gp-verse { margin: 0; }
.gp-checkin { margin: 0; display: grid; gap: .35rem; }
.gp-checkin dt { font: 700 var(--fs-xs) var(--body); color: var(--accent); }
.gp-checkin dd { margin: 0 0 .3rem; font-size: var(--fs-base); line-height: 1.5; white-space: pre-wrap; }
.gp-acts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; }
.gp-pray { appearance: none; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: var(--r-full); padding: .4rem .85rem; font: 700 var(--fs-xs) var(--body); cursor: pointer; }
.gp-pray.on { background: var(--wash); border-color: transparent; }
.gp-pray i { font-style: normal; }
.gp-answer > summary { cursor: pointer; list-style: none; padding: .4rem .85rem; border-radius: var(--r-full); border: 1px solid var(--line); font: 600 var(--fs-xs) var(--body); }
.gp-answer > summary::-webkit-details-marker { display: none; }
.gp-answer form { display: grid; gap: .4rem; margin-top: .5rem; }
.gp-answer textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-md); padding: .5rem .7rem; background: var(--bg); color: var(--ink); font: 400 var(--fs-sm) var(--body); }
.gp-replies { list-style: none; margin: 0; padding: .5rem 0 0 .75rem; border-left: 2px solid var(--line); display: grid; gap: .55rem; }
.gp-replies li { font-size: var(--fs-sm); position: relative; }
.gp-replies li.new b { color: var(--accent); }
.gp-replies b { font: 600 var(--fs-sm) var(--display); }
.gp-replies small { color: var(--muted); font-size: var(--fs-2xs); }
.gp-replies .gp-body { font-size: var(--fs-sm); }
.gp-rdel button { appearance: none; border: 0; background: none; padding: 0; color: var(--muted); font: 500 var(--fs-2xs) var(--body); cursor: pointer; }
.gp-reply { display: flex; gap: .35rem; }
.gp-reply input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-full); padding: .5rem .85rem; background: var(--bg); color: var(--ink); font: 400 var(--fs-sm) var(--body); }
.gp-reply button { appearance: none; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent-fill); color: var(--on-accent-fill); display: grid; place-items: center; cursor: pointer; }
/* read */
.gr-plan { padding: 1.1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .5rem; margin: 0 0 1.25rem; }
.gr-plan-meta { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.gr-today { display: grid; gap: .15rem; padding: .9rem 1rem; border-radius: var(--r-md); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; }
.gr-today-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.gr-today-t { font: 600 var(--fs-lg) var(--display); }
.gr-today-cta { font: 700 var(--fs-xs) var(--body); }
.gr-join { display: grid; gap: .4rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--wash); }
.gr-join[hidden] { display: none; }
.gr-join p { margin: 0; font-size: var(--fs-sm); }
.gr-join .ps-go { margin: 0; max-width: none; }
.gr-progress, .gr-learners, .gr-members { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .4rem; }
.gr-progress li { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; align-items: center; padding: .7rem .9rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.gr-progress li.me { border-color: var(--accent); }
.gr-pname { font: 600 var(--fs-base) var(--display); }
.gr-pbar { grid-column: 1 / -1; grid-row: 2; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.gr-pbar i { display: block; height: 100%; background: var(--spring); border-radius: 3px; }
.gr-pstat { font: 600 var(--fs-xs) var(--body); color: var(--muted); text-align: right; }
.gr-lead { margin: 1rem 0; }
.gr-verse { display: grid; gap: .75rem; margin: 0 0 1.25rem; }
.gr-verse .ps-go { margin: 0; }
.gr-learners li { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font: 600 var(--fs-base) var(--display); }
.gr-lstat { font: 700 var(--fs-xs) var(--body); color: var(--muted); }
.gr-lstat.s-known { color: #0B8A5F; }
.gr-lstat.s-learning { color: var(--accent); }
/* people */
.gr-inviteb { padding: 1.1rem; border-radius: var(--r-lg); background: var(--wash); display: grid; gap: .6rem; margin: 0 0 1.25rem; }
.gr-inviteb .bible-h2 { margin: 0; }
.gr-inviteb .gw-p { font-size: var(--fs-sm); }
.gr-code { display: flex; align-items: baseline; gap: .6rem; }
.gr-code span { font: 700 var(--fs-2xs) var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gr-code b { font: 700 1.4rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.gr-members li { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.gr-mname { flex: 1; display: grid; }
.gr-mname b { font: 600 var(--fs-base) var(--display); }
.gr-mname small { font: 700 var(--fs-2xs) var(--body); color: var(--accent); }
.gr-toggle { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.gr-toggle > span { flex: 1; display: grid; gap: .15rem; }
.gr-toggle b { font: 600 var(--fs-base) var(--display); }
.gr-toggle small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.gr-switch { appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; border: 0; background: var(--surface-2); position: relative; cursor: pointer; }
.gr-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.gr-switch.on { background: var(--accent-fill); }
.gr-switch.on i { left: 23px; }
.gr-danger { color: #B3261E; border-color: rgba(179,38,30,.35); }
[data-theme="dark"] .gr-danger { color: #F2A196; }
.gr-leave { text-align: center; margin-top: 1.5rem; }
.vp-group-share { margin: 0 0 1.5rem; }
/* account */
.ac-head { display: flex; align-items: center; gap: .9rem; margin: 0 0 1rem; }
.ac-avatar { width: 52px; height: 52px; font-size: 1.3rem; }
.ac-name { margin: 0; font: 600 var(--fs-xl) var(--display); }
.ac-email { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.ac-namebox { margin: 0 0 1rem; }
.ac-sync { display: grid; gap: .25rem; padding: 1rem 1.1rem; border-radius: var(--r-lg); background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; }
.ac-sync-k { font: 700 var(--fs-2xs) var(--body); opacity: .8; }
.ac-sync-t { font: 600 var(--fs-lg) var(--display); }
.ac-sync-s { font-size: var(--fs-sm); opacity: .9; line-height: 1.45; }
.ac-sync-cta { font: 700 var(--fs-xs) var(--body); }
.sy-now { display: grid; gap: .5rem; margin: 0 0 1.5rem; }
.sy-now .ps-go { margin: 0; max-width: none; }
.sy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.sy-list:empty { display: none; }
.sy-item { display: flex; justify-content: space-between; padding: .5rem .8rem; border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-sm); }
.sy-item.ok .sy-state { color: #0B8A5F; font-weight: 700; }
.sy-item.bad .sy-state { color: #B3261E; font-weight: 700; }
.sy-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: var(--fs-sm); }
.sy-table th { text-align: left; font-weight: 500; padding: .55rem .85rem; border-top: 1px solid var(--line); }
.sy-table td { text-align: right; padding: .55rem .85rem; border-top: 1px solid var(--line); font-weight: 700; }
.sy-table tr:first-child th, .sy-table tr:first-child td { border-top: 0; }

/* ============================================================
   Bible tab + Study tab, quick jump in the reader
   ============================================================ */
.site-nav a { min-width: 0; }
.site-nav a span { white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
@media (max-width: 400px) { .site-nav { font-size: 10.5px; padding: 0 .2rem; } .site-nav a { padding-left: 0; padding-right: 0; } }
@media (max-width: 350px) { .site-nav { font-size: 9.5px; } .site-nav a .icn, .site-nav a svg { width: 20px; height: 20px; } }
.reader-bar-ref .icn { transition: transform .2s; }
body.qp-open { overflow: hidden; }
.qp { position: fixed; inset: 0; z-index: 60; background: rgba(6, 23, 25, .45); display: flex; align-items: flex-end; justify-content: center; }
.qp[hidden] { display: none; }
.qp-sheet { width: 100%; max-width: 40rem; max-height: 86vh; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; padding: .75rem 1rem calc(1rem + env(safe-area-inset-bottom)); box-sizing: border-box; animation: qpUp .22s ease; }
@keyframes qpUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qp-sheet { animation: none; } }
.qp-top { display: flex; gap: .5rem; align-items: center; }
.qp-search { flex: 1; display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; min-height: 46px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.qp-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 400 var(--fs-base) var(--body); outline: none; }
.qp-close { appearance: none; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.qp-recent { display: flex; gap: .35rem; overflow-x: auto; padding: .7rem 0 .1rem; scrollbar-width: none; }
.qp-recent[hidden] { display: none; }
.qp-recent::-webkit-scrollbar { display: none; }
.qp-chip { appearance: none; flex: none; border: 1px solid var(--line); background: var(--wash); color: var(--accent); border-radius: var(--r-full); padding: .35rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.qp-tabs { display: flex; gap: .25rem; padding: .25rem; margin: .7rem 0 .5rem; border-radius: var(--r-full); background: var(--surface-2); }
.qp-tabs[hidden] { display: none; }
.qp-tabs button { appearance: none; flex: 1; border: 0; background: none; padding: .5rem; border-radius: var(--r-full); color: var(--muted); font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.qp-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.qp-body { overflow-y: auto; overscroll-behavior: contain; padding-top: .35rem; min-height: 12rem; }
.qp-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .35rem; }
.qp-book { appearance: none; text-align: left; padding: .7rem .75rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--fs-sm) var(--body); cursor: pointer; min-height: 44px; }
.qp-book.here { border-color: var(--accent); color: var(--accent); }
.qp-none { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-sm); }
.qp-head { display: flex; align-items: center; gap: .75rem; margin: 0 0 .6rem; }
.qp-head b { font: 600 var(--fs-lg) var(--display); }
.qp-back { appearance: none; border: 0; background: none; color: var(--accent); font: 600 var(--fs-sm) var(--body); cursor: pointer; padding: .4rem 0; }
.qp-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr)); gap: .35rem; }
.qp-ch { display: grid; place-items: center; min-height: 48px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 600 var(--fs-base) var(--body); }
.qp-ch.here { background: var(--accent-fill); color: var(--on-accent-fill); border-color: var(--accent-fill); }
.site-nav a { flex: 1 1 auto; }
@media (max-width: 370px) { .site-nav { font-size: 10px; letter-spacing: -0.01em; gap: 0; } }

/* ---- fixes from the bug sweep ---- */
.mz-path { overflow-x: clip; overflow-clip-margin: 1rem; }
.admin-actions { flex-wrap: wrap; }
@media (max-width: 380px) {
  .reader-bar { gap: .1rem; padding-left: .4rem; padding-right: .4rem; }
  .reader-bar-ref { font-size: 1.02rem; padding-left: .2rem; padding-right: .2rem; min-width: 0; }
  .reader-bar .trans-current { padding-left: .5rem; padding-right: .5rem; }
}
.fl-chip { min-width: 0; }
.fl-grid.small { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.fl-grid.small .fl-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Safety net: long unbroken text people type (a pasted link, "aaaaaaaa…")
   wraps instead of stretching the page sideways. Zero specificity, so any
   component rule still wins. */
main :where(p, li, h1, h2, h3, h4, dd, dt, td, th, blockquote, figcaption, label, summary) { overflow-wrap: anywhere; }
.prayer-author, .admin-row-main, .admin-row-main * { overflow-wrap: anywhere; min-width: 0; }

/* Tick-box agreements on forms (prayer wall name, sign-up). */
.pf-consent { display: flex; align-items: flex-start; gap: .625rem; margin: .875rem 0 .25rem; font-size: var(--fs-sm); line-height: 1.45; cursor: pointer; }
.pf-consent input { width: 1.125rem; height: 1.125rem; margin: .1rem 0 0; flex: none; accent-color: var(--accent); }
.pf-consent a { color: var(--accent); }
.pf-privacy { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; margin: .5rem 0 1rem; }
.pf-privacy a { color: inherit; }

/* Radio buttons and tick-boxes keep their own size; the general
   "form inputs are full width" rule is for text boxes. */
form input[type="radio"], form input[type="checkbox"] { width: auto; flex: none; }

/* Study tab: straight back into the Bible */
.st-continue { margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg, 18px); background: var(--surface); overflow: hidden; }
.st-continue-main { display: flex; align-items: center; gap: .875rem; padding: 1rem 1.125rem; color: var(--ink); text-decoration: none; }
.st-continue-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--accent-soft, var(--surface-2)); color: var(--accent); flex: none; }
.st-continue-body { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.st-continue-body small { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.st-continue-body b { font-family: var(--display); font-size: var(--fs-lg); line-height: 1.2; overflow-wrap: anywhere; }
.st-continue-links { display: flex; border-top: 1px solid var(--line); }
.st-continue-links a { flex: 1; display: flex; align-items: center; justify-content: center; gap: .375rem; padding: .7rem .5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); text-decoration: none; }
.st-continue-links a + a { border-left: 1px solid var(--line); }
.st-tools .lib-tile { min-width: 0; }
.st-glyph { font-family: var(--reading, serif); font-weight: 400; color: var(--accent); margin-right: .15rem; }
.st-tile-words { grid-column: 1 / -1; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.ch-study-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.ch-tool { display: grid; gap: .15rem; padding: .75rem .875rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.ch-tool b { font: 600 var(--fs-sm) var(--display); }
.ch-tool span:last-child { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.bsearch-also { margin: 0 0 1.25rem; }
.bsearch-also-h { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin: 0 0 .5rem; }
.bsearch-also .lib-chip { max-width: 100%; overflow-wrap: anywhere; }
.bsearch-also .lib-chip small { color: var(--muted); font-weight: 600; font-size: var(--fs-2xs, .7rem); }

/* ---------- The app guide ---------- */
.gd-fab {
  position: fixed; right: 1rem; bottom: calc(6rem + env(safe-area-inset-bottom)); z-index: 26;
  display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1rem .7rem .85rem;
  border: 0; border-radius: var(--r-full); background: var(--invert-bg); color: var(--invert-ink);
  font: 600 var(--fs-sm) var(--body); box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer;
}
.gd-fab:active { transform: scale(.96); }
body.gd-open .gd-fab { visibility: hidden; }
.gd { position: fixed; inset: 0; z-index: 60; background: rgba(10, 30, 30, .32); display: flex; align-items: flex-end; justify-content: center; }
.gd[hidden] { display: none; }
.gd-sheet {
  width: 100%; max-width: 34rem; height: min(78vh, 40rem); display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.2); padding-bottom: env(safe-area-inset-bottom);
  animation: gdUp .22s cubic-bezier(.16,1,.3,1);
}
@keyframes gdUp { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gd-sheet { animation: none; } }
.gd-head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .75rem 1.25rem; border-bottom: 1px solid var(--line); }
.gd-head > div { flex: 1; min-width: 0; }
.gd-title { font: 600 var(--fs-md) var(--display); margin: 0; }
.gd-sub { font-size: var(--fs-xs); color: var(--muted); margin: .1rem 0 0; }
.gd-x, .gd-clear { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); cursor: pointer; }
.gd-x { width: 2.25rem; height: 2.25rem; font-size: 1.35rem; line-height: 1; }
.gd-clear { padding: .35rem .75rem; font: 600 var(--fs-xs) var(--body); }
.gd-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: flex; flex-direction: column; gap: .625rem; }
.gd-msg { max-width: 88%; display: grid; gap: .4rem; }
.gd-text { margin: 0; padding: .625rem .875rem; border-radius: 1rem; font-size: var(--fs-base); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.gd-bot { align-self: flex-start; }
.gd-bot .gd-text { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: .35rem; }
.gd-me { align-self: flex-end; }
.gd-me .gd-text { background: var(--invert-bg); color: var(--invert-ink); border-bottom-right-radius: .35rem; }
.gd-link { display: grid; gap: .1rem; padding: .6rem .8rem; border-radius: .875rem; text-decoration: none; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); }
.gd-link b { font-size: var(--fs-sm); color: var(--accent); }
.gd-link b::after { content: " \2192"; }
.gd-link span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.gd-link:active { transform: scale(.98); }
.gd-typing { flex-direction: row; display: flex; gap: .3rem; padding: .8rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; width: max-content; }
.gd-typing span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--muted); animation: gdDot 1s infinite ease-in-out; }
.gd-typing span:nth-child(2) { animation-delay: .15s; } .gd-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes gdDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.gd-chips { display: flex; gap: .4rem; overflow-x: auto; padding: 0 1rem .625rem; scrollbar-width: none; }
.gd-chips[hidden] { display: none; }
.gd-chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full);
  padding: .45rem .8rem; font: 600 var(--fs-xs) var(--body); cursor: pointer; }
.gd-form { display: flex; gap: .4rem; align-items: center; padding: .625rem .75rem .75rem; border-top: 1px solid var(--line); }
form.gd-form .gd-input { flex: 1; min-width: 0; width: auto; font: inherit; font-size: 1rem; padding: .7rem .95rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.gd-mic, .gd-send { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.gd-mic { background: var(--surface-2); color: var(--ink); }
.gd-mic[hidden] { display: none; }
.gd-mic.on { background: #c0392b; color: #fff; animation: gdPulse 1.2s infinite; }
@keyframes gdPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); } 50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } }
.gd-send { background: var(--invert-bg); color: var(--invert-ink); }
@media (min-width: 700px) { .gd { align-items: center; } .gd-sheet { border-radius: 1.25rem; } }

.gd-prompt { display: flex; align-items: center; gap: .625rem; width: 100%; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 500 var(--fs-base) var(--body); text-align: left; cursor: pointer; }
.gd-prompt svg { color: var(--accent); flex: none; }
.gd-prompt span { flex: 1; min-width: 0; }
.gd-prompt small { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; }

/* ---------- Page banners: layered scenes that move with the scroll ---------- */
.sc { position: relative; height: clamp(9.5rem, 34vw, 13.5rem); margin: .25rem 0 1.25rem; border-radius: var(--r-lg, 20px);
  overflow: hidden; isolation: isolate; background: var(--surface-2); box-shadow: var(--shadow-md); }
.sc-art { position: absolute; inset: 0; opacity: var(--sc-fade, 1); }
.sc-layer { position: absolute; left: -2%; width: 104%; top: -12%; height: 124%; will-change: transform; display: block; }
.sc-photo { object-fit: cover; }
.sc::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 24, 25, .55), rgba(6, 24, 25, 0) 55%); }
.sc-line { position: absolute; left: 1rem; right: 1rem; bottom: .85rem; z-index: 2; margin: 0;
  font: 600 var(--fs-md) var(--display); color: #fff; line-height: 1.25; text-shadow: 0 1px 12px rgba(0,0,0,.35); overflow-wrap: anywhere; }
[data-theme="dark"] .sc-art { filter: brightness(.82) saturate(.95); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .sc-art { filter: brightness(.82) saturate(.95); } }

/* Gentle life inside the scenes */
.sc-drift { animation: scDrift 70s linear infinite; }
@keyframes scDrift { from { transform: translateX(-60px); } to { transform: translateX(460px); } }
.sc-twinkle { animation: scTwinkle 3.6s ease-in-out infinite; }
@keyframes scTwinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.sc-pulse { animation: scPulse 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes scPulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.sc-sway { animation: scSway 9s ease-in-out infinite; }
@keyframes scSway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.sc-ripple { animation: scRipple 6s ease-in-out infinite; }
@keyframes scRipple { 0%, 100% { transform: translateX(-6px); opacity: .5; } 50% { transform: translateX(6px); opacity: 1; } }
.sc-glide { animation: scGlide 12s ease-in-out infinite; }
@keyframes scGlide { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -5px); } }
.sc-float { animation: scFloat 10s ease-in-out infinite; transform-box: fill-box; }
@keyframes scFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Thumbnails drift and zoom slightly as they pass through the screen */
.px-thumb { will-change: transform; transform: scale(1.1); transition: transform .08s linear; }

@media (prefers-reduced-motion: reduce) {
  .sc-drift, .sc-twinkle, .sc-pulse, .sc-sway, .sc-ripple, .sc-glide, .sc-float { animation: none !important; }
  .sc-layer, .px-thumb { transform: none !important; }
}
.sc-mini { position: absolute; inset: 0; overflow: hidden; display: block; }
.sc-mini .sc-layer { top: -10%; height: 120%; }
.sermon-row-thumb { position: relative; overflow: hidden; }

/* ---------- Pop-up announcements ---------- */
.pu { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: rgba(6, 24, 25, .45); animation: puFade .2s ease-out; }
@keyframes puFade { from { opacity: 0; } to { opacity: 1; } }
.pu-card { position: relative; width: 100%; max-width: 24rem; max-height: 86vh; overflow-y: auto; border-radius: 1.25rem;
  background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: puUp .28s cubic-bezier(.16,1,.3,1); }
@keyframes puUp { from { transform: translateY(18px) scale(.97); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pu, .pu-card { animation: none; } }
.pu-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pu-body { padding: 1.25rem 1.25rem 1.1rem; }
.pu-title { font: 600 var(--fs-lg) var(--display); margin: 0 2rem .5rem 0; line-height: 1.2; overflow-wrap: anywhere; }
.pu-text { margin: 0 0 1rem; font-size: var(--fs-base); line-height: 1.55; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.pu-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pu-actions .btn-primary { width: auto; margin: 0; }
.pu-x { position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #0B2E2F; font-size: 1.35rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
body.pu-open .gd-fab { visibility: hidden; }

/* ---------- Home shortcuts ---------- */
.hs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.hs-tile { display: grid; gap: .15rem; align-content: start; padding: .8rem .7rem .75rem; min-height: 6.4rem; border-radius: var(--r-md, 14px);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.hs-tile:active { transform: scale(.97); }
.hs-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .7rem; background: var(--wash); color: var(--accent); margin-bottom: .35rem; }
.hs-tile b { font: 600 var(--fs-sm) var(--body); line-height: 1.2; }
.hs-tile small { font-size: var(--fs-2xs, .72rem); color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.hs-main { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-ink); }
.hs-main small { color: var(--invert-muted); }
.hs-main .hs-icon { background: rgba(255,255,255,.12); color: var(--invert-ink); }

/* ---------- 3D Bible world ---------- */
.b3d { position: relative; height: min(68vh, 34rem); border-radius: var(--r-lg, 18px); overflow: hidden; background: var(--surface-2); margin: .5rem 0 .75rem; touch-action: none; }
.b3d-stage, .b3d-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.b3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.b3d-label { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; cursor: pointer; white-space: nowrap;
  padding: .3rem .55rem; border-radius: var(--r-full); font: 600 var(--fs-xs) var(--body); color: #0B2E2F;
  background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.b3d-label::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); }
.b3d-minor { font-weight: 500; opacity: .9; }
.b3d-nolabels .b3d-labels { display: none; }
.b3d-info { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; z-index: 3; padding: .9rem 2.6rem .9rem 1rem; border-radius: var(--r-md);
  background: var(--bg); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); max-height: 55%; overflow-y: auto; }
.b3d-info-t { font: 600 var(--fs-md) var(--display); display: block; margin-bottom: .25rem; }
.b3d-info-p { margin: 0 0 .5rem; font-size: var(--fs-sm); line-height: 1.5; }
.b3d-info-a { font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.b3d-info-x { position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.b3d-nogl-msg { display: none; position: absolute; inset: 0; margin: 0; padding: 2rem; place-items: center; text-align: center; color: var(--muted); }
.b3d-nogl .b3d-nogl-msg { display: grid; }
.b3d-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.b3d-tools button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: .45rem .9rem; font: 600 var(--fs-sm) var(--body); cursor: pointer; }
.b3d-tools button[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); }
.b3d-help { font-size: var(--fs-xs); color: var(--muted); margin: .6rem 0 .25rem; }
.b3d-ref { font-size: var(--fs-sm); margin: 0 0 1rem; }
.b3d-more { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.b3d-credit { font-size: var(--fs-2xs, .72rem); color: var(--muted); }
.b3d-chip { margin: .5rem 0 0; }
.st-tile-3d { background: linear-gradient(135deg, var(--surface), var(--wash)); }

/* ---------- The early church ---------- */
.ef { margin: 0 0 .875rem; padding: .875rem 1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.ef-q { margin: 0 0 .5rem; font-family: var(--reading, Georgia, serif); font-size: var(--fs-base); line-height: 1.6; overflow-wrap: anywhere; }
.ef-by { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.ef-by b { color: var(--ink); }
.ef-by span { display: block; }
.ef-verse { margin: 1.5rem 0 0; }
.ef-verse h2 a { color: inherit; text-decoration: none; }
