/* PathLight — design tokens (matched from the original app) */
:root {
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;

  /* ---- Theme tokens (default theme: Midnight Navy) ----
     A church picks one of 5 named themes (see the Admin "Site Theme" section / THEMES in
     app.js); picking one just swaps a `data-theme="<id>"` attribute on <html>, which the
     [data-theme] blocks below override. Every rule in this file reads from these tokens —
     or from rgba(var(--color-ink-rgb)/--color-primary-rgb), never a hardcoded hex/rgb — so
     a theme switch recolors the whole app at once with no per-page changes needed. */
  --color-background: #f2f5f8;
  --color-foreground: #142033;
  --color-ink-rgb: 20,32,51; /* == --color-foreground as r,g,b, for the rgba() borders/shadows/tints below */
  --color-surface: #fbfcfd;
  --color-card: #fbfcfd;
  --color-card-foreground: #142033;
  --color-muted: #e3eaf1;
  --color-muted-foreground: #5c6b7c;
  --color-primary: #1a2c45;
  --color-primary-rgb: 26,44,69; /* == --color-primary as r,g,b */
  --color-primary-foreground: #f2f5f8;
  --color-secondary: #e3eaf1;
  --color-secondary-foreground: #1a2c45;
  --color-border: #d0dae4;
  --color-input: #d0dae4;
  --color-ring: #1a2c45;
  --color-destructive: #8b3a3a;
  --color-success: #2f6b4f;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-border: 0 0 0 1px rgba(var(--color-ink-rgb),0.07), 0 1px 2px -1px rgba(var(--color-ink-rgb),0.07), 0 2px 4px rgba(var(--color-ink-rgb),0.04);
  --shadow-border-hover: 0 0 0 1px rgba(var(--color-ink-rgb),0.1), 0 1px 2px -1px rgba(var(--color-ink-rgb),0.09), 0 2px 4px rgba(var(--color-ink-rgb),0.06);
  --shadow-bevel: inset 0 1px 0 rgba(255,255,255,0.88), inset 0 -1px 0 rgba(var(--color-primary-rgb),0.14), 0 1px 1px rgba(var(--color-primary-rgb),0.08), 0 8px 20px -8px rgba(var(--color-primary-rgb),0.34), 0 2px 0 rgba(var(--color-primary-rgb),0.12);

  /* Gradients — derived from this theme's two brand tones (dark primary / near-white) so
     every screen reads as one system rather than introducing new colors. The warm gold
     accent glow in --shadow-badge / --shadow-nav-active is kept constant across all 5
     themes on purpose — one shared "family resemblance" trim regardless of main color. */
  --gradient-primary: linear-gradient(155deg, #24406a 0%, #142033 100%);
  --gradient-header: linear-gradient(120deg, #27426e 0%, #1a2c45 55%, #0f1a2a 100%);
  --gradient-card: linear-gradient(165deg, #ffffff 0%, #fbfcfd 55%, #f3f6f9 100%);
  --gradient-badge: linear-gradient(155deg, #2c4870 0%, #142033 100%);
  --gradient-nav-active: linear-gradient(155deg, #3f6199 0%, #1a2c45 100%);
  --gradient-welcome-bg: radial-gradient(120% 85% at 50% 6%, #2d4568 0%, #1a2c45 48%, #0f1a2a 100%);
  --shadow-badge: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -6px 10px rgba(0,0,0,0.22), 0 4px 10px -4px rgba(var(--color-ink-rgb),0.4);
  --shadow-nav-active: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -5px 8px rgba(0,0,0,0.2), 0 0 0 2px rgba(var(--color-primary-rgb),0.12), 0 3px 10px -3px rgba(216,180,110,0.45);
}

/* ---- Alternate themes ----
   Only the brand hue changes between themes (cards stay crisp near-white, and the
   destructive/success semantic colors and the gold accent glow stay constant everywhere
   so error/success and the "family trim" always mean the same thing). */
:root[data-theme="forest"] {
  --color-background: #f1f6f3; --color-foreground: #13271f; --color-ink-rgb: 19,39,31;
  --color-muted: #e0ece5; --color-muted-foreground: #5c7268; --color-card-foreground: #13271f;
  --color-primary: #1a4433; --color-primary-rgb: 26,68,51;
  --color-secondary: #e0ece5; --color-secondary-foreground: #1a4433; --color-ring: #1a4433;
  --color-border: #cfe0d6; --color-input: #cfe0d6;
  --gradient-primary: linear-gradient(155deg, #2d6a4f 0%, #13271f 100%);
  --gradient-header: linear-gradient(120deg, #2f704f 0%, #1a4433 55%, #0c1c15 100%);
  --gradient-badge: linear-gradient(155deg, #337a58 0%, #13271f 100%);
  --gradient-nav-active: linear-gradient(155deg, #4a9370 0%, #1a4433 100%);
  --gradient-welcome-bg: radial-gradient(120% 85% at 50% 6%, #2f6b4d 0%, #1a4433 48%, #0c1c15 100%);
}
:root[data-theme="burgundy"] {
  --color-background: #f8f1f2; --color-foreground: #2a1219; --color-ink-rgb: 42,18,25;
  --color-muted: #efdfe2; --color-muted-foreground: #7c5c62; --color-card-foreground: #2a1219;
  --color-primary: #5c1f2e; --color-primary-rgb: 92,31,46;
  --color-secondary: #efdfe2; --color-secondary-foreground: #5c1f2e; --color-ring: #5c1f2e;
  --color-border: #e0c9ce; --color-input: #e0c9ce;
  --gradient-primary: linear-gradient(155deg, #7d3145 0%, #2a1219 100%);
  --gradient-header: linear-gradient(120deg, #833549 0%, #5c1f2e 55%, #200d13 100%);
  --gradient-badge: linear-gradient(155deg, #8a3b50 0%, #2a1219 100%);
  --gradient-nav-active: linear-gradient(155deg, #a15068 0%, #5c1f2e 100%);
  --gradient-welcome-bg: radial-gradient(120% 85% at 50% 6%, #7a3346 0%, #5c1f2e 48%, #200d13 100%);
}
:root[data-theme="slate"] {
  --color-background: #f3f5f6; --color-foreground: #1c2226; --color-ink-rgb: 28,34,38;
  --color-muted: #e4e9eb; --color-muted-foreground: #626e75; --color-card-foreground: #1c2226;
  --color-primary: #35434c; --color-primary-rgb: 53,67,76;
  --color-secondary: #e4e9eb; --color-secondary-foreground: #35434c; --color-ring: #35434c;
  --color-border: #d3dade; --color-input: #d3dade;
  --gradient-primary: linear-gradient(155deg, #52646e 0%, #1c2226 100%);
  --gradient-header: linear-gradient(120deg, #56676f 0%, #35434c 55%, #161b1e 100%);
  --gradient-badge: linear-gradient(155deg, #5c707a 0%, #1c2226 100%);
  --gradient-nav-active: linear-gradient(155deg, #74848c 0%, #35434c 100%);
  --gradient-welcome-bg: radial-gradient(120% 85% at 50% 6%, #51626b 0%, #35434c 48%, #161b1e 100%);
}
:root[data-theme="charcoal"] {
  --color-background: #f7f4f0; --color-foreground: #241d16; --color-ink-rgb: 36,29,22;
  --color-muted: #ece4da; --color-muted-foreground: #75695b; --color-card-foreground: #241d16;
  --color-primary: #4a3a29; --color-primary-rgb: 74,58,41;
  --color-secondary: #ece4da; --color-secondary-foreground: #4a3a29; --color-ring: #4a3a29;
  --color-border: #ddd0c0; --color-input: #ddd0c0;
  --gradient-primary: linear-gradient(155deg, #6b5439 0%, #241d16 100%);
  --gradient-header: linear-gradient(120deg, #705a3c 0%, #4a3a29 55%, #15100b 100%);
  --gradient-badge: linear-gradient(155deg, #7a6142 0%, #241d16 100%);
  --gradient-nav-active: linear-gradient(155deg, #91744e 0%, #4a3a29 100%);
  --gradient-welcome-bg: radial-gradient(120% 85% at 50% 6%, #6a5338 0%, #4a3a29 48%, #15100b 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100dvh;
}
h1, h2, h3 {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--gradient-header);
  color: var(--color-primary-foreground);
  box-shadow: 0 1px 0 rgba(0,0,0,0.1), 0 10px 24px -18px rgba(0,0,0,0.6);
}
.header-inner {
  max-width: 48rem; margin: 0 auto;
  min-height: 4.5rem; display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5rem 0.75rem; row-gap: 0.4rem;
  padding: 0.6rem 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 6.5rem; flex: 1; }
.brand-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(242,245,248,0.22), 0 4px 14px -5px rgba(0,0,0,0.55), 0 0 16px -5px rgba(216,180,110,0.4);
  flex-shrink: 0; background: rgba(242,245,248,0.05);
}
.brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { min-width: 0; }
.brand-name {
  display: block; font-family: var(--font-serif); font-weight: 600;
  font-size: 1.125rem; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-tagline {
  display: block; font-size: 0.8rem; color: rgba(242,245,248,0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; row-gap: 0.4rem; justify-content: flex-end; flex-shrink: 0; max-width: 100%; }
/* Once the brand + all three header-action pills can no longer share one row (brand has
   already shrunk to its min-width), give header-actions the full row width to itself so ITS
   OWN flex-wrap can lay the pills out on one or two sub-lines within that width, rather than
   the pills overflowing past the right edge of a box that's still sized to fit them unwrapped. */
@media (max-width: 40rem) {
  .header-actions { flex-basis: 100%; }
}
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.75rem; padding: 0 0.9rem; border-radius: 999px;
  border: 1px solid rgba(242,245,248,0.35);
  font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.lang-switch {
  display: inline-flex; align-items: center; height: 2.75rem; padding: 0.15rem;
  border-radius: 999px; border: 1px solid rgba(242,245,248,0.35);
}
.lang-btn {
  height: 2.4rem; min-width: 2.4rem; padding: 0 0.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: rgba(242,245,248,0.75);
}
.lang-btn.active { background: var(--color-primary-foreground); color: var(--color-primary); }
/* Very narrow phones (≤352px, e.g. an older iPhone SE): brand name + the pill buttons +
   language switch don't all fit at their normal size, so trim the header chrome down a bit
   to leave the brand name legible instead of clipped to one letter. */
@media (max-width: 22rem) {
  .header-inner { gap: 0.4rem; }
  .brand-icon { width: 2.1rem; height: 2.1rem; }
  .brand-tagline { display: none; }
  .header-actions .pill-btn { padding: 0 0.55rem; font-size: 0.72rem; }
  .lang-switch .lang-btn { min-width: 1.9rem; padding: 0 0.3rem; }
}

/* "Use This App for Your Ministry" — always the platform signup CTA (see
   PLATFORM_SIGNUP_EMAIL in app.js). Styled as a plain .pill-btn, same size/shape/font as the
   Admin pill right next to it, just wide enough for its own (longer) label — not a big banner
   button. Sits in .header-actions with Admin + the language switch; that row wraps onto its
   own line under the brand (see .header-inner/.header-actions flex-wrap) if all three don't
   fit on very narrow phones, so nothing overflows horizontally. */
.join-cta-btn { gap: 0.4rem; background: rgba(242,245,248,0.14); }
.join-cta-btn:hover { background: rgba(242,245,248,0.22); }
.join-cta-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.join-cta-icon svg { width: 100%; height: 100%; }

/* Share The Gospel! icon (Home hero button + the #/welcome share-prompt card's Share
   button — both call shareStudyLink() in app.js). Sized to sit inline with a .btn's text. */
.share-btn-icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.share-btn-icon svg { width: 100%; height: 100%; }

/* Generic production toast (e.g. "Link copied" when the Web Share API isn't available and
   the invite link is copied to the clipboard instead) — modeled on the preview-only toast
   in build_preview.js, but this one is real and ships with the site. */
.pl-toast {
  position: fixed; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(0.5rem); opacity: 0; pointer-events: none;
  background: var(--color-primary); color: var(--color-primary-foreground);
  padding: 0.65rem 1rem; border-radius: var(--radius-md); font-size: 0.85rem;
  max-width: 88vw; text-align: center; box-shadow: var(--shadow-bevel);
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 100;
}
.pl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Last-resort share fallback (no Web Share API and clipboard write failed/blocked) — a
   selectable link inside the existing .confirm-card dialog pattern. */
.share-link-input {
  width: 100%; margin-top: 0.25rem; padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-foreground); font-size: 0.85rem;
}

/* Main */
.app-main {
  flex: 1; width: 100%; max-width: 48rem; margin: 0 auto;
  padding: 1.25rem 1rem calc(6rem + env(safe-area-inset-bottom));
}

/* Bottom nav */
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 22px -18px rgba(var(--color-ink-rgb),0.35);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav ul {
  max-width: 48rem; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; min-height: 3.5rem; padding: 0.25rem; font-size: 0.7rem; font-weight: 500;
  color: var(--color-muted-foreground);
}
.bottom-nav a.active { color: var(--color-primary); }
.nav-icon {
  width: 2rem; height: 2rem; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-badge); color: var(--color-primary-foreground);
  box-shadow: var(--shadow-badge);
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.nav-icon svg { width: 56%; height: 56%; }
.bottom-nav a.active .nav-icon {
  background: var(--gradient-nav-active);
  box-shadow: var(--shadow-nav-active);
  transform: translateY(-1px);
}

/* Generic building blocks */
.stack { display: flex; flex-direction: column; gap: 2rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  background: var(--gradient-card); color: var(--color-card-foreground);
  border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-border);
  padding: 1.25rem;
}
.tile {
  border-radius: var(--radius-xl); box-shadow: var(--shadow-border);
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.tile:hover { box-shadow: var(--shadow-border-hover); transform: translateY(-2px); }
.tile-icon {
  width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-badge); color: var(--color-primary-foreground);
  box-shadow: var(--shadow-badge);
  transition: transform 150ms ease;
}
.tile-icon svg { width: 52%; height: 52%; }
.tile:hover .tile-icon { transform: scale(1.06); }
.tile-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.tile-desc { margin-top: 0.2rem; font-size: 0.875rem; color: var(--color-muted-foreground); }
.tile-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.75rem; padding: 0 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem; white-space: nowrap;
  transition: transform 100ms ease, filter 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient-primary); color: var(--color-primary-foreground);
  box-shadow: var(--shadow-bevel);
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-outline { border: 1px solid var(--color-border); background: var(--color-surface); }
.btn-ghost { color: var(--color-primary); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (min-width: 640px) { .btn-row { flex-wrap: nowrap; } }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.hero h1 { font-size: 1.75rem; font-weight: 600; white-space: pre-line; }
.hero .ref { margin-top: 0.35rem; font-size: 0.875rem; color: var(--color-muted-foreground); }
.hero .actions { margin-top: 1.5rem; }

.verse-card {
  position: relative; overflow: hidden;
  background: var(--gradient-primary); color: var(--color-primary-foreground);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-bevel);
  padding: 1.25rem;
}
.verse-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 12% -12%, rgba(255,255,255,0.16), transparent 60%);
}
.verse-card > * { position: relative; z-index: 1; }
.verse-card .kicker { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(242,245,248,0.7); }
.verse-card blockquote { margin: 0.75rem 0 0; font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.4; }
.verse-card .ref { margin-top: 0.75rem; font-size: 0.875rem; color: rgba(242,245,248,0.75); }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 600; }
.page-header .subtitle { margin-top: 0.35rem; font-size: 0.9rem; color: var(--color-muted-foreground); }
.back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.875rem; font-weight: 600; color: var(--color-muted-foreground);
  margin-bottom: 0.5rem;
}

/* Footer — logo + ministry line, both centered (icon sits under the text) */
footer.site-footer {
  border-top: 1px solid var(--color-border); padding-top: 1rem; margin-top: 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-align: center;
}
footer.site-footer img { width: 3rem; height: 3rem; border-radius: var(--radius-sm); background: var(--color-card); box-shadow: var(--shadow-border); object-fit: contain; padding: 2px; }
footer.site-footer .ministry-line { font-size: 0.8rem; color: var(--color-muted-foreground); line-height: 1.4; max-width: 22rem; }
footer.site-footer.admin-footer { margin-top: 2.5rem; }
footer.site-footer .admin-feedback-line {
  font-size: 0.75rem; color: var(--color-muted-foreground); line-height: 1.5; max-width: 26rem;
  padding-top: 0.6rem; border-top: 1px solid var(--color-border);
}
footer.site-footer .admin-feedback-line a { color: var(--color-primary); font-weight: 600; }

/* FAQ */
.faq-item {
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-border);
  padding: 1rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; font-family: var(--font-serif);
  font-size: 1.08rem; font-weight: 600; display: flex; justify-content: space-between; gap: 0.75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { color: var(--color-muted-foreground); transition: transform 150ms ease; flex-shrink: 0; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .answer { margin-top: 0.75rem; font-size: 0.95rem; line-height: 1.6; color: rgba(var(--color-ink-rgb),0.9); }

/* Tracts / studies lists */
.list-tile { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.list-tile h2 { font-size: 1.05rem; font-weight: 600; }
.list-tile .go { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; font-weight: 600; color: var(--color-primary); flex-shrink: 0; }
.tract-files { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.tract-file-link { font-size: 0.75rem; font-weight: 600; color: var(--color-primary); text-decoration: underline; }

/* Bible */
.bible-testament-heading {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600;
  margin: 0.5rem 0 -0.25rem;
}
.bible-book-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.6rem;
}
.bible-book-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0.3rem; padding: 0.85rem 0.75rem;
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-md); box-shadow: var(--shadow-border);
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.bible-book-cell:hover { box-shadow: var(--shadow-border-hover); background: var(--color-secondary); transform: translateY(-1px); }
.bible-book-cell .book-name { font-family: var(--font-serif); font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.bible-book-cell .book-tagline {
  font-size: 0.72rem; line-height: 1.3; color: var(--color-muted-foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Topics — seeker questions that jump straight to relevant scripture */
.topics-section { display: flex; flex-direction: column; gap: 0.5rem; }
.topics-kicker {
  margin: 0; padding: 0.85rem 1rem; border-radius: var(--radius-lg);
  background: var(--color-muted); font-family: var(--font-serif); font-style: italic;
  font-size: 0.95rem; line-height: 1.5; color: var(--color-card-foreground);
}
.topics-kicker-ref { display: block; margin-top: 0.35rem; font-style: normal; font-size: 0.8rem; color: var(--color-muted-foreground); }
.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.topic-btn {
  display: block; background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-border);
  padding: 0.85rem 1rem; font-family: var(--font-serif); font-weight: 600; font-size: 0.9rem; line-height: 1.3;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.topic-btn:hover { box-shadow: var(--shadow-border-hover); background: var(--color-secondary); transform: translateY(-1px); }
.topic-blurb { line-height: 1.65; font-size: 1rem; }
.topic-verse-card { display: flex; flex-direction: column; gap: 0.4rem; }
.topic-verse-ref { font-family: var(--font-serif); font-weight: 600; color: var(--color-primary); font-size: 0.9rem; }
.topic-verse-text { font-family: var(--font-serif); line-height: 1.6; font-size: 1rem; }
.topic-help-card { text-align: left; }
.topic-help-card .actions { margin-top: 0.75rem; }
.bible-chapter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: 0.6rem;
}
.bible-chapter-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-md); box-shadow: var(--shadow-border);
  font-weight: 600; font-family: var(--font-serif);
}
.bible-chapter-cell:hover { box-shadow: var(--shadow-border-hover); background: var(--color-secondary); }
.bible-reader-card { min-height: 8rem; }
.bible-loading { color: var(--color-muted-foreground); text-align: center; padding: 1.5rem 0; }
.bible-passage {
  font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.85; color: var(--color-card-foreground);
}
.btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.bible-vnum {
  font-family: var(--font-sans); font-weight: 700; color: var(--color-primary);
  font-size: 0.7rem; margin-right: 0.15rem; vertical-align: super;
}

/* Admin dashboard (design preview) */
.admin-preview-note {
  background: var(--color-muted); color: var(--color-secondary-foreground);
  border-radius: var(--radius-md); padding: 0.75rem 1rem; font-size: 0.85rem; line-height: 1.5;
}
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.75rem; }
.admin-stat-tile {
  position: relative;
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-border);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.admin-stat-n { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-stat-label { font-size: 0.78rem; color: var(--color-muted-foreground); }
.admin-stat-reset {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font-size: 0.65rem; font-weight: 600; color: var(--color-muted-foreground);
  background: transparent; border: none; padding: 0.2rem 0.5rem; border-radius: 999px;
  cursor: pointer; transition: background 120ms ease, color 120ms ease;
}
.admin-stat-reset:hover { background: var(--color-muted); color: var(--color-primary); }
.admin-stat-reset:active { transform: scale(0.95); }
.admin-engage-row {
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-md); box-shadow: var(--shadow-border);
  padding: 0.85rem 1rem;
}
.admin-engage-head { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; margin-bottom: 0.5rem; }
.admin-engage-right { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.admin-engage-counts { color: var(--color-muted-foreground); font-variant-numeric: tabular-nums; }
.admin-engage-reset {
  font-size: 0.65rem; font-weight: 600; color: var(--color-muted-foreground);
  background: transparent; border: none; padding: 0.15rem 0.5rem; border-radius: 999px;
  cursor: pointer; transition: background 120ms ease, color 120ms ease; flex-shrink: 0;
}
.admin-engage-reset:hover { background: var(--color-muted); color: var(--color-primary); }
.admin-engage-reset:active { transform: scale(0.95); }
.admin-activity-card { padding: 0.25rem 1.25rem; }
.admin-activity-row {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border); font-size: 0.88rem;
}
.admin-activity-row:last-child { border-bottom: none; }
.admin-activity-dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; flex-shrink: 0; }
.admin-activity-contact { background: var(--color-primary); }
.admin-activity-study { background: var(--color-success); }
.admin-activity-gp { background: #a8853f; }
.admin-activity-text { flex: 1; }
.admin-activity-when { color: var(--color-muted-foreground); font-size: 0.78rem; flex-shrink: 0; }

/* Site Theme picker (Admin — foundation for the future per-tenant theme setting) */
.theme-swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.75rem; }
.theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  padding: 0.9rem 0.6rem; border-radius: var(--radius-lg);
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05); box-shadow: var(--shadow-border);
  font-size: 0.78rem; font-weight: 600; text-align: center; line-height: 1.3;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.theme-swatch:hover { box-shadow: var(--shadow-border-hover); transform: translateY(-1px); }
.theme-swatch.active { box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-border-hover); }
.theme-swatch-dot { width: 2.5rem; height: 2.5rem; border-radius: 999px; box-shadow: var(--shadow-bevel); flex-shrink: 0; }

.study-progress { font-size: 0.85rem; color: var(--color-muted-foreground); margin-bottom: 0.5rem; }
.progress-track { height: 6px; border-radius: 999px; background: var(--color-muted); overflow: hidden; margin-bottom: 1.25rem; }
.progress-fill { height: 100%; background: var(--gradient-primary); border-radius: 999px; }
.study-list-item {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-border);
  padding: 0.9rem 1rem; transition: box-shadow 150ms ease, transform 150ms ease;
}
.study-list-item:hover { box-shadow: var(--shadow-border-hover); transform: translateY(-1px); }
.study-num {
  width: 2.25rem; height: 2.25rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--color-muted); color: var(--color-muted-foreground); font-weight: 700; flex-shrink: 0; font-size: 0.9rem;
}
.study-list-item.done .study-num { background: var(--gradient-primary); color: var(--color-primary-foreground); }
.study-list-item.locked { opacity: 0.55; }
.study-list-item .title { font-weight: 600; }

/* Study reader */
.study-block-p { line-height: 1.7; margin-bottom: 0.9rem; }
.study-block-h { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.6rem; }
.blank-verse {
  background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-border);
  padding: 1rem; margin: 1rem 0;
}
.blank-verse .ref { font-size: 0.75rem; font-weight: 600; color: var(--color-muted-foreground); margin-bottom: 0.5rem; }
.blank-verse .verse-text { line-height: 1.6; }
.blank-input {
  display: inline-block; min-width: 5rem; border: none; border-bottom: 2px solid var(--color-primary);
  background: transparent; font: inherit; padding: 0 0.25rem; color: var(--color-primary); font-weight: 600;
}
.blank-input.correct { border-color: var(--color-success); color: var(--color-success); }
.blank-input.incorrect { border-color: var(--color-destructive); color: var(--color-destructive); }
.blank-feedback { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 600; }
.blank-feedback.correct { color: var(--color-success); }
.blank-feedback.incorrect { color: var(--color-destructive); }
.study-nav-row { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
/* Guards against horizontal overflow on very narrow phones, where "Previous Chapter" /
   "Next Chapter" labels at the default padding can be wider than half the viewport. */
@media (max-width: 380px) {
  .study-nav-row .btn { padding: 0 0.7rem; font-size: 0.82rem; }
}
.page-dots { display: flex; gap: 0.35rem; justify-content: center; margin: 1rem 0; }
.page-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--color-border); }
.page-dots span.active { background: var(--color-primary); }

/* Contact form */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field textarea {
  border: 1px solid var(--color-input); border-radius: var(--radius-sm);
  background: var(--color-surface); padding: 0.6rem 0.75rem; font: inherit; color: inherit;
}
.field textarea { resize: vertical; min-height: 6rem; }
.form-note { font-size: 0.85rem; color: var(--color-muted-foreground); margin-top: 0.5rem; }
.form-note.error { color: var(--color-destructive); font-weight: 600; }

/* "Use This App for Your Ministry" signup modal — reuses .confirm-overlay for the backdrop */
.join-card {
  max-width: 26rem; width: 100%; background: var(--gradient-card); color: var(--color-card-foreground);
  border-radius: var(--radius-xl); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.45); padding: 1.5rem;
  max-height: 90vh; overflow-y: auto;
}
.join-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.join-card > p { font-size: 0.88rem; line-height: 1.55; color: var(--color-muted-foreground); margin-bottom: 1.1rem; }
.join-success-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 999px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary); color: var(--color-primary-foreground); box-shadow: var(--shadow-bevel);
}
.join-success-icon svg { width: 55%; height: 55%; }

/* Admin login modal — reuses .confirm-overlay for the backdrop, styled like .join-card/.confirm-card */
.login-card {
  max-width: 24rem; width: 100%; background: var(--gradient-card); color: var(--color-card-foreground);
  border-radius: var(--radius-xl); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.45); padding: 1.5rem;
  max-height: 90vh; overflow-y: auto;
}
.login-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.login-card > p { font-size: 0.88rem; line-height: 1.55; color: var(--color-muted-foreground); margin-bottom: 1.1rem; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: #ffffff; color: #142033; border: 1px solid var(--color-border);
  box-shadow: none;
}
.google-btn:hover { filter: brightness(0.97); }
.login-divider {
  display: flex; align-items: center; text-align: center; gap: 0.75rem;
  margin: 1.1rem 0; font-size: 0.78rem; color: var(--color-muted-foreground); text-transform: uppercase; letter-spacing: 0.04em;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--color-border);
}

/* Review Their Site (Ministry Accounts detail) */
.review-site-note { font-size: 0.85rem; line-height: 1.55; color: var(--color-muted-foreground); }

/* Placeholder / coming soon */
.coming-soon { text-align: center; padding: 2.5rem 1rem; color: var(--color-muted-foreground); }

.admin-page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.admin-page-header h1 { flex-shrink: 0; }

/* Visitor landing page (#/welcome) — a standalone splash, no app chrome, for someone
   arriving from a tract QR code or an ad link, distinct from the normal in-app Home. */
body.landing-page .site-header,
body.landing-page .bottom-nav { display: none; }
body.landing-page .app-main { padding: 0; max-width: none; }

.welcome-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--gradient-welcome-bg);
  color: var(--color-primary-foreground);
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
}
.welcome-btn-primary {
  background: linear-gradient(180deg, #ffffff 0%, var(--color-primary-foreground) 100%);
  color: var(--color-primary); box-shadow: var(--shadow-bevel);
}
.welcome-btn-primary:hover { filter: brightness(0.97); }

/* Loading splash — plays once each time a visitor lands on #/welcome */
.welcome-loading { position: relative; align-items: center; justify-content: center; }
.welcome-loading-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.welcome-loading-icon-wrap {
  width: 6.5rem; height: 6.5rem; border-radius: 999px; overflow: hidden;
  animation: pl-flicker 3.5s ease-in-out 1 forwards;
}
.welcome-loading-icon { width: 100%; height: 100%; object-fit: cover; }
.welcome-loading-path { width: 3.1rem; height: 3.7rem; margin-top: -0.35rem; opacity: 0; }
.welcome-loading-path svg { width: 100%; height: 100%; overflow: visible; }
.welcome-loading-path-line {
  stroke: rgba(242,245,248,0.95); stroke-width: 1.4; stroke-linecap: round; fill: none;
}
.welcome-loading-path-fill { fill: url(#wlPathFill); stroke: none; }
.welcome-loading-path { animation: pl-flicker-path 3.5s ease-in-out 1 forwards; }
.welcome-loading-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.7rem; letter-spacing: 0.02em; }
.welcome-loading-tagline { font-size: 1.05rem; color: rgba(242,245,248,0.7); }
/* One-shot (not looping): the lamp flashes a few times, then on roughly the third flash it
   settles bright and stays that way for the rest of the ~3.5s loading window (matches
   WELCOME_LOADING_MS in app.js — keep both in sync if either changes). */
@keyframes pl-flicker {
  0% { opacity: 0.2; filter: drop-shadow(0 0 2px rgba(242,245,248,0.1)); }
  6% { opacity: 1; filter: drop-shadow(0 0 18px rgba(242,245,248,0.6)); }
  12% { opacity: 0.22; filter: drop-shadow(0 0 2px rgba(242,245,248,0.1)); }
  22% { opacity: 1; filter: drop-shadow(0 0 18px rgba(242,245,248,0.6)); }
  28% { opacity: 0.25; filter: drop-shadow(0 0 2px rgba(242,245,248,0.1)); }
  40%, 100% { opacity: 1; filter: drop-shadow(0 0 18px rgba(242,245,248,0.6)); }
}
/* Kept on the same timeline as pl-flicker above: hidden by default, briefly visible with
   each of the lamp's first flashes, then — once the lamp settles bright at 40% — stays
   visible for good, right along with it. */
@keyframes pl-flicker-path {
  0% { opacity: 0; }
  4% { opacity: 0; }
  6% { opacity: 1; }
  8% { opacity: 0; }
  20% { opacity: 0; }
  22% { opacity: 1; }
  24% { opacity: 0; }
  38% { opacity: 0; }
  40%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-loading-icon-wrap { animation: none; }
  .welcome-loading-path { animation: none; opacity: 1; }
}

/* Interactive study — one question at a time, each replacing the last */
.welcome-study { justify-content: center; }
.welcome-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.5rem; }
.welcome-exit { font-size: 0.95rem; font-weight: 600; color: rgba(242,245,248,0.8); }
.welcome-loading .welcome-exit { position: absolute; top: 1.5rem; left: 1.25rem; }
.welcome-lang {
  display: inline-flex; align-items: center; padding: 0.15rem;
  border-radius: 999px; border: 1px solid rgba(242,245,248,0.35);
}
.welcome-lang .lang-btn {
  height: 2.4rem; min-width: 2.4rem; padding: 0 0.65rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: rgba(242,245,248,0.75);
}
.welcome-lang .lang-btn.active { background: var(--color-primary-foreground); color: var(--color-primary); }
.dialogue-card {
  max-width: 27rem; margin: 0 auto; width: 100%;
  background: linear-gradient(165deg, rgba(242,245,248,0.09), rgba(242,245,248,0.02));
  border: 1px solid rgba(242,245,248,0.14);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.35rem;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.5);
  opacity: 1; transform: translateY(0) scale(1);
  transition: opacity 260ms ease, transform 260ms ease;
}
.dialogue-card.entering { opacity: 0; transform: translateY(10px) scale(0.98); }
.dialogue-card.leaving { opacity: 0; transform: translateY(-10px) scale(0.98); }
.dialogue-prompt {
  font-family: var(--font-serif); font-size: clamp(1.4rem, 5.2vw, 1.65rem); line-height: 1.4; font-weight: 600;
  text-align: center; margin-bottom: 1.5rem;
}
.dialogue-options { display: flex; flex-direction: column; gap: 0.7rem; }
.dialogue-option {
  display: block; width: 100%; text-align: left; padding: 1rem 1.15rem; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(242,245,248,0.13), rgba(242,245,248,0.05));
  border: 1px solid rgba(242,245,248,0.25);
  font-size: 1.04rem; line-height: 1.45; color: var(--color-primary-foreground);
  transition: background 150ms ease, border-color 150ms ease;
}
.dialogue-option:hover { background: linear-gradient(180deg, rgba(242,245,248,0.2), rgba(242,245,248,0.09)); }
.dialogue-option.selected {
  background: linear-gradient(180deg, #ffffff, var(--color-primary-foreground));
  color: var(--color-primary); border-color: transparent; font-weight: 600;
}
.dialogue-feedback {
  margin-top: 1.25rem; padding: 1.1rem; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(242,245,248,0.15), rgba(242,245,248,0.05));
  font-size: 1.02rem; line-height: 1.6;
  color: rgba(242,245,248,0.94);
}
.dialogue-verse {
  margin: 1rem 0 0; padding: 0.9rem 1.1rem; border-left: 3px solid rgba(242,245,248,0.45);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: linear-gradient(90deg, rgba(242,245,248,0.08), rgba(242,245,248,0));
  font-family: var(--font-serif); font-style: italic; font-size: 1.08rem; line-height: 1.55;
}
.dialogue-verse cite { display: block; margin-top: 0.5rem; font-style: normal; font-size: 0.82rem; color: rgba(242,245,248,0.7); }
.dialogue-card > .btn { margin-top: 1.5rem; min-height: 3.15rem; font-size: 1.02rem; width: 100%; }
.welcome-closing-links { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.welcome-closing-links .btn-outline { background: transparent; border-color: rgba(242,245,248,0.4); color: var(--color-primary-foreground); }
.welcome-closing-links .btn { min-height: 3.1rem; font-size: 1rem; }
.welcome-restart {
  display: block; margin: 1.5rem auto 0; font-size: 0.82rem; color: rgba(242,245,248,0.6);
  text-decoration: underline; text-underline-offset: 2px;
}

@media print {
  .site-header, .bottom-nav { display: none; }
}

/* ---------- Ministry Accounts (master-admin) ---------- */
.admin-accounts-link { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tenant-pending-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem;
  padding: 0 0.4rem; border-radius: 999px; background: var(--color-destructive); color: #fff;
  font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.tenant-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.9rem 1.1rem; background: var(--gradient-card); border: 1px solid rgba(var(--color-ink-rgb),0.05);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-border);
}
.tenant-row:hover { box-shadow: var(--shadow-border-hover); transform: translateY(-1px); }
.tenant-row-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.tenant-row-church { font-weight: 600; }
.tenant-row-sub { font-size: 0.8rem; color: var(--color-muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-status {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.3rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.tenant-status-pending { background: rgba(168,133,63,0.16); color: #8a6d1f; }
.tenant-status-active { background: rgba(47,107,79,0.14); color: var(--color-success); }
.tenant-status-offline { background: var(--color-muted); color: var(--color-muted-foreground); }
.tenant-status-rejected, .tenant-status-banned { background: rgba(139,58,58,0.14); color: var(--color-destructive); }
.tenant-detail-card { display: flex; flex-direction: column; gap: 0.85rem; }
.tenant-field { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.tenant-field-label { color: var(--color-muted-foreground); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; flex-shrink: 0; }
.btn-danger { background: var(--color-destructive); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }

/* Simple confirm dialog — replaces native window.confirm() for every destructive Admin action */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(15,26,42,0.55); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
.confirm-card {
  max-width: 24rem; width: 100%; background: var(--gradient-card); color: var(--color-card-foreground);
  border-radius: var(--radius-xl); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.45); padding: 1.5rem;
}
.confirm-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
.confirm-card p { font-size: 0.92rem; line-height: 1.55; color: var(--color-muted-foreground); }
.confirm-actions { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.confirm-actions .btn { flex: 1; }

/* ---------- QR code (Admin) ---------- */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center; padding: 1.5rem 1.25rem; }
.qr-image { width: 12rem; height: 12rem; image-rendering: pixelated; border-radius: var(--radius-md); background: #fff; padding: 0.6rem; box-shadow: var(--shadow-border); }
.qr-link-label { font-size: 0.8rem; color: var(--color-muted-foreground); word-break: break-all; }
.qr-link-label span { font-weight: 600; color: var(--color-card-foreground); }

/* Print-friendly QR: clicking "Print QR Code" adds .printing-qr to <body> just for the
   print pass (removed again on the browser's afterprint event — see app.js) so only the
   QR card itself ends up on paper, not the rest of the Admin dashboard. */
@media print {
  body.printing-qr .app-shell > *:not(.app-main) { display: none !important; }
  body.printing-qr #app > .stack > *:not(#qr-print-card) { display: none !important; }
  body.printing-qr #qr-print-card { box-shadow: none; border: none; padding: 2rem 0; }
  body.printing-qr .qr-print-hide { display: none !important; }
  body.printing-qr .qr-image { width: 16rem; height: 16rem; }
}

/* ---------- Edit Site Content (Admin) ---------- */
.edit-hub-note { font-size: 0.85rem; line-height: 1.55; color: var(--color-muted-foreground); padding: 0 0.25rem; }
.edit-hub-badge {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 0.5rem;
  padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  background: rgba(47,107,79,0.14); color: var(--color-success);
}
.edit-card { display: flex; flex-direction: column; gap: 0.75rem; }
.edit-step-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted-foreground); }
.edit-field { display: flex; flex-direction: column; gap: 0.3rem; }
.edit-field label { font-size: 0.78rem; font-weight: 600; color: var(--color-muted-foreground); }
.edit-field textarea, .edit-field input[type="text"] {
  border: 1px solid var(--color-input); border-radius: var(--radius-sm);
  background: var(--color-surface); padding: 0.6rem 0.75rem; font: inherit; color: inherit;
  resize: vertical; min-height: 4.5rem; line-height: 1.5; width: 100%; box-sizing: border-box;
}
.edit-field input[type="text"] { min-height: 0; resize: none; }
.edit-option-block {
  border-top: 1px solid var(--color-border); padding-top: 0.75rem; margin-top: 0.25rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.edit-option-heading { font-size: 0.85rem; font-weight: 700; color: var(--color-primary); }
.edit-checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; }
.edit-checkbox input { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.edit-verse-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.edit-verse-row input {
  border: 1px solid var(--color-input); border-radius: var(--radius-sm);
  background: var(--color-surface); padding: 0.5rem 0.6rem; font: inherit; color: inherit;
}
.edit-verse-book { width: 4.5rem; text-transform: uppercase; }
.edit-verse-num { width: 3.5rem; }
.edit-actions { margin-top: 0.25rem; }
.edit-ref-display { font-size: 0.8rem; color: var(--color-muted-foreground); font-weight: 600; }
.edit-section-link { display: flex; align-items: center; justify-content: space-between; }
