/* ═══════════════════════════════════════════════════════════════════
   GRV BIBLE v3 reader (approved mockup: mockups/bible-v3.html)
   Private --b3-* tokens: branding-loader.js rewrites the common variable
   names at runtime, so this sheet never reads them. The shared chrome
   (rail, phone top bar, dock) comes from wr-header.js + brethren-v2.css.
   Phones: slim sticky bar, picker / verse tools / Aa as bottom sheets.
   ≥900px: book column + reading column (study panel below the chapter).
   ≥1280px: book column + reading column + study panel on the right.
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --b3-bg: #060c2e;
    --b3-bg-2: #0a1442;
    --b3-bg-3: #0f1d5a;
    --b3-bg-4: #16277a;
    --b3-gold: #f5a623;
    --b3-gold-hi: #ffc964;
    --b3-gold-lo: #c47f0e;
    --b3-ink: #f0f2ff;
    --b3-ink-2: #b8c4e8;
    --b3-ink-3: #7a8ec0;
    --b3-live: #3ddc97;
    --b3-alert: #ff5d6c;
    --b3-edge: rgba(122, 142, 192, 0.16);
    --b3-edge-2: rgba(122, 142, 192, 0.28);
    --b3-edge-gold: rgba(245, 166, 35, 0.45);
    --b3-display: 'Sora', sans-serif;
    --b3-body: 'Plus Jakarta Sans', sans-serif;
    --b3-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --b3-safe-t: env(safe-area-inset-top, 0px);
    --b3-safe-b: env(safe-area-inset-bottom, 0px);
    --b3-top: calc(60px + var(--b3-safe-t));
    --b3-dock: calc(66px + var(--b3-safe-b));
    /* reader */
    --b3-jesus: #ffd79a;
    --b3-vs: var(--verse-size, 20px);
    --b3-lh: 1.85;
    --b3-scripture: var(--b3-body);
    --b3-measure: calc(var(--b3-vs) * 34);
    /* highlight tints: gold + blue only */
    --b3-h-gold: rgba(245, 166, 35, 0.22);
    --b3-h-honey: rgba(255, 201, 100, 0.2);
    --b3-h-amber: rgba(196, 127, 14, 0.34);
    --b3-h-sky: rgba(110, 168, 255, 0.22);
    --b3-h-royal: rgba(64, 96, 255, 0.34);
    /* older notes saved with inline var(--ink-m) */
    --ink-m: #b8c4e8;
}
@media (min-width: 900px) {
    :root { --b3-top: 0px; --b3-dock: 0px; }
}
html.b3-serif { --b3-scripture: 'Literata', Georgia, serif; }

body.b3 { margin: 0; min-height: 100vh; overflow-x: hidden; }
body.b3 *, body.b3 *::before, body.b3 *::after { box-sizing: border-box; }
/* resets carry zero specificity so every component class wins */
:where(.b3-ui) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.b3-ui) :where(button:disabled) { opacity: 0.38; cursor: default; }
:where(.b3-ui) :where(input, select, textarea) { font: inherit; color: inherit; }
:where(.b3-ui) :where(h1, h2, h3, h4, p) { margin: 0; }
:where(.b3-ui) :where(a) { color: inherit; text-decoration: none; }
.b3-ui kbd, .b3-kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--b3-edge-2); background: var(--b3-bg-2); font: 700 10.5px var(--b3-display); color: var(--b3-ink-3); }
html.v2 .b3-ui input:focus-visible, html.v2 .b3-ui textarea:focus-visible { outline: none; }

/* ── shared idioms ── */
.b3-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; font: 700 13px var(--b3-display); white-space: nowrap; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); }
.b3-btn.gold { color: var(--b3-bg) !important; background: linear-gradient(180deg, var(--b3-gold-hi), var(--b3-gold)) !important; }
.b3-btn.line { background: var(--b3-bg-3) !important; box-shadow: inset 0 0 0 1px var(--b3-edge-2); color: var(--b3-ink) !important; }
.b3-btn.line i { color: var(--b3-gold); }
.b3-act { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px !important; border-radius: 99px; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge) !important; font: 700 12.5px var(--b3-display) !important; color: var(--b3-ink-2) !important; white-space: nowrap; transition: transform 0.15s var(--b3-ease), border-color 0.15s; }
.b3-act i { color: var(--b3-gold); font-size: 13px; }
.b3-act:hover { border-color: var(--b3-edge-gold) !important; color: var(--b3-ink) !important; }
.b3-act:active { transform: scale(0.94); }
.b3-eyebrow { font: 800 11px var(--b3-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--b3-ink-3); }
.b3-eyebrow i { color: var(--b3-gold); margin-right: 6px; }
.b3-veb { display: inline-flex; align-items: center; gap: 10px; font: 800 10px var(--b3-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--b3-gold); }
.b3-veb::before, .b3-veb::after { content: ''; width: 26px; height: 1px; background: var(--b3-edge-gold); }
.b3-grv { position: relative; background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(32, 64, 200, 0.45), transparent 70%), linear-gradient(rgba(122, 142, 192, 0.06) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(122, 142, 192, 0.06) 1px, transparent 1px) 0 0 / 18px 18px, var(--b3-bg); border: 1px solid rgba(122, 142, 192, 0.2); border-radius: 4px; }
.b3-grv .b3-c { position: absolute; width: 16px; height: 16px; border: 0 solid var(--b3-gold); }
.b3-grv .c1 { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.b3-grv .c2 { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.b3-grv .c3 { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; opacity: 0.5; }
.b3-grv .c4 { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; opacity: 0.5; }
.b3-card { min-width: 0; padding: 14px; border-radius: 16px; background: var(--b3-bg-2); border: 1px solid var(--b3-edge); }
.b3-wh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.b3-wh .b3-eyebrow { white-space: nowrap; letter-spacing: 0.12em; }
.b3-wh > button, .b3-wh > a, .b3-wh > span.b3-cnt { font: 700 12px var(--b3-body) !important; color: var(--b3-gold) !important; white-space: nowrap; }
.b3-wh > span.b3-cnt { color: var(--b3-ink-3) !important; }
.b3-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; background: rgba(245, 166, 35, 0.14); color: var(--b3-gold); font: 800 10px var(--b3-display); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.b3-grab { display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: var(--b3-edge-2); }

/* round buttons: always true circles */
.b3-rb { width: 38px; height: 38px; min-width: 38px; flex: none; aspect-ratio: 1; border-radius: 50% !important; display: inline-grid !important; place-items: center; color: var(--b3-ink-2) !important; font-size: 15px; transition: background 0.15s, color 0.15s; }
.b3-rb:hover:not(:disabled) { color: var(--b3-gold) !important; background: var(--b3-bg-3) !important; }
.b3-rb.on, .b3-rb[aria-pressed='true'] { color: var(--b3-gold) !important; background: rgba(245, 166, 35, 0.14) !important; }
.b3-rb.aa { font: 800 15px var(--b3-display) !important; letter-spacing: -0.02em; }

/* ═══ layout ═══ */
.b3-bible { display: block; color: var(--b3-ink); font-family: var(--b3-body); }
.b3-read { position: relative; min-width: 0; }
.b3-dk { display: none !important; }

/* sticky reading bar (phone: slim, under the top bar) */
.b3-rbar { position: sticky; top: var(--b3-top); z-index: 50; display: flex; align-items: center; gap: 0; height: 52px; padding: 0 6px 0 10px; background: rgba(6, 12, 46, 0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--b3-edge); }
.b3-sp { flex: 1; min-width: 4px; }
.b3-pick { display: inline-flex !important; align-items: center; gap: 7px; height: 36px; max-width: 52vw; padding: 0 12px 0 14px !important; border-radius: 99px; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge-2) !important; font: 700 14px var(--b3-display) !important; white-space: nowrap; }
.b3-pick span { overflow: hidden; text-overflow: ellipsis; }
.b3-pick b { color: var(--b3-gold); }
.b3-pick i { font-size: 10px; color: var(--b3-ink-3); }
.b3-crumb { align-items: center; gap: 8px; min-width: 0; font: 800 11px var(--b3-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--b3-ink-3); white-space: nowrap; }
.b3-crumb i { color: var(--b3-gold); }
.b3-crumb .fa-chevron-right { font-size: 8px; color: var(--b3-ink-3); }
.b3-crumb b { color: var(--b3-ink); overflow: hidden; text-overflow: ellipsis; }
.b3-spill { align-items: center; gap: 10px; height: 38px; width: 214px; padding: 0 8px 0 14px !important; white-space: nowrap; border-radius: 99px; background: var(--b3-bg-2) !important; border: 1px solid var(--b3-edge-2) !important; font: 500 13px var(--b3-body) !important; color: var(--b3-ink-3) !important; }
.b3-spill i { color: var(--b3-gold); }
.b3-spill span { flex: 1; text-align: left; }
.b3-spill:hover { border-color: var(--b3-edge-gold) !important; }
.b3-lpill { align-items: center; gap: 8px; height: 38px; padding: 0 14px !important; margin: 0 4px !important; border-radius: 99px; border: 1px solid var(--b3-edge-gold) !important; background: rgba(245, 166, 35, 0.08) !important; font: 700 12.5px var(--b3-display) !important; color: var(--b3-gold) !important; white-space: nowrap; }
.b3-lpill.on { background: var(--b3-gold) !important; color: var(--b3-bg) !important; }
.b3-rsep { width: 1px; height: 24px; margin: 0 8px; background: var(--b3-edge-2); }
.b3-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: rgba(122, 142, 192, 0.18); pointer-events: none; }
.b3-prog i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--b3-gold-lo), var(--b3-gold)); box-shadow: 0 0 8px rgba(245, 166, 35, 0.6); transition: width 0.15s linear; }
@media (max-width: 359px) {
    .b3-rbar { padding: 0 2px 0 6px; }
    .b3-rbar .b3-rb { width: 34px; height: 34px; min-width: 34px; }
    .b3-pick { padding: 0 9px 0 11px !important; }
}

/* chapter header */
.b3-page { padding: 26px 18px 30px; }
.b3-chead { text-align: center; padding: 6px 0 24px; margin-bottom: 18px; background: radial-gradient(ellipse 70% 70% at 50% 0%, rgba(32, 64, 200, 0.3), transparent 70%); border: 0; }
.b3-chead .b3-c { display: none; }
.b3-cbk { margin-top: 10px; font: 800 12px var(--b3-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--b3-gold); }
.b3-num { margin: 4px 0 0 !important; font: 800 84px/1 var(--b3-display) !important; letter-spacing: -0.04em; color: var(--b3-ink); text-shadow: 0 6px 40px rgba(32, 64, 200, 0.8); }
.b3-ttl { margin-top: 4px; font: 600 16px var(--b3-display); color: var(--b3-ink-2); }
.b3-ttl:empty { display: none; }
.b3-rule { width: 64px; height: 3px; margin: 16px auto 0; background: var(--b3-gold); box-shadow: 0 0 14px rgba(245, 166, 35, 0.6); }
.b3-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.b3-meta:empty { display: none; }
.b3-mp { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--b3-bg-2); border: 1px solid var(--b3-edge); font: 700 12px var(--b3-body); color: var(--b3-ink-3); white-space: nowrap; }
.b3-mp i { color: var(--b3-gold); font-size: 11px; }

/* ═══ scripture text ═══ */
.b3-text { max-width: var(--b3-measure); margin: 0 auto; font-family: var(--b3-scripture); font-size: var(--b3-vs); line-height: var(--b3-lh); color: #e9ecfb; overflow-wrap: break-word; }
.b3-text .b3-p { display: flow-root; margin: 0 0 0.85em; }
.b3-text .section-heading { display: flex; align-items: center; gap: 12px; margin: 1.6em 0 0.7em; font: 800 12px/1.5 var(--b3-display); letter-spacing: 0.15em; text-transform: uppercase; color: var(--b3-gold-hi); }
.b3-text .section-heading::after { content: ''; flex: 1; min-width: 24px; height: 1px; background: linear-gradient(90deg, var(--b3-edge-gold), transparent); }
.b3-text .section-heading:first-child { margin-top: 0; }
.b3-text .verse { cursor: pointer; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background 0.15s, box-shadow 0.15s; }
@media (hover: hover) { .b3-text .verse:hover { background: rgba(122, 142, 192, 0.1); } }
.b3-text .verse-num { margin: 0 0.3em 0 0.1em; font: 800 0.56em var(--b3-display); vertical-align: 0.6em; line-height: 0; color: var(--b3-gold); font-variant-numeric: tabular-nums; user-select: none; -webkit-user-select: none; }
.b3-text:not(.vbv) .verse.has-drop .verse-num { display: none; }
.b3-text:not(.vbv) .dropcap { float: left; padding: 0.1em 0.12em 0 0; font: 800 3.3em/0.86 var(--b3-display); color: var(--b3-gold); }
.b3-text .dropcap-q { font-size: 0.5em; vertical-align: top; margin-right: 0.04em; }
.b3-text .jesus { color: var(--b3-jesus); }
html.b3-nojesus .b3-text .jesus { color: inherit; }
/* whole-verse highlights (older colour names shown as the nearest allowed colour) */
.b3-text .verse.hl-gold { background: var(--b3-h-gold); }
.b3-text .verse.hl-honey { background: var(--b3-h-honey); }
.b3-text .verse.hl-amber { background: var(--b3-h-amber); }
.b3-text .verse.hl-sky { background: var(--b3-h-sky); }
.b3-text .verse.hl-royal { background: var(--b3-h-royal); }
.b3-text .verse.selected { background: rgba(32, 64, 200, 0.45); box-shadow: inset 0 0 0 1px var(--b3-edge-gold); }
.b3-text .verse.verse-highlight { background: rgba(32, 64, 200, 0.4); box-shadow: inset 0 -2px 0 var(--b3-gold); }
.b3-text .verse.reading { background: rgba(245, 166, 35, 0.1); box-shadow: inset 0 -2px 0 rgba(245, 166, 35, 0.5); }
/* word marks */
mark.hl-mark { color: inherit; padding: 0.04em 0; border-radius: 2px; background: rgba(245, 166, 35, 0.34); }
mark.hl-mark.hl-honey, mark.hl-mark.hl-rose { background: rgba(255, 201, 100, 0.3); }
mark.hl-mark.hl-amber { background: rgba(196, 127, 14, 0.45); }
mark.hl-mark.hl-sky, mark.hl-mark.hl-sage { background: rgba(110, 168, 255, 0.32); }
mark.hl-mark.hl-royal, mark.hl-mark.hl-lavender { background: rgba(64, 96, 255, 0.45); }
/* private side-note marker */
.b3-text .verse-note-dot { display: inline-grid !important; place-items: center; width: 1.2em; height: 1.2em; min-width: 0; margin: 0 0 0 0.3em !important; padding: 0 !important; border-radius: 50% !important; background: var(--b3-gold) !important; color: var(--b3-bg) !important; font-size: 0.6em !important; line-height: 1; vertical-align: 0.25em; box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2); cursor: pointer; }
/* verse by verse */
.b3-text.vbv .b3-p { margin: 0; }
.b3-text.vbv .verse { position: relative; display: block; margin: 0 -10px; padding: 2px 10px 2px 2.2em; }
.b3-text.vbv .verse-num { position: absolute; left: 0; top: 2px; width: 1.7em; margin: 0; font-size: 11.5px; text-align: right; line-height: calc(var(--b3-vs) * var(--b3-lh)); vertical-align: baseline; }
.b3-text.vbv .verse.selected { box-shadow: inset 3px 0 0 var(--b3-gold); }
.b3-text.vbv .section-heading { margin-top: 1.4em; }
.verses-loading, .verses-empty { padding: 40px 10px; text-align: center; font: 600 15px var(--b3-body); color: var(--b3-ink-3); }
.verses-empty i { display: block; margin-bottom: 10px; font-size: 26px; color: var(--b3-gold); }
.verses-empty strong { display: block; margin-bottom: 4px; font: 800 18px var(--b3-display); color: var(--b3-ink); }
.b3-orn { display: flex; align-items: center; gap: 14px; max-width: var(--b3-measure); margin: 30px auto 18px; color: var(--b3-gold); font-size: 13px; }
.b3-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--b3-edge-gold)); }
.b3-orn span:last-child { background: linear-gradient(90deg, var(--b3-edge-gold), transparent); }
.b3-cnav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: var(--b3-measure); margin: 0 auto; }
.b3-cnav .b3-btn { min-height: 56px; flex-direction: column; gap: 1px; align-items: flex-start; padding: 0 16px; min-width: 0; }
.b3-cnav .b3-btn:last-child { align-items: flex-end; }
.b3-cnav .b3-btn small { font: 800 9.5px var(--b3-display); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.b3-cnav .b3-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.b3-cnav .b3-btn:disabled { visibility: hidden; }

/* Listen mini-player */
.b3-player { position: sticky; bottom: calc(var(--b3-dock) + 10px); z-index: 55; display: flex; align-items: center; gap: 10px; margin: 0 8px 10px; padding: 8px; border-radius: 99px; background: rgba(10, 20, 66, 0.97); border: 1px solid var(--b3-edge-gold); box-shadow: 0 14px 40px rgba(2, 6, 30, 0.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.b3-player[hidden] { display: none !important; }
.b3-player .b3-pp { width: 42px; height: 42px; min-width: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--b3-gold-hi), var(--b3-gold)) !important; color: var(--b3-bg) !important; font-size: 15px; }
.b3-player .b3-ptx { flex: 1; min-width: 0; }
.b3-player .b3-ptx b { display: block; font: 700 13px var(--b3-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b3-player .b3-ptx small { display: block; font: 600 11.5px var(--b3-body); color: var(--b3-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b3-player .b3-pbar { height: 3px; margin-top: 5px; border-radius: 3px; background: rgba(122, 142, 192, 0.25); }
.b3-player .b3-pbar i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--b3-gold); transition: width 0.3s; }
.b3-player .b3-spd { flex: none; height: 30px; padding: 0 10px !important; border-radius: 99px; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge-2) !important; font: 800 12px var(--b3-display) !important; }
.b3-player .b3-rb { width: 34px; height: 34px; min-width: 34px; }

/* ═══ books + chapters (desktop column / phone sheet) ═══ */
.b3-nav { display: flex; flex-direction: column; color: var(--b3-ink); }
.b3-sheet-head { display: none; }
.b3-tts { display: flex; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--b3-edge); flex-shrink: 0; }
.b3-tt { height: 44px; font: 800 10.5px var(--b3-display) !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--b3-ink-3) !important; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; }
.b3-tt.active { color: var(--b3-ink) !important; box-shadow: inset 0 -2px 0 var(--b3-gold); }
.b3-filter { display: flex; align-items: center; gap: 10px; height: 42px; margin: 12px 14px 4px; padding: 0 14px; border-radius: 12px; background: var(--b3-bg-3); border: 1px solid var(--b3-edge-2); flex-shrink: 0; }
.b3-filter:focus-within { border-color: var(--b3-gold); }
.b3-filter i { color: var(--b3-gold); font-size: 13px; }
.b3-filter input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--b3-ink); }
.b3-filter input::placeholder { color: var(--b3-ink-3); }
.b3-filter input::-webkit-search-cancel-button { -webkit-appearance: none; }
.b3-books { padding: 0 8px 10px; }
.b3-books .book-group { display: none; }
.b3-books .book-group.show { display: block; }
.b3-books .grp-label { padding: 14px 10px 6px; font: 800 10px var(--b3-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--b3-gold); }
.b3-books .book { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; padding: 0 12px !important; border-radius: 10px; font: 600 14px var(--b3-body) !important; color: var(--b3-ink-2) !important; text-align: left; }
.b3-books .book .abbr { font: 700 11px var(--b3-display); color: var(--b3-ink-3); }
.b3-books .book:hover { background: var(--b3-bg-3) !important; color: var(--b3-ink) !important; }
.b3-books .book.active { background: var(--b3-bg-3) !important; color: var(--b3-ink) !important; box-shadow: inset 3px 0 0 var(--b3-gold); font-weight: 700 !important; }
.b3-books .book.active .abbr { color: var(--b3-gold); }
.b3-books .book.unavailable { opacity: 0.55; }
.b3-books .b3-nomatch { padding: 18px 10px; font-size: 13px; color: var(--b3-ink-3); }
.b3-chdock { padding: 12px 14px 14px; border-top: 1px solid var(--b3-edge); flex-shrink: 0; }
.b3-chd-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.b3-chd-h b { font: 800 16px var(--b3-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b3-chd-h b em { font-style: normal; color: var(--b3-gold); }
.b3-chd-h small { font: 800 10px var(--b3-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--b3-ink-3); white-space: nowrap; }
.b3-chgrid { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--b3-bg-4) transparent; }
.b3-chgrid .ch-btn { position: relative; height: 36px; border-radius: 9px; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge) !important; font: 700 13px var(--b3-display) !important; color: var(--b3-ink-2) !important; font-variant-numeric: tabular-nums; }
.b3-chgrid .ch-btn:hover { border-color: var(--b3-edge-gold) !important; color: var(--b3-ink) !important; }
.b3-chgrid .ch-btn.active { background: linear-gradient(180deg, var(--b3-gold-hi), var(--b3-gold)) !important; border-color: var(--b3-gold) !important; color: var(--b3-bg) !important; }
.b3-chnav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.b3-chnav .b3-btn { min-height: 36px; font-size: 12.5px; }

/* phone / tablet: the book column is a bottom sheet */
@media (max-width: 899px) {
    .b3-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1260; display: none; max-width: 560px; max-height: 88vh; max-height: 88dvh; margin: 0 auto; padding-top: 8px; border-radius: 22px 22px 0 0; background: var(--b3-bg-2); border-top: 1px solid var(--b3-edge-gold); box-shadow: 0 -20px 60px rgba(2, 6, 30, 0.7); overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(14px + var(--b3-safe-b)); }
    .b3-nav.open { display: flex; animation: b3-rise 0.25s var(--b3-ease); }
    .b3-sheet-head { display: flex; flex-direction: column; flex-shrink: 0; }
    .b3-sheet-row { display: flex; align-items: center; padding: 0 6px 4px 18px; }
    .b3-sheet-row h2 { flex: 1; margin: 0; font: 800 17px var(--b3-display); }
    .b3-nav .b3-tts { order: 1; }
    .b3-nav .b3-chdock { order: 2; border-top: 0; border-bottom: 1px solid var(--b3-edge); }
    .b3-nav .b3-chgrid { max-height: none; overflow: visible; }
    .b3-nav .b3-chnav { display: none; }
    .b3-nav .b3-filter { order: 3; }
    .b3-nav .b3-books { order: 4; flex-shrink: 0; }
}
.b3-scrim { position: fixed; inset: 0; z-index: 1250; display: none; background: rgba(2, 6, 30, 0.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.b3-scrim.visible { display: block; }

/* ═══ study panel ═══ */
.b3-study { display: flex; flex-direction: column; gap: 12px; padding: 4px 10px 24px; }
.b3-shd { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.b3-shd::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--b3-edge-2), transparent); order: 1; }
.b3-shd > button { order: 2; font: 700 12px var(--b3-body) !important; color: var(--b3-gold) !important; white-space: nowrap; }
.b3-empty { font-size: 13px; line-height: 1.5; color: var(--b3-ink-3); }
.b3-nt { display: block; width: 100%; padding: 10px 12px !important; margin-top: 8px !important; border-radius: 12px; background: var(--b3-bg-3) !important; box-shadow: inset 3px 0 0 var(--b3-gold); text-align: left; }
.b3-wh + .b3-nt { margin-top: 0 !important; }
.b3-nt .r { display: flex; justify-content: space-between; gap: 8px; font: 700 12.5px var(--b3-display); color: var(--b3-gold); }
.b3-nt .r small { font: 600 11px var(--b3-body); color: var(--b3-ink-3); }
.b3-nt b { display: block; margin-top: 3px; font: 700 13.5px var(--b3-display); color: var(--b3-ink); }
.b3-nt p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--b3-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b3-nt .pv { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font: 600 11px var(--b3-body); color: var(--b3-ink-3); }
.b3-hlr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0 !important; border-top: 1px solid var(--b3-edge) !important; text-align: left; }
.b3-wh + .b3-hlr { border-top: 0 !important; padding-top: 0 !important; }
.b3-hlr .sw { width: 14px; height: 14px; flex: none; border-radius: 50%; }
.b3-hlr .tx { flex: 1; min-width: 0; font-size: 13px; color: var(--b3-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b3-hlr .tx b { font: 700 12.5px var(--b3-display); color: var(--b3-ink); margin-right: 6px; }
.b3-votd { padding: 22px 16px 18px; text-align: center; }
.b3-votd p { margin: 10px 0 0; font: 600 16.5px/1.55 var(--b3-body); text-wrap: balance; color: var(--b3-ink); }
.b3-votd .ref { margin-top: 10px; font: 800 11.5px var(--b3-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--b3-gold); }
.b3-votd .row { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.sw-gold { background: #f5a623 !important; }
.sw-honey { background: #ffc964 !important; }
.sw-amber { background: #c47f0e !important; }
.sw-sky { background: #6ea8ff !important; }
.sw-royal { background: #4060ff !important; }

/* ═══ verse tools: floating bar (≥900) / bottom sheet (phones) ═══ */
.b3-vbar { z-index: 1160; color: var(--b3-ink); font-family: var(--b3-body); background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); box-shadow: 0 24px 60px rgba(2, 6, 30, 0.75); }
.b3-vb-h { display: flex; align-items: center; gap: 10px; }
.b3-vb-id { min-width: 0; }
.b3-vb-ref { font: 800 11.5px var(--b3-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--b3-gold); white-space: nowrap; }
.b3-vb-ref em { font-style: normal; margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: rgba(245, 166, 35, 0.16); }
.b3-vb-snip { display: none; }
.b3-sws { display: flex; align-items: center; gap: 7px; }
.b3-sws .lb { font: 800 10px var(--b3-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--b3-ink-3); margin-right: 2px; }
.b3-sws .hl-swatch { width: 26px; height: 26px; min-width: 26px; flex: none; aspect-ratio: 1; border-radius: 50% !important; border: 2px solid var(--b3-bg-2) !important; box-shadow: 0 0 0 1px var(--b3-edge-2); transition: transform 0.15s var(--b3-ease); }
.b3-sws .hl-swatch:hover { transform: scale(1.12); }
.b3-sws .hl-swatch.active { box-shadow: 0 0 0 2px var(--b3-ink); }
.b3-sws .hl-swatch.clear { display: grid; place-items: center; background: none !important; border: 1px dashed var(--b3-edge-2) !important; box-shadow: none; color: var(--b3-ink-3) !important; font-size: 12px; }
.b3-vb-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.b3-vb-x { margin-left: auto; }
.b3-vb-sw2 { display: none; }
@media (min-width: 900px) {
    .b3-vbar { position: absolute; width: 744px; padding: 10px 12px 12px; border-radius: 18px; animation: b3-pop 0.18s var(--b3-ease); }
    .b3-vbar::before { content: ''; position: absolute; top: -7px; left: var(--cx, 50%); width: 12px; height: 12px; margin-left: -6px; background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); border-width: 1px 0 0 1px; transform: rotate(45deg); }
    .b3-vbar.above::before { top: auto; bottom: -7px; border-width: 0 1px 1px 0; }
    .b3-vbar .b3-grab { display: none; }
    .b3-vb-h { margin-bottom: 10px; }
    .b3-vb-h .b3-sws { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--b3-edge-2); }
    .b3-vb-acts { gap: 5px; }
    .b3-vb-acts .b3-act { padding: 0 11px !important; gap: 6px; }
}
@media (max-width: 899px) {
    .b3-vbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1260; max-width: 560px; margin: 0 auto; padding: 8px 14px calc(16px + var(--b3-safe-b)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: b3-rise 0.22s var(--b3-ease); }
    .b3-vb-h { align-items: flex-start; }
    .b3-vb-h .b3-sws { display: none; }
    .b3-vb-id { flex: 1; }
    .b3-vb-snip { display: -webkit-box; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--b3-ink-2); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .b3-vb-x { margin-left: 0; }
    .b3-vb-sw2 { display: flex; justify-content: space-between; margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: var(--b3-bg-3); }
    .b3-vb-sw2 .hl-swatch { width: 32px; height: 32px; min-width: 32px; }
    .b3-vb-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .b3-vb-acts .b3-act { flex-direction: column; justify-content: center; gap: 6px; height: 66px; padding: 0 4px !important; border-radius: 14px; font-size: 11.5px !important; white-space: normal; text-align: center; line-height: 1.2; }
    .b3-vb-acts .b3-act i { font-size: 16px; }
}

/* ═══ Aa reading settings ═══ */
.b3-aap { position: absolute; z-index: 1170; width: 340px; padding: 16px; border-radius: 18px; color: var(--b3-ink); font-family: var(--b3-body); background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); box-shadow: 0 24px 60px rgba(2, 6, 30, 0.75); animation: b3-pop 0.18s var(--b3-ease); }
.b3-aap .b3-grab { display: none; }
.b3-aa-row { margin-top: 14px; }
.b3-aa-row > .b3-eyebrow { display: block; margin-bottom: 8px; }
.b3-sz { display: flex; align-items: center; gap: 10px; }
.b3-sz .b3-a { width: 40px; height: 40px; min-width: 40px; flex: none; aspect-ratio: 1; border-radius: 50% !important; display: grid; place-items: center; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge-2) !important; font: 800 13px var(--b3-display) !important; }
.b3-sz .b3-a.lg { font-size: 18px !important; }
.b3-sz input { flex: 1; min-width: 0; accent-color: var(--b3-gold); }
.b3-sz output { width: 28px; text-align: center; font: 800 14px var(--b3-display); color: var(--b3-gold); }
.b3-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--b3-bg-3); border: 1px solid var(--b3-edge); }
.b3-seg button { height: 36px; border-radius: 9px; font: 700 12.5px var(--b3-display) !important; color: var(--b3-ink-2) !important; white-space: nowrap; }
.b3-seg button.on { background: var(--b3-gold) !important; color: var(--b3-bg) !important; }
.b3-seg .serif-s { font-family: 'Literata', Georgia, serif !important; font-weight: 500 !important; }
.b3-tgl { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px !important; font: 600 13.5px var(--b3-body) !important; color: var(--b3-ink-2) !important; text-align: left; }
.b3-tgl span { flex: 1; }
.b3-tgl span b { color: var(--b3-jesus); font-weight: 600; }
.b3-tgl i { position: relative; width: 42px; height: 24px; flex: none; border-radius: 99px; background: var(--b3-bg-4); transition: background 0.2s; }
.b3-tgl i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--b3-ink-2); transition: transform 0.2s var(--b3-ease), background 0.2s; }
.b3-tgl.on i { background: var(--b3-gold); }
.b3-tgl.on i::after { transform: translateX(18px); background: var(--b3-bg); }
.b3-aap .b3-btn { width: 100%; margin-top: 16px; }
@media (max-width: 899px) {
    .b3-aap { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; z-index: 1260; width: auto; max-width: 560px; margin: 0 auto; padding: 8px 16px calc(18px + var(--b3-safe-b)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: b3-rise 0.22s var(--b3-ease); }
    .b3-aap .b3-grab { display: block; }
}

/* ═══ search palette (Ctrl K) ═══ */
.b3-palwrap { position: fixed; inset: 0; z-index: 10050; display: none; background: rgba(2, 6, 30, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.b3-palwrap.open { display: block; }
.b3-pal { position: absolute; display: flex; flex-direction: column; color: var(--b3-ink); font-family: var(--b3-body); background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); box-shadow: 0 30px 80px rgba(2, 6, 30, 0.8); }
@media (min-width: 700px) {
    .b3-pal { top: 10vh; left: 50%; width: 660px; max-width: calc(100vw - 32px); max-height: 76vh; transform: translateX(-50%); border-radius: 20px; animation: b3-fade 0.15s ease; }
}
@media (max-width: 699px) {
    .b3-pal { inset: 0; border-width: 0; padding-top: var(--b3-safe-t); padding-bottom: var(--b3-safe-b); }
    .b3-pal-ft .keys, .b3-pal-in kbd { display: none !important; }
}
.b3-pal-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--b3-edge); flex-shrink: 0; }
.b3-pal-in > i { color: var(--b3-gold); }
.b3-pal-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 600 17px var(--b3-body); color: var(--b3-ink); }
.b3-pal-in input::placeholder { color: var(--b3-ink-3); font-weight: 500; }
.b3-pal-in input::-webkit-search-cancel-button { -webkit-appearance: none; }
.b3-pal-sc { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 18px; border-bottom: 1px solid var(--b3-edge); flex-shrink: 0; }
.b3-pal-sc::-webkit-scrollbar { display: none; }
.b3-pal-sc button, .b3-pal-sel { flex: none; height: 30px; padding: 0 12px !important; border-radius: 99px; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge) !important; font: 700 12px var(--b3-body) !important; color: var(--b3-ink-2) !important; white-space: nowrap; }
.b3-pal-sc button.on, .b3-pal-sel.on { background: var(--b3-gold) !important; border-color: var(--b3-gold) !important; color: var(--b3-bg) !important; }
.b3-pal-sel { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 12px !important; }
.b3-pal-sel select { height: 28px; max-width: 150px; border: 0; outline: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.b3-pal-sel select option, .b3-pal-sel select optgroup { background: var(--b3-bg-2); color: var(--b3-ink); }
.b3-pal-res { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px; }
.b3-pg { padding: 12px 10px 6px; font: 800 10px var(--b3-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--b3-ink-3); }
.b3-pr { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px !important; border-radius: 12px; text-align: left; }
.b3-pr:hover, .b3-pr.on { background: var(--b3-bg-3) !important; }
.b3-pr.on { box-shadow: inset 3px 0 0 var(--b3-gold); }
.b3-pr .ic { width: 36px; height: 36px; min-width: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--b3-bg-3); border: 1px solid var(--b3-edge-2); color: var(--b3-gold); font-size: 13px; }
.b3-pr.on .ic { background: var(--b3-bg-4); }
.b3-pr .tx { flex: 1; min-width: 0; }
.b3-pr .tx b { display: block; font: 700 14px var(--b3-display); color: var(--b3-ink); }
.b3-pr .tx small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--b3-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b3-pr .tx p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--b3-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b3-pr .tx p.wj { color: var(--b3-jesus); }
.b3-pr mark { background: rgba(245, 166, 35, 0.3); color: var(--b3-ink); border-radius: 2px; }
.b3-pr .go { flex: none; font: 700 11px var(--b3-display); color: var(--b3-ink-3); }
.b3-pal-msg { padding: 34px 20px; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--b3-ink-3); }
.b3-pal-msg i { display: block; margin-bottom: 10px; font-size: 24px; color: var(--b3-gold); }
.b3-pal-msg b { display: block; margin-bottom: 2px; font: 800 15px var(--b3-display); color: var(--b3-ink); }
.b3-pal-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 18px; border-top: 1px solid var(--b3-edge); font-size: 12px; color: var(--b3-ink-3); flex-shrink: 0; }
.b3-pal-ft .tip { flex: 1; min-width: 180px; }
.b3-pal-ft .tip b { color: var(--b3-gold); }
.b3-pal-ft span { display: inline-flex; align-items: center; gap: 5px; }

/* ═══ Share to the Scroll composer ═══ */
.b3-compose { position: fixed; z-index: 10045; left: 50%; top: 14vh; width: min(520px, calc(100vw - 32px)); padding: 16px; border-radius: 20px; color: var(--b3-ink); font-family: var(--b3-body); background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); box-shadow: 0 30px 80px rgba(2, 6, 30, 0.8); transform: translateX(-50%); animation: b3-fade 0.15s ease; }
.b3-compose .b3-grab { display: none; }
.b3-cmp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.b3-cmp-plate { padding: 18px 16px 14px; text-align: center; }
.b3-cmp-plate p { margin: 0; font: 600 15.5px/1.55 var(--b3-body); color: var(--b3-ink); }
.b3-cmp-plate .ref { margin-top: 10px; font: 800 11px var(--b3-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--b3-gold); }
.b3-compose textarea { display: block; width: 100%; min-height: 84px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; resize: vertical; outline: 0; background: var(--b3-bg-3); border: 1px solid var(--b3-edge-2); color: var(--b3-ink); font-size: 16px; line-height: 1.5; }
.b3-compose textarea:focus { border-color: var(--b3-gold); }
.b3-compose textarea::placeholder { color: var(--b3-ink-3); }
.b3-cmp-ft { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.b3-cmp-ft span { flex: 1; font-size: 12px; color: var(--b3-ink-3); }
@media (max-width: 699px) {
    .b3-compose { left: 0; right: 0; top: auto; bottom: 0; width: auto; transform: none; padding: 8px 16px calc(16px + var(--b3-safe-b)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: b3-rise 0.22s var(--b3-ease); }
    .b3-compose .b3-grab { display: block; }
}

/* ═══ word-highlight popup (after selecting words in a verse) ═══ */
.hl-context { position: fixed; z-index: 10015; display: none; align-items: center; gap: 4px; padding: 6px; border-radius: 99px; background: var(--b3-bg-3); border: 1px solid var(--b3-edge-gold); box-shadow: 0 14px 36px rgba(2, 6, 30, 0.65); }
.hl-context.open { display: flex; }
.hl-context .hl-dot { width: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--b3-bg-3); box-shadow: 0 0 0 1px var(--b3-edge-2); cursor: pointer; }
.hl-context .hl-clear { display: grid; place-items: center; width: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 50%; border: 1px dashed var(--b3-edge-2); background: none; color: var(--b3-ink-2); font-size: 12px; cursor: pointer; }

/* ═══ private side note popover ═══ */
.verse-annotation-popover { position: fixed; z-index: 10020; display: none; flex-direction: column; gap: 10px; width: 320px; padding: 14px 14px 12px; border-radius: 16px; color: var(--b3-ink); font-family: var(--b3-body); background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); box-shadow: 0 18px 50px rgba(2, 6, 30, 0.65); }
.verse-annotation-popover.open { display: flex; }
.va-header, .va-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.va-ref { font: 800 12px var(--b3-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--b3-gold); }
.va-text { min-height: 110px; font-size: 16px; }
.va-hint { font-size: 12px; color: var(--b3-ink-3); }
.va-hint i { margin-right: 4px; }
@media (max-width: 899px) {
    .verse-annotation-popover { top: auto !important; left: 0 !important; right: 0; bottom: var(--b3-dock); width: auto; padding: 16px 16px 18px; border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: b3-rise 0.25s var(--b3-ease); }
}

/* ═══ notes (kept editor) ═══ */
.notes-overlay { position: fixed; inset: 0; z-index: 10040; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(6, 12, 46, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-family: var(--b3-body); }
.notes-overlay.open { display: flex; }
.notes-modal { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); width: min(1020px, 100%); height: min(700px, calc(100vh - 48px)); border-radius: 18px; overflow: hidden; background: var(--b3-bg-2); border: 1px solid var(--b3-edge-gold); color: var(--b3-ink); animation: b3-rise 0.25s var(--b3-ease); }
.notes-modal h2, .notes-modal h3 { margin: 0; }
.notes-sidebar { display: flex; flex-direction: column; min-height: 0; background: var(--b3-bg); border-right: 1px solid var(--b3-edge); }
.notes-sidebar-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 18px 16px 12px; }
.notes-sidebar-header h2, .notes-content-header h3 { display: flex; align-items: center; gap: 10px; font: 800 17px var(--b3-display); }
.notes-sidebar-header h2 i, .notes-content-header h3 i { color: var(--b3-gold); font-size: 15px; }
.notes-sidebar-close { display: none !important; }
.notes-search-wrap { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--b3-edge-2); background: var(--b3-bg-3); }
.notes-search-wrap:focus-within { border-color: var(--b3-gold); }
.notes-search-wrap i { color: var(--b3-gold); font-size: 13px; }
.notes-search { flex: 1; min-width: 0; min-height: 42px; border: 0; outline: none; background: none; color: var(--b3-ink); font: 16px var(--b3-body); }
.notes-search::placeholder { color: var(--b3-ink-3); }
.notes-items { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.notes-empty { padding: 32px 14px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--b3-ink-3); }
.notes-empty i { display: block; margin-bottom: 10px; font-size: 24px; color: var(--b3-gold); opacity: 0.8; }
.note-card { padding: 11px 12px 11px 13px; border-radius: 10px; margin-top: 4px; border-left: 3px solid transparent; cursor: pointer; transition: background 0.15s ease; }
.note-card:hover { background: var(--b3-bg-2); }
.note-card.active { background: var(--b3-bg-3); border-left-color: var(--b3-gold); }
.note-card-ref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13.5px var(--b3-display); color: var(--b3-ink); }
.note-card-preview { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--b3-ink-3); }
.notes-new-btn { margin: 10px 12px 14px; }
.notes-content { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.notes-content-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px 4px 24px; }
.notes-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px 12px; border-bottom: 1px solid var(--b3-edge); font-size: 12px; color: var(--b3-ink-3); }
.autosave-indicator { font-weight: 600; }
.autosave-indicator .fa-check-circle { color: var(--b3-gold); }
.note-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.note-editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--b3-edge); overflow-x: auto; scrollbar-width: none; }
.note-editor-toolbar::-webkit-scrollbar { display: none; }
.ne-btn { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--b3-ink-2) !important; font-size: 14px; cursor: pointer; }
.ne-btn:hover { background: var(--b3-bg-3); color: var(--b3-gold) !important; }
.ne-sep { flex-shrink: 0; width: 1px; height: 22px; margin: 0 6px; background: var(--b3-edge); }
.ne-tag-input { flex: 0 0 150px; min-height: 36px; margin-left: auto; padding: 0 10px; border-radius: 10px; border: 1px solid var(--b3-edge); background: var(--b3-bg); color: var(--b3-ink) !important; font-size: 13px; outline: none; }
.ne-tag-input:focus { border-color: var(--b3-gold); }
.note-title-input { width: 100%; padding: 16px 24px 10px; border: 0; outline: none; background: none; color: var(--b3-ink) !important; font: 700 20px var(--b3-display) !important; }
.note-title-input::placeholder, .ne-tag-input::placeholder { color: var(--b3-ink-3); }
.note-textarea { flex: 1; min-height: 120px; overflow-y: auto; padding: 6px 24px 20px; outline: none; font-size: 16px; line-height: 1.75; color: var(--b3-ink); overflow-wrap: break-word; }
html.v2 .note-textarea:focus-visible, html.v2 .note-title-input:focus-visible, html.v2 .notes-search:focus-visible, html.v2 .va-text:focus-visible { outline: none; }
.note-textarea:empty::before { content: attr(data-placeholder); color: var(--b3-ink-3); }
.note-textarea h3 { margin: 14px 0 6px; font-size: 18px; }
.note-textarea ul { padding-left: 22px; }
.note-textarea blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--b3-gold) !important; color: var(--b3-ink-2) !important; font-style: italic; }
.note-textarea blockquote strong { font-style: normal; color: var(--b3-gold); }
.note-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 24px; border-top: 1px solid var(--b3-edge); font-size: 12px; color: var(--b3-ink-3); }
.ne-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 899px) {
    .notes-overlay { padding: 0; align-items: stretch; }
    .notes-modal { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; padding: var(--b3-safe-t) 0 var(--b3-safe-b); border: 0; border-radius: 0; }
    .notes-sidebar { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--b3-edge); }
    .notes-sidebar-header { padding: 10px 6px 10px 16px; }
    .notes-sidebar-close { display: inline-grid !important; }
    .notes-search-wrap { margin-right: 10px; }
    .notes-new-btn { margin: 8px 12px 12px; }
    .notes-content-header { display: none; }
    .notes-meta { padding: 10px 16px; }
    .ne-btn { width: 44px; height: 44px; }
    .ne-tag-input { flex-basis: 130px; min-height: 40px; font-size: 16px; }
    .note-title-input { padding: 14px 16px 8px; font-size: 18px !important; }
    .note-textarea { padding: 4px 16px 16px; }
    .note-editor-footer { padding: 8px 12px 8px 16px; }
}

/* ═══ focus / full-screen reading ═══ */
#focusBtn .fa-compress, html.bible-focus #focusBtn .fa-expand { display: none; }
html.bible-focus #focusBtn .fa-compress { display: inline-block; }
html.bible-focus body { padding: 0 !important; }
html.bible-focus .v2-rail, html.bible-focus .v2-mtop, html.bible-focus .v2-mdock, html.bible-focus .cw-bubble, html.bible-focus .pwa-banner,
html.bible-focus .b3-study { display: none !important; }
html.bible-focus .b3-rbar { top: 0; }
html.bible-focus .b3-player { bottom: calc(10px + var(--b3-safe-b)); }
@media (max-width: 899px) {
    html.bible-focus .b3-rbar { padding-top: var(--b3-safe-t); height: calc(52px + var(--b3-safe-t)); }
}
@media (min-width: 900px) {
    html.bible-focus .b3-bible { display: block !important; }
    html.bible-focus .b3-nav { display: none !important; }
    html.bible-focus .b3-rbar { padding-left: 40px; }
    html.bible-focus .b3-page { padding-top: 48px; }
}

/* ═══ ≥900px: book column + reading column ═══ */
@media (min-width: 900px) {
    .b3-ph { display: none !important; }
    .b3-crumb.b3-dk, .b3-spill.b3-dk, .b3-lpill.b3-dk { display: inline-flex !important; }
    .b3-rb.b3-dk { display: inline-grid !important; }
    .b3-rsep.b3-dk { display: block !important; }
    .b3-bible { display: grid; grid-template-columns: 256px minmax(0, 1fr); align-items: start; }
    .b3-nav { position: sticky; top: 0; grid-row: 1 / span 2; height: 100vh; background: rgba(10, 20, 66, 0.55); border-right: 1px solid var(--b3-edge-2); }
    .b3-nav .b3-tts { padding-top: 10px; }
    .b3-nav .b3-books { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--b3-bg-4) transparent; }
    .b3-nav .b3-chdock { background: rgba(6, 12, 46, 0.55); }
    .b3-read, .b3-study { grid-column: 2; }
    .b3-rbar { top: 0; height: 64px; padding: 0 12px 0 24px; }
    .b3-page { padding: 36px 40px 40px; }
    .b3-chead { max-width: var(--b3-measure); margin: 0 auto 30px; padding: 34px 20px 26px; background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(32, 64, 200, 0.45), transparent 70%), linear-gradient(rgba(122, 142, 192, 0.06) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(122, 142, 192, 0.06) 1px, transparent 1px) 0 0 / 18px 18px, var(--b3-bg); border: 1px solid rgba(122, 142, 192, 0.2); }
    .b3-chead .b3-c { display: block; }
    .b3-num { font-size: 104px !important; }
    .b3-player { bottom: 18px; max-width: 560px; margin: 0 auto 18px; }
    .b3-study { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; padding: 0 40px 40px; }
    .b3-study .b3-shd { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (max-width: 1279px) {
    .b3-rbar { padding-left: 18px; }
    .b3-crumb #crumbTest, .b3-crumb .fa-chevron-right { display: none; }
    .b3-spill { width: 170px; }
    .b3-spill kbd { display: none; }
}
/* the chat bubble would sit on the Listen player on phones */
@media (max-width: 899px) {
    html.b3-listening .cw-bubble { opacity: 0; pointer-events: none; }
}
/* ≥1280px: study panel on the right */
@media (min-width: 1280px) {
    .b3-bible { grid-template-columns: 256px minmax(0, 1fr) 300px; }
    .b3-nav { grid-row: auto; }
    .b3-read { grid-column: 2; }
    .b3-study { grid-column: 3; grid-row: 1; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; align-items: stretch; gap: 14px; padding: 18px 18px 28px; background: rgba(10, 20, 66, 0.45); border-left: 1px solid var(--b3-edge-2); scrollbar-width: thin; scrollbar-color: var(--b3-bg-4) transparent; }
    .b3-study .b3-shd { display: none; }
}

@keyframes b3-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes b3-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; } }
@keyframes b3-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .b3-ui, .b3-ui *, .b3-text .verse { animation: none !important; transition: none !important; }
}

/* ═══ About this book (pill under the chapter heading; bottom sheet on phones, side panel from 900px) ═══ */
.b3-mp-about { cursor: pointer; color: var(--b3-gold); border-color: var(--b3-edge-gold); background: rgba(245, 166, 35, 0.08); }
.b3-mp-about:hover, .b3-mp-about:focus-visible { background: rgba(245, 166, 35, 0.16); color: var(--b3-gold-hi); outline: none; }
.b3-about { position: fixed; inset: 0; z-index: 1500; }
.b3-about[hidden] { display: none; }
.b3-about-scrim { position: absolute; inset: 0; background: rgba(2, 6, 30, 0.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.25s; }
.b3-about-panel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: 90vh; max-height: 90dvh; border-radius: 22px 22px 0 0; background: var(--b3-bg-2); border-top: 1px solid var(--b3-edge-gold); box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45); transform: translateY(100%); transition: transform 0.32s var(--b3-ease); }
.b3-about.open .b3-about-scrim { opacity: 1; }
.b3-about.open .b3-about-panel { transform: none; }
.b3-about-head { position: relative; flex: none; padding: 10px 22px 16px; border-bottom: 1px solid var(--b3-edge); }
.b3-about-head h2 { margin: 6px 0 6px; font: 800 26px/1.15 var(--b3-display); color: var(--b3-ink); }
.b3-about-sum { margin: 0; padding-right: 8px; font: 500 italic 15px/1.55 var(--b3-body); color: var(--b3-ink-2); }
.b3-about-x { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--b3-bg-3) !important; border: 1px solid var(--b3-edge-2) !important; color: var(--b3-ink-2) !important; font-size: 16px; }
.b3-about-x:hover, .b3-about-x:focus-visible { color: var(--b3-gold) !important; border-color: var(--b3-edge-gold) !important; outline: none; }
.b3-about-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 22px calc(28px + var(--b3-safe-b)); font: 400 16px/1.7 var(--b3-body); color: var(--b3-ink); }
.b3-about-body section { padding-top: 18px; }
.b3-about-body h3 { margin: 0 0 8px; font: 800 12px var(--b3-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--b3-gold); }
.b3-about-body p { margin: 0 0 12px; }
.b3-about-body ul { margin: 0 0 12px; padding: 0; list-style: none; }
.b3-about-body li { position: relative; margin: 0 0 8px; padding-left: 18px; }
.b3-about-body li::before { content: ''; position: absolute; left: 2px; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--b3-gold); }
.b3-about-body strong { font-weight: 700; color: var(--b3-ink); }
.b3-about-body em { color: var(--b3-ink-2); }
html.b3-about-open, html.b3-about-open body { overflow: hidden; }
@media (min-width: 900px) {
    .b3-about-panel { left: auto; top: 0; width: 480px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--b3-edge-gold); transform: translateX(100%); }
    .b3-about-head { padding-top: 26px; }
    .b3-about-head .b3-grab { display: none; }
}
