/* ==========================================================================
   Bahir — Tewahedo Reader · v2 design system
   Visual language adapted from EOTC Open Source (github.com/EOTCOpenSource):
   deep liturgical maroon, warm cream neutrals, restrained gold, Playfair
   serif display + Noto Sans Ethiopic. Editorial, premium, reverent.
   ========================================================================== */

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

:root {
  /* Maroon (primary) */
  --maroon-900: #3a0a0b;
  --maroon-800: #4c0e0f;
  --maroon-600: #621b1c;
  --maroon-400: #8a3a36;
  --blush:      #fbf6f6;

  /* White + maroon */
  --cream:      #ffffff;
  --cream-2:    #ffffff;
  --cream-3:    #ece8e8;
  --ink:        #241f1e;
  --ink-2:      #6b5b58;

  /* Gold (accent, used sparingly) */
  --gold:       #c8a84b;
  --gold-soft:  #ffe062;
  --gold-line:  #e7d9a8;

  /* Roles */
  --role-priest: #621b1c;
  --role-deacon: #2a4d6e;
  --role-people: #392d2d;
  --role-reader: #2f6140;
  --role-rubric: #a9803a;

  --maxw: 720px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(58,10,11,0.06), 0 1px 3px rgba(58,10,11,0.05);
  --shadow:    0 6px 24px rgba(58,10,11,0.10);
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ethiopic: 'Noto Serif Ethiopic', 'Noto Sans Ethiopic', serif;
}

[data-theme="night"] {
  --cream:   #171312;
  --cream-2: #1f1917;
  --cream-3: #271f1d;
  --ink:     #f3ece1;
  --ink-2:   #b6a89f;
  --blush:   #2a1a18;
  --maroon-800: #d98a82;
  --maroon-600: #c97a72;
  --gold:    #e3c674;
  --shadow:  0 6px 28px rgba(0,0,0,0.55);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.lang-ethiopic { font-family: var(--ethiopic); }

/* ---------- Header ---------- */
header.app-bar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-900));
  color: var(--cream);
  box-shadow: 0 2px 18px rgba(58,10,11,0.28);
}
.app-bar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
}
.crest {
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center;
}
.crest img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark .name {
  font-family: var(--display); font-size: 1.7rem; font-weight: 700;
  color: var(--cream); letter-spacing: 0.3px;
}
.wordmark .sub { font-size: 0.72rem; color: #e9c9c3; letter-spacing: 0.3px; margin-top: 2px; }
.wordmark .sub .gez { font-family: var(--ethiopic); color: var(--gold-soft); }
.theme-toggle {
  margin-left: auto; background: rgba(255,255,255,0.10); color: var(--cream);
  border: 1px solid rgba(255,224,98,0.4); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-family: var(--sans); font-size: 0.82rem;
}
.theme-toggle:hover { background: rgba(255,255,255,0.18); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 96px; }

/* ---------- Today (hero) ---------- */
.today {
  position: relative;
  background: linear-gradient(135deg, var(--maroon-800), var(--maroon-600));
  color: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  overflow: hidden;
  margin-bottom: 22px;
}
.today::after {
  content: ""; position: absolute; right: -40px; top: -30px;
  width: 200px; height: 200px;
  background: url("../icons/processional-cross.png") center/contain no-repeat;
  opacity: 0.14; transform: rotate(8deg); pointer-events: none;
}
.today .kicker { font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); }
.today .eth-date { font-family: var(--display); font-size: 2.1rem; font-weight: 700; margin: 4px 0 2px; }
.today .eth-date .gez { font-family: var(--ethiopic); }
.today .greg-date { font-size: 0.86rem; color: #eccfc9; }
.today .feast {
  font-family: var(--display); font-style: italic; font-size: 1.18rem;
  margin: 14px 0 12px; padding-left: 14px; border-left: 3px solid var(--gold-soft);
}
.today .chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-fast {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.14); color: var(--cream);
  padding: 5px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid rgba(255,224,98,0.35);
}
.chip-fast.none { background: rgba(255,224,98,0.18); }
.today .meta { font-size: 0.8rem; color: #e4c3bd; margin-top: 10px; }

/* ---------- Toolbar ---------- */
.toolbar { display: grid; gap: 14px; margin-bottom: 22px; }
.group-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--cream-3); background: var(--cream);
  color: var(--ink); padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 0.85rem; box-shadow: var(--shadow-sm);
  transition: all .14s ease;
}
.chip:hover { border-color: var(--gold-line); }
.chip[aria-pressed="true"] {
  background: var(--maroon-800); color: var(--cream); border-color: var(--maroon-800);
  font-weight: 600;
}
.chip .gez { font-family: var(--ethiopic); }

/* ---------- Document ---------- */
.doc { background: var(--cream); border: 1px solid var(--cream-3);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.doc-head { text-align: center; padding: 26px 20px 18px; background: var(--blush);
  border-bottom: 1px solid var(--cream-3); }
.doc-head .gez { font-family: var(--ethiopic); font-size: 1.7rem; font-weight: 700; color: var(--maroon-800); }
.doc-head .latin { font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--ink-2); margin-top: 4px; }
.review-flag {
  margin: 14px 18px 0; padding: 9px 13px; border-radius: 10px;
  background: var(--secondary-200, #fff6d2); border: 1px solid var(--gold-line);
  color: #876326; font-size: 0.76rem; display: flex; gap: 8px;
}
.section { padding: 8px 18px 14px; }
.section-heading {
  text-align: center; font-family: var(--display); color: var(--maroon-600);
  font-size: 1.05rem; margin: 18px 0 10px; position: relative;
}
.section-heading::after { content: "✦"; display: block; color: var(--gold); font-size: 0.7rem; margin-top: 4px; }

.line { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 4px;
  border-bottom: 1px solid var(--cream-3); }
.line:last-child { border-bottom: none; }
.role-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; padding-top: 3px; }
.role-tag small { display: block; font-family: var(--ethiopic); font-weight: 400; opacity: 0.7; letter-spacing: 0; font-size: 0.85em; }
.line.rubric { background: var(--blush); border-radius: 8px; }
.line.rubric .langs { color: var(--maroon-600); font-style: italic; }
.langs { display: grid; gap: 5px; }
.langs .secondary { color: var(--ink-2); }
/* Ge'ez & Amharic (Ethiopic) always render in maroon */
.langs .ln-gez, .langs .ln-am,
.langs .ln-gez.secondary, .langs .ln-am.secondary {
  font-family: var(--ethiopic); font-size: 1.18em; line-height: 1.95;
  color: var(--maroon-800); font-weight: 500;
}

footer.foot { text-align: center; color: var(--ink-2); font-size: 0.78rem; padding: 30px 18px 0; }
footer.foot .gez { font-family: var(--ethiopic); color: var(--maroon-600); font-size: 1.1rem; display: block; margin-bottom: 4px; }

/* ---------- Content Library (home grid) ---------- */
.library { margin-top: 6px; }
.library-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 16px; }
.library-head h2 { font-family: var(--display); font-size: 1.5rem; color: var(--maroon-800); margin: 0; }
.lib-sub { font-family: var(--ethiopic); color: var(--gold); font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lib-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; padding: 0; font-family: var(--sans);
}
.tile-face {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 16px;
  background: var(--maroon-900); box-shadow: var(--shadow);
  border: 2px solid var(--gold-line);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-tile:active .tile-face { transform: scale(0.96); }
.lib-tile:hover .tile-face { border-color: var(--gold-soft); box-shadow: 0 8px 26px rgba(58,10,11,0.18); }
.lib-tile.ready .tile-face { border-color: var(--gold-soft); }
.tile-label { font-size: 0.84rem; font-weight: 600; color: var(--ink); text-align: center; }
.tile-gez { font-family: var(--ethiopic); font-size: 0.82rem; color: var(--maroon-600); margin-top: -3px; }

/* ---------- Reader view ---------- */
.back-btn {
  background: var(--cream); border: 1px solid var(--cream-3); color: var(--maroon-800);
  border-radius: 999px; padding: 9px 18px; font-family: var(--sans); font-weight: 600;
  cursor: pointer; margin-bottom: 16px; box-shadow: var(--shadow-sm); font-size: 0.9rem;
}
.back-btn:hover { background: var(--blush); border-color: var(--gold-line); }

[hidden] { display: none !important; }

/* ---------- v3: header presence + Church Season banner ---------- */
header.app-bar {
  background:
    radial-gradient(130% 150% at 12% -30%, rgba(255,224,98,0.14), transparent 55%),
    linear-gradient(135deg, #5c1314, var(--maroon-900));
  box-shadow: 0 4px 24px rgba(58,10,11,0.38);
}
header.app-bar::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 18%, var(--gold) 50%, var(--gold-soft) 82%, transparent);
}
.app-bar-inner { position: relative; padding: 18px 18px; }
.app-bar-inner::before {
  content: ""; position: absolute; right: 92px; top: 50%;
  transform: translateY(-50%) rotate(7deg);
  width: 130px; height: 130px;
  background: url("../icons/processional-cross.png") center/contain no-repeat;
  opacity: 0.16; pointer-events: none;
}
.crest { width: 58px; height: 58px; position: relative; }
.crest::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,224,98,0.28), transparent 68%); z-index: 0;
}
.crest img { position: relative; z-index: 1; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }
.wordmark .name { font-size: 1.85rem; letter-spacing: 0.4px; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.wordmark .sub { font-size: 0.74rem; letter-spacing: 0.6px; color: #ecc8c2; }

/* Church Season banner — readable to an English speaker */
.today .kicker { font-size: 0.72rem; letter-spacing: 2.5px; }
.today .season { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1.12; margin: 6px 0 2px; }
.today .season-gez { font-family: var(--ethiopic); color: var(--gold-soft); font-size: 1.1rem; margin-bottom: 14px; }
.today .dayline {
  font-family: var(--display); font-style: italic; font-size: 1.16rem; color: #f6ddd8;
  padding-left: 14px; border-left: 3px solid var(--gold-soft); margin-bottom: 14px;
}
.today .dates { font-size: 0.9rem; color: #f0d3cd; margin-bottom: 12px; line-height: 1.5; }
.today .dates .dot { margin: 0 9px; color: var(--gold-soft); }
.today .dates .muted { color: #d9b3ac; font-size: 0.85em; }

/* ---------- v4: rotating season image + masthead refinement ---------- */
.wordmark .name { display: flex; align-items: baseline; gap: 6px; }
.wordmark .name-gez { font-family: var(--ethiopic); font-size: 1.05rem; color: var(--gold-soft); font-weight: 400; }
.wordmark .eminence { font-size: 0.68rem; color: #e7c9a6; letter-spacing: 0.4px; margin-top: 4px; font-style: italic; }

/* Masthead ornamental gold band (generated Aksumite filigree) */
header.app-bar::after {
  height: 20px; opacity: 1;
  background: url("../icons/header-band.webp") center/auto 100% repeat-x;
}

/* Church Season — framed rotating icon beside the text */
.season-body { display: flex; gap: 16px; align-items: flex-start; }
.season-figure {
  margin: 0; flex: none; width: 118px; height: 118px;
  border-radius: 12px; overflow: hidden;
  border: 2px solid var(--gold-soft);
  box-shadow: 0 5px 16px rgba(0,0,0,0.4);
  background: var(--maroon-900);
}
.season-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.season-text { min-width: 0; flex: 1; }
.today .season { font-size: 1.7rem; margin-top: 0; }
.today .season-text .dates { margin-bottom: 10px; }

@media (max-width: 470px) {
  .season-body { gap: 13px; }
  .season-figure { width: 94px; height: 94px; }
  .today .season { font-size: 1.4rem; }
  .today .dayline { font-size: 1.04rem; }
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--maroon-800); color: var(--cream); border: none;
  border-radius: 999px; padding: 11px 22px; font-family: var(--sans); font-weight: 600;
  font-size: 0.92rem; cursor: pointer; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--maroon-600); }
.btn-ghost { background: none; border: 1px solid var(--cream-3); color: var(--ink-2);
  border-radius: 999px; padding: 11px 20px; cursor: pointer; font-family: var(--sans); }

/* ---------- Mission card (home) ---------- */
.mission-card {
  display: flex; gap: 16px; align-items: center;
  background: linear-gradient(135deg, #2f6140, #213f29);
  color: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 22px; border: 1px solid rgba(255,224,98,0.3);
}
.mc-figure { margin: 0; flex: none; width: 96px; height: 96px; border-radius: 12px;
  overflow: hidden; border: 2px solid var(--gold-soft); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.mc-figure img { width: 100%; height: 100%; object-fit: cover; }
.mc-kicker { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); }
.mc-title { font-family: var(--display); font-size: 1.38rem; font-weight: 700; margin: 2px 0; }
.mc-sub { font-size: 0.82rem; font-style: italic; color: #d8ecdd; margin-bottom: 6px; }
.mc-stats { font-size: 0.78rem; color: #c2ddc9; margin-bottom: 11px; }
.mission-card .btn-primary { background: var(--gold-soft); color: #213f29; }
.mission-card .btn-primary:hover { background: #ffd23a; }

/* ---------- Outreach CRM ---------- */
.out-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg,#2f6140,#1c3a25);
  color: var(--cream); border-radius: var(--radius); padding: 16px; margin: 6px 0 16px; box-shadow: var(--shadow); }
.out-hero figure { margin: 0; flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 2px solid var(--gold-soft); }
.out-hero img { width: 100%; height: 100%; object-fit: cover; }
.oh-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.oh-verse { font-size: 0.8rem; font-style: italic; color: #d8ecdd; }
.oh-count { font-size: 0.78rem; color: var(--gold-soft); margin-top: 4px; }
#outreach > .btn-primary { margin-bottom: 14px; }

.funnel { background: var(--cream); border: 1px solid var(--cream-3); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 14px; margin-bottom: 20px; display: grid; gap: 7px; }
.funnel-row { display: flex; align-items: center; gap: 10px; }
.funnel-bar { background: linear-gradient(90deg, var(--maroon-800), var(--maroon-600));
  color: var(--cream); border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between;
  align-items: center; min-width: 120px; transition: width .2s ease; }
.fr-name { font-size: 0.82rem; font-weight: 600; }
.fr-count { font-weight: 700; font-size: 0.88rem; background: rgba(255,255,255,0.2); border-radius: 999px; padding: 0 9px; margin-left: 10px; }
.fr-gez { font-family: var(--ethiopic); font-size: 0.78rem; color: var(--ink-2); }

.soul-form { background: var(--cream); border: 1px solid var(--gold-line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 18px; display: grid; gap: 10px; }
.soul-form input, .soul-form textarea, .soul-form select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--cream-3); border-radius: 10px;
  font-family: var(--sans); font-size: 0.92rem; color: var(--ink); background: #fff; }
.soul-form textarea { min-height: 70px; resize: vertical; }
.sf-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-2); }
.sf-actions { display: flex; gap: 10px; }

.stage-group { margin-bottom: 16px; }
.stage-h { font-family: var(--display); color: var(--maroon-800); font-size: 1.05rem; margin: 8px 2px;
  border-bottom: 2px solid var(--gold-line); padding-bottom: 5px; }
.stage-h .gez { font-family: var(--ethiopic); color: var(--gold); font-size: 0.85rem; }
.soul { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start;
  background: var(--cream); border: 1px solid var(--cream-3); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.soul-name { font-weight: 600; color: var(--ink); }
.soul-meta { font-size: 0.8rem; color: var(--ink-2); }
.soul-notes { font-size: 0.82rem; color: var(--ink); margin-top: 4px; font-style: italic; }
.soul-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.mini { background: var(--maroon-800); color: var(--cream); border: none; border-radius: 999px;
  padding: 6px 12px; font-size: 0.78rem; cursor: pointer; font-family: var(--sans); }
.mini.ghost { background: none; color: var(--ink-2); border: 1px solid var(--cream-3); padding: 6px 10px; }
.mini.done { background: #2f6140; color: #fff; }
.empty { color: var(--ink-2); text-align: center; padding: 24px; font-style: italic; }

/* ---------- Category list (table of contents) ---------- */
.cat-head { text-align: center; padding: 8px 0 16px; }
.cat-head .cat-gez { font-family: var(--ethiopic); font-size: 1.9rem; font-weight: 700; color: var(--maroon-800); }
.cat-head .cat-en { font-family: var(--display); font-style: italic; color: var(--ink-2); font-size: 1.1rem; }
.cat-list { display: grid; gap: 8px; }
.cat-item { display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--cream); border: 1px solid var(--cream-3); border-radius: 12px;
  padding: 13px 15px; cursor: pointer; font-family: var(--sans); box-shadow: var(--shadow-sm); width: 100%; }
.cat-item:hover { border-color: var(--gold-line); }
.cat-item.ready { border-left: 3px solid var(--maroon-800); }
.ci-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blush);
  color: var(--maroon-800); font-weight: 700; font-size: 0.78rem; display: grid; place-items: center; }
.ci-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-gez { font-family: var(--ethiopic); color: var(--maroon-800); font-size: 1.05rem; line-height: 1.5; }
.ci-en { color: var(--ink); font-size: 0.9rem; }
.cat-item:not(.ready) .ci-en { color: var(--ink-2); }
.ci-arrow { flex: none; color: var(--gold); font-size: 1.3rem; }
.cat-pending { text-align: center; color: var(--ink-2); font-style: italic; padding: 28px 16px; }
.back-btn.small { padding: 7px 14px; font-size: 0.85rem; }

/* ---------- Connect row (home) ---------- */
.connect-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.connect-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: var(--cream); border: 1px solid var(--cream-3); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 16px 12px; cursor: pointer; font-family: var(--sans); }
.connect-card:hover { border-color: var(--gold-line); box-shadow: var(--shadow); }
.connect-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-soft); margin-bottom: 4px; }
.cc-title { font-family: var(--display); font-weight: 700; color: var(--maroon-800); font-size: 1.05rem; }
.cc-sub { font-size: 0.76rem; color: var(--ink-2); }

/* ---------- Care hero (prayer / messages) ---------- */
.care-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--maroon-800), var(--maroon-600));
  color: var(--cream); border-radius: var(--radius); padding: 16px; margin: 6px 0 16px; box-shadow: var(--shadow); }
.care-hero.msg { background: linear-gradient(135deg, #2a4d6e, #1d3954); }
.care-hero figure { margin: 0; flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 2px solid var(--gold-soft); }
.care-hero img { width: 100%; height: 100%; object-fit: cover; }
.ch-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.ch-verse { font-size: 0.8rem; font-style: italic; color: #f0d9d4; }
.care-hero.msg .ch-verse { color: #d4e2f0; }
.pr-cat { font-size: 0.72rem; background: var(--blush); color: var(--maroon-800); border-radius: 999px; padding: 2px 9px; margin-left: 6px; font-weight: 600; }

/* Announcements */
.ann-list { display: grid; gap: 10px; margin-bottom: 18px; }
.ann { background: var(--cream); border: 1px solid var(--cream-3); border-left: 3px solid var(--gold); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.ann-title { font-family: var(--display); font-weight: 700; color: var(--maroon-800); font-size: 1.05rem; }
.ann-body { font-size: 0.88rem; color: var(--ink); white-space: pre-line; margin-top: 4px; }

/* ---------- CRM v2: clickable cards, badges, detail, timeline ---------- */
.soul-main { flex: 1; cursor: pointer; min-width: 0; }
.soul-chevron { flex: none; color: var(--gold); font-size: 1.5rem; align-self: center; cursor: pointer; padding: 0 4px; }
.soul.due { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-line); }
.soul-stage { font-size: 0.7rem; font-weight: 600; background: var(--blush); color: var(--maroon-800); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.soul-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.badge { font-size: 0.7rem; background: var(--cream-3); color: var(--ink); border-radius: 999px; padding: 2px 9px; }
.badge.sync { background: #e7f0e9; color: #2f6140; }
.badge.off { background: #fff6d2; color: #876326; }
.badge.due { background: var(--gold-soft); color: #6b4e0e; font-weight: 600; }
.followup-box { margin-bottom: 18px; }
.stage-h.due { color: #876326; border-color: var(--gold); }

.sd-head { text-align: center; padding: 6px 0 14px; }
.sd-name { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--maroon-800); }
.sd-meta { color: var(--ink-2); font-size: 0.88rem; }
.sd-stage { background: var(--cream); border: 1px solid var(--cream-3); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.sd-stage-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.sd-stage-now { flex: 1; text-align: center; font-family: var(--display); font-weight: 700; color: var(--maroon-800); font-size: 1.1rem; }
.sd-stage-now .gez { font-family: var(--ethiopic); color: var(--gold); font-size: 0.9rem; }
.sd-stage-now small { display: block; font-family: var(--sans); font-weight: 400; color: var(--ink-2); font-size: 0.74rem; }
.mini.disabled { opacity: 0.35; }
.sd-form { margin-bottom: 18px; }

.timeline { margin-top: 6px; }
.tl-row { display: flex; gap: 10px; padding: 8px 2px; }
.tl-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--maroon-800); margin-top: 6px; box-shadow: 0 0 0 3px var(--blush); }
.tl-text { font-size: 0.9rem; color: var(--ink); }
.tl-at { font-size: 0.72rem; color: var(--ink-2); }

/* ---------- PWA install banner ---------- */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  display: flex; align-items: center; gap: 12px;
  background: var(--maroon-800, #4c0e0f); color: #fff;
  border: 1px solid var(--gold, #ffe062);
  border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
  transform: translateY(160%); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .35s;
  max-width: 520px; margin: 0 auto;
}
.install-banner.show { transform: translateY(0); opacity: 1; }
.install-banner .ib-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 0 0 1px rgba(255,224,98,.4); }
.install-banner .ib-text { flex: 1; line-height: 1.25; min-width: 0; }
.install-banner .ib-text strong { display: block; font-family: var(--display, "Playfair Display"), serif; font-size: 1.02rem; }
.install-banner .ib-text span { display: block; font-size: .8rem; color: #f3dada; }
.install-banner .ib-share { font-size: .9em; }
.install-banner .ib-install {
  flex: none; background: var(--gold, #ffe062); color: var(--maroon-800, #4c0e0f);
  font-weight: 700; border: none; border-radius: 999px; padding: 9px 18px; font-size: .9rem; cursor: pointer;
}
.install-banner .ib-install:active { transform: scale(.96); }
.install-banner .ib-close {
  flex: none; background: transparent; color: #f3dada; border: none;
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 2px; align-self: flex-start;
}

/* ---------- sourced-text attribution ---------- */
.source-note {
  font-size: .72rem; line-height: 1.5; color: var(--ink-2, #6b5b50);
  font-style: italic; border-left: 2px solid var(--gold, #ffe062);
  padding: 6px 0 6px 12px; margin: 0 0 14px; background: rgba(255,224,98,.06);
}

/* ---------- Scripture & reference rendering ---------- */
.verse-line { display: flex; gap: 9px; padding: 3px 0; align-items: baseline; }
.verse-line .vnum { flex: none; font-size: .68rem; color: var(--gold-soft, #c9a24a); font-weight: 700; min-width: 1.5em; text-align: right; }
.verse-line .langs { flex: 1; }
.verse-line .ln-en { line-height: 1.75; }
.doc-loading { text-align: center; color: var(--ink-2, #6b5b50); padding: 40px 0; font-size: 1.3rem; }
