/* =====================================================================
   Holy Bible reader – /read-bible (web) and the app WebView (?type=application)
   ===================================================================== */

.bible-app {
    --accent: #F0592E;
    --accent-soft: rgba(240, 89, 46, .12);
    --bg: #FFFFFF;
    --bg-2: #F6F7F9;
    --panel: #FFFFFF;
    --ink: #1B2429;
    --ink-2: #4E5A61;
    --ink-3: #8A959B;
    --line: #E7EAEE;
    --shadow: 0 10px 40px rgba(15, 30, 40, .16);
    --read-size: 19px;
    --read-lh: 1.85;
    --font-te: 'Noto Serif Telugu', 'Noto Sans Telugu', serif;
    --font-en: 'Literata', Georgia, serif;
    --font-ui: 'Inter', 'Noto Sans Telugu', system-ui, sans-serif;
    --hl-yellow: rgba(255, 213, 0, .38);
    --hl-green: rgba(76, 201, 110, .30);
    --hl-blue: rgba(64, 156, 255, .28);
    --hl-pink: rgba(255, 99, 160, .26);
    --hl-orange: rgba(255, 140, 50, .32);
    --toolbar-top: var(--nav-h, 76px);
    --toolbar-h: 60px;

    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--ink);
    min-height: calc(100vh - var(--toolbar-top));
    position: relative;
}

.bible-app[data-font-te="sans"] { --font-te: 'Noto Sans Telugu', sans-serif; }
.bible-app[data-font-en="sans"] { --font-en: 'Inter', system-ui, sans-serif; }

.bible-app[data-theme="sepia"] {
    --bg: #F7F0E3;
    --bg-2: #EFE5D2;
    --panel: #FBF6EC;
    --ink: #3B2F22;
    --ink-2: #6A5A47;
    --ink-3: #97866F;
    --line: #E4D8C2;
}

.bible-app[data-theme="dark"] {
    --bg: #111519;
    --bg-2: #1A2026;
    --panel: #1A2026;
    --ink: #E7ECEF;
    --ink-2: #AEB8BE;
    --ink-3: #7C878D;
    --line: #2A323A;
    --shadow: 0 10px 40px rgba(0, 0, 0, .5);
    --accent-soft: rgba(240, 89, 46, .2);
}

.in-app .bible-app { --toolbar-top: 0px; min-height: 100vh; }
.in-app body { background: var(--bg, #fff); }

.bible-app *,
.bible-app *::before,
.bible-app *::after { box-sizing: border-box; }

.bible-app button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bible-app button:focus-visible,
.bible-app input:focus-visible,
.bible-app select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.b-icon { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Toolbar ---------- */
.b-toolbar {
    position: sticky;
    top: var(--toolbar-top);
    z-index: 40;
    height: var(--toolbar-h);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 max(12px, calc((100% - 1180px) / 2));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.b-ref-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px 0 14px;
    border-radius: 12px;
    background: var(--bg-2) !important;
    font-weight: 600;
    font-size: 15px;
    max-width: 46vw;
    min-width: 0;
}

.b-ref-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-ref-btn .b-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }

.b-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--ink-2) !important;
    transition: background .15s, color .15s;
}

.b-icon-btn:hover { background: var(--bg-2) !important; color: var(--ink) !important; }
.b-icon-btn.active { color: var(--accent) !important; background: var(--accent-soft) !important; }
.b-icon-btn:disabled { opacity: .35; cursor: default; }

.b-spacer { flex: 1; }

.b-mode {
    display: inline-flex;
    padding: 3px;
    border-radius: 12px;
    background: var(--bg-2);
    flex-shrink: 0;
}

.b-mode button {
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2) !important;
    white-space: nowrap;
}

.b-mode button.active {
    background: var(--panel) !important;
    color: var(--ink) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.b-mode .short { display: none; }

@media (max-width: 640px) {
    .b-toolbar { gap: 2px; padding: 0 8px; }
    .b-mode button { padding: 0 9px; font-size: 12px; }
    .b-hide-sm { display: none !important; }
    .b-ref-btn { flex: 1 1 auto; max-width: none; padding: 0 8px 0 10px; font-size: 14px; justify-content: space-between; }
    .b-toolbar > .b-spacer { display: none; }
    .b-mode .full { display: none; }
    .b-mode .short { display: inline; }
}

/* ---------- Reading area ---------- */
.b-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 20px 180px;
}

.bible-app[data-mode="both"] .b-main { max-width: 1180px; }

.b-chapter-head {
    text-align: center;
    margin: 8px 0 28px;
}

.b-chapter-head .b-book-name {
    font-family: var(--font-te);
    font-size: 15px;
    letter-spacing: .04em;
    color: var(--ink-3);
    margin-bottom: 4px;
}

.b-chapter-head .b-chapter-num {
    font-family: var(--font-en);
    font-size: 44px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink);
}

.b-chapter-head .b-chapter-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; }

.b-cols-head {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 12px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.bible-app[data-mode="both"] .b-cols-head { display: grid; }

.b-verse {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px 12px;
    margin: 0 -12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}

.bible-app[data-mode="both"] .b-verse { grid-template-columns: 1fr 1fr; gap: 40px; }

.b-verse:hover { background: color-mix(in srgb, var(--bg-2) 70%, transparent); }

.b-cell {
    font-size: var(--read-size);
    line-height: var(--read-lh);
    min-width: 0;
}

.b-cell[data-lang="te"] { font-family: var(--font-te); }
.b-cell[data-lang="en"] { font-family: var(--font-en); }

.b-num {
    display: inline-block;
    min-width: 1.4em;
    margin-right: 4px;
    font-family: var(--font-ui);
    font-size: .62em;
    font-weight: 700;
    color: var(--accent);
    vertical-align: .45em;
    line-height: 1;
}

.bible-app[data-numbers="off"] .b-num { display: none; }

.b-heading {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 18px 0 6px;
    line-height: 1.4;
}

.b-heading + .b-heading { margin-top: 0; font-weight: 500; font-style: italic; color: var(--ink-2); }
.bible-app[data-headings="off"] .b-heading { display: none; }

.b-heading-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.bible-app[data-mode="both"] .b-heading-row { grid-template-columns: 1fr 1fr; }

.b-marks {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: .1em;
}

.b-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--ink-3) !important;
    background: var(--bg-2) !important;
}

.b-mark .b-icon { width: 12px; height: 12px; }
.b-mark.xref:hover { color: var(--accent) !important; background: var(--accent-soft) !important; }
.b-mark.note { color: var(--accent) !important; }
.b-mark.bm { color: #D9A400 !important; }
.bible-app[data-xrefs="off"] .b-mark.xref { display: none; }

/* Only the first column shows markers in parallel mode */
.bible-app[data-mode="both"] .b-cell + .b-cell .b-marks { display: none; }

.b-verse[data-hl="yellow"] { background: var(--hl-yellow); }
.b-verse[data-hl="green"] { background: var(--hl-green); }
.b-verse[data-hl="blue"] { background: var(--hl-blue); }
.b-verse[data-hl="pink"] { background: var(--hl-pink); }
.b-verse[data-hl="orange"] { background: var(--hl-orange); }

.b-verse.selected .b-cell {
    text-decoration: underline dotted var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: .28em;
}

.b-verse.selected { box-shadow: inset 3px 0 0 var(--accent); }

.b-verse.speaking { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }

.b-verse.flash { animation: b-flash 2.2s ease; }

@keyframes b-flash {
    0%, 30% { background: var(--hl-yellow); }
    100% { background: transparent; }
}

@media (max-width: 767.98px) {
    .b-main { padding: 18px 16px 190px; }
    .bible-app[data-mode="both"] .b-verse,
    .bible-app[data-mode="both"] .b-heading-row { grid-template-columns: 1fr; gap: 2px; }
    .bible-app[data-mode="both"] .b-cell + .b-cell { font-size: calc(var(--read-size) * .86); color: var(--ink-2); }
    .bible-app[data-mode="both"] .b-cell + .b-cell .b-num { display: none; }
    .bible-app[data-mode="both"] .b-verse { padding-top: 10px; padding-bottom: 10px; }
    .bible-app[data-mode="both"] .b-cols-head { display: none; }
    .b-chapter-head .b-chapter-num { font-size: 36px; }
}

/* Chapter footer */
.b-chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.b-chapter-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--line) !important;
    text-align: left;
    transition: border-color .15s, background .15s;
}

.b-chapter-nav button:last-child { text-align: right; }
.b-chapter-nav button:hover { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
.b-chapter-nav small { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.b-chapter-nav span { font-weight: 600; font-size: 15px; }
.b-chapter-nav button[hidden] { visibility: hidden; display: flex; }

.b-attrib { margin-top: 28px; font-size: 12px; color: var(--ink-3); text-align: center; }
.b-attrib a { color: var(--ink-3); text-decoration: underline; }

/* Loading / error */
.b-skeleton { padding-top: 20px; }

.b-skeleton div {
    height: 16px;
    margin: 14px 0;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-2) 25%, color-mix(in srgb, var(--bg-2) 50%, var(--bg)) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: b-shimmer 1.2s infinite linear;
}

@keyframes b-shimmer {
    to { background-position: -200% 0; }
}

.b-empty { text-align: center; padding: 48px 12px; color: var(--ink-3); }

/* ---------- Floating: back pill ---------- */
.b-back-pill {
    position: fixed;
    left: 50%;
    top: calc(var(--toolbar-top) + var(--toolbar-h) + 12px);
    transform: translateX(-50%);
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--ink) !important;
    color: var(--bg) !important;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.b-back-pill .b-icon { width: 16px; height: 16px; }

/* ---------- Bottom bars (selection / audio) ---------- */
.b-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.b-bar {
    pointer-events: auto;
    width: 100%;
    max-width: 720px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px 12px;
    animation: b-rise .2s ease;
}

@keyframes b-rise {
    from { transform: translateY(16px); opacity: 0; }
}

.b-sel-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.b-sel-ref { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.b-swatches { display: flex; gap: 6px; align-items: center; }

.b-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.b-swatch.active { border-color: var(--ink) !important; }
.b-swatch[data-c="yellow"] { background: #FFE14D !important; }
.b-swatch[data-c="green"] { background: #7FDC98 !important; }
.b-swatch[data-c="blue"] { background: #8EC2FF !important; }
.b-swatch[data-c="pink"] { background: #FF9CC4 !important; }
.b-swatch[data-c="orange"] { background: #FFB27A !important; }
.b-swatch[data-c="none"] { background: var(--bg-2) !important; display: grid; place-items: center; }
.b-swatch[data-c="none"] .b-icon { width: 14px; height: 14px; }

.b-actions {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.b-actions::-webkit-scrollbar { display: none; }

.b-action {
    flex: 1 0 auto;
    min-width: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-2) !important;
}

.b-action:hover { background: var(--bg-2) !important; color: var(--ink) !important; }
.b-action.active { color: var(--accent) !important; }

/* Audio bar */
.b-audio { display: flex; align-items: center; gap: 6px; }
.b-audio .b-audio-info { flex: 1; min-width: 0; }
.b-audio .b-audio-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-audio .b-audio-sub { font-size: 12px; color: var(--ink-3); }

.b-play {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent) !important;
    color: #fff !important;
    flex-shrink: 0;
}

.b-play .b-icon { width: 22px; height: 22px; }
.b-play .b-icon.fill { fill: currentColor; stroke: none; }

.b-chip-btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--bg-2) !important;
    font-size: 12.5px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- Sheets / panels ---------- */
.b-scrim {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 14, 18, .45);
    animation: b-fade .15s ease;
}

@keyframes b-fade {
    from { opacity: 0; }
}

.b-sheet {
    position: fixed;
    z-index: 2001;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    color: var(--ink);
    box-shadow: var(--shadow);
    animation: b-slide .2s ease;
}

.b-sheet.wide { width: min(760px, 100%); }

@keyframes b-slide {
    from { transform: translateX(24px); opacity: 0; }
}

@media (max-width: 767.98px) {
    .b-sheet {
        top: auto;
        left: 0;
        width: 100%;
        max-height: 88vh;
        height: 88vh;
        border-radius: 22px 22px 0 0;
        animation-name: b-up;
    }

    .b-sheet.short { height: auto; }
    .b-sheet.full { height: 100vh; max-height: 100vh; border-radius: 0; }

    @keyframes b-up {
        from { transform: translateY(40px); opacity: 0; }
    }
}

.b-sheet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px 12px 20px;
    border-bottom: 1px solid var(--line);
}

.b-sheet-head h3 {
    flex: 1;
    margin: 0;
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 32px;
    overscroll-behavior: contain;
}

.b-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--ink);
    font-size: 15px;
    font-family: var(--font-ui);
}

.b-input:focus { outline: none; border-color: var(--accent); background: var(--panel); }

.b-input-wrap { position: relative; }
.b-input-wrap > .b-icon { position: absolute; left: 13px; top: 13px; color: var(--ink-3); }

.b-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-2);
    margin: 14px 0;
}

.b-tabs button {
    flex: 1;
    height: 36px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2) !important;
}

.b-tabs button.active { background: var(--panel) !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.b-section-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 18px 0 10px;
}

/* Book grid */
.b-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.b-book {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line) !important;
    text-align: left;
    transition: border-color .15s, background .15s;
}

.b-book:hover { border-color: var(--accent) !important; }
.b-book.current { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
.b-book .primary { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.b-book .primary.te { font-family: 'Noto Sans Telugu', var(--font-ui); }
.b-book .secondary { font-size: 12px; color: var(--ink-3); }

.b-chapters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}

.b-chapters button {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line) !important;
    font-weight: 600;
    font-size: 15px;
}

.b-chapters button:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.b-chapters button.current { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }

.b-crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent) !important;
    margin-bottom: 10px;
}

.b-crumb .b-icon { width: 16px; height: 16px; }

/* Verse-of-the-day card */
.b-votd {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid var(--line);
    cursor: pointer;
}

.b-votd .label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.b-votd .text { font-family: var(--font-te); font-size: 16px; line-height: 1.7; margin: 6px 0; }
.b-votd .text.en { font-family: var(--font-en); font-size: 14.5px; color: var(--ink-2); }
.b-votd .ref { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* Result / reference list items */
.b-list-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    margin: 0 -14px;
    width: calc(100% + 28px);
    border-radius: 12px;
    border-bottom: 1px solid var(--line) !important;
}

.b-list-item:hover { background: var(--bg-2) !important; }
.b-list-item .ref { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.b-list-item .ref .tag { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.b-list-item .txt { font-size: 15px; line-height: 1.6; color: var(--ink); }
.b-list-item .txt[data-lang="te"] { font-family: 'Noto Sans Telugu', var(--font-ui); }
.b-list-item .txt[data-lang="en"] { font-family: var(--font-en); }
.b-list-item .txt + .txt { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.b-list-item mark { background: var(--hl-yellow); color: inherit; padding: 0 1px; border-radius: 3px; }
.b-list-item .note-text { font-size: 14px; color: var(--ink-2); margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--accent); white-space: pre-wrap; }
.b-list-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.b-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }

.b-filter-chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line) !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2) !important;
}

.b-filter-chip.active { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--bg) !important; }
.b-filter-chip small { opacity: .7; margin-left: 4px; }

.b-muted { color: var(--ink-3); font-size: 13.5px; }

.b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14.5px;
    background: var(--accent) !important;
    color: #fff !important;
}

.b-btn.ghost { background: var(--bg-2) !important; color: var(--ink) !important; }
.b-btn.block { width: 100%; }

/* Settings */
.b-setting { padding: 14px 0; border-bottom: 1px solid var(--line); }
.b-setting:last-child { border-bottom: 0; }
.b-setting-label { font-weight: 600; font-size: 14.5px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.b-setting-label small { color: var(--ink-3); font-weight: 500; }

.b-seg { display: flex; gap: 6px; flex-wrap: wrap; }

.b-seg button {
    flex: 1;
    min-width: 70px;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--line) !important;
    font-size: 13.5px;
    font-weight: 600;
}

.b-seg button.active { border-color: var(--accent) !important; color: var(--accent) !important; background: var(--accent-soft) !important; }

.b-theme-swatch { display: flex; align-items: center; justify-content: center; gap: 6px; }
.b-theme-swatch i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); display: inline-block; }

.b-range { width: 100%; accent-color: var(--accent); }

.b-switch {
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--line) !important;
    transition: background .15s;
    flex-shrink: 0;
}

.b-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .15s;
}

.b-switch.on { background: var(--accent) !important; }
.b-switch.on::after { transform: translateX(18px); }

.b-select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--ink);
    font-size: 14px;
    font-family: var(--font-ui);
}

.b-textarea {
    width: 100%;
    min-height: 160px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
}

.b-textarea:focus { outline: none; border-color: var(--accent); }

/* Toast */
.b-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 2100;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--bg);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
    animation: b-rise .2s ease;
}

.b-bottom:not(:empty) ~ .b-toast { bottom: calc(160px + env(safe-area-inset-bottom)); }

/* Site chrome when shown on the website */
.bible-page .site-footer { display: none; }
body.bible-page { background: var(--bg, #fff); }

html:has(body.bible-page) { scroll-behavior: auto; }
