/* ================================================================
   WORD OF GOD — Stylesheet
   Same design language as Dram Ledger / Stonewood: flat surfaces, 1px hairlines instead of shadows,
   square corners, Cormorant display type, Inter UI, one muted accent (gold leaf) and a rubric red
   for verse numbers. Two themes: Ink (dark) and Parchment (light), switched with html[data-theme].
   ================================================================ */

/* ── 1. Tokens ────────────────────────────────────────────────── */
:root, :root[data-theme="ink"] {
  --bg:        #131417;
  --bg2:       #1a1b20;
  --bg3:       #22232a;
  --text:      #ece7dd;
  --muted:     #b8b1a4;
  --dim:       #8d8679;
  --gold:      #c9a55a;          /* accent: gold leaf */
  --gold-ink:  #131417;
  --rubric:    #d07466;          /* verse numbers, the scarlet thread */
  --line:        rgba(201, 165, 90, 0.14);
  --line-strong: rgba(201, 165, 90, 0.34);
  --line-soft:   rgba(236, 231, 221, 0.06);
  --topbar:    rgba(19, 20, 23, 0.92);
  /* highlighter inks (alpha over the page) */
  --hl-gold: rgba(214, 170, 70, 0.30); --hl-rose: rgba(214, 110, 120, 0.30);
  --hl-sage: rgba(120, 170, 110, 0.30); --hl-sky: rgba(100, 150, 210, 0.32);
  color-scheme: dark;
}
:root[data-theme="parchment"] {
  --bg:        #f4efe4;
  --bg2:       #ece5d6;
  --bg3:       #e2d9c6;
  --text:      #231f19;
  --muted:     #564e41;
  --dim:       #7a715f;
  --gold:      #8a6a24;
  --gold-ink:  #f4efe4;
  --rubric:    #9b2d2d;
  --line:        rgba(110, 85, 35, 0.18);
  --line-strong: rgba(110, 85, 35, 0.38);
  --line-soft:   rgba(35, 31, 25, 0.06);
  --topbar:    rgba(244, 239, 228, 0.92);
  --hl-gold: rgba(230, 180, 60, 0.38); --hl-rose: rgba(225, 120, 130, 0.32);
  --hl-sage: rgba(120, 175, 105, 0.34); --hl-sky: rgba(100, 155, 220, 0.30);
  color-scheme: light;
}
:root {
  /* genre + tradition palettes: mid-lightness so they read on both themes; always shown with a label */
  --g-law: #b7793a; --g-history: #6f9a5a; --g-wisdom: #8f6fc4; --g-prophets: #c4583f;
  --g-gospels: #2f9aa6; --g-epistles: #4f80c4; --g-apocalypse: #b8527e;
  --t-ecumenical: #a39676; --t-early: #b7793a; --t-swiss: #c4583f; --t-continental: #4f80c4;
  --t-presbyterian: #2f9aa6; --t-baptist: #6f9a5a;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --scripture: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pad: clamp(1rem, 5vw, 2.5rem);
  --max: 1240px;
  --nav-h: 72px;
  --t-fast: 0.2s ease;
  --t-base: 0.35s ease;
}

/* ── 2. Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; font-weight: 300; line-height: 1.7;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh;
  transition: background var(--t-base), color var(--t-base);
}
:root[data-theme="parchment"] body { font-weight: 400; }
a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
strong, b { font-weight: 500; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--gold-ink); }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.1; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; font-weight: 500; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9em; margin: 0 0 0.9rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }
.lede { font-size: clamp(1.02rem, 1.2vw, 1.15rem); color: var(--muted); max-width: 640px; margin: 1rem 0 0; }
.muted { color: var(--dim); }
.small { font-size: 0.875rem; }
.serif { font-family: var(--serif); }

/* ── 3. Header ────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 1500; height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); padding: 0 var(--pad);
  background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.crest { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text); flex-shrink: 0; }
.crest svg { width: 30px; height: 30px; color: var(--gold); }
.crest-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.1rem); flex: 1; min-width: 0; }
.nav a, .navtop { font: inherit; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding: 0.4rem 0; border: 0; border-bottom: 1px solid transparent; background: none; }
.nav a:hover, .navgroup:hover .navtop { color: var(--text); }
.nav a.active, .navgroup.active > .navtop { color: var(--text); border-bottom-color: var(--gold); }
.navgroup { position: relative; }
.navtop { cursor: pointer; }
.navtop::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 3px 8px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); opacity: 0.7; }
.navmenu { display: none; position: absolute; top: calc(100% + 20px); left: -20px; min-width: 300px; padding: 6px 0; background: var(--bg); border: 1px solid var(--line); z-index: 1100; }
.navmenu::before { content: ""; position: absolute; top: -21px; left: 0; right: 0; height: 21px; }
.navgroup:hover .navmenu, .navgroup:focus-within .navmenu, .navgroup.open .navmenu { display: block; }
.nav .navmenu a { display: block; padding: 0.7rem 20px; border-bottom: 0; }
.nav .navmenu a:hover { background: var(--bg2); }
.nav .navmenu a.active { color: var(--text); }
.nav .navmenu a.active > span { border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
.navmenu small { display: block; margin-top: 3px; font-size: 0.75rem; letter-spacing: 0; text-transform: none; color: var(--dim); }
.navmenu .soon { opacity: 0.55; pointer-events: none; }
.navmenu.mega { display: none; gap: 0; min-width: 0; width: max-content; padding: 10px 6px; }
.navgroup:hover .navmenu.mega, .navgroup:focus-within .navmenu.mega, .navgroup.open .navmenu.mega { display: flex; }
.navcol { width: 236px; }
.navmenu small { white-space: normal; }
.navcol + .navcol { border-left: 1px solid var(--line); }
.navh { margin: 0.4rem 20px 0.2rem; font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.nav .navmenu.mega a { padding: 0.55rem 20px; }
/* My Word: the account button's menu */
.acct { position: relative; }
.acct.active > #acctBtn { border-color: var(--gold); }
.acctmenu { display: none; position: absolute; right: 0; top: calc(100% + 14px); min-width: 230px; padding: 6px 0 8px; background: var(--bg); border: 1px solid var(--line); z-index: 1100; box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.acct.open .acctmenu { display: block; }
.acctmenu a { display: block; padding: 0.55rem 20px; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.acctmenu a:hover { background: var(--bg2); color: var(--text); }
.acctmenu a.active { color: var(--text); } .acctmenu a.active > span { border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
#acctLink { color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 0.7rem; margin-bottom: 0.3rem; }
#acctMenu .navh { margin: 0.6rem 20px 0.2rem; }
.hub-tabs { margin: -0.4rem 0 1.4rem; }
.top-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; margin-left: auto; }
.menu-btn { display: none !important; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex !important; }
  .nav { position: fixed; top: var(--nav-h); left: 0; width: min(320px, 100vw); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--pad) 1.25rem; background: var(--bg); border: 1px solid var(--line); border-top: 0; display: none; }
  .nav.open { display: flex; }
  .nav > a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .navtop, .navgroup.active > .navtop { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0.95rem 0; font-size: 0.75rem; color: var(--text); text-align: left; border-bottom: 1px solid var(--line); }
  .nav > a.active { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 7px; border-bottom-color: var(--line); }
  .navtop::after { margin: 0 4px 3px 0; transition: transform 0.2s; }
  .navgroup.open > .navtop::after { transform: rotate(-135deg); margin-bottom: -2px; }
  .navgroup.active > .navtop { color: var(--gold); }
  .navmenu, .navgroup:hover .navmenu, .navgroup:focus-within .navmenu, .navgroup:hover .navmenu.mega, .navgroup:focus-within .navmenu.mega { display: none; position: static; min-width: 0; width: auto; padding: 0 0 0.4rem 0.9rem; border: 0; background: none; box-shadow: none; }
  .nav .navgroup.open > .navmenu, .nav .navgroup.open > .navmenu.mega { display: block; }
  .navmenu::before, .navmenu small { display: none; }
  .navcol { width: auto; } .navcol + .navcol { border-left: 0; }
  .navh { margin: 0.8rem 0 0.1rem; }
  .nav .navmenu a, .nav .navmenu.mega a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .acctmenu { position: fixed; top: var(--nav-h); right: 0; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
  .crest-name { font-size: 1rem; }
}
@media (max-width: 480px) { .crest-name { display: none; } }

/* ── 4. Buttons, chips, inputs ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.85em 1.6em; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--text);
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2;
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ghost { border-color: transparent; }
.btn-sm { padding: 0.55em 1em; font-size: 0.6875rem; }
.icon-btn { padding: 0.55em 0.7em; }
.btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.35em 0.8em;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}
button.chip { cursor: pointer; }
button.chip:hover, a.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.on { border-color: var(--gold); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.plaque { display: inline-block; padding: 0.3em 0.75em; border: 1px solid var(--line-strong); color: var(--gold); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }

.input, select.input, textarea.input {
  width: 100%; padding: 0.75em 0.9em; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg);
  color: var(--text); font-family: var(--sans); font-size: 0.9rem; font-weight: 300; outline: none; transition: border-color var(--t-fast);
}
.input:focus { border-color: var(--gold); }
textarea.input { line-height: 1.6; min-height: 90px; resize: vertical; }
label.lbl { display: block; margin-bottom: 0.4rem; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.field { margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.radio-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border: 1px solid var(--line-strong); cursor: pointer; font-size: 0.875rem; }
.radio-row input { accent-color: var(--gold); }
.err { color: var(--rubric); font-size: 0.875rem; min-height: 1.2em; }

/* ── 5. Layout ────────────────────────────────────────────────── */
main { min-height: calc(100vh - var(--nav-h)); }
.page { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) var(--pad) 5rem; }
.page-narrow { max-width: 820px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.rule { border: 0; height: 1px; background: var(--line); margin: clamp(2.5rem, 5vw, 4rem) 0; }
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--bg2); color: var(--text); overflow: hidden; transition: background var(--t-base); }
a.card:hover { background: var(--bg3); color: var(--text); }
.card-body { padding: 1.25rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.15; }
.card-meta { font-size: 0.75rem; color: var(--dim); letter-spacing: 0.02em; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.card-band { height: 2px; }
.card.soon { opacity: 0.6; }
.panel { background: var(--bg2); border: 1px solid var(--line); padding: 1.4rem 1.5rem; }
.panel h3, .kicker { font-family: var(--sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.section-title { margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1.5rem 0; }
.stat { padding: 1.1rem 1.2rem 1.1rem 0; }
.stat + .stat { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.stat .v { font-family: var(--serif); font-size: 2rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 0.3rem; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.empty { padding: 2rem; text-align: center; color: var(--dim); border: 1px dashed var(--line-strong); }
.notice { padding: 0.9rem 1.1rem; border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); background: var(--bg2); font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: calc(var(--nav-h) + 1.5rem); }

/* ── 6. Home ──────────────────────────────────────────────────── */
.home-hero { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6.5rem) var(--pad) 1rem; }
.home-hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: 1.02; max-width: 12ch; }
.home-hero .btns { margin-top: 2rem; }
.votd { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.votd-inner { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.votd blockquote { margin: 0; font-family: var(--scripture); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.4; }
.votd cite { display: block; margin-top: 0.8rem; font-style: normal; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 640px) { .votd-inner { grid-template-columns: 1fr; gap: 0.5rem; } }

/* ── 7. Line art: Creation → New Creation ─────────────────────── */
.story { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad); }
.story-svg { width: 100%; height: auto; display: block; overflow: visible; }
.story-svg .ln { vector-effect: non-scaling-stroke; fill: none; stroke: var(--dim); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.6s ease; }
.story-svg .ground { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.story-svg .thread { fill: none; stroke: var(--rubric); stroke-width: 1.4; stroke-dasharray: 5 7; animation: thread 2.4s linear infinite; opacity: 0.8; }
.story-svg .thread-lit { fill: none; stroke: var(--rubric); stroke-width: 1.8; transition: stroke-dashoffset 1.2s ease; }
.story-svg .st { cursor: pointer; }
.story-svg .st .hit { fill: transparent; }
.story-svg .st.on .ln, .story-svg .st:hover .ln { stroke: var(--gold); }
.story-svg .st .fill { fill: var(--gold); opacity: 0; transition: opacity 0.6s; }
.story-svg .st.on .fill { opacity: 0.9; }
.story-svg .lbl { font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; fill: var(--dim); transition: fill 0.4s; }
.story-svg .num { font-family: var(--serif); font-size: 12px; fill: var(--dim); }
.story-svg .st.on .lbl, .story-svg .st.on .num { fill: var(--text); }
.story-svg .bob { animation: bob 3.2s ease-in-out infinite; transform-box: fill-box; }
.story-svg .flick { animation: flick 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.story-svg .twinkle { animation: twinkle 2.8s ease-in-out infinite; }
.story-svg .spin { animation: spin 40s linear infinite; transform-box: fill-box; transform-origin: center; }
.story-svg .drift { animation: drift 6s ease-in-out infinite; }
.story.paused .story-svg * { animation-play-state: paused !important; }
@keyframes thread { to { stroke-dashoffset: -24; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes flick { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.15) skewX(-3deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .story-svg * { animation: none !important; } }
.story-caption { display: grid; grid-template-columns: 70px 1fr auto; gap: 1.2rem; align-items: baseline; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); min-height: 5.5rem; }
.story-caption .n { font-family: var(--serif); font-size: 2.4rem; color: var(--gold); line-height: 1; }
.story-caption .t { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.story-caption p { margin: 0.3rem 0 0; color: var(--muted); max-width: 70ch; }
@media (max-width: 640px) { .story-caption { grid-template-columns: 50px 1fr; } .story-caption a { grid-column: 2; } }

/* ── 8. Books index ───────────────────────────────────────────── */
.testament { margin-bottom: 3rem; }
.genre-block { margin-bottom: 1.6rem; }
.genre-block h3 { font-family: var(--sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px; margin-bottom: 0.6rem; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.book-grid a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0.75rem 1rem; background: var(--bg2); color: var(--text); font-family: var(--serif); font-size: 1.2rem; font-weight: 500; transition: background var(--t-fast); border-left: 2px solid var(--gc, transparent); }
.book-grid a:hover { background: var(--bg3); }
.book-grid small { font-family: var(--sans); font-size: 0.6875rem; color: var(--dim); font-weight: 400; }

/* ── 9. Reader ────────────────────────────────────────────────── */
.reader-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.reader-head h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); }
.reader-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scripture { font-family: var(--scripture); font-size: var(--read-size, 1.3rem); line-height: 1.75; max-width: 68ch; }
.scripture.lines .v { display: block; margin-bottom: 0.25em; }
.scripture .v { cursor: pointer; border-radius: 2px; transition: background var(--t-fast); -webkit-tap-highlight-color: transparent; }
.scripture .v:hover { background: var(--line-soft); }
.scripture .v.sel { background: var(--line-strong); box-shadow: 0 1px 0 var(--gold); }
.scripture .v.hl-gold { background: var(--hl-gold); } .scripture .v.hl-rose { background: var(--hl-rose); }
.scripture .v.hl-sage { background: var(--hl-sage); } .scripture .v.hl-sky { background: var(--hl-sky); }
.scripture sup { font-family: var(--sans); font-size: 0.55em; font-weight: 600; color: var(--rubric); margin: 0 0.25em 0 0.1em; vertical-align: 0.5em; user-select: none; }
.scripture sup.ch1 { display: none; }
.scripture .dropcap { float: left; font-family: var(--serif); font-size: 4.2em; line-height: 0.82; margin: 0.08em 0.12em 0 0; color: var(--gold); }
.scripture i.sup { font-style: italic; color: var(--muted); }
.scripture .note-mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin: 0 3px 0.15em; vertical-align: middle; }
.chapter-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2rem; }
.ch-grid a { display: grid; place-items: center; padding: 0.5rem 0; background: var(--bg2); color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.ch-grid a:hover, .ch-grid a.on { background: var(--bg3); color: var(--gold); }
.side-list { display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 0.875rem; }
.side-list > * { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
.side-list a:hover { color: var(--gold); }
.side-list .k { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); display: block; }
.side-list .q { color: var(--muted); display: block; line-height: 1.5; margin-top: 2px; }

/* selection action bar */
.actionbar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; z-index: 1800; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line-strong); transition: transform 0.25s ease; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
.actionbar.show { transform: translate(-50%, 0); visibility: visible; }
.actionbar .ref { font-family: var(--serif); font-size: 1.05rem; padding: 0 8px; white-space: nowrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.swatch.gold { background: var(--hl-gold); } .swatch.rose { background: var(--hl-rose); } .swatch.sage { background: var(--hl-sage); } .swatch.sky { background: var(--hl-sky); }
.swatch.none { background: transparent; position: relative; }
.swatch.none::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1px; background: var(--dim); transform: rotate(-45deg); }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* dialog */
.modal-bg { position: fixed; inset: 0; z-index: 2500; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line-strong); padding: 1.6rem; }
.modal h2 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.modal .btns { margin-top: 1.2rem; justify-content: flex-end; }

/* hover bubble */
.bubble { position: fixed; z-index: 3000; max-width: min(380px, calc(100vw - 24px)); padding: 12px 14px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text); font-family: var(--scripture); font-size: 1.02rem; line-height: 1.5; pointer-events: none; opacity: 0; transition: opacity 0.12s; }
.bubble.show { opacity: 1; }
.bubble .bt { font-family: var(--sans); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.bubble sup { font-family: var(--sans); font-size: 0.6em; color: var(--rubric); margin-right: 2px; }
a.ref-link { border-bottom: 1px dotted var(--line-strong); }

/* ── 10. Confessions ──────────────────────────────────────────── */
.conf-list { border-top: 1px solid var(--line); }
.conf-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 1.2rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
.conf-row:hover { color: var(--text); background: linear-gradient(90deg, var(--bg2), transparent); }
.conf-row .yr { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.conf-row .ti { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; }
.conf-row .bl { font-size: 0.875rem; color: var(--muted); }
.conf-row .ct { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
@media (max-width: 640px) { .conf-row { grid-template-columns: 52px 1fr; } .conf-row .ct { display: none; } }
.qa { padding: 1.6rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.qa-n { font-family: var(--serif); font-size: 1rem; color: var(--gold); letter-spacing: 0.06em; }
.qa-q { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.25; margin: 0.2rem 0 0.6rem; }
.qa-a, .qa-text { font-family: var(--scripture); font-size: 1.18rem; line-height: 1.65; }
.qa-a sup a, .qa-text sup a { font-family: var(--sans); font-size: 0.65em; font-weight: 600; color: var(--rubric); padding: 0 1px; }
.proofs { margin-top: 0.8rem; display: grid; gap: 4px; font-size: 0.8125rem; color: var(--dim); }
.proofs div { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.proofs b { color: var(--rubric); font-weight: 600; min-width: 1.2em; }
.sub-qa { margin: 0.8rem 0 0 1.2rem; padding-left: 1rem; border-left: 1px solid var(--line); font-size: 0.95rem; }
.sub-qa p { margin: 0.4rem 0; }
.toc { max-height: calc(100vh - var(--nav-h) - 3rem); overflow-y: auto; font-size: 0.8125rem; }
.toc a { display: block; padding: 0.35rem 0; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.toc a:hover { color: var(--gold); }

/* ── 11. Memory ───────────────────────────────────────────────── */
.mem-card { background: var(--bg2); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 2.6rem); text-align: center; min-height: 280px; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.mem-card .ref { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.mem-card .txt { font-family: var(--scripture); font-size: 1.3rem; line-height: 1.6; max-width: 60ch; margin: 0 auto; }
.mem-card .hint { font-family: var(--scripture); font-size: 1.3rem; letter-spacing: 0.08em; color: var(--muted); }
.mem-card .btns { justify-content: center; }
.boxes { display: inline-flex; gap: 4px; }
.boxes i { width: 8px; height: 8px; border: 1px solid var(--gold); border-radius: 50%; }
.boxes i.on { background: var(--gold); }
.mem-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.mem-row .r { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.mem-row .p { font-size: 0.875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }

/* ── 12. Join ─────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1000px) { .tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--bg2); padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.tier.feature { background: var(--bg3); box-shadow: inset 0 2px 0 var(--gold); }
.tier h3 { font-size: 1.8rem; font-weight: 500; }
.tier .price { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); }
.tier ul { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; color: var(--muted); display: grid; gap: 0.45rem; }
.tier li::before { content: "—"; color: var(--gold); margin-right: 0.5em; }
.tier .btns { margin-top: auto; }
.tier > .plaque { align-self: flex-start; margin-top: auto; }

/* ── 13. Footer ───────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 2.5rem var(--pad); text-align: center; font-size: 0.75rem; color: var(--dim); letter-spacing: 0.04em; }
footer.site .verse { font-family: var(--scripture); font-size: 1rem; font-style: italic; color: var(--muted); margin-top: 6px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th { text-align: left; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line-strong); }
.tbl td { padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }

.toast { position: fixed; left: 20px; bottom: 20px; z-index: 3500; padding: 0.8rem 1.1rem; background: var(--bg); border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); font-size: 0.875rem; max-width: min(420px, calc(100vw - 40px)); transform: translateY(160%); transition: transform 0.25s ease; }
.toast.show { transform: translateY(0); }
@media (max-width: 640px) {
  .actionbar { left: 0; right: 0; bottom: 0; max-width: none; transform: translateY(calc(100% + 20px)); display: grid; grid-template-columns: 1fr auto; gap: 8px 6px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-width: 1px 0 0; }
  .actionbar.show { transform: translateY(0); }
  .actionbar .ref { grid-column: 1; padding: 0; align-self: center; }
  .actionbar .swatches { grid-column: 2; display: flex; gap: 8px; }
  .actionbar .acts { grid-column: 1 / -1; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
  .actionbar .sep { display: none; }
  .scripture { padding-bottom: 7rem; }
}
.actionbar .swatches, .actionbar .acts { display: flex; align-items: center; gap: 6px; }

/* ── 14. Study: interlinear, lexicon ──────────────────────────── */
.modal.modal-wide { width: min(900px, 100%); }
.interlinear { display: grid; gap: 1rem; margin: 1rem 0; }
.il-verse { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.il-ref { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; color: var(--rubric); padding-top: 6px; }
.il-words { display: flex; flex-wrap: wrap; gap: 6px; }
.il-words.rtl { direction: rtl; }
.il-w { direction: ltr; display: grid; justify-items: center; gap: 1px; padding: 6px 8px; min-width: 56px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; }
.il-w:hover, .il-w.on { border-color: var(--gold); }
.il-w .o { font-family: "SBL Hebrew", "Ezra SIL", "Cardo", "Times New Roman", serif; font-size: 1.45rem; line-height: 1.3; }
.il-w .tr { font-size: 0.7rem; color: var(--dim); font-style: italic; }
.il-w .gl { font-size: 0.75rem; color: var(--muted); max-width: 120px; text-align: center; line-height: 1.25; }
.lexbox { padding: 1rem 1.1rem; background: var(--bg2); border: 1px solid var(--line); border-left: 2px solid var(--gold); min-height: 4rem; }
.lex-head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.lex-head .o { font-family: "SBL Hebrew", "Cardo", "Times New Roman", serif; font-size: 1.9rem; }
.lex-head .tr { font-style: italic; color: var(--muted); }
.lex-gloss { font-family: var(--serif); font-size: 1.35rem; margin: 0.2rem 0; }
.lex-def { margin-top: 0.8rem; font-size: 0.875rem; line-height: 1.65; color: var(--muted); max-height: 16rem; overflow-y: auto; }
.lex-def a { color: var(--gold); border-bottom: 1px dotted var(--line-strong); cursor: default; }
#readBtn.on { color: var(--gold); border-color: var(--line-strong); }
.reader-side .chips .chip { text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }
.reader-side { max-height: calc(100vh - var(--nav-h) - 3rem); overflow-y: auto; scrollbar-width: thin; }
.actionbar [data-act="study"] { display: none; }
@media (max-width: 960px) { .reader-side { max-height: none; overflow: visible; } .actionbar [data-act="study"] { display: inline-flex; } }
@media (max-width: 640px) { .actionbar .acts .btn { padding: 0.5em 0.45em; letter-spacing: 0.06em; } }

/* ── 15. Search, topics, plans, passport ──────────────────────── */
mark { background: var(--hl-gold); color: inherit; padding: 0 1px; }
.bybook { display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
.bybook button { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center; padding: 3px 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.8125rem; cursor: pointer; text-align: left; }
.bybook button:hover, .bybook button.on { color: var(--text); background: var(--bg3); }
.bybook i { height: 6px; display: block; }
.bybook b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }
.topic-cols { columns: 4 200px; column-gap: 2rem; }
.topic-cols a { display: flex; justify-content: space-between; gap: 8px; break-inside: avoid; padding: 0.35rem 0; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 0.9rem; }
.topic-cols a:hover { color: var(--gold); }
.topic-cols small { color: var(--dim); font-size: 0.75rem; }
.topic-verse { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.topic-verse .tv-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topic-verse .k { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.topic-verse p { margin: 0.4rem 0 0; font-family: var(--scripture); font-size: 1.2rem; line-height: 1.6; }
.aspect { margin-bottom: 1.4rem; }
.aspect .chip, .chips a.chip[data-ref] { text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }
.plans { display: grid; gap: 1rem; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.bar { height: 3px; background: var(--line); margin: 1rem 0; }
.bar i { display: block; height: 100%; background: var(--gold); }
.plan-today { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.plan-today .chip { text-transform: none; letter-spacing: 0.02em; font-size: 0.8125rem; color: var(--text); }
.plan details summary { cursor: pointer; margin-top: 0.4rem; }
.daygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 3px; margin-top: 0.8rem; }
.daygrid button { padding: 4px 0; font: inherit; font-size: 0.6875rem; background: var(--bg); border: 1px solid var(--line); color: var(--dim); cursor: pointer; }
.daygrid button.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.daygrid button.now { outline: 1px solid var(--rubric); }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 1.2rem 0.8rem; }
.stamp { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-size: 0.75rem; text-align: center; }
.stamp svg { width: 88px; height: 88px; overflow: visible; }
.stamp .s-out { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.stamp .s-track { fill: none; stroke: var(--line); stroke-width: 3; }
.stamp .s-prog { fill: none; stroke: var(--c); stroke-width: 3; }
.stamp .s-abbr { font-family: var(--serif); font-size: 17px; text-anchor: middle; fill: var(--dim); letter-spacing: 0.04em; }
.stamp .s-count, .stamp .s-date { font-family: var(--sans); font-size: 7.5px; text-anchor: middle; fill: var(--dim); letter-spacing: 0.12em; }
.stamp.done .s-out { stroke: var(--c); stroke-width: 2.4; stroke-dasharray: none; }
.stamp.done .s-in { fill: none; stroke: var(--c); stroke-width: 1; stroke-dasharray: 1 2.2; }
.stamp.done .s-abbr, .stamp.done .s-date { fill: var(--c); font-weight: 600; }
.stamp.done { color: var(--text); }
.stamp:hover { color: var(--gold); }
@media print {
  .topbar, footer.site, .btns, .notice, .actionbar { display: none !important; }
  body { background: #fff; color: #000; }
  .stamps { grid-template-columns: repeat(8, 1fr); }
}

/* ── 16. Lands (home-page map) ────────────────────────────────── */
:root, :root[data-theme="ink"] { --land: #2c2b27; --land-edge: #0b0c0e; --river: #50636a; --wall: #e4ddcd; --wall2: #bfb6a3; --roof: #0f1012; --site-label: #c9c1b2; }
:root[data-theme="parchment"] { --land: #e0d4b8; --land-edge: #b9a67e; --river: #7e9aa3; --wall: #fbf8f1; --wall2: #d8ccb2; --roof: #3a3226; --site-label: #4c4337; }
.lands { max-width: var(--max); margin: 0 auto; padding: 1rem var(--pad) 2rem; }
.lands-svg { width: 100%; height: auto; display: block; overflow: hidden; }
.ld-land { fill: var(--land); } .ld-edge { fill: var(--land-edge); opacity: 0.8; }
.ld-lake { fill: var(--bg); stroke: var(--river); stroke-width: 0.8; }
.ld-river { fill: none; stroke: var(--river); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ld-route { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.ld-abraham { stroke: var(--g-history); stroke-dasharray: 2 5; }
.ld-exodus { stroke: var(--gold); stroke-dasharray: 6 5; }
.ld-paul { stroke: var(--rubric); stroke-dasharray: 8 6; animation: thread 3s linear infinite; }
.ld-shadow { fill: var(--land-edge); opacity: 0.55; }
.ld-wall { fill: var(--wall); } .ld-wall2 { fill: var(--wall2); } .ld-roof { fill: var(--roof); }
.ld-mount { fill: var(--wall2); stroke: var(--roof); stroke-width: 0.6; } .ld-fire { fill: var(--rubric); }
.ld-dot { fill: var(--wall); stroke: var(--roof); stroke-width: 0.8; }
.ld-label { font-family: var(--serif); letter-spacing: 0.18em; fill: var(--site-label); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-opacity: 0.6; }
.ld-site { cursor: pointer; }
.ld-site:hover .ld-label, .ld-site:focus .ld-label { fill: var(--gold); }
.ld-site:hover .ld-wall, .ld-site:focus .ld-wall { fill: var(--gold); }
.ld-hull { fill: var(--roof); } .ld-mast { stroke: var(--roof); stroke-width: 1; } .ld-sail { fill: var(--wall); stroke: var(--rubric); stroke-width: 0.8; }
:root[data-theme="ink"] .ld-hull { fill: #c9c1b2; } :root[data-theme="ink"] .ld-mast { stroke: #c9c1b2; }
.lands-key { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; align-items: center; margin-top: 0.8rem; font-size: 0.8125rem; color: var(--muted); }
.lands-key i { display: inline-block; width: 26px; height: 0; border-top: 2px dashed; margin-right: 8px; vertical-align: middle; }
.k-abraham { border-color: var(--g-history) !important; border-top-style: dotted !important; } .k-exodus { border-color: var(--gold) !important; } .k-paul { border-color: var(--rubric) !important; }
@media (prefers-reduced-motion: reduce) { .ld-paul { animation: none; } }

/* ── 17. Learn, quizzes, badges ───────────────────────────────── */
.lesson-row { display: flex !important; justify-content: space-between; align-items: center; gap: 1rem; }
.lesson-row .q { display: block; font-size: 0.875rem; color: var(--muted); }
.lesson-row > .small { white-space: nowrap; }
.lesson p { font-size: 1.08rem; }
.qq { border: 1px solid var(--line); padding: 1rem 1.2rem 0.8rem; margin: 0 0 1rem; background: var(--bg2); }
.qq legend { font-family: var(--serif); font-size: 1.25rem; padding: 0 0.4rem; line-height: 1.3; }
.qq label { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0.4rem; cursor: pointer; border-radius: 2px; }
.qq label:hover { background: var(--bg3); }
.qq input { accent-color: var(--gold); }
.qq.right { border-color: var(--g-history); } .qq.wrong { border-color: var(--rubric); }
.qq label.is-answer { background: var(--hl-sage); }
.qq.wrong label:has(input:checked):not(.is-answer) { background: var(--hl-rose); text-decoration: line-through; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge-card { display: grid; justify-items: center; gap: 4px; padding: 1.2rem 0.8rem; background: var(--bg2); border: 1px solid var(--line); color: var(--dim); font: inherit; cursor: pointer; text-align: center; }
.badge-card b { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--muted); }
.badge-card span { font-size: 0.75rem; }
.badge-card.on b { color: var(--text); }
.badge-card:hover { background: var(--bg3); }
.medal .m-out { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 4; }
.medal .m-in { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.medal .m-icon { fill: none; stroke: var(--dim); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.medal.on .m-out { stroke: var(--c); stroke-dasharray: none; stroke-width: 3; }
.medal.on .m-in { stroke: var(--c); stroke-dasharray: 1 3; }
.medal.on .m-in.m-mill { stroke-dasharray: 0.6 1.6; stroke-width: 3; }
.medal.on .m-icon { stroke: var(--c); }
.medal.on { filter: drop-shadow(0 0 0 transparent); }

/* ── 18. Theology map & star ──────────────────────────────────── */
.tm-controls { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
.tm-controls label { display: grid; gap: 4px; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.tm-controls select { width: auto; min-width: 260px; text-transform: none; letter-spacing: 0; }
.tm-svg { width: 100%; height: auto; display: block; background: var(--bg2); border: 1px solid var(--line); }
.tm-grid { stroke: var(--line); stroke-width: 1; }
.tm-pole { font-family: var(--sans); font-size: 12px; fill: var(--dim); }
.tm-axis { font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; fill: var(--gold); }
.tm-dot { stroke: var(--bg2); stroke-width: 2; }
.tm-hit { fill: transparent; }
.tm-pt:hover .tm-dot, .tm-pt:focus .tm-dot { stroke: var(--text); }
.tm-name { font-family: var(--sans); font-size: 11px; fill: var(--muted); pointer-events: none; }
.tm-tip { position: fixed; z-index: 3000; max-width: 280px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-strong); font-size: 0.875rem; line-height: 1.5; pointer-events: none; }
.star-svg { overflow: visible; }
.st-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.st-fill { fill: var(--c); opacity: 0.14; }
.st-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.st-dot { fill: var(--c); stroke: var(--bg); stroke-width: 2; }
.st-lbl { font-family: var(--sans); font-size: 12px; font-weight: 500; fill: var(--text); }
.st-sub { font-size: 10px; font-weight: 400; fill: var(--dim); }

/* ── 19. Timelines ────────────────────────────────────────────── */
.seg { display: inline-flex; border: 1px solid var(--line-strong); }
.seg button { padding: 0.5em 1em; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.seg button.on { background: var(--gold); color: var(--gold-ink); }
.tl-bar { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tl-earthnote { max-width: 760px; margin: 0 0 0.6rem; }
.tl-strip { position: relative; height: 34px; margin: 0.6rem 0 1.5rem; border-bottom: 1px solid var(--line-strong); cursor: pointer; }
.tl-strip a { position: absolute; width: 3px; height: 18px; top: 8px; opacity: 0.75; transition: transform 0.3s, opacity 0.3s; }
.tl-strip a:hover, .tl-strip a.on { opacity: 1; transform: scaleY(1.5); }
.tl-strip span { position: absolute; top: 38px; font-size: 0.6875rem; color: var(--dim); transform: translateX(-2px); white-space: nowrap; }
.tl-pre { position: absolute; left: 0; top: 4px; height: 26px; border-right: 1px dashed var(--line-strong); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding-top: 30px; }
.tl-here { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--rubric); transition: left 0.35s ease; pointer-events: none; }
.tl-here::before { content: ""; position: absolute; top: -4px; left: -4px; border: 4px solid transparent; border-top-color: var(--rubric); }
.tl-era { margin-bottom: 2.4rem; scroll-margin-top: calc(var(--nav-h) + 16px); }
.tl-era h2 { font-size: 1.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.4rem; }
.tl-row { display: grid; grid-template-columns: 64px 14px 1fr; gap: 0.9rem; align-items: start; padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); position: relative; }
.tl-ic .ic { width: 64px; height: 60px; }
.tl-y { font-family: var(--serif); font-size: 1.05rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 7px; box-shadow: 0 0 0 2px var(--bg); }
.tl-t { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.tl-t a { color: var(--text); }
.tl-t a:hover { color: var(--gold); }
.tl-n { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.tl-oe { font-size: 0.75rem; color: var(--dim); margin-top: 0.45rem; padding-top: 0.4rem; border-top: 1px dashed var(--line-strong); font-style: italic; }
.tl-oe::before { content: "† "; font-style: normal; color: var(--rubric); }

/* line-art glyphs (icons.js) */
.ic { display: block; overflow: visible; }
.ic .ln { vector-effect: non-scaling-stroke; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill { fill: var(--gold); stroke: var(--gold); fill-opacity: 0.85; }
.ic .gr { stroke: var(--line-strong); fill: none; }
.ic .bob { animation: bob 3.2s ease-in-out infinite; transform-box: fill-box; }
.ic .flick { animation: flick 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ic .twinkle { animation: twinkle 2.8s ease-in-out infinite; }
.ic .spin { animation: spin 40s linear infinite; transform-box: fill-box; transform-origin: center; }
.ic .drift { animation: drift 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ic * { animation: none !important; } }

/* picture-line timeline */
.tlx-wrap { position: relative; margin: 0 0 2rem; }
.tlx { overflow-x: auto; overflow-y: hidden; cursor: grab; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; overscroll-behavior-x: contain; }
.tlx.drag { cursor: grabbing; user-select: none; }
.tlx:focus-visible { outline-offset: -3px; }
.tlx-track { position: relative; height: 760px; }
.tlx-thread { position: absolute; left: 0; top: 370px; overflow: visible; }
.tlx-thread .thread { fill: none; stroke: var(--rubric); stroke-width: 1.2; stroke-dasharray: 5 7; opacity: 0.6; animation: thread 2.4s linear infinite; }
.tlx-thread .thread-lit { fill: none; stroke: var(--rubric); stroke-width: 2; transition: stroke-dashoffset 0.25s linear; }
.tlx-era { position: absolute; top: 388px; height: 4px; background: var(--ec, var(--line-strong)); opacity: 0.55; }
.tlx-era span { position: absolute; left: 0; top: 8px; white-space: nowrap; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.tlx-cent { background: var(--line-strong); }
.tlx-ev { position: absolute; top: 0; height: 100%; width: 0; }
.tlx-dot { position: absolute; left: -6px; top: 374px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ec, var(--gold)); transition: background 0.3s, transform 0.3s; z-index: 1; }
.tlx-ev.near .tlx-dot { background: var(--ec, var(--gold)); transform: scale(1.3); }
.tlx-stem { position: absolute; left: 0; width: 1px; background: var(--line-strong); }
.tlx-ev.up .tlx-stem { top: 350px; height: 24px; }
.tlx-ev.dn .tlx-stem { top: 386px; height: 24px; }
.tlx-card { position: absolute; left: -22px; width: 250px; display: flex; flex-direction: column; gap: 0.35rem; opacity: 0; transition: opacity 0.7s ease, transform 0.7s ease; }
.tlx-ev.up .tlx-card { bottom: 410px; flex-direction: column-reverse; transform: translateY(12px); }
.tlx-ev.dn .tlx-card { top: 410px; transform: translateY(-12px); }
.tlx-ev.in .tlx-card { opacity: 1; transform: none; }
.tlx-ic { width: 76px; height: 72px; margin-left: -8px; }
.tlx-ev.near .tlx-ic .ln { stroke: var(--text); }
.tlx-txt .tl-t { font-size: 1.12rem; }
.tlx-txt .tl-y { font-size: 0.95rem; }
.tlx-txt .tl-n { font-size: 0.78rem; }
.tlx-txt .tl-note, .tlx-txt .tl-oe { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.tlx-txt .tl-oe { -webkit-line-clamp: 3; }
.tlx-card:hover .tl-note, .tlx-card:hover .tl-oe, .tlx-card:focus-within .tl-note, .tlx-card:focus-within .tl-oe { -webkit-line-clamp: unset; }
.tlx-card:hover { z-index: 2; background: var(--bg); }
.tlx-arrow { position: absolute; top: 360px; z-index: 3; width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.tlx-arrow:hover { border-color: var(--gold); color: var(--gold); }
.tlx-arrow.prev { left: 8px; } .tlx-arrow.next { right: 8px; }
@media (max-width: 640px) {
  .tl-row { grid-template-columns: 48px 10px 1fr; gap: 0.6rem; } .tl-ic .ic { width: 48px; height: 45px; }
  .tlx-card { width: 200px; } .tlx-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tlx-card { transition: none; opacity: 1; transform: none !important; } .tlx-thread .thread { animation: none; } }
.scripture .v.cited { box-shadow: inset 0 -2px 0 var(--gold); background: var(--line-soft); }
.gloss-bars { display: grid; gap: 3px; max-width: 520px; }
.gloss-bars div { display: grid; grid-template-columns: 170px 1fr 34px; gap: 8px; align-items: center; font-size: 0.8125rem; }
.gloss-bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.gloss-bars i { height: 6px; background: var(--gold); border-radius: 0 3px 3px 0; display: block; }
.gloss-bars b { font-weight: 400; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.conc-list .chip { text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }
.conc-list { max-height: 14rem; overflow-y: auto; }

/* ── 20. Focus (full-screen reading) ──────────────────────────── */
.focus-exit { display: none; }
body.focus .topbar, body.focus footer.site, body.focus .reader-side, body.focus .reader-tools, body.focus .reader-head .eyebrow { display: none !important; }
body.focus .page { max-width: 760px; padding-top: 3rem; }
body.focus .two-col { grid-template-columns: 1fr; }
body.focus .reader-head { border: 0; justify-content: center; text-align: center; }
body.focus .scripture { margin: 0 auto; }
body.focus .focus-exit { display: inline-flex; position: fixed; top: 14px; right: 14px; z-index: 1600; padding: 0.4em 0.8em; background: var(--bg); border: 1px solid var(--line); color: var(--dim); font: inherit; font-size: 0.75rem; cursor: pointer; opacity: 0.4; transition: opacity var(--t-fast); }
body.focus .focus-exit:hover { opacity: 1; }

/* ── 21. Memory cards & tests ─────────────────────────────────── */
.mem-bar { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mcard { perspective: 1200px; cursor: pointer; min-height: 220px; outline: none; }
.mcard-in { position: relative; height: 100%; min-height: 220px; transition: transform 0.5s ease; transform-style: preserve-3d; }
.mcard.flip .mcard-in { transform: rotateY(180deg); }
.mcard-front, .mcard-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.1rem 1.2rem; background: var(--bg2); border: 1px solid var(--line); border-top: 3px solid var(--g-wisdom);
  background-image: repeating-linear-gradient(transparent 0 27px, var(--line-soft) 27px 28px); background-position: 0 52px; }
.mcard.done .mcard-front, .mcard.done .mcard-back { border-top-color: var(--gold); }
.mcard-back { transform: rotateY(180deg); overflow-y: auto; }
.mcard:focus-visible .mcard-front, .mcard:hover .mcard-front { border-color: var(--line-strong); }
.mc-coll { font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.mc-ref { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; }
.mc-hint { font-family: var(--scripture); color: var(--muted); letter-spacing: 0.06em; flex: 1; }
.mc-txt { font-family: var(--scripture); font-size: 1.1rem; line-height: 1.55; flex: 1; }
.mc-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--dim); }
.mc-why { font-size: 0.8125rem; color: var(--muted); font-style: italic; border-top: 1px solid var(--line); padding-top: 0.4rem; }
.mem-preview { font-family: var(--scripture); font-size: 1.1rem; line-height: 1.55; max-height: 10rem; overflow-y: auto; }
.mem-preview sup { font-family: var(--sans); font-size: 0.6em; color: var(--rubric); margin-right: 2px; }
.test-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.test-opts .btn { text-transform: none; letter-spacing: 0.02em; font-size: 0.95rem; }
.test-opts .btn.wrong { border-color: var(--rubric); color: var(--rubric); }
@media (max-width: 520px) { .test-opts { grid-template-columns: 1fr; } }

/* ── Seasons: home theme, band, pages ─────────────────────────── */
.home-hero-wrap { position: relative; overflow: hidden; --season: var(--gold); }
.home-hero-wrap .home-hero { position: relative; z-index: 1; }
.hero-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; pointer-events: none; opacity: 0.9;
  background: radial-gradient(ellipse 70% 60% at 85% 20%, color-mix(in srgb, var(--season) 16%, transparent), transparent 70%); }
.season-scene { position: absolute; left: 0; bottom: 0; width: 100%; height: 55%; opacity: 0.65; }
.season-scene .sl { fill: none; stroke: color-mix(in srgb, var(--season) 55%, var(--line-strong)); stroke-width: 1.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.season-scene .sl.dim { opacity: 0.45; }
.season-scene .fillsun { fill: color-mix(in srgb, var(--season) 30%, transparent); }
.season-scene .sf { fill: color-mix(in srgb, var(--season) 40%, var(--text)); opacity: 0.55; animation: snow linear infinite; }
.season-scene .lf { fill: color-mix(in srgb, var(--season) 45%, transparent); stroke: var(--season); stroke-width: 1; vector-effect: non-scaling-stroke; animation: leaf linear infinite; }
.season-scene .st { stroke: color-mix(in srgb, var(--season) 60%, var(--text)); stroke-width: 1.2; fill: none; animation: twinkle 3s ease-in-out infinite; }
.season-scene .bigstar { animation: twinkle 4s ease-in-out infinite; }
.season-scene .sp { animation: bob 5s ease-in-out infinite; }
.season-scene .sun { animation: spin 90s linear infinite; transform-box: fill-box; transform-origin: center; }
.season-scene .rise { animation: rise 6s ease-out both; }
.season-scene .fl { fill: color-mix(in srgb, var(--season) 35%, transparent); animation: flick 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes snow { from { transform: translateY(-40px); } to { transform: translateY(240px); } }
@keyframes leaf { 0% { transform: translate(0, -30px) rotate(0); } 100% { transform: translate(-160px, 240px) rotate(300deg); } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.season-scene .lf { transform-box: fill-box; }
@media (prefers-reduced-motion: reduce) { .season-scene * { animation: none !important; } }
.home-hero-wrap .home-hero h1 { text-shadow: 0 0 30px var(--bg); }
.season-band { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.season-inner { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; padding: 1.2rem 0 0.4rem; }
.season-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); width: 100%; }
.season-card { display: grid; grid-template-columns: 64px 1fr; gap: 0.9rem; align-items: center; padding: 1rem 1.1rem; background: var(--bg2); color: var(--text); border-top: 2px solid var(--sc); }
.season-card:hover { background: var(--bg3); color: var(--text); }
.season-ic { width: 64px; height: 60px; }
.season-ic .fill, .season-big .fill { fill: var(--sc, var(--season)); stroke: var(--sc, var(--season)); }
.season-t { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.season-year { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.season-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: 0.8rem 0.4rem; border-bottom: 1px solid var(--line); color: var(--text); border-left: 2px solid var(--sc); padding-left: 0.8rem; }
.season-row:hover { background: var(--bg2); color: var(--text); }
.season-row.off { opacity: 0.45; }
.season-when { text-align: right; font-family: var(--serif); font-size: 1.05rem; }
.season-hero { position: relative; overflow: hidden; }
.season-hero .page { position: relative; z-index: 1; }
.season-head { display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem; align-items: center; }
.season-big { width: 140px; height: 130px; }
.season-big .ln { stroke: var(--text); }
.season-verse { font-family: var(--serif); font-size: 1.45rem; line-height: 1.5; margin: 0 0 2rem; padding-left: 1.2rem; border-left: 2px solid var(--season, var(--gold)); }
.season-verse cite { display: block; margin-top: 0.6rem; font-family: var(--sans); font-style: normal; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
.season-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
ul.ticks { margin: 0; padding-left: 1.1rem; } ul.ticks li { margin: 0.35rem 0; }
@media (max-width: 640px) {
  .season-row { grid-template-columns: 48px 1fr; } .season-when { grid-column: 2; text-align: left; } .season-row .season-ic { width: 48px; height: 45px; }
  .season-head { grid-template-columns: 80px 1fr; gap: 1rem; } .season-big { width: 80px; height: 74px; }
}
/* book emblems */
.book-grid a { align-items: center; justify-content: flex-start; }
.book-grid a span { flex: 1; }
.bk-ic { width: 40px; height: 38px; flex-shrink: 0; }
.bk-ic .ln { stroke: var(--dim); } .book-grid a:hover .bk-ic .ln { stroke: var(--text); }
.bk-ic .fill { fill: var(--gc); stroke: var(--gc); }
.reader-title { display: flex; gap: 1.1rem; align-items: flex-end; }
.bk-emblem { flex-shrink: 0; padding-bottom: 0.2rem; }
.bk-big { width: 92px; height: 86px; } .bk-big .fill { fill: var(--gc); stroke: var(--gc); }
.bk-motto { margin: 0.3rem 0 0; font-style: italic; }
body.focus .bk-emblem { display: none; }
@media (max-width: 640px) { .bk-big { width: 60px; height: 56px; } }
.remind { margin-top: 1rem; } .remind-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ── Phase 2: today, stories, family, devotional, prayer, hymns ── */
.today { max-width: var(--max); margin: 0 auto; padding: 2.5rem var(--pad) 0; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.today-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start; padding: 1.2rem; background: var(--bg2); color: var(--text); }
a.today-card:hover { background: var(--bg3); color: var(--text); }
.today-card .kicker { margin: 0 0 0.35rem; }
.today-card .card-title { font-size: 1.25rem; }
.today-ic { width: 64px; height: 60px; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.story-card { display: flex; flex-direction: column; background: var(--bg2); color: var(--text); }
.story-card:hover { background: var(--bg3); color: var(--text); }
.story-card:hover .story-ic .ln { stroke: var(--text); }
.story-art { display: flex; justify-content: center; align-items: flex-end; height: 130px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 100%, var(--bg3), transparent 70%); }
.story-ic { width: 120px; height: 112px; }
.story-body { padding: 0.9rem 1.1rem 1.1rem; }
.story-body .card-title { font-size: 1.25rem; margin: 0.2rem 0 0.4rem; }
.story-blurb { margin: 0; }
.story-hero { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: center; margin-top: 0.6rem; }
.story-big { width: 150px; height: 140px; }
.story-big .ln { stroke: var(--text); }
.story-text p { font-family: var(--serif); font-size: 1.4rem; line-height: 1.6; }
.story-passage p.serif { font-size: 1.15rem; line-height: 1.75; }
.story-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
sup.vn { color: var(--rubric); font-family: var(--sans); font-size: 0.65em; margin: 0 0.2em 0 0.35em; }
.kid-verse { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; margin: 0.3rem 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step { display: flex; gap: 0.8rem; }
.step .n { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); line-height: 1; }
.kid-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 0.5rem; margin-bottom: 0.5rem; }
.mlist { padding-left: 1.2rem; } .mlist li { margin: 0.8rem 0; } .mlist li.on b { color: var(--gold); }
.dev-sec { padding: 1.6rem 0; border-top: 1px solid var(--line); }
.dev-text p.serif { font-size: 1.15rem; line-height: 1.75; }
.pr-item { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.pr-item p { margin: 0.2rem 0; font-family: var(--serif); font-size: 1.2rem; }
.pr-act { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; flex-shrink: 0; }
.pr-ans { margin-top: 0.4rem; font-size: 0.875rem; color: var(--muted); border-left: 2px solid var(--g-history); padding-left: 0.6rem; }
.hymn-list { border-top: 1px solid var(--line); margin-bottom: 1rem; }
.hymn { display: grid; grid-template-columns: 56px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.hymn-ic { width: 56px; height: 52px; }
.hymn-line { margin: 0.3rem 0; font-size: 1.1rem; font-style: italic; }
@media (max-width: 640px) {
  .story-hero { grid-template-columns: 90px 1fr; } .story-big { width: 90px; height: 84px; }
  .hymn { grid-template-columns: 40px 1fr; } .hymn-ic { width: 40px; height: 38px; }
  .today-card { grid-template-columns: 48px 1fr; } .today-ic { width: 48px; height: 45px; }
  .pr-item { flex-direction: column; } .pr-act { flex-direction: row; }
}
.today-grid, .story-grid { background: none; border: 0; gap: 0; }
.today-card, .story-card { box-shadow: 0 0 0 0.5px var(--line-strong); }
/* Maps page */
.map-controls { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1rem; }
.map-time { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; align-items: center; }
.map-time input[type=range] { width: 100%; accent-color: var(--gold); }
.map-when { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.3rem; min-height: 3.4rem; }
.map-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-top: 0.3rem; }
.map-key i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; opacity: 0.6; vertical-align: middle; }
.map-key i.j { height: 0; border-top: 2px dashed; opacity: 1; background: none; }
.map-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; max-width: 1500px; margin: 0 auto; padding: 0 var(--pad) 1.5rem; }
.map-canvas { border: 1px solid var(--line); background: var(--bg2); min-height: 300px; }
.map-side { border: 1px solid var(--line); background: var(--bg2); padding: 1.2rem; align-self: start; position: sticky; top: calc(var(--nav-h) + 12px); }
.map-side h2 { font-size: 1.8rem; margin: 0.2rem 0 0.4rem; }
.at-empire { fill: var(--ec); fill-opacity: 0.22; stroke: var(--ec); stroke-opacity: 0.7; stroke-width: 1.2; vector-effect: non-scaling-stroke; animation: fadein 0.8s ease; }
.at-empire-lbl { font-family: var(--sans); font-weight: 600; letter-spacing: 0.3em; fill: var(--text); opacity: 0.55; pointer-events: none; }
.at-region { font-family: var(--serif); font-style: italic; letter-spacing: 0.25em; fill: var(--dim); cursor: pointer; }
.at-route { fill: none; stroke: var(--jc); stroke-linecap: round; animation: fadein 0.8s ease; }
.at-hit { fill: transparent; }
.at-site.on .ld-wall, .at-site.on .ld-dot, .at-site.on .ld-mount { fill: var(--gold); }
.ld-label.on { fill: var(--gold); }
.at-water .ld-dot { fill: #4f80c4; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) { .map-wrap { grid-template-columns: 1fr; } .map-side { position: static; } }
.atlas-svg .ld-label, .atlas-svg .ld-river, .atlas-svg .ld-lake, .atlas-svg .ld-site *, .atlas-svg .at-region, .atlas-svg .at-empire-lbl, .atlas-svg .ld-land, .atlas-svg .ld-edge { vector-effect: non-scaling-stroke; }
.atlas-svg { max-height: 82vh; }
/* People & library */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.person-card { display: grid; grid-template-columns: 48px 1fr; gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; background: var(--bg2); color: var(--text); box-shadow: 0 0 0 0.5px var(--line-strong); }
.person-card:hover { background: var(--bg3); color: var(--text); }
.person-card .card-title { font-size: 1.2rem; }
.pc-init { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 1.1rem; letter-spacing: 0.05em; }
.works { border-top: 1px solid var(--line); }
.work { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.work .serif { font-size: 1.15rem; }
.lib-list { border-top: 1px solid var(--line); }
.lib-item { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.lib-item p { margin: 0.3rem 0; }
/* Studies */
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.study-card { display: block; padding: 1.1rem 1.2rem; background: var(--bg2); color: var(--text); box-shadow: 0 0 0 0.5px var(--line-strong); }
.study-card:hover { background: var(--bg3); color: var(--text); }
.study-card .card-title { font-size: 1.3rem; }
.study-card p { margin: 0.4rem 0; }
.study-title { font-family: var(--serif); font-size: 2rem; padding: 0.4rem 0.6rem; }
.study-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.2rem; }
.study-pages { display: flex; flex-direction: column; gap: 0.3rem; align-items: stretch; }
.study-pages .pg { text-align: left; background: none; border: 1px solid var(--line); color: var(--muted); padding: 0.5rem 0.7rem; font: inherit; font-size: 0.875rem; cursor: pointer; }
.study-pages .pg.on { border-color: var(--gold); color: var(--text); }
.study-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; position: sticky; top: var(--nav-h); background: var(--bg); padding: 0.4rem 0; z-index: 2; }
.study-editor { min-height: 50vh; border: 1px solid var(--line-strong); padding: 1rem 1.2rem; background: var(--bg2); outline: none; }
.study-editor:focus { border-color: var(--gold); }
.study-editor, .study-body { font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; }
.study-editor h2, .study-body h2 { font-size: 1.6rem; margin: 1.2rem 0 0.4rem; }
.study-editor h3, .study-body h3 { font-size: 1.25rem; margin: 1rem 0 0.3rem; }
.study-editor blockquote, .study-body blockquote { border-left: 2px solid var(--gold); margin: 0.8rem 0; padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); }
.study-editor blockquote cite, .study-body blockquote cite { display: block; font-family: var(--sans); font-size: 0.75rem; font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.3rem; }
.study-editor table, .study-body table { border-collapse: collapse; width: 100%; margin: 0.8rem 0; font-family: var(--sans); font-size: 0.9rem; }
.study-editor th, .study-editor td, .study-body th, .study-body td { border: 1px solid var(--line-strong); padding: 0.4rem 0.6rem; text-align: left; }
.study-editor .check, .study-body .check { display: flex; gap: 0.5rem; align-items: center; }
.study-foot { margin-top: 1.4rem; }
.side-list a.unread { color: var(--text); font-weight: 500; }
.bell { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--rubric); color: #fff; font-size: 0.6875rem; font-weight: 600; margin-right: 6px; }
.bell:hover { color: #fff; }
@media (max-width: 760px) { .study-layout { grid-template-columns: 1fr; } .study-pages { flex-direction: row; flex-wrap: wrap; } }

/* Breadcrumbs, floating reading controls, chapter bar, whole-book reading */
.eyebrow .crumbs { color: var(--dim); display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.1em; }
.eyebrow .crumbs a { color: var(--dim); } .eyebrow .crumbs a:hover { color: var(--gold); }
.eyebrow .crumbs i { font-style: normal; margin: 0 0.5em; opacity: 0.7; }
.eyebrow .crumb-sep { font-style: normal; color: var(--dim); opacity: 0.6; margin: 0 0.6em; }
.eyebrow { flex-wrap: wrap; row-gap: 0.3rem; }
.float-nav { position: fixed; right: 16px; bottom: 84px; z-index: 1700; display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.float-nav.show { opacity: 1; pointer-events: auto; }
.float-nav button, .ch-bar button { width: 42px; height: 42px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); font-size: 1rem; cursor: pointer; backdrop-filter: blur(6px); }
.float-nav button:hover, .ch-bar button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.float-nav button.off { visibility: hidden; }
.ch-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1700; display: flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); transition: bottom 0.25s ease, opacity 0.25s; }
.ch-bar button { border: 0; font-size: 1.4rem; width: 48px; height: 44px; background: none; }
.ch-bar button:disabled { opacity: 0.25; cursor: default; }
.ch-bar-l { font-family: var(--serif); font-size: 1.05rem; padding: 0 0.6rem; min-width: 8.5rem; text-align: center; white-space: nowrap; }
body:has(.actionbar.show) .ch-bar { opacity: 0; pointer-events: none; }
body:has(.actionbar.show) .float-nav { bottom: 140px; }
.reader-side { padding-bottom: 70px; }
.chapter-nav { margin-bottom: 70px; }
.more-ch { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 12px); }
.more-ch .ch-head { font-size: 2rem; margin-bottom: 1rem; }
.more-ch a.v { color: inherit; }
.more-ch a.v:hover { background: var(--line-soft); }
.more-foot { margin-top: 1rem; text-align: right; }
@media (max-width: 640px) {
  .float-nav { right: 10px; bottom: 76px; } .float-nav button { width: 38px; height: 38px; }
  .ch-bar { bottom: calc(10px + env(safe-area-inset-bottom)); } .ch-bar-l { min-width: 7rem; font-size: 0.95rem; }
}
.float-nav.show, .ch-bar { opacity: 0.8; }
.float-nav.show:hover, .ch-bar:hover { opacity: 1; }
.float-nav.idle, .ch-bar.idle { opacity: 0.35; transition: opacity 2s ease; }
.float-nav.idle:hover, .ch-bar.idle:hover { opacity: 1; transition-duration: 0.15s; }
.hymn-acts { display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; }
.hymn-acts .btn { white-space: nowrap; }
[data-tune].playing { background: var(--rubric); border-color: var(--rubric); color: #fff; }
@media (max-width: 640px) { .hymn-acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; } }
button.ch-bar-l { width: auto; height: 44px; border: 0; background: none; color: var(--text); cursor: pointer; font-family: var(--serif); font-size: 1.05rem; text-decoration: underline dotted var(--line-strong); text-underline-offset: 5px; }
button.ch-bar-l:hover { color: var(--gold); }
.ch-pick { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 55vh; overflow-y: auto; margin: 1rem 0; }

/* Cross-references bubble over the verse */
.xpop { position: absolute; z-index: 1750; width: min(380px, calc(100vw - 24px)); padding: 10px 12px 12px; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.xpop-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.xpop-x { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 0.85rem; padding: 2px 4px; }
.xpop-list { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.875rem; }
.xpop-more { margin-top: 8px; border: 0; background: none; padding: 0; color: var(--gold); font: inherit; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.xpop-more:hover { color: var(--text); }

/* Study drawer (phones and tablets) */
.side-tab, .side-back { display: none; }
@media (max-width: 960px) {
  .two-col > aside.reader-side.sticky { position: fixed; top: var(--nav-h); right: 0; bottom: 0; width: min(360px, 88vw); max-height: none; overflow-y: auto; z-index: 1850;
    padding: 1rem 1rem 90px; background: var(--bg); border-left: 1px solid var(--line-strong); box-shadow: -12px 0 30px rgba(0,0,0,.2);
    transform: translateX(105%); transition: transform 0.3s ease; visibility: hidden; }
  .two-col > aside.reader-side.sticky.open { transform: none; visibility: visible; }
  .side-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; position: fixed; right: 0; top: 46%; z-index: 1860; padding: 10px 4px 8px; border: 1px solid var(--line-strong); border-right: 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); color: var(--gold); cursor: pointer; opacity: 0.85; transition: right 0.3s ease; }
  .side-tab span { font-size: 1.2rem; line-height: 1; transition: transform 0.3s; }
  .side-tab small { writing-mode: vertical-rl; font-size: 0.5625rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
  .side-tab.open { right: min(360px, 88vw); opacity: 1; }
  .side-tab.open span { transform: rotate(180deg); }
  .side-back { display: block; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 1840; background: rgba(0,0,0,.35); }
  .side-back[hidden] { display: none; }
  body.drawer-open .float-nav, body.drawer-open .ch-bar { opacity: 0 !important; pointer-events: none; }
  body.focus .side-tab { display: none; }
}

/* Book introductions */
.h1-btn { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 0.35em; }
.h1-btn:hover { color: var(--gold); }
.h1-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.h1-i { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; border: 1px solid var(--gold); border-radius: 50%; font-family: var(--serif); font-style: italic; font-size: 0.75rem; color: var(--gold); transform: translateY(-0.9em); }
.bk-emblem[data-intro] { cursor: pointer; }
.bk-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.8rem; margin: 0; font-size: 0.875rem; }
.bk-facts dt { font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); padding-top: 0.2rem; }
.bk-facts dd { margin: 0; }
.bk-facts.big { font-size: 0.95rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal.modal-wide { width: min(760px, 100%); }
.bi-head { display: grid; grid-template-columns: 90px 1fr auto; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.bi-head .bk-big { width: 90px; height: 84px; }
.bi-head h2 { font-size: 2.2rem; margin: 0.1rem 0; }
.bi-sec { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.bi-sec .kicker { margin-bottom: 0.5rem; }
.bi-sec p { margin: 0; }
.ol-bar { display: flex; height: 14px; gap: 2px; margin: 0.3rem 0 0.8rem; }
.ol-bar a { opacity: 0.6; transition: opacity 0.2s; min-width: 4px; }
.ol-bar a:hover, .ol-bar a.here { opacity: 1; }
.ol-bar a.here { box-shadow: 0 -3px 0 var(--text) inset; }
.ol-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.ol-list i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; opacity: 0.7; }
.bi-map { border: 1px solid var(--line); background: var(--bg2); margin-bottom: 0.4rem; }
.bi-map .atlas-svg { max-height: 360px; }
.bi-strip { position: relative; height: 26px; border-bottom: 1px solid var(--line-strong); margin: 0.4rem 0 1.6rem; }
.bi-strip span { position: absolute; top: 30px; font-size: 0.6875rem; color: var(--dim); transform: translateX(-50%); white-space: nowrap; }
.bi-strip i { position: absolute; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--rubric); box-shadow: 0 0 0 3px var(--bg); }
.book-card .bk-facts { font-size: 0.8125rem; }
@media (max-width: 640px) { .bi-head { grid-template-columns: 60px 1fr auto; } .bi-head .bk-big { width: 60px; height: 56px; } .bi-head h2 { font-size: 1.7rem; } }

/* Note sheet above the highlight bar */
.note-sheet { position: fixed; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); z-index: 1900; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 -8px 30px rgba(0,0,0,.25); padding: 10px 12px 12px; animation: sheetUp 0.22s ease; }
.note-sheet textarea { width: 100%; resize: vertical; min-height: 5.5rem; font-family: var(--serif); font-size: 1.05rem; }
.note-sheet .btns { margin-top: 0.5rem; justify-content: flex-end; }
.ns-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
@keyframes sheetUp { from { transform: translateX(-50%) translateY(16px); opacity: 0; } }
@media (min-width: 641px) { .note-sheet { transform: none; animation-name: sheetUpD; } @keyframes sheetUpD { from { transform: translateY(16px); opacity: 0; } } }
@media (max-width: 640px) { .note-sheet { left: 0; right: 0; width: auto; transform: none; border-width: 1px 0; animation-name: sheetUpD; } }
body.noting .xpop, body.noting .ch-bar, body.noting .float-nav { display: none; }

/* Study templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin: 0.6rem 0 1rem; }
.tpl { text-align: left; padding: 0.7rem 0.8rem; border: 1px solid var(--line-strong); background: var(--bg2); color: var(--text); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 3px; }
.tpl:hover { border-color: var(--gold); }
.tpl b { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; }
.tpl span { font-size: 0.75rem; color: var(--dim); }

/* Study pane in the reader */
.study-pane { display: none; }
body.study-open .study-pane:not([hidden]) { display: block; }
.sp-head { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.6rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.sp-t { flex: 1; min-width: 0; font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-switch { all: unset; cursor: pointer; } .sp-switch:hover { color: var(--gold); }
.sp-min { display: none; border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 1rem; }
.study-layout.compact { grid-template-columns: 1fr; gap: 0.5rem; }
.study-layout.compact .study-pages { flex-direction: row; flex-wrap: wrap; }
.study-layout.compact .study-editor { min-height: 40vh; font-size: 1.02rem; }
.study-layout.compact .study-toolbar { top: 0; }
.study-pane .study-title { font-size: 1.3rem; }
@media (min-width: 961px) {
  body.study-open .two-col { grid-template-columns: minmax(0, 1fr) min(480px, 40vw); }
  body.study-open .reader-side { display: none; }
  body.study-open .study-pane { position: sticky; top: calc(var(--nav-h) + 1rem); max-height: calc(100vh - var(--nav-h) - 2rem); overflow-y: auto; border: 1px solid var(--line); background: var(--bg2); padding: 0.9rem; }
}
@media (max-width: 960px) {
  body.study-open .study-pane { position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; z-index: 1870; overflow-y: auto; background: var(--bg); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 30px rgba(0,0,0,.25); padding: 0.6rem 0.9rem 1rem; }
  body.study-open .study-pane.min { height: auto; overflow: hidden; }
  body.study-open .study-pane.min .sp-body { display: none; }
  body.study-open .study-pane.min .sp-head { border: 0; margin: 0; padding: 0.2rem 0; }
  .sp-min { display: block; }
  .study-pane.min .sp-min { transform: rotate(180deg); }
  body.study-open .page { padding-bottom: 54vh; }
  body.study-open .ch-bar, body.study-open .float-nav, body.study-open .side-tab { display: none; }
  body.study-open .actionbar.show { bottom: 52vh; }
}
.study-pane .sp-head { position: sticky; top: -0.9rem; z-index: 4; background: inherit; padding-top: 0.6rem; margin-top: -0.6rem; }
body.study-open .study-pane { background: var(--bg2); }
.study-pane .study-toolbar { position: sticky; top: 2.9rem; background: var(--bg2); z-index: 3; padding: 0.4rem 0; }
@media (max-width: 960px) { .study-pane .study-toolbar { background: var(--bg); top: 2.6rem; } }
@media (max-width: 960px) { .study-pane .sp-head { top: -0.6rem; } body.study-open .study-pane { background: var(--bg); } }

/* Confession reader */
.conf-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.conf-text .qa-a, .conf-text .qa-text { font-size: var(--conf-size, 1.18rem); }
.cu { position: relative; margin: 0 -0.6rem; padding: 0.35rem 0.6rem; cursor: pointer; transition: background 0.2s; }
.cu + .cu { margin-top: 0.4rem; }
@media (hover: hover) { .cu:hover { background: var(--line-soft); } }
.cu.sel { background: var(--line-strong); box-shadow: inset 2px 0 0 var(--gold); }
.cu.hl-gold { background: var(--hl-gold); } .cu.hl-rose { background: var(--hl-rose); } .cu.hl-sage { background: var(--hl-sage); } .cu.hl-sky { background: var(--hl-sky); }
.cu.hl-gold.sel, .cu.hl-rose.sel, .cu.hl-sage.sel, .cu.hl-sky.sel { box-shadow: inset 2px 0 0 var(--gold), 0 0 0 1px var(--gold); }
.cu.noted::after { content: ""; position: absolute; right: 6px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.conf-text .qa { padding: 1.3rem 0; }
.fn a { font-family: var(--sans); font-size: 0.65em; font-weight: 600; color: var(--rubric); padding: 0 2px; cursor: pointer; }
.fn a:hover { color: var(--gold); }
.cp-row { display: grid; grid-template-columns: 1.4em 1fr; gap: 6px; align-items: baseline; margin-bottom: 6px; }
.cp-row b { color: var(--rubric); font-size: 0.8125rem; }
.cp-row .chip { text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }
.toc a.on { color: var(--gold); }
body.focus .conf-head .eyebrow, body.focus .conf-head .lede { display: none; }

/* Reading with the study open: two clean columns, controls over the Bible column */
@media (min-width: 961px) {
  body.study-open .page { max-width: min(1560px, 100%); }
  body.study-open .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
  body.study-open .two-col > div:first-child { padding-right: clamp(1.5rem, 3vw, 3rem); }
  body.study-open .study-pane { height: calc(100vh - var(--nav-h) - 2rem); max-height: none; border-width: 0 0 0 1px; border-color: var(--line-strong); background: none; padding: 0 0 0 clamp(1.5rem, 3vw, 3rem); }
  body.study-open .study-pane .sp-head, body.study-open .study-pane .study-toolbar { background: var(--bg); }
  body.study-open .ch-bar { left: var(--col-c, 50%); }
  body.study-open .actionbar { left: var(--col-c, 50%); max-width: min(760px, 46vw); }
  body.study-open .float-nav { right: var(--col-r, 16px); }
}
.creed-text .qa-text p { margin: 0 0 1.1rem; }
.creed-lines .cu { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line-soft); margin-top: 0 !important; }
.cl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.4rem 1.4rem; align-items: baseline; }
.cl-k { font-size: 1.12rem; line-height: 1.4; }
.cl-refs { font-size: 0.875rem; }
@media (max-width: 640px) { .cl-row { grid-template-columns: 1fr; } }
#cbar .ref { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; }
.cu.cs { display: inline; margin: 0; padding: 2px 1px; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cu.cs + .cu.cs { margin: 0; }
.cu.cs.sel { box-shadow: 0 1px 0 var(--gold); }
.cu.cs.noted::after { position: static; display: inline-block; margin: 0 3px 0.15em; vertical-align: middle; }
.cp-k { color: var(--muted); margin: 0.4rem 0 0.2rem; font-style: italic; }

/* ───────── Library reader ───────── */
.lib-toc { display: flex; flex-direction: column; }
.lib-toc a { display: block; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line-soft); color: var(--text); text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.lib-toc a .muted { display: inline-block; min-width: 2.2em; font-variant-numeric: tabular-nums; }
.lib-toc a:hover { background: var(--line-soft); }
.lib-toc a.on { background: var(--line-strong); box-shadow: inset 2px 0 0 var(--gold); }
.lib-g { font-family: var(--serif, Georgia, serif); color: var(--gold); font-size: 0.95rem; padding: 0.9rem 0.5rem 0.3rem; }
.reader-side .lib-toc { max-height: 46vh; overflow-y: auto; }
.lib-h1 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.2; }
.lib-text .cu p { margin: 0; font-size: var(--conf-size, 1.12rem); line-height: 1.7; }
.lib-text .cu + .cu { margin-top: 0.7rem; }
.lib-text.poetry .cu p { line-height: 1.55; }
.lib-text.poetry .cu + .cu { margin-top: 1rem; }
.lib-sub { font-family: var(--serif, Georgia, serif); color: var(--gold); font-size: 1.15rem; margin: 2rem 0 0.8rem; }
.lib-fn { font-size: 0.65em; color: var(--muted); margin-left: 1px; }
.lib-pn { justify-content: space-between; margin: 2.5rem 0 1rem; }
a.card-title { color: var(--text); text-decoration: none; }
a.card-title:hover { color: var(--gold); }

/* ───────── Bookshelf ───────── */
.shelf-btn.on { border-color: var(--gold); color: var(--gold); }
.shelf-mini { margin-left: 0.6rem; width: 1.7rem; height: 1.7rem; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 50%; cursor: pointer; font-size: 0.85rem; line-height: 1; vertical-align: middle; }
.shelf-mini:hover, .shelf-mini.on { border-color: var(--gold); color: var(--gold); }
.lib-item .shelf-btn, .work .shelf-btn { margin-left: 0.4rem; font-size: 0.68rem; padding: 0.2rem 0.55rem; }
.reader-side .shelf-btn { margin-top: 0.8rem; }
.shelf-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.shelf-tools select { width: auto; }
.shelf-list { border-top: 1px solid var(--line); }
.shelf-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.shelf-spine { align-self: stretch; border-radius: 2px; background: var(--g-history); min-height: 3rem; }
.k-library .shelf-spine { background: var(--gold); } .k-confession .shelf-spine { background: var(--g-epistles); } .k-classic .shelf-spine { background: var(--g-wisdom); } .k-book .shelf-spine { background: var(--g-prophets); }
.shelf-pg { height: 4px; background: var(--line); border-radius: 2px; margin: 0.5rem 0 0.25rem; max-width: 320px; overflow: hidden; }
.shelf-pg i { display: block; height: 100%; background: var(--gold); }
.shelf-note { margin: 0.4rem 0 0; font-style: italic; color: var(--muted); }

/* ───────── Groups ───────── */
.lnk { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; letter-spacing: 0.02em; }
.lnk:hover, .lnk.on { color: var(--gold); }
.lnk.danger:hover { color: var(--rubric); }
.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); vertical-align: middle; margin-left: 3px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.group-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.2rem 1.3rem; background: var(--bg2); border: 1px solid var(--line); border-top: 2px solid var(--gold); color: var(--text); }
.group-card.k-family { border-top-color: var(--g-history); } .group-card.k-church { border-top-color: var(--g-epistles); }
.group-card:hover { border-color: var(--line-strong); color: var(--text); }
.gc-top { display: flex; justify-content: space-between; align-items: center; }
.gc-study { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.gc-ic { width: 34px; height: 32px; flex: none; } .gc-ic.big { width: 54px; height: 50px; }
.gp-kind { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-strong); padding: 0.1em 0.5em; }
.gp-kind.ok { color: var(--g-history); border-color: var(--g-history); }
.g-tabs { display: flex; gap: 0.2rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 1.6rem; scrollbar-width: none; }
.g-tabs a { white-space: nowrap; padding: 0.7rem 0.9rem; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.g-tabs a:hover { color: var(--text); } .g-tabs a.on { color: var(--gold); border-bottom-color: var(--gold); }
.g-sec { margin-bottom: 2rem; }
.g-study { margin-bottom: 1.5rem; }
.g-study-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.ch-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0.6rem 0 1rem; }
.ch-dots a { min-width: 2rem; padding: 0.25rem 0.3rem; text-align: center; font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ch-dots a.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.composer { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 1.2rem; }
.composer .btns { justify-content: flex-end; align-items: center; margin: 0; } .composer .cp-err { margin-right: auto; color: var(--rubric); }
.cp-sermon { display: flex; flex-direction: column; gap: 0.6rem; }
.gp { display: grid; grid-template-columns: 38px 1fr; gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.gp.flash { animation: gpflash 2.4s ease; } @keyframes gpflash { 0%, 40% { background: var(--hl-gold); } 100% { background: transparent; } }
.gp-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); color: var(--gold); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; border: 1px solid var(--line-strong); }
.gp-av.sm { width: 30px; height: 30px; font-size: 0.68rem; display: inline-grid; }
.gp-meta { font-size: 0.85rem; } .gp-meta a { color: var(--muted); }
.gp-title { font-family: var(--serif); font-size: 1.25rem; margin: 0.3rem 0; }
.gp-verse { margin: 0.5rem 0; padding: 0.5rem 0.9rem; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; background: var(--bg2); }
.gp-verse cite { display: block; font-family: var(--sans, inherit); font-style: normal; font-size: 0.78rem; margin-top: 0.3rem; }
.gp-body p { margin: 0.35rem 0; line-height: 1.6; }
.gp-acts { display: flex; gap: 1rem; margin-top: 0.4rem; }
.gp.k-prayer .gp-av { border-color: var(--g-wisdom); } .gp.k-announce .gp-av, .gp.k-sermon .gp-av { border-color: var(--g-epistles); }
.gp.answered { opacity: 0.8; }
.gp-replies { margin-top: 0.7rem; border-left: 1px solid var(--line-strong); padding-left: 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.gp-reply { font-size: 0.92rem; } .gp-reply > div { margin-top: 0.15rem; line-height: 1.55; }
.gp-replybox { margin-top: 0.6rem; } .gp-replybox .btns { justify-content: flex-end; margin-top: 0.4rem; }
.g-prayers { display: flex; flex-direction: column; margin-bottom: 0.8rem; }
.g-prayers a { padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 0.9rem; line-height: 1.4; }
.g-faces { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.6rem; }
.g-chs { margin: 1rem 0 1.4rem; } .g-chs .chip.read { border-color: var(--gold); }
.g-ch { margin-bottom: 1.8rem; }
.g-ch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line-strong); padding-bottom: 0.3rem; margin-bottom: 0.3rem; }
.g-ch-head h3 { margin: 0; } .g-ch-head h3 .lnk { font-family: var(--serif); font-size: 1.25rem; color: var(--text); }
.g-study-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.g-summary { margin: 1rem 0; }
.g-general { margin-bottom: 1.4rem; } .g-general summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.g-progress { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.6rem; }
.gpr { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.gpr-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpr-bar { display: flex; gap: 2px; } .gpr-bar i { flex: 1; height: 8px; background: var(--line); border-radius: 1px; } .gpr-bar i.on { background: var(--gold); }
.g-board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; } .g-board-head h2 { margin: 0; }
.g-done { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
.g-done:hover { color: var(--text); background: linear-gradient(90deg, var(--bg2), transparent); }
.g-members { border-top: 1px solid var(--line); }
.g-mem { display: grid; grid-template-columns: 38px 1fr auto; gap: 0.9rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.g-mem .btns { margin: 0; flex-wrap: wrap; justify-content: flex-end; }
.invite-row { display: flex; gap: 0.5rem; } .invite-row .input { flex: 1; }
.g-mini { display: flex; flex-direction: column; margin-top: 0.6rem; }
.g-mini a { display: block; padding: 0.5rem 0; border-top: 1px solid var(--line-soft); color: var(--text); font-size: 0.86rem; line-height: 1.4; }
.g-mini a .q { display: block; color: var(--muted); }
.ns-share { display: flex; align-items: center; gap: 0.4rem; margin-right: auto; color: var(--muted); }
.ns-share select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.8rem; max-width: 12rem; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-list a.unread, #notifSec a.unread { color: var(--text); box-shadow: inset 2px 0 0 var(--gold); padding-left: 0.6rem; }
.today-card.today-new { border-color: var(--gold); }
@media (max-width: 640px) {
  .g-mem { grid-template-columns: 38px 1fr; } .g-mem .btns { grid-column: 1 / -1; justify-content: flex-start; }
  .g-study-top { flex-direction: column; }
  .gpr { grid-template-columns: 5rem 1fr auto; }
}
.gp-verse .gv-t { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gp-verse.open .gv-t { -webkit-line-clamp: unset; display: block; }
.gp-verse.folded { cursor: pointer; } .gp-verse.folded:not(.open) cite::before { content: "Tap to read all · "; color: var(--dim); }
.g-chs .cnt { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; margin-left: 0.35rem; border-radius: 0.6rem; background: var(--gold); color: var(--gold-ink); font-size: 0.6rem; letter-spacing: 0; }

/* Groups, part 2: meetings, children, directory, files, reports */
.gc-next { color: var(--gold); margin-top: 0.3rem; }
.g-meet { margin-bottom: 1.5rem; border-left: 2px solid var(--gold); }
.g-agenda { margin: 0.6rem 0 0.8rem 1.1rem; padding: 0; line-height: 1.55; } .g-agenda li { margin: 0.25rem 0; } .g-agenda .lnk { margin-left: 0.3rem; }
.g-sched { margin-bottom: 2rem; }
.sched { border-top: 1px solid var(--line); }
.sch { display: grid; grid-template-columns: 3.6rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.sch.past { opacity: 0.62; } .sch.next { background: linear-gradient(90deg, var(--bg2), transparent); box-shadow: inset 2px 0 0 var(--gold); }
.sch-d { display: flex; flex-direction: column; align-items: center; font-variant-numeric: tabular-nums; } .sch-d b { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; } .sch-d span { font-size: 0.7rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.sch-t { font-family: var(--serif); font-size: 1.15rem; } .sch-r { font-size: 0.9rem; } .sch-mine { color: var(--g-history); font-size: 0.8rem; margin-left: 0.5rem; }
.sch-notes { margin-top: 0.5rem; padding: 0.5rem 0.8rem; background: var(--bg2); } .sch-notes p { margin: 0.2rem 0 0; }
.gpr-bar button { flex: 1; height: 10px; background: var(--line); border: 0; border-radius: 1px; cursor: pointer; padding: 0; } .gpr-bar button.on { background: var(--g-history); }
.gpr.kid .gpr-n::before { content: "· "; color: var(--dim); }
.gp-av.kid { border-color: var(--g-history); color: var(--g-history); border-style: dashed; }
.cp-as { display: flex; align-items: center; gap: 0.4rem; } .cp-as select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.85rem; }
.cp-file input { margin-left: 0.4rem; } .cp-prog { height: 4px; background: var(--line); } .cp-prog i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }
.gp-file { margin: 0.5rem 0; display: flex; flex-direction: column; gap: 0.25rem; } .gp-file audio { width: 100%; max-width: 520px; height: 40px; }
.g-tog { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; color: var(--text); }
.g-report { margin-bottom: 1rem; } .g-report blockquote { margin: 0.6rem 0; padding: 0.4rem 0.8rem; border-left: 2px solid var(--rubric); background: var(--bg); }
.g-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.g-dir-card { display: grid; grid-template-columns: 38px 1fr; gap: 0.8rem; padding: 1rem; background: var(--bg2); border: 1px solid var(--line); }
.g-dir-c { display: flex; flex-direction: column; margin-top: 0.4rem; word-break: break-all; }
/* group studies on other books */
.cp-row { display: flex; gap: 0.6rem; } .cp-row .input { flex: 1; } .cp-row .cp-page { flex: 0 0 6.5rem; }
.gp-quote { margin: 0.5rem 0; padding: 0.5rem 0.9rem; border-left: 2px solid var(--g-wisdom); font-family: var(--serif); font-size: 1.12rem; font-style: italic; line-height: 1.5; background: var(--bg2); }
.gp-quote cite { display: block; font-style: normal; font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; font-family: inherit; }
.gp-page { font-size: 0.75rem; color: var(--muted); }
.ch-dots button { min-width: 2rem; padding: 0.25rem 0.3rem; font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); background: none; cursor: pointer; font-variant-numeric: tabular-nums; }
.ch-dots button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* ───────── Printable study record (Export PDF) ───────── */
body.printing .float-nav, body.printing .ch-bar { display: none !important; }
.pdoc-bar { position: sticky; top: var(--nav-h, 64px); z-index: 5; display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; justify-content: center; padding: 0.8rem 1rem; background: var(--bg2); border-bottom: 1px solid var(--line); }
.pdoc-bar label { display: flex; align-items: center; gap: 0.35rem; }
.pdoc { max-width: 760px; margin: 2rem auto 4rem; padding: 3rem 3.2rem; background: #fffdf8; color: #1d1a15; font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; box-shadow: 0 2px 24px rgba(0, 0, 0, 0.18); }
.pdoc h1 { font-size: 2.4rem; margin: 0.2rem 0 0.4rem; color: #1d1a15; }
.pdoc h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; padding-bottom: 0.25rem; border-bottom: 1px solid #c9b88f; color: #1d1a15; break-after: avoid; }
.pdoc h3 { font-size: 1.15rem; margin: 1.3rem 0 0.4rem; color: #6d5420; break-after: avoid; }
.pd-cover { text-align: center; padding-bottom: 1.5rem; border-bottom: 2px solid #8a6a24; }
.pd-kicker { font-family: Inter, sans-serif; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a24; margin: 0; }
.pd-sub { margin: 0.2rem 0; color: #4a4235; } .pd-members { font-size: 0.95rem; color: #4a4235; margin-top: 0.8rem; }
.pd-post, .pd-meet { padding: 0.55rem 0; border-bottom: 1px solid #eadfca; break-inside: avoid; }
.pd-meta { font-family: Inter, sans-serif; font-size: 0.78rem; color: #6b6253; }
.pd-title { font-weight: 600; margin-top: 0.15rem; } .pd-link { font-weight: 400; font-size: 0.8rem; color: #6b6253; word-break: break-all; }
.pdoc blockquote { margin: 0.4rem 0; padding: 0.3rem 0.8rem; border-left: 2px solid #8a6a24; background: #f7f1e3; font-style: normal; }
.pdoc blockquote cite { font-style: normal; font-family: Inter, sans-serif; font-size: 0.75rem; color: #6d5420; white-space: nowrap; }
.pdoc .pd-quote { font-style: italic; border-left-color: #7b5ea7; }
.pdoc p { margin: 0.3rem 0; }
.pd-replies { margin: 0.3rem 0 0 1rem; padding-left: 0.7rem; border-left: 1px solid #d9cba8; font-size: 0.95rem; }
.pd-dim { color: #7a715f; font-size: 0.88rem; }
.pdoc ol { margin: 0.3rem 0 0.3rem 1.3rem; padding: 0; }
.pd-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; } .pd-tbl th, .pd-tbl td { text-align: left; padding: 0.3rem 0.4rem; border-bottom: 1px solid #eadfca; vertical-align: top; }
.pd-tbl th { font-family: Inter, sans-serif; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6253; }
.pd-dots span { display: inline-block; min-width: 1.4rem; margin: 1px; text-align: center; font-family: Inter, sans-serif; font-size: 0.68rem; color: #a99d84; border: 1px solid #e3d8c0; }
.pd-dots span.on { background: #8a6a24; color: #fff; border-color: #8a6a24; }
.pd-foot { margin-top: 2.5rem; padding-top: 0.6rem; border-top: 1px solid #c9b88f; text-align: center; font-family: Inter, sans-serif; font-size: 0.72rem; color: #7a715f; }
@media (max-width: 700px) { .pdoc { margin: 0; padding: 1.5rem 1.1rem; box-shadow: none; } .pdoc h1 { font-size: 1.9rem; } }
@media print {
  @page { margin: 16mm 15mm; }
  body.printing { background: #fff !important; }
  body.printing .topbar, body.printing footer.site, body.printing .no-print, body.printing #toast, body.printing .bell { display: none !important; }
  body.printing main { padding: 0 !important; }
  .pdoc { max-width: none; margin: 0; padding: 0; box-shadow: none; background: #fff; font-size: 11.5pt; }
  .pdoc h2 { break-after: avoid; } .pd-cover { break-after: avoid; }
  .pdoc a { color: inherit; text-decoration: none; }
}
.ss-topics { max-height: 38vh; overflow-y: auto; padding: 0.6rem; border: 1px solid var(--line); margin-bottom: 0.6rem; }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.2rem 0.8rem; }
.ss-t { display: flex; gap: 0.4rem; align-items: baseline; font-size: 0.88rem; padding: 0.15rem 0; cursor: pointer; }
.g-topics { margin: 0; padding-left: 1.2rem; line-height: 1.7; }
/* the schedule folds into a bar */
.sched-bar { display: flex; align-items: center; gap: 0.6rem; width: 100%; margin: 0.6rem 0 0.4rem; padding: 0.55rem 0.8rem; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; }
.sched-bar:hover { border-color: var(--line-strong); }
.sched-ic { width: 20px; height: 20px; color: var(--gold); flex: none; }
.sched-l { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.sched-n { min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem; border-radius: 0.6rem; background: var(--line-strong); color: var(--text); font-size: 0.68rem; display: inline-grid; place-items: center; }
.sched-next { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-next b { color: var(--text); font-weight: 500; }
.sched-chev { color: var(--muted); transition: transform 0.25s; } .sched-bar.open .sched-chev { transform: rotate(180deg); }
.g-sched { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; margin-bottom: 0.8rem; }
.g-sched.open { grid-template-rows: 1fr; }
.g-sched-in { overflow: hidden; min-height: 0; }
.g-sched.open .g-sched-in { padding: 0.6rem 0 0.4rem; }
.sched-tools { margin: 0 0 0.6rem; justify-content: flex-end; }
@media (max-width: 640px) { .sched-next { white-space: normal; } .sched-bar { flex-wrap: wrap; } }
/* Group music */
.g-music-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.night { margin-bottom: 1.4rem; } .night-h { display: flex; align-items: baseline; gap: 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line-strong); }
.night-h b { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; } .night-h .lnk { margin-left: auto; }
.song { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.song-t { font-family: var(--serif); font-size: 1.12rem; } .song-a { display: flex; gap: 0.9rem; align-items: center; flex: none; }
.heart { font-size: 0.95rem; } .heart.on { color: var(--rubric); }
.hymn-hits { display: flex; flex-direction: column; margin: -0.4rem 0 0.8rem; } .hymn-hit { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0.45rem 0.2rem; color: var(--text); cursor: pointer; font: inherit; } .hymn-hit:hover { background: var(--bg2); }
.g-meet-songs { margin: 0.2rem 0 0.8rem; } .g-meet-songs a { color: var(--text); }
@media (max-width: 640px) { .song { flex-direction: column; align-items: flex-start; gap: 0.3rem; } }
/* Hymns (Sing! Hymnal) */
.hymn-tools { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; } .hymn-tools .input { flex: 1; min-width: 200px; } .hymn-tools select { flex: 0 1 260px; }
.hymn .card-title { color: var(--text); } .hymn .card-title:hover { color: var(--gold); }
.hymn-words { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; }
.hw-v { margin-bottom: 1.2rem; } .hw-v p { margin: 0; } .hw-l { font-family: var(--sans, inherit); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.2rem; }
.hymn-attr { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }
/* arrangeable side panels */
.pn-bar { display: flex; gap: 0.8rem; align-items: center; justify-content: flex-end; margin-bottom: 0.6rem; font-size: 0.72rem; color: var(--dim); }
.pn-bar span { margin-right: auto; letter-spacing: 0.12em; text-transform: uppercase; }
.pn-bar button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; } .pn-bar button:hover { color: var(--gold); }
.pn-h { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; user-select: none; }
.pn-h:focus-visible { outline: 1px dashed var(--gold); outline-offset: 3px; }
.pn-ctl { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.pn-ctl button { background: none; border: 1px solid transparent; color: var(--muted); font-size: 0.55rem; line-height: 1; padding: 3px 4px; cursor: pointer; }
.pn-ctl button:hover { color: var(--gold); border-color: var(--line-strong); }
.panel:hover .pn-ctl, .pn-h:focus-within .pn-ctl { opacity: 1; }
@media (hover: none) { .pn-ctl { opacity: 1; } }
.pn-chev { width: 0.5rem; height: 0.5rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; flex: none; margin-left: 0.3rem; }
.panel.pn-closed .pn-chev { transform: rotate(-45deg); }
.panel.pn-closed > :not(h3:first-of-type) { display: none !important; }
.panel.pn-closed { padding-top: 0.9rem; padding-bottom: 0.9rem; } .panel.pn-closed > h3 { margin-bottom: 0; }
.pn-sub { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 0.5rem; }
/* hymn numbers */
.hymn-no { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 56px; border: 1px solid var(--line-strong); color: var(--gold); text-decoration: none; flex: none; }
.hymn-no span { font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); line-height: 1; }
.hymn-no b { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hymn-no:hover { border-color: var(--gold); }
.hymn-head { display: flex; align-items: center; gap: 1.1rem; } .hymn-head h1 { margin: 0; }
.hymn-no.big { width: 78px; height: 78px; } .hymn-no.big b { font-size: 2.1rem; }
.song-no { display: inline-block; min-width: 2.2rem; margin-right: 0.5rem; padding: 0 0.3rem; border: 1px solid var(--line-strong); color: var(--gold); font-family: var(--serif); font-size: 0.95rem; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hymn-no.big { width: 60px; height: 60px; } .hymn-no.big b { font-size: 1.6rem; } }
.hymn-tools #hq { flex: 2 1 260px; } .hymn-tools #hsort { flex: 0 1 190px; }

/* ───────── Bible atlas (full screen) ───────── */
:root, :root[data-theme="ink"] { --sea: #10151b; }
:root[data-theme="parchment"] { --sea: #cfdde0; }
body.atlas-open footer.site { display: none; }
body.atlas-open main#app { padding: 0; }
.atlas { position: relative; height: calc(100dvh - var(--nav-h, 64px)); overflow: hidden; background: var(--sea); }
.atlas-map { position: absolute; inset: 0; background: var(--sea); }
.atlas-map.leaflet-container { background: var(--sea); font: inherit; }
.atlas-relief { mix-blend-mode: multiply; opacity: 0.5; }
:root[data-theme="ink"] .atlas-relief { filter: invert(1) contrast(0.85); mix-blend-mode: screen; opacity: 0.16; }
.atlas:fullscreen { height: 100vh; }
/* panel */
.atlas-panel { position: absolute; z-index: 800; top: 12px; left: 12px; bottom: 12px; width: 360px; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong); box-shadow: 0 8px 30px rgba(0,0,0,0.25); transition: transform 0.3s ease, opacity 0.3s; }
.atlas-panel.folded { transform: translateX(calc(-100% - 20px)); opacity: 0; pointer-events: none; }
.atlas-fold { position: absolute; top: 10px; right: 10px; background: none; border: 1px solid var(--line); color: var(--muted); width: 28px; height: 28px; cursor: pointer; }
.atlas-unfold { position: absolute; z-index: 800; top: 12px; left: 12px; padding: 0.5rem 0.8rem; background: var(--bg); border: 1px solid var(--line-strong); color: var(--gold); font: inherit; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.ap-head { padding: 1rem 1.1rem 0.6rem; } .ap-head h1 { font-size: 1.9rem; margin: 0 0 0.6rem; }
.ap-hits { display: flex; flex-direction: column; } .ap-hits button, .ap-list button { display: flex; gap: 0.5rem; align-items: baseline; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0.45rem 0.2rem; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; flex-wrap: wrap; }
.ap-hits button:hover, .ap-list button:hover, .ap-list button.on { background: var(--bg2); }
.ap-list { display: flex; flex-direction: column; } .ap-list button span { flex: 1; } .ap-list small { width: 100%; padding-left: 1.2rem; }
.ap-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 0.6rem; }
.ap-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.6rem 0.2rem; color: var(--muted); font: inherit; font-size: 0.8rem; letter-spacing: 0.06em; cursor: pointer; }
.ap-tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.ap-body { flex: 1; overflow-y: auto; padding: 0.9rem 1.1rem; }
.ap-sec { margin-bottom: 1.1rem; } .ap-sec .kicker { display: block; margin-bottom: 0.4rem; }
.ap-sec .chips { gap: 0.3rem; } .ap-sec .chip { font-size: 0.66rem; padding: 0.25rem 0.55rem; }
.ap-sec .chip:is([data-layer],[data-cat],[data-test],[data-aset]):not(.on) { opacity: 0.6; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.ap-sec .chip .dot, .ap-list .dot, .ap-hits .dot, .atlas-card .chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.ap-row { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 0.5rem; }
.ap-row .input { flex: 1; } .ap-sec select { margin-top: 0.5rem; }
.ap-list .jl { width: 18px; border-top: 3px dashed; display: inline-block; vertical-align: middle; }
.ap-src { padding: 0.5rem 1.1rem 0.8rem; margin: 0; font-size: 0.68rem; border-top: 1px solid var(--line); }
/* card */
.atlas-card { position: absolute; z-index: 800; top: 12px; right: 12px; width: 370px; max-height: calc(100% - 120px); overflow-y: auto; padding: 1.1rem 1.2rem 1.2rem; background: color-mix(in srgb, var(--bg) 96%, transparent);
  border: 1px solid var(--line-strong); box-shadow: 0 8px 30px rgba(0,0,0,0.25); animation: cardIn 0.3s ease; }
@keyframes cardIn { from { opacity: 0; transform: translateY(-8px); } }
.atlas-card h2 { font-size: 1.9rem; margin: 0.1rem 0 0.4rem; } .ac-x { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer; }
.ac-note { font-size: 1.1rem; line-height: 1.45; margin: 0.3rem 0 0.6rem; }
.ac-verse { margin: 0.5rem 0; padding: 0.4rem 0.8rem; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 1.05rem; } .ac-verse cite { display: block; font-size: 0.75rem; font-style: normal; margin-top: 0.2rem; }
.ac-sec { margin-top: 0.9rem; } .ac-sec .kicker { display: block; margin-bottom: 0.35rem; } .ac-sec .chip { font-size: 0.66rem; }
.ac-books { font-size: 0.85rem; line-height: 1.7; max-height: 260px; overflow-y: auto; } .ac-books b { font-weight: 600; margin-right: 0.2rem; } .ac-books a { margin-right: 0.15rem; }
.ac-story { display: flex; align-items: center; gap: 0.7rem; } .as-big { width: 54px; height: 50px; }
/* tools, time, walk */
.atlas-tools { position: absolute; z-index: 700; right: 12px; bottom: 86px; display: flex; flex-direction: column; gap: 4px; }
.atlas-tools button { width: 36px; height: 36px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text); font-size: 1.05rem; cursor: pointer; }
.atlas-tools button:hover { color: var(--gold); }
.atlas-time { position: absolute; z-index: 700; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(620px, calc(100% - 420px)); display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; align-items: center;
  padding: 0.5rem 0.9rem; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 1px solid var(--line-strong); }
.atlas-panel:not(.folded) ~ .atlas-time { left: calc(50% + 190px); }
.at-play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold); background: none; color: var(--gold); cursor: pointer; }
.atlas-time input { width: 100%; accent-color: var(--gold); } .at-when { grid-column: 2; font-family: var(--serif); font-size: 1.05rem; } .at-when span { color: var(--muted); font-size: 0.9rem; }
.atlas-walk { position: absolute; z-index: 750; left: 50%; bottom: 100px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); padding: 0.8rem 1rem; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 8px 30px rgba(0,0,0,0.25); animation: cardIn 0.3s ease; }
.atlas-panel:not(.folded) ~ .atlas-walk { left: calc(50% + 190px); }
.aw-top { display: flex; align-items: center; gap: 0.6rem; } .aw-top .muted { margin-left: auto; } .aw-dot { width: 10px; height: 10px; border-radius: 50%; }
.aw-x { background: none; border: 0; color: var(--muted); cursor: pointer; }
.aw-stop { margin: 0.5rem 0; } .aw-name { font-family: var(--serif); font-size: 1.5rem; } .aw-note { color: var(--muted); }
.aw-bar { display: flex; gap: 3px; margin: 0.5rem 0; } .aw-bar button { flex: 1; height: 5px; border: 0; background: var(--line-strong); cursor: pointer; padding: 0; } .aw-bar button.done { background: color-mix(in srgb, var(--gold) 55%, transparent); } .aw-bar button.on { background: var(--gold); }
.aw-nav { display: flex; justify-content: space-between; } .aw-nav button { background: none; border: 1px solid var(--line-strong); color: var(--text); padding: 0.35rem 0.8rem; font: inherit; font-size: 0.8rem; cursor: pointer; } .aw-nav button:disabled { opacity: 0.35; }
/* map marks */
.atlas-lbl span { position: absolute; transform: translate(-50%, -165%); white-space: nowrap; font-family: var(--serif); font-size: 0.82rem; color: var(--text); pointer-events: none;
  text-shadow: 0 0 3px var(--land), 0 0 3px var(--land), 0 0 2px var(--land); }
.atlas-lbl.big span { font-size: 0.98rem; font-weight: 600; }
.atlas-lbl.region span { font-variant: small-caps; letter-spacing: 0.14em; color: var(--muted); transform: translate(-50%, -50%); }
.atlas-lbl.water span { font-style: italic; color: var(--g-gospels); text-shadow: 0 0 3px var(--sea), 0 0 3px var(--sea); }
.atlas-area-lbl span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-family: var(--serif); font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; pointer-events: none;
  text-shadow: 0 0 3px var(--land), 0 0 3px var(--land); }
.atlas-area-lbl.empire span { font-size: 1.1rem; letter-spacing: 0.3em; opacity: 0.6; }
.atlas-area { transition: fill-opacity 0.3s; } .atlas-area:hover { fill-opacity: 0.28; }
.atlas-tip { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; font-family: var(--sans, inherit); font-size: 0.78rem; padding: 2px 7px; }
.atlas-tip::before { display: none; }
.atlas-story span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,0.25); animation: bob 3.5s ease-in-out infinite; }
.atlas-story .as-ic { width: 18px; height: 17px; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.atlas-pulse { position: relative; pointer-events: none; } .atlas-pulse i { position: absolute; inset: 0; border: 2px solid var(--gold); border-radius: 50%; animation: pulse 2s ease-out infinite; } .atlas-pulse i + i { animation-delay: 1s; }
@keyframes pulse { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.atlas-ring { animation: ringfade 1.4s ease-in-out infinite alternate; } @keyframes ringfade { to { stroke-opacity: 0.2; } }
.atlas-journey { animation: jmarch 1.4s linear infinite; } @keyframes jmarch { to { stroke-dashoffset: -26; } }
.atlas-journey.drawing { stroke-dasharray: var(--len) var(--len) !important; stroke-dashoffset: var(--len); animation: jdraw 1.8s ease-out forwards; } @keyframes jdraw { to { stroke-dashoffset: 0; } }
.atlas-journey.focus { filter: drop-shadow(0 0 3px rgba(0,0,0,0.35)); }
@media (prefers-reduced-motion: reduce) { .atlas-journey, .atlas-story span, .atlas-pulse i, .atlas-ring { animation: none !important; } }
/* phones: the panel and card become sheets */
@media (max-width: 700px) {
  .atlas-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 62%; border-left: 0; border-right: 0; }
  .atlas-panel.folded { transform: translateY(105%); }
  .atlas-card { left: 8px; right: 8px; top: auto; bottom: 74px; width: auto; max-height: 52%; }
  .atlas-time, .atlas-panel:not(.folded) ~ .atlas-time { left: 8px; right: 60px; transform: none; width: auto; bottom: 8px; padding: 0.35rem 0.6rem; }
  .atlas-walk, .atlas-panel:not(.folded) ~ .atlas-walk { left: 8px; right: 8px; transform: none; width: auto; bottom: 74px; }
  .atlas-tools { bottom: 8px; right: 8px; } .atlas-tools button { width: 40px; height: 40px; } .atlas-tools #aZin, .atlas-tools #aZout { display: none; }
}
/* the journey walker sits top-right, leaving the map's middle clear */
@media (min-width: 701px) {
  .atlas-walk, .atlas-panel:not(.folded) ~ .atlas-walk { left: auto; right: 12px; top: 12px; bottom: auto; transform: none; width: 380px; }
}
@media (max-width: 700px) { .atlas.walking .atlas-time { display: none; } .atlas.walking .atlas-walk { bottom: 8px; } }
.home-grid + .section-title { margin-top: 3rem; }

/* ── Season scenes (public/js/season-anim.js) ─────────────────── */
.sa { margin: 0 0 2.2rem; border: 1px solid var(--line); background: var(--bg2); --fire: #f0a93a; }
.sa-stage { position: relative; }
.sa svg { display: block; width: 100%; height: auto; }
.sa .ln { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sa .ln.dim, .sa .dim { opacity: 0.45; }
.sa-btns { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; gap: 0.3rem; }
.sa-cap { padding: 0.8rem 1rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); min-height: 3.2em; }
.sa-cap b { color: var(--text); font-weight: 500; }
.sa-t { font-family: var(--serif); font-size: 21px; fill: var(--text); }
.sa-lb { font-size: 12px; fill: var(--muted); letter-spacing: 0.04em; }
.sa-tw { stroke: color-mix(in srgb, var(--season) 55%, var(--text)); stroke-width: 1.1; fill: none; animation: twinkle 3s ease-in-out infinite; }
.sa-fl { fill: var(--fire); stroke: color-mix(in srgb, var(--fire) 60%, var(--text)); stroke-width: 0.8; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: 50% 100%; animation: flick 1.6s ease-in-out infinite; }
.sa-glow { fill: var(--fire); opacity: 0.22; filter: blur(7px); }
.sa-flame { transition: opacity 0.6s; } .sa-flame.off { opacity: 0; }
.sa-leaf { fill: color-mix(in srgb, #5d8a4e 55%, var(--bg2)); stroke: color-mix(in srgb, #5d8a4e 70%, var(--text)); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.sa-berry { fill: #b8473a; }
.sa-wax { stroke: var(--text); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sa-wax.purple { fill: color-mix(in srgb, #6b4e8f 70%, var(--bg2)); } .sa-wax.rose { fill: color-mix(in srgb, #d08aa4 75%, var(--bg2)); } .sa-wax.white { fill: var(--bg); }
.sa-candle { cursor: pointer; outline: none; } .sa-candle.sel .sa-wax, .sa-candle:focus-visible .sa-wax { stroke: var(--gold); stroke-width: 2.4; }
/* Christmas */
.sa-night { background: color-mix(in srgb, #0d1430 70%, var(--bg2)); }
.sa-night .ln { stroke: color-mix(in srgb, var(--text) 50%, #c9d3f0); }
.sa-night .sa-t { fill: #f1e6c4; } .sa-night .sa-tw { stroke: #e9e4cf; }
.sa-cupn { font-size: 11px; opacity: 0.7; }
.sa-sheep { fill: color-mix(in srgb, #fff 70%, var(--bg2)); stroke: #c9d3f0; stroke-width: 0.8; }
.sa-starp { fill: #f6e3a1; stroke: #f6e3a1; }
.sa-bigstar .sa-glow { fill: #f6e3a1; opacity: 0.4; }
.sa-beam { fill: #f6e3a1; opacity: 0; transition: opacity 2s; } .arrived .sa-beam { opacity: 0.18; }
.sa-hdoor { fill: none; stroke: #c9d3f0; stroke-width: 1.2; transition: fill 2s; } .arrived .sa-hdoor { fill: #f6c86a; }
.sa-gloria { opacity: 0; transition: opacity 2s 0.8s; } .arrived .sa-gloria { opacity: 1; }
/* Lent */
.sa-trail { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 3 6; }
.sa-trail-on { fill: none; stroke: var(--season); stroke-width: 2.4; opacity: 0.55; }
.sa-stone { fill: var(--bg); stroke: var(--text); stroke-width: 1; transition: fill 0.3s; } .sa-stone.on { fill: var(--season); }
.sa-stone.now { animation: saPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sa-sun { fill: color-mix(in srgb, var(--gold) 45%, transparent); stroke: var(--gold); stroke-width: 1; }
.sa-dot { fill: var(--season); stroke: var(--bg); stroke-width: 2; }
/* Holy Week */
.sa-wall { fill: color-mix(in srgb, var(--season) 7%, transparent); stroke: var(--text); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sa-mount { fill: color-mix(in srgb, var(--gold) 14%, transparent); stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sa-place { fill: var(--bg); stroke: var(--text); stroke-width: 1.2; }
.sa-route { fill: none; stroke: var(--season); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sa-route.judas { stroke: var(--rubric); stroke-width: 1.6; opacity: 0; transition: opacity 0.4s; }
.sa-days { padding: 0.7rem 1rem 0; } .sa-days .chip.on { border-color: var(--season); color: var(--text); }
.risen .sa-dot { fill: var(--gold); animation: saPulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
/* Easter */
.sa-sky { fill: color-mix(in srgb, #1a2340 60%, var(--bg2)); opacity: 0; }
.go .sa-sky { animation: saDawn 3.5s ease-out both; }
@keyframes saDawn { from { opacity: 1; } to { opacity: 0; } }
.sa-sunc { fill: color-mix(in srgb, var(--gold) 45%, transparent); stroke: var(--gold); }
.go .sa-sunrise { animation: saRise 3.5s ease-out both; }
@keyframes saRise { from { transform: translateY(190px); } to { transform: none; } }
.sa-rock { fill: color-mix(in srgb, var(--text) 9%, var(--bg2)); stroke: var(--text); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.sa-open { fill: color-mix(in srgb, var(--text) 70%, var(--bg2)); }
.sa-stone2 circle:first-child { fill: color-mix(in srgb, var(--text) 18%, var(--bg2)); stroke: var(--text); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.sa-stone2 { transform-box: fill-box; transform-origin: center; }
.go .sa-stone2 { animation: saRoll 1.8s cubic-bezier(.5,0,.3,1) 2s both; }
@keyframes saRoll { to { transform: translateX(122px) rotate(150deg); } }
.sa-rays path { stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.sa-rays { opacity: 0; } .go .sa-rays { animation: saFade 1.4s ease-out 3.5s both; }
.sa-risen, .sa-works { opacity: 0; } .go .sa-risen { animation: saFade 1.6s ease-out 4.2s both; }
@keyframes saFade { from { opacity: 0; } to { opacity: 1; } }
.sa-pet { fill: #fbf7ea; stroke: var(--text); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.sa-lily { animation: saSway 5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes saSway { 50% { transform: rotate(4deg); } }
/* Pentecost */
.sa-wind { fill: none; stroke: color-mix(in srgb, var(--season) 60%, var(--text)); stroke-width: 1.4; stroke-dasharray: 1100; stroke-dashoffset: 1100; opacity: 0.6; }
.go .sa-wind { animation: saWind 2.4s ease-in-out calc(var(--i) * 0.3s) both; }
@keyframes saWind { 60% { opacity: 0.6; } to { stroke-dashoffset: -1100; opacity: 0; } }
.sa-tongue { opacity: 0; }
.go .sa-tongue { animation: saDescend 1s ease-out calc(1.6s + var(--i) * 0.16s) both; }
@keyframes saDescend { from { opacity: 0; transform: translateY(-140px); } to { opacity: 1; transform: none; } }
.sa-nation { font-family: var(--serif); font-size: 15px; fill: var(--season); opacity: 0; }
.go .sa-nation { animation: saFade 1s ease-out calc(4s + var(--i) * 0.22s) both; }
.go .sa-works { animation: saFade 1.4s ease-out 7.6s both; } .sa-works { font-size: 15px; }
/* Passover */
.sa-plate { fill: color-mix(in srgb, var(--gold) 8%, var(--bg)); stroke: var(--text); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sa-dish { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; transition: fill 0.3s; }
.sa-item { cursor: pointer; outline: none; } .sa-item:hover .sa-dish, .sa-item.sel .sa-dish, .sa-item:focus-visible .sa-dish { fill: color-mix(in srgb, var(--season) 22%, var(--bg)); stroke: var(--season); }
.sa-wine { fill: #8e2b3a; transition: y 1.2s ease-out, height 1.2s ease-out; }
/* Tabernacles */
.sa-build { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1600; }
.go .sa-build { animation: saDraw 2.4s ease-out both; }
@keyframes saDraw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
.go .sa-branch { animation: saFall 0.9s cubic-bezier(.3,1.4,.6,1) calc(2s + var(--i) * 0.12s) both; }
@keyframes saFall { from { opacity: 0; transform: translateY(-90px) rotate(-8deg); } to { opacity: 1; transform: none; } }
.sa-lantern .sa-flame { opacity: 0; } .go .sa-lantern .sa-flame { animation: saFade 1s ease-out 3.6s both; }
.sa-pitcher { transform-box: fill-box; transform-origin: 80% 90%; animation: saPour 4s ease-in-out infinite; }
@keyframes saPour { 0%, 15%, 85%, 100% { transform: none; } 35%, 65% { transform: rotate(-38deg); } }
.sa-drop { fill: #5b8fc7; opacity: 0; animation: saDrip 4s linear calc(var(--i) * 0.18s) infinite; }
@keyframes saDrip { 0%, 34% { opacity: 0; transform: none; } 36% { opacity: 1; } 60% { opacity: 1; transform: translateY(80px); } 61%, 100% { opacity: 0; transform: translateY(80px); } }
.sa-bulls { padding: 0.8rem 1rem 0.2rem; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.sa-bull-row { display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: var(--muted); }
.sa-bull-row.now { color: var(--text); font-weight: 600; }
.sa-bull-sq { display: flex; gap: 3px; } .sa-bull-sq i { width: 12px; height: 12px; background: color-mix(in srgb, var(--season) 55%, var(--bg)); border: 1px solid var(--season); }
.sa-bull-row.now .sa-bull-sq i { background: var(--season); }
/* Reformation */
.sa-doorp { fill: color-mix(in srgb, #7a5230 30%, var(--bg2)); stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sa-parch { fill: #f3e7c6; stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sa-paper { transform: translate(400px, 172px); }
.go .sa-paper { animation: saPaper 1.5s cubic-bezier(.3,.9,.4,1) both; }
@keyframes saPaper { from { opacity: 0; transform: translate(40px, 60px) rotate(-30deg) scale(0.6); } 40% { opacity: 1; } to { transform: translate(400px, 172px); } }
.sa-head { fill: color-mix(in srgb, var(--text) 60%, var(--bg2)); }
.sa-hammer { transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(28deg); }
.go .sa-hammer { animation: saHammer 1.8s ease-in-out 1.5s both; }
@keyframes saHammer { 0%, 33%, 66% { transform: rotate(28deg); } 15%, 48%, 81% { transform: rotate(-12deg); } 100% { transform: rotate(28deg); } }
.sa-taps { opacity: 0; } .go .sa-taps { animation: saTap 1.8s steps(1) 1.5s both; }
@keyframes saTap { 0% { opacity: 0; } 15% { opacity: 1; } 25% { opacity: 0; } 48% { opacity: 1; } 58% { opacity: 0; } 81% { opacity: 1; } 91%, 100% { opacity: 0; } }
.sa-solas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; padding: 0.8rem 1rem; border-top: 1px solid var(--line); }
.sa-sola { font-family: var(--serif); font-size: 1.05rem; padding: 0.2rem 0.8rem; border: 1px solid var(--season); color: var(--text); opacity: 0; }
.sa-solas.go .sa-sola { animation: saFade 0.8s ease-out calc(3.4s + var(--i) * 0.35s) both; }
/* Thanksgiving */
.sa-grain { fill: color-mix(in srgb, var(--gold) 60%, var(--bg2)); stroke: var(--gold); stroke-width: 0.8; }
.sa-sheaf { animation: saSway 6s ease-in-out infinite; }
.sa-st ellipse { fill: color-mix(in srgb, var(--season) 22%, var(--bg)); stroke: var(--text); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sa-st text { font-size: 12px; fill: var(--text); }
.sa-st.ph { opacity: 0.45; }
.sa-st.drop { animation: saDrop 0.7s cubic-bezier(.3,1.5,.6,1) both; }
@keyframes saDrop { from { transform: translateY(-220px); opacity: 0; } to { transform: none; opacity: 1; } }
.sa-add { display: flex; gap: 0.4rem; padding: 0.8rem 1rem 0; flex-wrap: wrap; } .sa-add .input { flex: 1; min-width: 200px; }
@media (prefers-reduced-motion: reduce) { .sa * { animation-duration: 0.01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }
@keyframes saPulse { 50% { transform: scale(1.6); } }

/* ── Season pages: two columns, schedules, compact music ──────── */
.season-page .two-col { grid-template-columns: minmax(0, 1fr) 280px; }
.season-story h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin: 1.6rem 0 0.4rem; }
.season-story h3:first-child { margin-top: 0; }
.season-story p { line-height: 1.7; max-width: 68ch; }
.season-christ { margin: 1.8rem 0 0.6rem; border-left: 2px solid var(--season); }
.sched-block { margin-top: 2.4rem; }
.sched { list-style: none; margin: 0.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.sched li { display: grid; grid-template-columns: 92px 1fr; gap: 1rem; padding: 0.85rem 0.4rem; border-bottom: 1px solid var(--line); }
.sched li.past { opacity: 0.55; }
.sched li.now { background: color-mix(in srgb, var(--season) 9%, transparent); border-left: 3px solid var(--season); padding-left: 0.6rem; }
.sched-when { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.sched-when b { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--text); }
.sched-when em { font-style: normal; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--season); margin-top: 0.2rem; }
.sched-t { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; }
.sched li p { margin: 0.3rem 0 0; font-size: 0.92rem; }
.sched-refs { margin-top: 0.35rem; font-size: 0.85rem; }
.sched.folded li:nth-child(n + 8) { display: none; }
.sched-more { margin-top: 0.5rem; }
details.qa { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
details.qa summary { cursor: pointer; font-family: var(--serif); font-size: 1.15rem; }
details.qa p { margin: 0.5rem 0 0; line-height: 1.65; }
.season-side .side-links { display: flex; flex-direction: column; gap: 0.15rem; }
.season-side .side-links a { font-size: 0.875rem; padding: 0.2rem 0; }
.side-refs { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: 0.875rem; }
.music-mini { display: flex; flex-direction: column; }
.mm { display: grid; grid-template-columns: 30px 1fr auto; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; line-height: 1.3; }
.mm-no { font-size: 0.75rem; color: var(--gold); text-align: center; border: 1px solid var(--line-strong); padding: 1px 0; }
.mm-play { border: 1px solid var(--line-strong); background: none; color: var(--text); width: 28px; height: 28px; cursor: pointer; font-size: 0.7rem; }
.mm-play.playing { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.music-mini > a { margin-top: 0.6rem; }
.season-side { max-height: calc(100vh - var(--nav-h) - 3rem); overflow-y: auto; }
@media (max-width: 960px) {
  .season-page .two-col { grid-template-columns: 1fr; }
  .season-side { position: static; max-height: none; }
  .season-side .panel:has(.side-links) { display: none; }
  .sched li { grid-template-columns: 70px 1fr; gap: 0.7rem; }
}

/* ── Compare: tabbed columns beside the reader ────────────────── */
.par-pane { display: none; }
body.par-open .par-pane:not([hidden]) { display: block; }
.par-cols { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 0; height: 100%; }
.par-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line-strong); padding: 0 0 0 clamp(1rem, 2vw, 1.8rem); }
.par-col + .par-col { margin-left: clamp(1rem, 2vw, 1.8rem); }
.par-tabs { display: flex; align-items: flex-end; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.par-tab { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 200px; padding: 0.42rem 0.55rem; border: 1px solid var(--line); border-bottom: 0; background: var(--bg2); color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; margin-bottom: -1px; }
.par-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.par-tab i { font-style: normal; opacity: 0.5; padding: 0 2px; } .par-tab i:hover { opacity: 1; color: var(--rubric); }
.par-tab.on { background: var(--bg); color: var(--text); border-color: var(--line-strong); border-top: 2px solid var(--gold); }
.par-tab.link span::before { content: "⛓ "; opacity: 0.6; }
.par-add, .par-ic { border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 0.3rem 0.45rem; cursor: pointer; } .par-add:hover, .par-ic:hover { color: var(--gold); }
.par-sp { flex: 1; }
.par-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.par-head { padding: 0.7rem 0 0.5rem; border-bottom: 1px solid var(--line); }
.par-title { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.4rem; }
.par-tools { display: flex; flex-wrap: wrap; gap: 0.3rem; } .par-tools .chip { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
.par-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin-top: 0.5rem; padding: 0.4rem 0.6rem; background: var(--bg2); border: 1px solid var(--line); font-size: 0.85rem; }
.par-text { flex: 1; overflow-y: auto; padding: 0.8rem 0.4rem 40vh 0; scrollbar-width: thin; }
.par-text .v { cursor: pointer; border-radius: 2px; }
.par-text .v:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.par-text .v.focus { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.par-text .v.msel { box-shadow: inset 0 -2px 0 var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.par-text .v.psel { background: color-mix(in srgb, var(--sky, #5b8fc7) 22%, transparent); }
.par-empty { padding: 2rem 0; }
.par-form { display: flex; gap: 0.4rem; flex-wrap: wrap; } .par-form .input:first-child { flex: 1; min-width: 200px; } .par-form select { width: auto; }
@media (min-width: 961px) {
  body.par-open .page { max-width: min(1720px, 100%); }
  body.par-open .reader-side { display: none; }
  body.par-open .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, var(--pf, 1fr)); gap: 0; }
  body.par-open.par-2 .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, var(--pf, 1.7fr)); }
  body.par-open.study-open .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, var(--pf, 0.9fr)) minmax(0, 0.9fr); }
  body.par-open.par-2.study-open .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, var(--pf, 1.5fr)) minmax(0, 0.9fr); }
  body.par-open .two-col > div:first-child { padding-right: clamp(1rem, 2vw, 1.8rem); }
  body.par-open .par-pane { position: sticky; top: calc(var(--nav-h) + 1rem); height: calc(100vh - var(--nav-h) - 2rem); }
  .par-grip { position: absolute; left: -7px; top: 0; bottom: 0; width: 14px; cursor: col-resize; z-index: 5; touch-action: none; }
  .par-grip::after { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 0.15s; }
  .par-grip:hover::after, .par-grip.drag::after { background: var(--gold); }
  body.par-open.study-open .study-pane { border-left: 1px solid var(--line-strong); padding-left: clamp(1rem, 2vw, 1.8rem); margin-left: clamp(1rem, 2vw, 1.8rem); }
  body.par-open .ch-bar { left: var(--col-c, 50%); }
  body.par-open .actionbar { left: var(--col-c, 50%); max-width: min(760px, 46vw); }
  body.par-open .float-nav { right: var(--col-r, 16px); }
}
@media (max-width: 960px) {
  body.par-open .par-pane { position: fixed; left: 0; right: 0; bottom: 0; height: var(--par-h, 50vh); z-index: 1870; background: var(--bg); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 30px rgba(0,0,0,.25); padding: 1rem 0.8rem 0; }
  .par-grip { position: absolute; left: 0; right: 0; top: 0; height: 22px; cursor: row-resize; touch-action: none; z-index: 5; }
  .par-grip::after { content: ""; position: absolute; left: 50%; top: 7px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: var(--line-strong); }
  .par-grip.drag::after { background: var(--gold); }
  body.par-open .par-col { border: 0; padding: 0; }
  body.par-open .page { padding-bottom: calc(var(--par-h, 50vh) + 2vh); }
  body.par-open .ch-bar, body.par-open .float-nav, body.par-open .side-tab { display: none; }
  body.par-open .actionbar.show { bottom: var(--par-h, 50vh); }
  .par-text { padding-bottom: 2rem; }
}
body.focus.par-open .par-pane { top: 1rem; height: calc(100vh - 2rem); }
.par-min { display: none; }
@media (max-width: 960px) {
  .par-min { display: inline-block; }
  body.par-open .par-pane.min { height: auto; }
  body.par-open .par-pane.min .par-view { display: none; }
  .par-pane.min .par-min { transform: rotate(180deg); }
}
.par-notes { font-family: var(--sans); font-size: 0.92rem; }
.pn-note { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.pn-ref { display: flex; gap: 0.6rem; align-items: baseline; margin-bottom: 0.25rem; }
.pn-ref > :first-child { font-family: var(--serif); font-size: 1.05rem; }
.pn-text { line-height: 1.55; white-space: normal; }
.linkish { border: 0; background: none; padding: 0; color: var(--gold); cursor: pointer; font: inherit; }
.linkish:hover { text-decoration: underline; }
.pk-trans { margin-bottom: 1rem; }
.pk-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pk-b { border: 0; border-left: 2px solid var(--gc, transparent); background: var(--bg2); color: var(--text); text-align: left; padding: 0.45rem 0.6rem; font: inherit; font-family: var(--serif); font-size: 0.98rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-b:hover { background: var(--bg3); }
.pk-h { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin: 0.5rem 0 0.8rem; }
.pk-grid { margin-bottom: 0.5rem; }
.pk { max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.pn-edit { padding: 0.7rem 0 0.9rem; }
.pn-edit textarea { width: 100%; font-size: 1rem; line-height: 1.5; margin: 0.4rem 0; resize: vertical; }
.pn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.pn-acts label { display: inline-flex; align-items: center; gap: 0.3rem; } .pn-acts select { width: auto; padding: 0.2rem 0.4rem; }
.pn-del { color: var(--rubric); }
.pn-vv { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--serif); }
.pn-vv span { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
.pn-v { width: auto; padding: 0.15rem 0.3rem; font-size: 0.9rem; }
.pn-vv { white-space: nowrap; flex-wrap: nowrap; }

.par-pick { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.par-pick:hover { color: var(--gold); border-bottom-color: var(--gold); }
.par-pick span { font-size: 0.7em; margin-left: 0.3rem; color: var(--muted); }
/* group-study ticks on confession / catechism pages */
.qa.has-cread { position: relative; }
.cread { float: right; margin: 0 0 0.4rem 0.8rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); font: inherit; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.6rem; cursor: pointer; position: relative; z-index: 2; }
.cread:hover { border-color: var(--gold); color: var(--text); }
.cread.on { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.cstudies { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.6rem; margin: 0 0 1.4rem; }
.cstudy { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--bg2); color: var(--text); }
.cstudy:hover { background: var(--bg3); color: var(--text); }
.cstudy b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.cstudy-bar { height: 4px; background: var(--line); } .cstudy-bar i { display: block; height: 100%; background: var(--gold); }
/* Marriage: today's reading beside the list (same page width as the other Family tabs) */
.mar-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.mar-today { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
@media (max-width: 860px) { .mar-grid { grid-template-columns: 1fr; } .mar-today { position: static; } }
/* with Compare or Study open the columns are sized by the split; let the text fill its column */
body.par-open .scripture, body.study-open .scripture, .par-text.scripture { max-width: none; }
/* book intro: zoomed "when" strip with landmarks, and an overview bar */
.bi-strip.zoom { height: 64px; margin: 1.6rem 0 1.7rem; }
.bi-strip.zoom > span { top: 70px; }
.bi-lm { position: absolute; bottom: -4px; width: 0; font-weight: 400; }
.bi-lm::before { content: ""; position: absolute; left: -4px; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--gold); }
.bi-lm em, .bi-lm small { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; font-style: normal; text-align: center; }
.bi-lm em { bottom: 30px; font-family: var(--serif); font-size: 0.95rem; color: var(--text); }
.bi-lm small { bottom: 16px; font-size: 0.6875rem; color: var(--gold); }
.bi-here { position: absolute; bottom: 48px; transform: translateX(-50%); white-space: nowrap; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rubric); font-weight: 600; }
.bi-over { position: relative; height: 4px; background: var(--line); margin: 1.2rem 0 1.6rem; }
.bi-over u { position: absolute; top: -3px; height: 10px; border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 18%, transparent); }
.bi-over i { position: absolute; top: -2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--rubric); }
.bi-over span { position: absolute; top: 9px; font-size: 0.625rem; color: var(--dim); white-space: nowrap; }
.bi-over span:first-of-type, .bi-over span.r { transform: none; } .bi-over span:nth-of-type(2) { transform: translateX(-50%); }
.bi-lm.l em, .bi-lm.l small, .bi-here.l { transform: translateX(-12px); text-align: left; }
.bi-lm.r em, .bi-lm.r small, .bi-here.r { transform: translateX(calc(-100% + 12px)); text-align: right; }

/* reading controls docked in the text column: sticky at its bottom, stopping above the chapter buttons and the footer */
.rnav-dock { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); height: 0; margin-top: 74px; z-index: 1700; pointer-events: none; }
.rnav-dock > * { pointer-events: auto; }
body .rnav-dock .ch-bar { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
body .rnav-dock .float-nav { position: absolute; right: 0; bottom: 0; }
body:has(.actionbar.show) .rnav-dock .float-nav { bottom: 140px; }
.float-nav button.gone { display: none; }
/* page arrows: faint when shown, fainter still once the page settles */
.float-nav.show { opacity: 0.35; }
.float-nav.idle { opacity: 0.05; }
.float-nav.show:hover, .float-nav.idle:hover { opacity: 1; }
.rt-menu { position: relative; display: inline-flex; }
.rt-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1600; display: flex; flex-direction: column; align-items: stretch; gap: 0.4rem; min-width: 240px; padding: 0.7rem; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.rt-pop[hidden] { display: none; }
.rt-pop > .chip { justify-content: flex-start; text-align: left; }
.rt-row { display: flex; align-items: center; gap: 0.4rem; } .rt-row > span { flex: 1; }
@media (max-width: 640px) { .rt-pop { right: auto; left: 0; } }
.par-ic[data-pz] { font-size: 0.78rem; letter-spacing: 0.04em; }
#dispBtn { text-transform: none; letter-spacing: 0.04em; }
.sh-log { display: flex; flex-direction: column; gap: 0.6rem; max-height: 34vh; overflow-y: auto; margin-bottom: 0.6rem; }
.sh-n { padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; line-height: 1.5; }
.sh-n textarea, .sh-n input { width: 100%; margin: 0.3rem 0; }
.sh-add { display: flex; flex-direction: column; gap: 0.4rem; }
/* Prayer: topical guides */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1rem 0 1.5rem; }
.pt-card { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; padding: 0.8rem 0.9rem; background: var(--bg2); border: 0; color: var(--text); font: inherit; cursor: pointer; }
.pt-card b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.pt-card:hover, .pt-card.on { background: var(--bg3); } .pt-card.on { box-shadow: inset 3px 0 0 var(--gold); }
.pt-v { font-family: var(--scripture); font-size: 1.12rem; line-height: 1.6; margin: 0 0 1rem; padding-left: 1rem; border-left: 2px solid var(--gold); }
.pt-v cite { display: block; font-style: normal; font-size: 0.8rem; margin-top: 0.25rem; }
/* My dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.dash-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.dash-h h3 { margin: 0; }
.dash-big { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; margin-right: 0.2rem; }
.dash-sw { display: inline-block; width: 10px; height: 10px; margin-right: 0.4rem; border-radius: 2px; vertical-align: middle; }
.dash-arr { margin-bottom: 1.4rem; }
.dash-ar { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.dash-ar span { display: flex; gap: 0.3rem; }
.dash-sw.hl-gold { background: var(--hl-gold); } .dash-sw.hl-rose { background: var(--hl-rose); } .dash-sw.hl-sage { background: var(--hl-sage); } .dash-sw.hl-sky { background: var(--hl-sky); }
/* study editor: one title, a slim tool row, page tabs only when there are pages */
.study-title { border: 0; border-bottom: 1px solid transparent; background: none; padding: 0.2rem 0; }
.study-title:hover { border-bottom-color: var(--line); } .study-title:focus { border-bottom-color: var(--gold); outline: none; }
.study-toolbar { gap: 2px; align-items: center; border-bottom: 1px solid var(--line); padding: 0.3rem 0; }
.st-b, .st-x { border: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 0.95rem; min-width: 32px; height: 32px; padding: 0 0.45rem; cursor: pointer; border-radius: 2px; }
.st-b:hover, .st-x:hover { color: var(--text); background: var(--bg2); border-color: var(--line); }
.st-x { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.04em; border-color: var(--line); margin-right: 0.3rem; }
.st-more { position: relative; margin-left: auto; }
.st-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; min-width: 190px; padding: 0.3rem; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.st-pop[hidden] { display: none; }
.st-pop button { text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.9rem; padding: 0.45rem 0.6rem; cursor: pointer; }
.st-pop button:hover { background: var(--bg2); }
.study-pages[hidden] { display: none; }
.study-layout:has(.study-pages[hidden]) { grid-template-columns: 1fr; }
.study-pages .pg.on { cursor: text; }

/* ───────── church page ───────── */
.input.input-sm { padding: 0.3rem 0.5rem; font-size: 0.875rem; width: auto; }
.cu-notices { display: grid; gap: 1rem; }
.cu-notice { border-left: 2px solid var(--gold); padding: 0.25rem 0 0.25rem 1rem; }
.cu-notice h3 { margin: 0.25rem 0; }
.cu-notice p { margin: 0.25rem 0 0; }
.cu-song { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.cu-song .btns { margin: 0; flex-wrap: nowrap; }
.cu-like { border: 1px solid var(--line-strong); background: none; color: var(--muted); padding: 0.3rem 0.55rem; cursor: pointer; font: inherit; font-size: 0.875rem; white-space: nowrap; }
.cu-like.on { color: var(--rubric); border-color: var(--rubric); }
.cu-row { display: flex; gap: 0.5rem; align-items: center; padding: 0.35rem 0; }
.cu-code { font-family: var(--mono, monospace); font-size: 1.4rem; letter-spacing: 0.15em; padding: 0.2rem 0.6rem; border: 1px dashed var(--gold); color: var(--gold); }
@media (max-width: 640px) { .cu-song { grid-template-columns: auto 1fr; } .cu-song .btns { grid-column: 1 / -1; justify-content: flex-end; } }
.xpop-comm { margin: 0.5rem 0 0; }
.xpop-acts { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.xpop-more.on { color: var(--text); }
.xpop-topics .chips .chip { font-size: 0.75rem; }
.btn-split { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.study-editor tr > th:first-child:not(:last-child) { width: 28%; }
