* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root,
html[data-bb-app-theme='classic'] {
    color-scheme: light;
    --bb-color-bg-canvas: #f4f6f8;
    --bb-color-bg-surface: #fdfbf7;
    --bb-color-bg-surface-raised: #fffdf8;
    --bb-color-bg-subtle: #eef2f6;
    --bb-color-bg-reader: #fbf8f1;
    --bb-color-bg-panel: #ffffff;
    --bb-color-bg-overlay: #ffffff;
    --bb-color-bg-inverse: #141b2a;
    --bb-color-text-primary: #1c1814;
    --bb-color-text-secondary: #4a433b;
    --bb-color-text-muted: #746c61;
    --bb-color-text-disabled: #9aa8b8;
    --bb-color-text-inverse: #ffffff;
    --bb-color-text-reader: #1c1814;
    --bb-color-text-reader-muted: #65758b;
    --bb-color-border-subtle: #e2ddd4;
    --bb-color-border-default: #d1c9bd;
    --bb-color-border-strong: #a99f91;
    --bb-color-accent-primary: #2d5f8a;
    --bb-color-accent-primary-strong: #244b70;
    --bb-color-accent-secondary: #0f766e;
    --bb-color-accent-reader: #b98218;
    --bb-color-focus-ring: #2563eb;
    --bb-color-success: #16a34a;
    --bb-color-warning: #d89922;
    --bb-color-danger: #dc2626;
    --bb-color-scrim: rgba(10, 15, 26, 0.36);
    --bb-color-state-hover: rgba(20, 27, 42, 0.06);
    --bb-color-state-active: rgba(37, 99, 235, 0.12);
    --bb-color-state-selected: rgba(37, 99, 235, 0.14);
    --bb-color-state-reader-selected: rgba(216, 153, 34, 0.2);
    --bb-color-state-disabled-bg: rgba(101, 117, 139, 0.1);
    --bb-color-state-disabled-text: #9aa8b8;
    --bb-color-state-danger-bg: rgba(220, 38, 38, 0.1);
    --bb-color-state-success-bg: rgba(22, 163, 74, 0.1);
    --bb-shadow-raised: 0 1px 2px rgba(20, 27, 42, 0.08);
    --bb-shadow-panel: 0 8px 24px rgba(20, 27, 42, 0.12);
    --bb-shadow-overlay: 0 18px 48px rgba(20, 27, 42, 0.2);
    --bb-shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.28);
    --primary-color: var(--bb-color-accent-primary);
    --primary-color-strong: var(--bb-color-accent-primary-strong);
    --secondary-color: #3b82f6;
    --accent-color: var(--bb-color-accent-primary);
    --text-color: var(--bb-color-text-primary);
    --light-text: var(--bb-color-text-muted);
    --bg-color: var(--bb-color-bg-canvas);
    --light-bg: var(--bb-color-bg-surface);
    --border-color: var(--bb-color-border-subtle);
    --success-color: var(--bb-color-success);
    --bb-input-bg: var(--bb-color-bg-surface-raised);
    --bb-input-border: var(--bb-color-border-default);
    --bb-card-bg: rgba(255, 255, 255, 0.94);
    --bb-card-border: rgba(229, 231, 235, 0.92);
    --bb-menu-bg: rgba(255, 255, 255, 0.97);
    --bb-menu-border: rgba(148, 163, 184, 0.2);
    --bb-menu-shadow: 0 16px 44px rgba(15, 23, 42, 0.12);
    --bb-theme-active-border: rgba(59, 130, 246, 0.32);
    --bb-theme-active-bg: rgba(239, 246, 255, 0.92);
    --bb-hero-start: #667eea;
    --bb-hero-end: #764ba2;
    --bb-hero-btn-primary-bg: #ffffff;
    --bb-hero-btn-primary-text: #667eea;
    --bb-hero-btn-primary-hover-bg: #f8f9ff;
    --bb-hero-btn-secondary-border: rgba(255, 255, 255, 0.7);
    --bb-hero-btn-secondary-text: #ffffff;
    --reading-max: 42rem;
    --bb-reader-copy-line-height: 1.8;
    --bb-reader-copy-line-height-compact: 1.77;
    --bb-reader-copy-line-height-large: 1.82;
    --bb-reader-copy-letter-spacing: 0.002em;
    --bb-reader-copy-font-weight: 400;
    --bb-reader-meta-letter-spacing: 0.012em;
    --bb-reader-meta-font-weight: 560;
    --bb-reader-verse-font-weight: 590;
    /* Shared bb-disclosure / bb-inline-help surfaces */
    --bb-disclosure-border: rgba(148, 163, 184, 0.24);
    --bb-disclosure-border-quiet: rgba(148, 163, 184, 0.19);
    --bb-disclosure-bg: rgba(248, 250, 252, 0.58);
    --bb-disclosure-bg-compact: rgba(248, 250, 252, 0.42);
    --bb-disclosure-bg-quiet: rgba(248, 250, 252, 0.52);
    --bb-disclosure-panel-border: rgba(148, 163, 184, 0.165);
    --bb-help-font-size: 0.8125rem;
    --bb-help-line-height: 1.44;
}

html[data-bb-app-theme='parchment'] {
    color-scheme: light;
    --bb-color-bg-canvas: #eee0c6;
    --bb-color-bg-surface: #f7eddc;
    --bb-color-bg-surface-raised: #fcf5e8;
    --bb-color-bg-subtle: #e8dac2;
    --bb-color-bg-reader: #fbf3e4;
    --bb-color-bg-panel: #f7eddc;
    --bb-color-bg-overlay: #fcf5e8;
    --bb-color-bg-inverse: #332516;
    --bb-color-text-primary: #332318;
    --bb-color-text-secondary: #57412d;
    --bb-color-text-muted: #6f563b;
    --bb-color-text-disabled: #9b876a;
    --bb-color-text-inverse: #fff7e9;
    --bb-color-text-reader: #2b1c10;
    --bb-color-text-reader-muted: #705434;
    --bb-color-border-subtle: #d6c19d;
    --bb-color-border-default: #bda177;
    --bb-color-border-strong: #957248;
    --bb-color-accent-primary: #76303a;
    --bb-color-accent-primary-strong: #5d2530;
    --bb-color-accent-secondary: #567044;
    --bb-color-accent-reader: #a76315;
    --bb-color-focus-ring: #76303a;
    --bb-color-success: #577b43;
    --bb-color-warning: #9f6415;
    --bb-color-danger: #a94835;
    --bb-color-scrim: rgba(51, 37, 22, 0.36);
    --bb-color-state-hover: rgba(87, 65, 45, 0.075);
    --bb-color-state-active: rgba(118, 48, 58, 0.13);
    --bb-color-state-selected: rgba(118, 48, 58, 0.16);
    --bb-color-state-reader-selected: rgba(167, 99, 21, 0.18);
    --bb-color-state-disabled-bg: rgba(108, 87, 63, 0.12);
    --bb-color-state-disabled-text: #9b876a;
    --bb-color-state-danger-bg: rgba(169, 72, 53, 0.12);
    --bb-color-state-success-bg: rgba(87, 123, 67, 0.12);
    --bb-shadow-raised: 0 1px 2px rgba(79, 59, 39, 0.08);
    --bb-shadow-panel: 0 8px 24px rgba(79, 59, 39, 0.12);
    --bb-shadow-overlay: 0 18px 44px rgba(79, 59, 39, 0.2);
    --bb-shadow-focus: 0 0 0 3px rgba(124, 81, 45, 0.28);
    --secondary-color: #8f6638;
    --bb-card-bg: rgba(251, 247, 237, 0.95);
    --bb-card-border: rgba(214, 196, 162, 0.92);
    --bb-menu-bg: rgba(253, 249, 240, 0.98);
    --bb-menu-border: rgba(155, 124, 83, 0.26);
    --bb-menu-shadow: 0 16px 38px rgba(79, 59, 39, 0.12);
    --bb-theme-active-border: rgba(124, 81, 45, 0.36);
    --bb-theme-active-bg: rgba(241, 225, 198, 0.94);
    --bb-hero-start: #8f6338;
    --bb-hero-end: #684222;
    --bb-hero-btn-primary-bg: #fffaf0;
    --bb-hero-btn-primary-text: #7a4f2b;
    --bb-hero-btn-primary-hover-bg: #f8ebd2;
    --bb-hero-btn-secondary-border: rgba(255, 247, 232, 0.84);
    --bb-hero-btn-secondary-text: #fff7e8;
    --bb-reader-copy-line-height: 1.82;
    --bb-reader-copy-line-height-compact: 1.78;
    --bb-reader-copy-line-height-large: 1.84;
    --bb-reader-copy-letter-spacing: 0.004em;
    --bb-reader-copy-font-weight: 405;
    --bb-reader-meta-letter-spacing: 0.014em;
    --bb-reader-meta-font-weight: 560;
    --bb-reader-verse-font-weight: 580;
    --bb-disclosure-border: rgba(156, 122, 78, 0.26);
    --bb-disclosure-border-quiet: rgba(156, 122, 78, 0.18);
    --bb-disclosure-bg: rgba(255, 249, 239, 0.64);
    --bb-disclosure-bg-compact: rgba(255, 248, 235, 0.5);
    --bb-disclosure-bg-quiet: rgba(255, 248, 235, 0.56);
    --bb-disclosure-panel-border: rgba(156, 122, 78, 0.16);
}

html[data-bb-app-theme='low-light'] {
    color-scheme: dark;
    --bb-color-bg-canvas: #0c0e15;
    --bb-color-bg-surface: #171b28;
    --bb-color-bg-surface-raised: #202535;
    --bb-color-bg-subtle: #232a3a;
    --bb-color-bg-reader: #141722;
    --bb-color-bg-panel: #171b28;
    --bb-color-bg-overlay: #202535;
    --bb-color-bg-inverse: #f8fafc;
    --bb-color-text-primary: #e6ded2;
    --bb-color-text-secondary: #cfd3df;
    --bb-color-text-muted: #a8b2c3;
    --bb-color-text-disabled: #7c879a;
    --bb-color-text-inverse: #111827;
    --bb-color-text-reader: #e8dfd2;
    --bb-color-text-reader-muted: #b9b2a6;
    --bb-color-border-subtle: #2d3446;
    --bb-color-border-default: #3b4358;
    --bb-color-border-strong: #586176;
    --bb-color-accent-primary: #91a8d6;
    --bb-color-accent-primary-strong: #b5c5e6;
    --bb-color-accent-secondary: #2dd4bf;
    --bb-color-accent-reader: #dfa66a;
    --bb-color-focus-ring: #a7b9df;
    --bb-color-success: #4ade80;
    --bb-color-warning: #f6d365;
    --bb-color-danger: #fb7185;
    --bb-color-scrim: rgba(0, 0, 0, 0.56);
    --bb-color-state-hover: rgba(232, 223, 210, 0.08);
    --bb-color-state-active: rgba(145, 168, 214, 0.18);
    --bb-color-state-selected: rgba(145, 168, 214, 0.2);
    --bb-color-state-reader-selected: rgba(223, 166, 106, 0.19);
    --bb-color-state-disabled-bg: rgba(168, 178, 195, 0.12);
    --bb-color-state-disabled-text: #7c879a;
    --bb-color-state-danger-bg: rgba(251, 113, 133, 0.17);
    --bb-color-state-success-bg: rgba(74, 222, 128, 0.15);
    --bb-shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.34);
    --bb-shadow-panel: 0 10px 30px rgba(0, 0, 0, 0.46);
    --bb-shadow-overlay: 0 22px 56px rgba(0, 0, 0, 0.58);
    --bb-shadow-focus: 0 0 0 3px rgba(147, 197, 253, 0.36);
    --secondary-color: #93c5fd;
    --bb-card-bg: rgba(16, 24, 38, 0.97);
    --bb-card-border: rgba(58, 75, 102, 0.94);
    --bb-menu-bg: rgba(20, 31, 49, 0.98);
    --bb-menu-border: rgba(174, 187, 208, 0.26);
    --bb-menu-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
    --bb-theme-active-border: rgba(147, 197, 253, 0.48);
    --bb-theme-active-bg: rgba(96, 165, 250, 0.2);
    --bb-hero-start: #10213d;
    --bb-hero-end: #07101f;
    --bb-hero-btn-primary-bg: #f8fafc;
    --bb-hero-btn-primary-text: #0f172a;
    --bb-hero-btn-primary-hover-bg: #dbeafe;
    --bb-hero-btn-secondary-border: rgba(203, 213, 225, 0.68);
    --bb-hero-btn-secondary-text: #f8fafc;
    --bb-reader-copy-line-height: 1.84;
    --bb-reader-copy-line-height-compact: 1.8;
    --bb-reader-copy-line-height-large: 1.86;
    --bb-reader-copy-letter-spacing: 0.006em;
    --bb-reader-copy-font-weight: 390;
    --bb-reader-meta-letter-spacing: 0.016em;
    --bb-reader-meta-font-weight: 570;
    --bb-reader-verse-font-weight: 560;
    --bb-disclosure-border: rgba(148, 163, 184, 0.24);
    --bb-disclosure-border-quiet: rgba(148, 163, 184, 0.18);
    --bb-disclosure-bg: rgba(30, 41, 59, 0.64);
    --bb-disclosure-bg-compact: rgba(30, 41, 59, 0.5);
    --bb-disclosure-bg-quiet: rgba(30, 41, 59, 0.54);
    --bb-disclosure-panel-border: rgba(148, 163, 184, 0.16);
}

html[data-bb-app-theme='minimal'] {
    color-scheme: light;
    --bb-color-bg-canvas: #f7f7f6;
    --bb-color-bg-surface: #f8f8f7;
    --bb-color-bg-surface-raised: #fbfbfa;
    --bb-color-bg-subtle: #f0f1f3;
    --bb-color-bg-reader: #f9f9f7;
    --bb-color-bg-panel: #ffffff;
    --bb-color-bg-overlay: #ffffff;
    --bb-color-bg-inverse: #17171a;
    --bb-color-text-primary: #202020;
    --bb-color-text-secondary: #4b4b4b;
    --bb-color-text-muted: #737373;
    --bb-color-text-disabled: #898d96;
    --bb-color-text-inverse: #ffffff;
    --bb-color-text-reader: #1f1f1f;
    --bb-color-text-reader-muted: #5f6269;
    --bb-color-border-subtle: #e6e6e2;
    --bb-color-border-default: #d6d6d1;
    --bb-color-border-strong: #b6b6af;
    --bb-color-accent-primary: #343434;
    --bb-color-accent-primary-strong: #1f1f1f;
    --bb-color-accent-secondary: #4b4d55;
    --bb-color-accent-reader: #697887;
    --bb-color-focus-ring: #2f3742;
    --bb-color-success: #15803d;
    --bb-color-warning: #9f4d08;
    --bb-color-danger: #b91c1c;
    --bb-color-scrim: rgba(23, 23, 26, 0.36);
    --bb-color-state-hover: rgba(23, 23, 26, 0.06);
    --bb-color-state-active: rgba(47, 55, 66, 0.12);
    --bb-color-state-selected: rgba(47, 55, 66, 0.145);
    --bb-color-state-reader-selected: rgba(159, 77, 8, 0.17);
    --bb-color-state-disabled-bg: rgba(95, 98, 105, 0.1);
    --bb-color-state-disabled-text: #898d96;
    --bb-color-state-danger-bg: rgba(185, 28, 28, 0.1);
    --bb-color-state-success-bg: rgba(21, 128, 61, 0.1);
    --bb-shadow-raised: 0 1px 2px rgba(23, 23, 26, 0.055);
    --bb-shadow-panel: 0 8px 22px rgba(23, 23, 26, 0.085);
    --bb-shadow-overlay: 0 18px 44px rgba(23, 23, 26, 0.15);
    --bb-shadow-focus: 0 0 0 3px rgba(47, 55, 66, 0.24);
    --secondary-color: #5f6269;
    --bb-card-bg: rgba(255, 255, 255, 0.96);
    --bb-card-border: rgba(201, 203, 209, 0.94);
    --bb-menu-bg: rgba(255, 255, 255, 0.98);
    --bb-menu-border: rgba(95, 98, 105, 0.22);
    --bb-menu-shadow: 0 16px 38px rgba(23, 23, 26, 0.095);
    --bb-theme-active-border: rgba(47, 55, 66, 0.34);
    --bb-theme-active-bg: rgba(47, 55, 66, 0.105);
    --bb-hero-start: #3f4752;
    --bb-hero-end: #23252a;
    --bb-hero-btn-primary-bg: #ffffff;
    --bb-hero-btn-primary-text: #27272a;
    --bb-hero-btn-primary-hover-bg: #f4f4f5;
    --bb-hero-btn-secondary-border: rgba(255, 255, 255, 0.7);
    --bb-hero-btn-secondary-text: #ffffff;
    --bb-reader-copy-line-height: 1.78;
    --bb-reader-copy-line-height-compact: 1.75;
    --bb-reader-copy-line-height-large: 1.8;
    --bb-reader-copy-letter-spacing: 0;
    --bb-reader-copy-font-weight: 400;
    --bb-reader-meta-letter-spacing: 0.006em;
    --bb-reader-meta-font-weight: 550;
    --bb-reader-verse-font-weight: 580;
    --bb-disclosure-border: rgba(113, 113, 122, 0.22);
    --bb-disclosure-border-quiet: rgba(113, 113, 122, 0.16);
    --bb-disclosure-bg: rgba(244, 244, 245, 0.62);
    --bb-disclosure-bg-compact: rgba(244, 244, 245, 0.48);
    --bb-disclosure-bg-quiet: rgba(244, 244, 245, 0.52);
    --bb-disclosure-panel-border: rgba(113, 113, 122, 0.16);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

input,
select,
textarea {
    background: var(--bb-input-bg);
    color: var(--text-color);
    border-color: var(--bb-input-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
}

/* Scripture-first passage: no navbar hairline — passage chrome + scripture top edge carry separation */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar {
    border-bottom: none;
    box-shadow: none;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .container {
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
    gap: 0.48rem 0.68rem;
    justify-content: flex-start;
    align-items: center;
}

/* Passage nav: top row = logo + ref + site links; first-run hint is a second line below (not in the flex row with Home/Passage/…). */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .container.bb-passage-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: stretch;
    gap: 0.12rem 0;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .bb-passage-nav__band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 0.48rem 0.68rem;
}

/* Passage (SF): logo + Pick + translation read as one aligned band. */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .logo h1 {
    margin: 0;
    line-height: 1.15;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links {
    /* Pack site links beside the passage toolbar — avoid a wide empty flex gap after translation. */
    margin-left: 0;
    flex-shrink: 0;
    gap: 1.35rem;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-ref-input-wrap--passage-sf {
    display: flex;
    align-items: center;
    align-self: center;
    flex: 0 0 auto;
    width: max-content;
    max-width: min(44rem, calc(100% - 10rem));
    min-width: 0;
    min-height: 0;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar {
    width: max-content;
    max-width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.26rem 0.42rem;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar__fields {
    flex: 0 1 auto;
    min-width: 0;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar__trans {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar__trans select {
    min-height: 2.35rem;
    max-width: 11.5rem;
    line-height: 1.2;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 999px;
    background: rgba(252, 253, 255, 0.92);
    color: rgba(71, 85, 105, 0.78);
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle__icon {
    width: 1.08rem;
    height: 1.08rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle:hover,
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle:focus-visible,
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle.is-open {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(239, 246, 255, 0.94);
    color: var(--primary-color);
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-tools-nav-toggle:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.32);
    outline-offset: 2px;
}

/* Scripture-first: compact saved-preference line near the reading translation selector (aria-live remains polite). */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #translationPrefControlStatus {
    display: block;
    margin: 0.18rem 0 0;
    max-width: 11.5rem;
    font-size: 0.72rem;
    line-height: 1.28;
    font-weight: 500;
    color: rgba(51, 65, 85, 0.88);
}

/* Scripture-first navbar: #passageForm is an off-screen owner for the typed-ref dialog submit path. */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar #passageForm.passage-form.passage-form--nav-toolbar {
    padding: 0;
    margin: 0;
    gap: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    flex: 0 0 0;
    width: 0;
    overflow: hidden;
    min-height: 0;
    align-items: center;
}

/* Undo grid + row-gap from .passage-lookup-primary (meant for full lookup rows); navbar only has the translation column. */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .bb-nav-passage-toolbar__fields.passage-lookup-primary {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-self: center;
    gap: 0;
    width: auto;
    min-height: 0;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .passage-translation-field.bb-nav-passage-toolbar__trans {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-self: center;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: 0;
    line-height: normal;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .passage-translation-field.bb-nav-passage-toolbar__trans #translationPrefControlStatus {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
}

body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip--nav {
    min-height: 2.35rem;
    box-sizing: border-box;
    align-self: center;
}

/* Scripture-first: site chrome reads as quiet navigation — scripture stays the star. */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links a {
    color: rgba(100, 116, 139, 0.72);
    font-weight: 450;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links a:hover {
    color: rgba(51, 65, 85, 0.9);
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .logo h1 {
    color: rgba(71, 85, 105, 0.78);
    font-weight: 600;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .logo h1 a.logo-link {
    color: inherit;
    text-decoration: none;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip.passage-shell-location-chip--nav {
    color: rgba(51, 65, 85, 0.76);
    font-weight: 550;
    background: rgba(248, 250, 252, 0.72);
    border-color: rgba(203, 213, 225, 0.65);
    box-shadow: none;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip.passage-shell-location-chip--nav:hover {
    border-color: rgba(148, 163, 184, 0.38);
    background: rgba(255, 255, 255, 0.88);
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip__ref {
    color: rgba(71, 85, 105, 0.76);
    font-weight: 560;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip__action {
    color: rgba(100, 116, 139, 0.52);
    font-weight: 650;
}
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar__trans select {
    border-color: rgba(226, 232, 240, 0.98);
    background: rgba(252, 253, 255, 0.9);
    color: rgba(71, 85, 105, 0.82);
    font-weight: 450;
    box-shadow: none;
}

/* Find in passage: word label on wide screens; icon-only treatment is scripture-first ≤767px (Batch C). */
.bb-passage-text-search-open-btn__icon {
    display: none;
}

.passage-form.passage-form--nav-toolbar {
    flex: 0 1 auto;
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

.passage-form.passage-form--nav-toolbar.passage-form--reference-jump {
    gap: 0.3rem;
    align-items: center;
}

.passage-form.passage-form--nav-toolbar select {
    min-width: 0;
}

.passage-form.passage-form--nav-toolbar .passage-lookup-primary {
    width: auto;
    max-width: 100%;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-ref-input-wrap {
    flex: 1;
    max-width: 20rem;
}

.nav-ref-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
}

.nav-ref-input::placeholder { color: var(--light-text); }
.nav-ref-input {
    touch-action: manipulation;
}
.nav-ref-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* passage.html — scripture-first: passage chip + translation in navbar; typed ref + Load live in the Pick dialog */
.nav-ref-input-wrap--passage-sf {
    flex: 1 1 auto;
    max-width: min(52rem, 100%);
    min-width: 0;
}

/* First-visit only: second line under the ref toolbar, full width in column stack. */
body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav .bb-passage-ref-first-run-hint {
    margin: 0.05rem 0 0;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    box-sizing: border-box;
    align-self: stretch;
}

.bb-nav-passage-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    min-width: 0;
}

/* #passageForm in Pick dialog: programmatic #book/#chapter/#verse only — strip default .passage-form card chrome */
#passageForm.passage-form.passage-form--picker-sync {
    gap: 0;
    flex: none;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.bb-nav-passage-toolbar__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.bb-nav-passage-toolbar__ref {
    flex: 2 1 10rem;
    min-width: 0;
}

.bb-nav-passage-toolbar__trans {
    flex: 1 1 7rem;
    min-width: 5.5rem;
}

.bb-nav-passage-toolbar__load {
    flex: 0 0 auto;
}

.passage-shell-location-chip--nav {
    flex: 0 0 auto;
    max-width: min(100%, 14rem);
}

.bb-nav-passage-toolbar__trans select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover { color: var(--primary-color); }

/* Hero Section (index.html only) */
.hero {
    background: linear-gradient(135deg, var(--bb-hero-start) 0%, var(--bb-hero-end) 100%);
    color: white;
    padding: 4.5rem 1.25rem;
    text-align: center;
}

.hero h2 {
    font-size: 2.1rem;
    margin-bottom: 0.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-support {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.cta-buttons {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.hero .btn-primary { background: var(--bb-hero-btn-primary-bg); color: var(--bb-hero-btn-primary-text); border-color: var(--bb-hero-btn-primary-bg); }
.hero .btn-primary:hover { background: var(--bb-hero-btn-primary-hover-bg); border-color: var(--bb-hero-btn-primary-hover-bg); }
.hero .btn-secondary { background: transparent; color: var(--bb-hero-btn-secondary-text); border-color: var(--bb-hero-btn-secondary-border); }
.hero .btn-secondary:hover { background: var(--bb-hero-btn-primary-bg); color: var(--bb-hero-btn-primary-text); border-color: var(--bb-hero-btn-primary-bg); }

.hero-links {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.hero-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.hero-links a:hover {
    color: white;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--bb-shadow-panel);
}
.btn:active:not(:disabled) {
    transform: translateY(0.5px) scale(0.992);
    box-shadow: var(--bb-shadow-raised);
}
.btn:disabled {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover { background: var(--primary-color-strong); border-color: var(--primary-color-strong); }

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-color);
    border-color: var(--light-text);
    box-shadow:
        var(--bb-shadow-panel),
        0 1px 0 var(--bb-color-state-selected);
}

.btn:focus-visible:not(:disabled) {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary:focus-visible:not(:disabled) {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 1px;
    box-shadow: var(--bb-shadow-focus);
}

.btn-secondary:focus-visible:not(:disabled) {
    outline-color: var(--primary-color);
    border-color: var(--bb-theme-active-border);
}

/* Sections */
section {
    padding: 4rem 20px;
}

section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

/* Homepage (index): quieter section titles & intro copy */
.about > .container > h3,
.features > .container > h3,
.principles > .container > h3,
.technology > .container > h3 {
    margin-bottom: 0.95rem;
    font-size: clamp(1.45rem, 2.8vw, 1.68rem);
    font-weight: 650;
}

.about > .container > p {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.85rem;
    line-height: 1.55;
    color: var(--light-text);
    text-align: center;
}

.technology > .container > p {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.9rem;
    line-height: 1.55;
    color: var(--light-text);
    text-align: center;
}

/* About Section */
.about {
    background-color: var(--light-bg);
    padding: 2.75rem 1.25rem;
}

.about ul.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.1rem;
    margin-top: 1.2rem;
}

.about li {
    padding: 0.85rem 1rem;
    background: white;
    border-left: 4px solid var(--secondary-color);
    border-radius: 0.25rem;
    line-height: 1.45;
    font-size: 0.9375rem;
}

.about strong {
    color: var(--primary-color);
}

/* Features Grid */
.features {
    padding: 2.75rem 1.25rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.35rem;
    margin-top: 1.2rem;
}

.feature-card {
    background: var(--bb-card-bg);
    border: 1px solid var(--bb-card-border);
    border-radius: 0.5rem;
    padding: 1.5rem 1.35rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.feature-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.feature-card p {
    color: var(--light-text);
    line-height: 1.52;
    font-size: 0.9375rem;
    margin: 0;
}

/* Principles */
.principles {
    background-color: var(--light-bg);
    padding: 2.75rem 1.25rem;
}

.principles-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.35rem;
    margin-top: 1.2rem;
}

.principle {
    background: white;
    padding: 1.5rem 1.35rem;
    border-radius: 0.5rem;
    border-top: 4px solid var(--secondary-color);
}

.principle h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.principle p {
    color: var(--light-text);
    line-height: 1.55;
    font-size: 0.9375rem;
    margin: 0;
}

/* Technology Section */
.technology {
    background-color: white;
    padding: 2.75rem 1.25rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.35rem;
    margin-top: 1.2rem;
}

.tech-category {
    background: var(--light-bg);
    padding: 1.5rem 1.35rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--secondary-color);
}

.tech-category h4 {
    color: var(--primary-color);
    margin-bottom: 0.65rem;
    font-size: 1.05rem;
}

.tech-category ul {
    list-style: none;
}

.tech-category li {
    padding: 0.35rem 0;
    color: var(--light-text);
    line-height: 1.45;
    font-size: 0.9rem;
}

.tech-category li:before {
    content: "▸ ";
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Source Code Section */
.source-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2.35rem 1.25rem;
}

.source-code h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: clamp(1.4rem, 2.5vw, 1.6rem);
    font-weight: 650;
}

.source-code p {
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 20px;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
    color: #d1d5db;
}

.heart {
    color: #ef4444;
}

body[data-bb-page="home"] .footer {
    margin-top: 2.25rem;
    padding: 1.65rem 1.25rem;
}

/* Responsive Design - Mobile-first breakpoints: 768, 430, 360 */

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.5rem 1rem;
    }

    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links {
        margin-left: 0;
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 1rem;
    }

    .nav-ref-input-wrap,
    .nav-ref-input-wrap--passage-sf {
        /* Target is inside .bb-passage-nav__band (Passage) or legacy toolbar rows; order applies to the flex parent of this wrap. */
        order: 3;
        max-width: 100%;
        width: 100%;
        flex-basis: 100%;
        margin-top: 0.25rem;
    }

    /* Batch C: scripture-first passage keeps one navbar band (reference · translation · find). */
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .bb-passage-nav__band {
        flex-wrap: nowrap;
        min-width: 0;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .nav-ref-input-wrap--passage-sf {
        order: 0;
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
        flex-basis: auto;
        margin-top: 0;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar {
        flex-wrap: nowrap;
    }

    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar__trans select {
        max-width: 100%;
    }

    .nav-ref-input {
        min-height: 2.75rem;
        font-size: 1rem;
        padding: 0.5rem 0.875rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 0.35rem 0;
        min-height: 2.25rem;
        display: inline-flex;
        align-items: center;
    }

    .hero {
        padding: 3.35rem 1rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-links {
        font-size: 0.9rem;
    }

    .about,
    .features,
    .principles,
    .technology,
    .source-code {
        padding-top: 2.1rem;
        padding-bottom: 2.1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .about > .container > h3,
    .features > .container > h3,
    .principles > .container > h3,
    .technology > .container > h3 {
        margin-bottom: 0.82rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    section {
        padding: 2rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    section h3 {
        font-size: 1.5rem;
    }

    .features-grid,
    .principles-content,
    .tech-stack {
        grid-template-columns: 1fr;
    }

    /* Passage layout: stack main then sidebar */
    .passage-layout {
        flex-direction: column;
        gap: 1.25rem;
        padding: 0;
    }

    .passage-section {
        max-width: none;
        padding: 1rem;
    }

    .passage-ref-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .passage-form {
        gap: 0.45rem;
        padding: 0.65rem 0.75rem;
    }

    .passage-form select {
        min-width: 0;
        width: 100%;
        min-height: 2.5rem;
    }

    .passage-form input[type="number"],
    .passage-form input[type="text"] {
        min-height: 2.5rem;
    }

    .quick-ref-input {
        width: 100%;
        min-width: 0;
    }

    .passage-form .btn-primary {
        min-height: 2.75rem;
        width: 100%;
        margin-top: 0;
    }

    .passage-structured-summary {
        font-size: 0.84rem;
        padding-top: 0.25rem;
    }

    /* Passage nav buttons - wrap with comfortable tap targets */
    .passage-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }

    .passage-nav .btn-secondary {
        min-height: 2.75rem;
        min-width: 2.75rem;
        padding: 0.5rem 0.75rem;
    }

    .history-nav-wrap {
        flex-basis: 100%;
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.25rem;
    }

    .reading-area {
        max-width: 100%;
        padding: 0.25rem 0;
    }

    /* Premium passage reading: spacing and typography */
    .translation-block {
        padding: 1rem 1rem;
        margin-bottom: 1.25rem;
    }

    .translation-block--passage-level {
        padding-left: calc(1rem - 3px);
    }

    .translation-text {
        font-size: 1.0625rem;
        line-height: 1.75;
        margin-top: 0.5rem;
    }

    .translation-passage-ref {
        font-size: 0.8rem;
    }

    .translation-text--passage-prose {
        margin-top: 0.35rem;
    }

    .result-reference {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .verse-header {
        gap: 0.35rem;
        margin-bottom: 0.75rem;
    }

    .verse-header-actions {
        margin-left: 0;
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .passage-nav-utilities {
        margin-left: 0;
        flex: 1 1 100%;
        padding-top: 0.45rem;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        justify-content: flex-start;
    }

    .section-divider {
        margin: 1rem 0;
    }

    .passage-section h3 {
        margin-bottom: 0.35rem;
    }

    .passage-main h3.passage-viewer-title {
        font-size: 0.75rem;
        letter-spacing: 0.045em;
    }

    .passage-desc {
        font-size: 0.8125rem;
        line-height: 1.45;
        margin-bottom: 0.55rem;
    }

    /* Tables: contain overflow, horizontal scroll */
    .tokens-wrap,
    .interlinear-wrap {
        margin: 0 -1rem;
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .token-table,
    .interlinear-table {
        min-width: 480px;
        font-size: 0.85rem;
    }

    .token-table th,
    .token-table td,
    .interlinear-table th,
    .interlinear-table td {
        padding: 0.4rem 0.5rem;
    }

    .cross-ref-items {
        flex-direction: column;
        gap: 0.62rem;
    }

    /* Occurrence explorer: scroll container */
    .occurrence-explorer {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
        max-width: 100%;
    }

    .occurrence-row {
        grid-template-columns: 6rem 3.5rem 1fr 1fr;
        gap: 0.5rem;
        min-width: 320px;
        font-size: 0.8rem;
    }

    /* Sidebar: full width, comfortable height */
    .bookmarks-sidebar {
        width: 100%;
        max-width: none;
        max-height: min(20rem, 50vh);
        order: 2;
        flex-shrink: 0;
        padding: 1rem 1rem;
    }

    .bookmarks-list li,
    .session-ref,
    .collection-item {
        min-height: 2.25rem;
        display: flex;
        align-items: center;
    }

    /* Ref preview: constrain to viewport to prevent overflow */
    .ref-preview {
        max-width: min(320px, calc(100vw - 2rem));
    }

    .ref-preview-dismiss {
        min-height: 2.75rem;
        padding: 0.38rem 0.65rem;
    }

    .ai-study-btn {
        min-height: 2.75rem;
        min-width: 4rem;
    }

    .ai-study-preset-chip {
        min-height: 40px;
        padding: 0.38rem 0.6rem;
        font-size: 0.74rem;
    }

    .ai-study-inline-btn {
        min-height: 2.75rem;
        padding: 0.4rem 0.55rem;
    }

    /* Pinned verses, save controls */
    .pinned-save-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .pinned-save-wrap .btn-secondary {
        width: 100%;
        min-height: 2.5rem;
    }

    /* Session/collection controls */
    .sessions-create {
        flex-wrap: wrap;
    }

    .session-name-input {
        flex: 1 1 100%;
        min-width: 0;
        min-height: 2.25rem;
    }

    .session-export-import {
        gap: 0.35rem;
    }

    .btn-session {
        min-height: 2.5rem;
        padding: 0.4rem 0.6rem;
    }

    /* Context / cross-ref list items: comfortable tap targets */
    .context-verse {
        padding: 0.625rem 0;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
    }

    .place-item {
        padding: 0.48rem 0;
        gap: 0.4rem;
    }

    /* Strong's links: adequate tap area */
    .strong-link {
        padding: 0.15em 0.1em;
        margin: -0.15em -0.1em;
        border-radius: 0.2em;
    }

    /* Status toast: mobile-safe position with safe area */
    .status-toast {
        left: max(1rem, env(safe-area-inset-left));
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
        max-width: none;
        padding: 0.75rem 1rem;
    }

    .exit-presentation-btn {
        bottom: max(1rem, env(safe-area-inset-bottom));
        right: max(1rem, env(safe-area-inset-right));
        left: max(1rem, env(safe-area-inset-left));
        max-width: none;
        min-height: 2.75rem;
        padding: 0.6rem 1rem;
    }

    .pinned-verse-ref-link,
    .pinned-verse-text {
        line-height: 1.45;
    }

    .pinned-verse-item {
        padding-bottom: 0.875rem;
    }
}

@media (max-width: 430px) {
    .logo h1 {
        font-size: 1.1rem;
    }

    .navbar .container {
        padding: 0.5rem 0.75rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .passage-section {
        padding: 0.75rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2.85rem 1rem;
    }

    .feature-card,
    .principle,
    .tech-category {
        padding: 1.35rem 1.15rem;
    }

    .study-panel,
    .translation-block,
    .map-section,
    .pinned-verse-panel {
        padding: 0.88rem 1.08rem;
    }

    .translation-block--passage-level {
        padding-left: calc(1rem - 3px);
    }

    .word-study-controls-stack {
        gap: 0.4rem;
    }
    .word-study-controls-stack > .word-study-compare-summary.study-panel,
    .word-study-controls-stack > .note-pin-study-helper.study-panel,
    .word-study-controls-stack > .word-study-pinned-wrap.study-panel {
        padding: 0.4rem 0.55rem;
    }
    .word-study-controls-stack > .word-study-result.study-panel {
        padding: 0.55rem 0.7rem;
    }

    /* Places: roomier rows, readable wraps, ~44px min tap targets */
    .place-item {
        padding: 0.62rem 0;
        gap: 0.46rem;
    }
    .place-item.place-item-active {
        padding: 0.58rem 0.5rem 0.58rem 0.65rem;
        margin: 0.2rem 0 0.2rem -0.3rem;
    }
    .place-item-head {
        align-items: flex-start;
    }
    .place-name {
        min-height: 2.75rem;
        display: flex;
        align-items: flex-start;
        padding: 0.35rem 0.35rem 0.35rem 0;
        box-sizing: border-box;
    }
    .place-coords-indicator {
        margin-top: 0.35rem;
    }
    .place-focus-map-btn {
        align-self: flex-start;
        min-height: 2.75rem;
        padding: 0.4rem 0.85rem;
        margin-left: 0 !important;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--light-bg);
        font-size: 0.85rem;
        text-decoration: none;
        line-height: 1.25;
    }
    .place-focus-map-btn:active {
        background: var(--border-color);
    }
    .place-item-active .place-focus-map-btn {
        border-color: rgba(59, 130, 246, 0.55);
        background: rgba(59, 130, 246, 0.14);
        color: var(--primary-color);
        font-weight: 600;
    }
    .place-item-active .place-focus-map-btn:active {
        background: rgba(59, 130, 246, 0.22);
    }
    .place-explore-map-handoff {
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        padding: 0.4rem 0.65rem;
        box-sizing: border-box;
    }
    /* SF places ≤430px: token overrides (see #placesList block in main sheet) */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #placesList {
        --sf-pad-row: 0.4rem;
        --sf-gap-stack: 0.2rem;
        --sf-gap-head: 0.26rem;
        --sf-gap-head-trail: 0.02rem;
        --sf-gap-title-y: 0.24rem;
        --sf-gap-title-x: 0.42rem;
        --sf-gap-actions-y: 0.26rem;
        --sf-gap-actions-x: 0.34rem;
        --sf-atlas-ml: 0;
        --sf-name-py: 0.16rem;
        --sf-name-px-end: 0.28rem;
        --sf-name-lh: 1.32;
        --sf-btn-min-h: 2.75rem;
        --sf-hl-pad-y: 0.34rem;
        --sf-hl-pad-x: 0.68rem;
        --sf-atlas-pad-y: 0.34rem;
        --sf-atlas-pad-x: 0.52rem;
        --sf-act-row-py: 0.36rem;
        --sf-act-row-px-end: 0.38rem;
        --sf-act-row-px-start: 0.48rem;
        --sf-act-row-my: 0.05rem;
        --sf-act-row-mx: -0.26rem;
        --sf-act-head-pad: 0.24rem;
        --sf-act-head-pad-x: 0.28rem;
        --sf-act-pill-py: 0.08rem;
        --sf-act-pill-px-end: 0.34rem;
        --sf-act-pill-px-start: 0.28rem;
        --sf-act-dot: 0.42rem;
        --sf-sum-mt: 0;
        --sf-sum-pt: 0.12rem;
        --sf-sum-lh: 1.38;
        --sf-meta-mt: 0;
        --sf-meta-lh: 1.32;
        --sf-det-mt: 0.06rem;
        --sf-det-pad-y: 0.1rem;
        --sf-det-pad-x: 0.24rem;
        --sf-det-pad-b: 0.12rem;
        --sf-det-open-y: 0.18rem;
        --sf-det-open-x: 0.3rem;
        --sf-det-open-b: 0.28rem;
        --sf-ref-list-mt: 0.24rem;
        --sf-prof-body-mt: 0.18rem;
        --sf-prof-body-pt: 0.08rem;
        --sf-prof-line-mb: 0.22rem;
    }
    .place-summary {
        line-height: 1.55;
    }

    .context-expand-btn,
    .cross-ref-filter-chip,
    .interlinear-toggle,
    .show-more-refs {
        min-height: 2.25rem;
        padding: 0.4rem 0.65rem;
    }

    .bookmark-btn,
    .pin-verse-btn,
    .add-to-collection-btn {
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0.4rem;
    }

    .translation-text {
        font-size: 1rem;
        line-height: 1.72;
    }

    .result-reference {
        font-size: 1rem;
        line-height: 1.35;
    }

    .translation-block {
        margin-bottom: 1rem;
    }

    .section-divider {
        margin: 0.875rem 0;
    }

    .passage-section h3 {
        margin-bottom: 0.25rem;
    }

    .occurrence-row {
        grid-template-columns: 5rem 3rem 1fr 1fr;
        min-width: 280px;
    }
}

/* SF places 431–768px: token bridge (midpoints between desktop and phone) */
@media (min-width: 431px) and (max-width: 768px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #placesList {
        --sf-pad-row: 0.46rem;
        --sf-gap-stack: 0.24rem;
        --sf-gap-head: 0.34rem;
        --sf-gap-head-trail: 0.06rem;
        --sf-gap-title-y: 0.3rem;
        --sf-gap-title-x: 0.54rem;
        --sf-gap-actions-y: 0.3rem;
        --sf-gap-actions-x: 0.44rem;
        --sf-atlas-ml: auto;
        --sf-name-py: 0.19rem;
        --sf-name-px-end: 0.3rem;
        --sf-name-lh: 1.33;
        --sf-btn-min-h: 2.75rem;
        --sf-hl-pad-y: 0.32rem;
        --sf-hl-pad-x: 0.62rem;
        --sf-atlas-pad-y: 0.3rem;
        --sf-atlas-pad-x: 0.5rem;
        --sf-hl-font-size: 0.8rem;
        --sf-act-row-py: 0.42rem;
        --sf-act-row-px-end: 0.44rem;
        --sf-act-row-px-start: 0.52rem;
        --sf-act-row-my: 0.08rem;
        --sf-act-row-mx: -0.28rem;
        --sf-act-head-pad: 0.3rem;
        --sf-act-head-pad-x: 0.36rem;
        --sf-act-pill-py: 0.1rem;
        --sf-act-pill-px-end: 0.38rem;
        --sf-act-pill-px-start: 0.3rem;
        --sf-act-dot: 0.44rem;
        --sf-sum-mt: 0.04rem;
        --sf-sum-pt: 0.16rem;
        --sf-sum-lh: 1.42;
        --sf-meta-mt: 0.02rem;
        --sf-meta-lh: 1.35;
        --sf-det-mt: 0.1rem;
        --sf-det-pad-y: 0.12rem;
        --sf-det-pad-x: 0.28rem;
        --sf-det-pad-b: 0.16rem;
        --sf-det-open-y: 0.24rem;
        --sf-det-open-x: 0.34rem;
        --sf-det-open-b: 0.34rem;
        --sf-ref-list-mt: 0.32rem;
        --sf-prof-body-mt: 0.24rem;
        --sf-prof-body-pt: 0.1rem;
        --sf-prof-line-mb: 0.26rem;
    }
}

@media (max-width: 430px) {
    .logo h1 {
        font-size: 1rem;
    }

    .nav-links a {
        font-size: 0.8125rem;
    }

    .passage-form select,
    .passage-form input {
        font-size: 0.9375rem;
    }

    .passage-nav .btn-secondary {
        font-size: 0.8125rem;
        padding: 0.5rem 0.625rem;
        min-height: 2.5rem;
    }

    .token-table,
    .interlinear-table {
        min-width: 400px;
        font-size: 0.8rem;
    }

    .occurrence-row {
        min-width: 260px;
    }

    .translation-text {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    .translation-text--passage-prose {
        font-size: 0.9375rem;
        line-height: 1.72;
    }

    .translation-passage-ref {
        font-size: 0.78rem;
        letter-spacing: 0.02em;
    }

    .passage-section {
        padding: 0.625rem;
    }

    .passage-main[data-bb-reading-surface='scripture-first-v1'] #placesList {
        --sf-gap-actions-y: 0.32rem;
    }

    /* SF places: stack Highlight + Explore Map on very narrow screens for predictable tap bands */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sf-gap-actions-y);
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__actions .place-focus-map-btn,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__actions .place-explore-map-handoff--secondary {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Passage viewer */
.passage-section {
    padding: 1.5rem 1rem;
    max-width: 1040px;
    margin: 0 auto;
}

.passage-ref-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem 1.15rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.65rem 0.6rem;
    background: rgba(248, 250, 252, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
@media (min-width: 720px) {
    .passage-ref-bar {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.85rem 1rem;
    }
    .passage-browse-nav,
    .passage-form {
        flex: none;
        width: 100%;
        max-width: none;
    }
}

.passage-entry-kicker {
    margin: 0 0 0.28rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.2;
}
.passage-entry-kicker--browse {
    color: rgba(30, 64, 175, 0.92);
}
.passage-entry-kicker--reference {
    color: rgba(71, 85, 105, 0.96);
}
@media (max-width: 520px) {
    .passage-ref-bar {
        padding: 0.48rem 0.5rem 0.52rem;
        gap: 0.75rem 0.85rem;
    }
    .passage-browse-nav {
        padding: 0.55rem 0.6rem;
    }
    .passage-browse-hint,
    .bb-browse-orientation {
        font-size: 0.74rem;
    }
    .passage-form {
        padding: 0.62rem 0.65rem;
        gap: 0.42rem;
    }
    .passage-entry-kicker {
        margin-bottom: 0.2rem;
    }
}

.passage-browse-nav {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 0.75rem 0.85rem 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.26);
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.bb-reading-entry__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(15, 23, 42, 0.94);
}
.bb-reading-entry__lede {
    margin: 0 0 0.55rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(51, 65, 85, 0.92);
    max-width: 48rem;
}
.bb-reading-entry__book-row {
    margin-bottom: 0.45rem;
}
.bb-reading-entry__primary-actions {
    flex: 1 1 auto;
    justify-content: flex-start;
}
@media (min-width: 480px) {
    .bb-reading-entry__primary-actions {
        justify-content: flex-end;
    }
}
.bb-reading-entry__chapters {
    margin-top: 0.5rem;
    max-width: none;
}
.bb-reading-entry__secondary {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
}
.passage-reader-header__titles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    min-width: 0;
}
.bb-reader-book-mode-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    color: rgb(6, 95, 70);
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.45);
    line-height: 1.2;
}
.bb-continue-reading-bar--visible {
    margin: 0 0 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.22);
}
.bb-continue-reading-bar--visible .bb-continue-reading-bar__btn {
    width: 100%;
    max-width: 36rem;
    min-height: 2.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
}
.bb-toc-resume-host:not([hidden]),
.bb-toc-current-host:not([hidden]) {
    margin-bottom: 0.35rem;
}
.bb-toc-resume .bb-toc-resume-btn {
    width: 100%;
    min-height: 2.35rem;
    font-weight: 600;
}
.bb-toc-current__line {
    margin: 0 0 0.32rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(30, 41, 59, 0.95);
}

/* Top of Contents: compact utility strip (not sticky — avoids “pinned sheet” over scroll). */
.bb-toc-reading-zone {
    position: relative;
    margin: 0 -0.2rem 0.45rem;
    padding: 0.32rem 0.38rem 0.4rem;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    box-shadow: none;
}
.bb-toc-panel__body .bb-toc-section--recent {
    margin-top: 0.08rem;
}
.bb-toc-recent-btn {
    min-height: 2.35rem;
    font-size: 0.84rem;
}

.passage-reader-header--reading-head {
    max-width: none;
    padding-bottom: 0.28rem;
    margin-bottom: 0.28rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.passage-reader-workspace[data-bb-reading="book"] .passage-reader-header--reading-head {
    border-bottom-color: rgba(16, 185, 129, 0.2);
}
/* Even vertical rhythm: title/toolbelt → continue → location → book strip (0.5rem scale). */
.passage-reader-header--reading-head .passage-reader-header__title-row {
    margin-bottom: 0.38rem;
}
.passage-reader-header--reading-head .bb-continue-reading-bar:not([hidden]) {
    margin-top: 0;
    margin-bottom: 0.38rem;
}
.passage-reader-header--reading-head .bb-reader-location-line:not([hidden]) {
    margin: 0 0 0.38rem;
    padding-top: 0.18rem;
}
.passage-reader-header--reading-head .bb-book-reading-progress-strip:not([hidden]) {
    margin-top: 0;
    margin-bottom: 0.38rem;
}

.bb-passage-ref-bar__primary {
    flex: 1 1 auto;
    min-width: 0;
}
.bb-passage-ref-bar__secondary {
    flex: 1 1 16rem;
    min-width: 0;
    padding: 0.55rem 0.65rem 0.62rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-sizing: border-box;
}
.passage-form.passage-form--reference-jump {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 0.5rem;
}
.passage-form.passage-form--reference-jump .passage-lookup-primary-label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: rgba(71, 85, 105, 0.92);
}

.bb-passage-nav-chapter-wrap {
    width: 100%;
    max-width: 100%;
    margin-top: 0.35rem;
    padding: 0.38rem 0.45rem 0.42rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.88);
    box-sizing: border-box;
}
.passage-nav--has-chapter-rail .bb-passage-nav-chapter-wrap {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(248, 250, 252, 0.95);
}
.passage-nav--book-reading .bb-passage-nav-chapter-wrap {
    border-color: rgba(16, 185, 129, 0.32);
    background: rgba(240, 253, 250, 0.55);
}
.bb-passage-nav-chapter-wrap__chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.28rem;
}
.bb-passage-nav-chapter-wrap__eyebrow {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.88);
}
.bb-passage-nav-chapter-wrap__book {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: rgba(15, 23, 42, 0.94);
    line-height: 1.22;
    padding: 0.08rem 0 0.08rem 0.48rem;
    border-left: 3px solid rgba(37, 99, 235, 0.38);
    box-sizing: border-box;
}
.passage-nav--book-reading .bb-passage-nav-chapter-wrap__book {
    border-left-color: rgba(5, 122, 85, 0.5);
}
.bb-passage-nav-chapter-wrap__viewport {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 -0.2rem;
    padding: 0.12rem 0.2rem 0.18rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
/* Edge fade: slightly stronger in default (chapter) rail so scroll feels obvious; book mode stays softer. */
.passage-nav--has-chapter-rail:not(.passage-nav--book-reading) .bb-passage-nav-chapter-wrap__viewport {
    box-shadow:
        inset 11px 0 18px -8px rgba(241, 245, 249, 0.98),
        inset -11px 0 18px -8px rgba(241, 245, 249, 0.98),
        inset 14px 0 22px -10px rgba(148, 163, 184, 0.22),
        inset -14px 0 22px -10px rgba(148, 163, 184, 0.22);
}
.passage-nav--book-reading .bb-passage-nav-chapter-wrap__viewport {
    box-shadow: inset 10px 0 14px -10px rgba(236, 253, 245, 0.98), inset -10px 0 14px -10px rgba(236, 253, 245, 0.98);
}
.bb-passage-nav-chapter-wrap__viewport::-webkit-scrollbar {
    height: 6px;
}
.bb-passage-nav-chapter-wrap__viewport::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
}

.bb-chapter-reading-badge--chapter-only {
    color: rgb(30, 64, 175);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.32);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.1rem 0.38rem;
    letter-spacing: 0.055em;
}
.bb-chapter-reading-badge--book-flow {
    color: rgb(6, 95, 70);
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.42);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.14rem 0.48rem;
    letter-spacing: 0.045em;
}

.passage-browse-hint {
    margin: 0 0 0.28rem;
    font-size: 0.76rem;
    line-height: 1.32;
    color: rgba(71, 85, 105, 0.88);
    max-width: 26rem;
}
.bb-browse-orientation {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(100, 116, 139, 0.95);
    max-width: 26rem;
    letter-spacing: 0.01em;
}
.bb-browse-orientation[hidden] {
    display: none !important;
}
.passage-browse-nav__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.45rem 0.65rem;
}
.passage-browse-field {
    flex: 1 1 7rem;
    min-width: 0;
}
.passage-browse-field--chapter {
    flex: 0 1 5.5rem;
}
.passage-browse-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--light-text, #64748b);
}
.bb-browse-select {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.passage-browse-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 100%;
}
@media (min-width: 420px) {
    .passage-browse-actions {
        flex: 1 1 auto;
        margin-left: auto;
        justify-content: flex-end;
    }
}
.bb-browse-read-btn,
.bb-browse-history-btn {
    font-size: 0.8125rem;
    padding: 0.42rem 0.65rem;
    min-height: 2.35rem;
}
.bb-chapter-reading-badge {
    flex: 0 0 auto;
    align-self: center;
    margin: 0 0.35rem 0 0;
    padding: 0.14rem 0.48rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(30, 64, 175);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 4px;
    line-height: 1.2;
}
@media (max-width: 480px) {
    .bb-chapter-reading-badge {
        font-size: 0.64rem;
        padding: 0.12rem 0.4rem;
    }
    .bb-chapter-reading-badge--chapter-only {
        font-size: 0.58rem;
        padding: 0.08rem 0.34rem;
    }
    .bb-chapter-reading-badge--book-flow {
        font-size: 0.66rem;
        padding: 0.12rem 0.42rem;
    }
}
.reading-area.bb-passage-scope--chapter {
    border-left: 3px solid rgba(59, 130, 246, 0.45);
    padding-left: 0.55rem;
    margin-left: -0.15rem;
    background: rgba(248, 250, 252, 0.55);
    border-radius: 0 6px 6px 0;
}
.reading-area.bb-passage-scope--chapter.bb-passage-scope--book-reading {
    border-left-color: rgba(16, 185, 129, 0.55);
    background: rgba(236, 253, 245, 0.42);
}
.passage-results[data-bb-passage-scope="verse"] .reading-area:not(.bb-passage-scope--chapter) {
    border-radius: 0 4px 4px 0;
}

/* Page chrome: subordinate to loaded reference + scripture (see .reading-area .verse-header .result-reference). */
.passage-main h3.passage-viewer-title,
.passage-reader-workspace .passage-viewer-title {
    margin-bottom: 0.32rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--light-text);
}

.passage-reader-header {
    max-width: 42rem;
    margin-bottom: 0.15rem;
}
.passage-reader-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.65rem;
    max-width: 42rem;
}
.passage-reader-header__ref-picker-wrap {
    flex: 1 1 10rem;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
}
.bb-reader-ref-picker-open-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.08rem;
    max-width: 100%;
    min-height: 2.55rem;
    padding: 0.32rem 0.55rem 0.34rem;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(30, 58, 138, 0.96);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.bb-reader-ref-picker-open-btn:hover {
    border-color: rgba(148, 163, 184, 0.45);
    color: rgb(30, 64, 175);
}
.bb-reader-ref-picker-open-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 1px;
}
.bb-reader-ref-picker-open-btn__kicker {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #64748b;
    line-height: 1.2;
}
.bb-reader-ref-picker-open-btn__label {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: #1e3a8a;
}
.passage-reader-workspace[data-bb-reading="book"] .bb-reader-ref-picker-open-btn {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.78));
}
.bb-reader-ref-picker-dialog {
    max-width: min(24rem, calc(100vw - 16px));
    width: 100%;
    max-height: calc(100dvh - 16px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.09), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    box-sizing: border-box;
    overflow: hidden;
}
dialog.bb-reader-ref-picker-dialog[open] {
    display: flex;
    flex-direction: column;
}
body.bb-ref-picker-dialog-open #bbPassageStudyActionRow,
body.bb-ref-picker-dialog-open #bbPassageReaderToolDock,
body.bb-ref-picker-dialog-open #bbPassageActionRowHint,
body.bb-ref-picker-dialog-open #bbSfVerseToolsSelectHint,
body.bb-ref-picker-dialog-open #bbReaderUnifiedOverlayHost {
    display: none !important;
}
.bb-reader-ref-picker-dialog::backdrop {
    background: rgba(15, 23, 42, 0.36);
}
/* When <dialog> has no showModal/show (very old engines): class + body lock mimic a modal layer. */
body.bb-ref-picker-polyfill-backdrop {
    overflow: hidden;
}
body.bb-ref-picker-polyfill-backdrop::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10055;
    background: rgba(15, 23, 42, 0.36);
}
dialog.bb-reader-ref-picker-dialog.bb-reader-ref-picker-dialog--polyfill-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10060;
    max-height: calc(100dvh - 16px);
    margin: 0;
}
.bb-reader-ref-picker-dialog__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.22rem 0.38rem;
    padding: 0.22rem 0.34rem 0.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(252, 253, 255, 0.98);
}
.bb-reader-ref-picker-dialog__head .btn-sm {
    min-height: 2.1rem;
    padding: 0.16rem 0.42rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.85);
}
.bb-reader-ref-picker-dialog__title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.78);
}
.bb-reader-ref-picker-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.2rem 0.32rem 0.28rem;
    scroll-padding-top: 0.35rem;
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog__location {
    margin: 0 0 0.12rem;
    padding: 0.14rem 0.22rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.22;
    color: rgba(71, 85, 105, 0.92);
    word-break: break-word;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: none;
}
.bb-reader-ref-picker-dialog__mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.22rem;
    margin: 0.16rem 0 0.42rem;
    padding: 0.16rem;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
}
.bb-reader-ref-picker-dialog__mode-tab {
    min-height: 2rem;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(51, 65, 85, 0.94);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.15;
    cursor: pointer;
}
.bb-reader-ref-picker-dialog__mode-tab:hover,
.bb-reader-ref-picker-dialog__mode-tab:focus-visible {
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(255, 255, 255, 0.86);
    outline: none;
}
.bb-reader-ref-picker-dialog__mode-tab--active {
    border-color: rgba(37, 99, 235, 0.42);
    background: rgba(255, 255, 255, 0.98);
    color: rgb(30, 64, 175);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.bb-reader-ref-picker-dialog__typed-ref {
    margin: 0 0 0.42rem;
    padding: 0.42rem 0.32rem 0.46rem;
    border-radius: 9px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.55));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 4px 16px rgba(37, 99, 235, 0.07);
}
.bb-reader-ref-picker-dialog__typed-ref-label {
    display: block;
    margin: 0 0 0.32rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(29, 78, 216, 0.88);
}
.bb-reader-ref-picker-dialog__typed-ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}
.bb-reader-ref-picker-dialog__typed-ref-input {
    flex: 1 1 10rem;
    min-width: 0;
    min-height: 2.55rem;
    padding: 0.38rem 0.45rem;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 0.4rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(255, 255, 255, 0.98);
    color: rgba(15, 23, 42, 0.96);
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog__typed-ref-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.bb-reader-ref-picker-dialog__typed-ref-load {
    flex: 0 0 auto;
    align-self: center;
}
.bb-reader-ref-picker-dialog .bb-reader-ref-picker-dialog__typed-ref-load,
.bb-reader-ref-picker-dialog #passageShellPickerLoadBtn {
    display: none;
}
.bb-reader-ref-picker-dialog__typed-ref-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
}
.bb-reader-ref-picker-dialog__flow-hint {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem 0.32rem;
    margin: 0 0 0.22rem;
    padding: 0.12rem 0.28rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.95);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.88);
}
.bb-ref-picker-step--on {
    color: rgb(29, 78, 216);
}
.bb-ref-picker-flow-arrow {
    opacity: 0.55;
    font-weight: 500;
}
.bb-reader-ref-picker-dialog .passage-browse-nav {
    margin: 0;
    padding: 0.06rem 0 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.bb-reader-ref-picker-dialog .passage-browse-nav.bb-ref-picker-browse--secondary {
    margin-top: 0;
    padding: 0.38rem 0.18rem 0.32rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.65);
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog .bb-reading-entry__title,
.bb-reader-ref-picker-dialog .bb-reading-entry__lede {
    margin: 0;
}
.bb-passage-text-search-dialog.bb-reader-ref-picker-dialog {
    max-width: min(34rem, calc(100vw - 0.75rem));
    max-height: min(88vh, 34rem);
}
.bb-passage-text-search-dialog .bb-reader-ref-picker-dialog__body {
    display: grid;
    gap: 0.52rem;
    padding-top: 0.22rem;
    padding-bottom: 0.38rem;
}
.bb-passage-text-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.36rem;
    align-items: center;
    margin-bottom: 0;
}
.bb-passage-text-search-input {
    width: 100%;
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.44rem 0.58rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: var(--bbp-panel-bg, #fff);
    font-size: 0.9rem;
}
.bb-passage-text-search-row .btn {
    min-height: 2.35rem;
    padding-inline: 0.82rem;
}
.bb-passage-text-search-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    overflow: visible;
    padding-bottom: 0;
}
.bb-passage-text-search-chips__label {
    flex: 0 0 auto;
    padding-right: 0.08rem;
    font-size: 0.7rem;
    font-weight: 760;
    color: rgba(71, 85, 105, 0.78);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.bb-passage-text-search-chip {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 730;
    line-height: 1.15;
}
.bb-passage-text-search-chip[aria-pressed='true'],
.bb-passage-text-search-chip--active {
    border-color: var(--bbp-accent, var(--primary-color));
    background: var(--bbp-accent-soft, rgba(59, 130, 246, 0.14));
    color: var(--bbp-accent, var(--primary-color));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent, #2563eb) 28%, transparent);
}
.bb-passage-text-search-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-height: 0;
    margin-bottom: 0;
}
.bb-passage-text-search-status {
    margin: 0;
    flex: 1 1 8rem;
    min-width: 0;
    font-size: 0.72rem;
    line-height: 1.25;
    color: rgba(71, 85, 105, 0.88);
}
.bb-passage-text-search-foot .bb-passage-text-search-retry {
    margin: 0;
    flex: 0 0 auto;
}
.bb-passage-text-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(48vh, 18rem);
    overflow: auto;
}
.bb-passage-text-search-results__item + .bb-passage-text-search-results__item {
    margin-top: 0.36rem;
}
.bb-passage-text-search-results__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9.6rem, auto);
    align-items: stretch;
    gap: 0.42rem;
}
.bb-passage-text-search-result-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.56rem 0.64rem;
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
}
.bb-passage-text-search-result-btn:hover {
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(248, 250, 252, 0.98);
}
.bb-passage-text-search-result-btn[aria-current='true'] {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 44%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 72%, var(--bbp-panel-bg, #fff));
    box-shadow: inset 3px 0 0 var(--bbp-accent, #2563eb);
}
.bb-passage-text-search-result-btn:focus-visible {
    outline: 2px solid var(--bbp-accent, var(--primary-color));
    outline-offset: 2px;
}
.bb-passage-text-search-result-btn__main {
    display: grid;
    grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.36rem;
    width: 100%;
    min-width: 0;
}
.bb-passage-text-search-result-btn__ref-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.24rem;
    min-width: 0;
}
.bb-passage-text-search-result-btn__ref {
    flex: 0 0 auto;
    max-width: 9rem;
    font-weight: 650;
    font-size: 0.8rem;
    letter-spacing: 0;
    color: rgba(30, 58, 138, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-passage-text-search-result-btn__current {
    display: inline-flex;
    align-items: center;
    min-height: 1.15rem;
    padding: 0.08rem 0.34rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 30%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 82%, var(--bbp-panel-bg, #fff));
    color: var(--bbp-accent, #2563eb);
    font-size: 0.66rem;
    font-weight: 760;
    line-height: 1;
}
.bb-passage-text-search-result-btn__snippet {
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(71, 85, 105, 0.88);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bb-passage-text-search-result-btn__hit {
    padding: 0 0.08rem;
    border-radius: 0.2rem;
    background: color-mix(in srgb, var(--bbp-accent, #2563eb) 18%, transparent);
    color: var(--bbp-text-secondary, #334155);
    font-weight: 760;
}
.bb-passage-text-search-result-btn__open-cue {
    align-self: center;
    padding: 0.16rem 0.42rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 28%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 999px;
    background: var(--bbp-accent-soft, #dbeafe);
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.1;
}
.bb-passage-text-search-result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.32rem;
    align-self: stretch;
    min-width: 0;
}
.bb-passage-text-search-workbench,
.bb-passage-text-search-send-study {
    align-self: stretch;
    justify-content: center;
    min-height: 2.45rem;
    padding-inline: 0.54rem;
    white-space: normal;
    text-wrap: balance;
}
.bb-passage-text-search-workbench {
    color: var(--bbp-text-secondary, #334155);
}
@media (max-width: 520px) {
    .bb-passage-text-search-dialog.bb-reader-ref-picker-dialog {
        max-width: calc(100vw - 0.5rem);
    }

    .bb-passage-text-search-dialog .bb-reader-ref-picker-dialog__body {
        gap: 0.46rem;
    }

    .bb-passage-text-search-results__actions {
        grid-template-columns: 1fr;
        gap: 0.36rem;
    }

    .bb-passage-text-search-result-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bb-passage-text-search-result-btn__main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.28rem 0.34rem;
    }

    .bb-passage-text-search-result-btn__ref {
        max-width: none;
    }

    .bb-passage-text-search-result-btn__snippet {
        grid-column: 1 / -1;
        font-size: 0.8rem;
    }

    .bb-passage-text-search-result-btn__open-cue {
        grid-column: 2;
        grid-row: 1;
    }

    .bb-passage-text-search-workbench,
    .bb-passage-text-search-send-study {
        justify-self: stretch;
        min-height: 2.35rem;
    }
}
@media (max-width: 400px) {
    .bb-passage-text-search-result-actions {
        grid-template-columns: 1fr;
    }
}
.bb-reader-ref-picker-dialog .bb-ref-picker-book-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.28rem 0.32rem;
    align-items: end;
    margin-bottom: 0.16rem;
    padding: 0.22rem 0.26rem 0.24rem;
    border-radius: 7px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(255, 255, 255, 0.98);
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-book-field {
    min-width: 0;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-book-label {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(37, 99, 235, 0.75);
}
.bb-reader-ref-picker-dialog .bb-ref-picker-book-select,
.bb-reader-ref-picker-dialog .bb-ref-picker-book-select.bb-browse-select {
    width: 100%;
    min-height: 2.42rem;
    padding: 0.26rem 0.38rem;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 0.35rem;
    border: 2px solid rgba(37, 99, 235, 0.35);
    background: rgba(255, 255, 255, 1);
    color: rgba(15, 23, 42, 0.95);
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-read-book-wrap {
    align-self: end;
    margin: 0;
    padding: 0;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-read-book-wrap.bb-reading-entry__primary-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-read-book-btn {
    min-height: 2.42rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.92);
    color: rgba(30, 41, 59, 0.92);
    box-shadow: none;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-read-book-btn:hover {
    border-color: rgba(100, 116, 139, 0.42);
    background: rgba(241, 245, 249, 0.98);
}
/* Browse path: visually secondary to typed “Go to passage” (same layout, softer chrome). */
.bb-reader-ref-picker-dialog .bb-ref-picker-browse--secondary .bb-ref-picker-book-row {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-browse--secondary .bb-ref-picker-book-label {
    color: rgba(71, 85, 105, 0.78);
}
.bb-reader-ref-picker-dialog .bb-ref-picker-browse--secondary .bb-ref-picker-book-select,
.bb-reader-ref-picker-dialog .bb-ref-picker-browse--secondary .bb-ref-picker-book-select.bb-browse-select {
    border-width: 1px;
    border-color: rgba(148, 163, 184, 0.38);
    font-size: 0.92rem;
    font-weight: 650;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-browse--secondary .bb-ref-picker-chapter-zone.bb-chapter-map-wrap {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(148, 163, 184, 0.14);
}
.bb-reader-ref-picker-dialog .bb-reading-entry__chapters {
    margin-top: 0.12rem;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-chapter-zone.bb-chapter-map-wrap {
    margin-top: 0.08rem;
    margin-bottom: 0.08rem;
    padding: 0.16rem 0.2rem 0.2rem;
    border-radius: 6px;
    background: rgba(252, 253, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-sizing: border-box;
}
.bb-reader-ref-picker-dialog .bb-ref-picker-chapter-zone .bb-chapter-map-wrap__visible-label {
    margin: 0 0 0.1rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.78);
}
.bb-reader-ref-picker-dialog .bb-chapter-map-grid {
    gap: 0.1rem;
    grid-template-columns: repeat(auto-fill, minmax(2.02rem, 1fr));
    padding-bottom: 0.02rem;
}
.bb-reader-ref-picker-dialog .bb-chapter-map-btn {
    min-width: 2.02rem;
    min-height: 2.02rem;
    padding: 0.08rem 0.12rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.25rem;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.98);
}
.bb-reader-ref-picker-dialog .bb-chapter-map-btn:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(239, 246, 255, 0.65);
}
.bb-reader-ref-picker-dialog .bb-chapter-map-btn--active {
    font-weight: 800;
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(29, 78, 216, 0.5);
    color: rgb(23, 37, 84);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.bb-reader-ref-picker-dialog .bb-book-overview.bb-disclosure {
    margin-top: 0.12rem;
    font-size: 0.76rem;
}
.bb-reader-ref-picker-dialog .bb-book-overview .bb-disclosure__summary {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.92);
}
.bb-reader-ref-picker-dialog__footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.42rem 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.035);
}
.bb-reader-ref-picker-dialog__draft-summary {
    min-width: 0;
    margin: 0;
    color: rgba(71, 85, 105, 0.9);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.bb-reader-ref-picker-dialog__primary-load {
    flex: 0 0 auto;
    min-width: 5.5rem;
    min-height: 2.15rem;
}
@media (max-width: 400px) {
    .bb-reader-ref-picker-dialog {
        max-width: calc(100vw - 8px);
        max-height: calc(100dvh - 8px);
        border-radius: 7px;
    }
    .bb-reader-ref-picker-dialog__footer {
        padding: 0.36rem 0.4rem;
    }
    .bb-reader-ref-picker-dialog__draft-summary {
        font-size: 0.74rem;
    }
    .bb-reader-ref-picker-dialog .bb-ref-picker-book-row {
        grid-template-columns: 1fr;
    }
    .bb-reader-ref-picker-dialog .bb-ref-picker-read-book-btn {
        width: 100%;
    }
    .bb-reader-ref-picker-dialog .bb-chapter-map-grid {
        grid-template-columns: repeat(auto-fill, minmax(1.92rem, 1fr));
        gap: 0.08rem;
    }
    .bb-reader-ref-picker-dialog .bb-chapter-map-btn {
        min-width: 1.92rem;
        min-height: 1.92rem;
        font-size: 0.76rem;
    }
}
.bb-passage-ref-bar--lookup-compact {
    margin-top: 0.05rem;
    padding-top: 0.2rem;
    border-top: none;
}
.passage-reader-workspace__lookup .bb-passage-ref-bar__secondary {
    padding: 0.14rem 0.22rem 0.18rem;
    border-radius: 6px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: none;
}
.passage-reader-workspace__lookup .passage-form.passage-form--reference-jump {
    gap: 0.24rem;
}
.passage-reader-workspace__lookup .passage-load-btn {
    padding: 0.22rem 0.52rem;
    font-size: 0.78rem;
    min-height: 1.92rem;
    box-shadow: none;
    font-weight: 600;
}
.passage-reader-workspace__lookup .passage-lookup-primary-label,
.passage-reader-workspace__lookup .translation-pref-label {
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.92;
}
.bb-passage-ref-bar--lookup-compact .bb-browse-legacy-note {
    margin-bottom: 0.14rem;
    opacity: 0.92;
}
.passage-reader-workspace__lookup .quick-ref-input {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}
.bb-browse-legacy-note--muted .bb-browse-legacy-note__summary {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.88);
    opacity: 0.92;
}
.bb-browse-legacy-note--muted.bb-disclosure--compact .bb-disclosure__panel {
    font-size: 0.78rem;
}
.bb-passage-ref-bar--lookup-compact .bb-passage-ref-bar__secondary {
    padding: 0.28rem 0.38rem 0.32rem;
}
@media (max-width: 520px) {
}
.passage-reader-header .passage-viewer-title {
    margin-bottom: 0;
}
.passage-reader-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}
/* Header toolbelt chrome (shared layouts). Scripture-first reading actions use .bb-sf-reading-utility-rail in the reading area. */
.passage-reader-header__toolbelt {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.22rem 0.26rem;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.88) inset;
    box-sizing: border-box;
}
.passage-reader-workspace[data-bb-reading="book"] .passage-reader-header__toolbelt {
    border-color: rgba(16, 185, 129, 0.32);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 253, 245, 0.72));
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.passage-reader-header__toolbelt .btn.btn-secondary {
    margin: 0;
    min-height: 2.2rem;
    padding: 0.26rem 0.55rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: rgba(30, 58, 138, 0.95);
}
.passage-reader-header__toolbelt .btn.btn-secondary:not(:first-of-type) {
    box-shadow: -1px 0 0 rgba(148, 163, 184, 0.32);
}
.passage-reader-header__toolbelt .btn.btn-secondary:hover {
    background: rgba(241, 245, 249, 0.98);
    border-color: rgba(148, 163, 184, 0.35);
    color: rgb(30, 64, 175);
}
.passage-reader-header__toolbelt .btn.btn-secondary:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 1px;
}
.passage-reader-header .bb-reader-nav-open-btn,
.passage-reader-header .bb-toc-open-btn {
    flex-shrink: 0;
}
.passage-reader-header__toolbelt .bb-maps-explorer-open-btn,
.passage-reader-header__toolbelt .bb-reader-nav-open-btn,
.passage-reader-header__toolbelt .bb-toc-open-btn {
    flex: 1 1 auto;
}
.passage-reader-header .passage-lookup-intro {
    margin-top: 0.35rem;
}

@media (max-width: 520px) {
    .passage-reader-header__title-row {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
        gap: 0.4rem 0.55rem;
    }
    .passage-reader-header__titles {
        width: 100%;
    }
    .passage-reader-header__ref-picker-wrap {
        width: 100%;
        justify-content: stretch;
    }
    .bb-reader-ref-picker-open-btn {
        width: 100%;
        justify-content: flex-start;
    }
    .passage-reader-header__actions {
        width: 100%;
        justify-content: stretch;
    }
    .passage-reader-header__toolbelt {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: stretch;
        gap: 0.1rem;
        padding: 0.16rem 0.18rem;
    }
    .passage-reader-header__toolbelt .btn.btn-secondary {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
}

/* Reader workspace: one column for “where you are / book strip”, one for lookup — softer chrome than stacked boxes.
   Optional scope: [data-passage-ui="workbench"] matches #passageReaderWorkspace. */
.passage-reader-workspace {
    max-width: 52rem;
    margin: 0 0 0.18rem;
    padding: 0.18rem 0.26rem 0.22rem;
    border-radius: 7px;
    background: rgba(252, 253, 255, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.05);
    box-shadow: none;
    box-sizing: border-box;
}
.passage-reader-workspace__status {
    padding-bottom: 0.06rem;
    margin-bottom: 0.22rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.passage-reader-workspace[data-bb-reading="book"] .passage-reader-workspace__status {
    border-bottom-color: rgba(16, 185, 129, 0.22);
    box-shadow: 0 1px 0 rgba(16, 185, 129, 0.06);
}
.passage-reader-workspace__lookup {
    padding-top: 0.04rem;
}
.passage-reader-workspace__tips {
    margin: 0 0 0.28rem;
}
.passage-reader-workspace__tips.passage-reader-workspace__tips--after-ref {
    margin: 0.12rem 0 0;
}
.passage-reader-workspace__tips--after-ref .passage-reader-workspace__tips-summary {
    font-size: 0.78rem;
    padding: 0.12rem 0.2rem;
}
.passage-reader-workspace__lookup .bb-passage-ref-bar {
    margin-top: 0.08rem;
    padding-top: 0.22rem;
    border-top: none;
    opacity: 0.97;
}
.passage-reader-workspace__lookup .bb-passage-ref-bar.bb-passage-ref-bar--lookup-compact {
    margin-top: 0;
    padding-top: 0.08rem;
}
.passage-reader-workspace__status .bb-book-reading-progress-strip {
    margin-top: 0.28rem;
    margin-bottom: 0.35rem;
    padding: 0.45rem 0.55rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;
}
.passage-reader-workspace__status .bb-reader-location-line {
    max-width: none;
}
.passage-reader-workspace__status .bb-reader-location-line.bb-reader-location-line--chapter {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(148, 163, 184, 0.14);
}
.passage-reader-workspace__status .bb-reader-location-line.bb-reader-location-line--book {
    border-left: 3px solid rgba(16, 185, 129, 0.45);
}
@media (min-width: 880px) {
    .passage-reader-workspace {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.32rem;
        align-items: start;
    }
    .passage-reader-workspace__status {
        margin-bottom: 0;
        padding-bottom: 0.45rem;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }
    .passage-reader-workspace__lookup {
        padding-top: 0;
        min-width: 0;
    }
    .passage-reader-workspace[data-bb-reading="book"] .passage-reader-workspace__status {
        border-bottom-color: rgba(16, 185, 129, 0.28);
    }
}

.passage-desc--compact {
    font-size: 0.875rem;
    line-height: 1.42;
    margin: 0.35rem 0 0;
}
.passage-desc--compact:first-child {
    margin-top: 0;
}
.passage-browse-hint--tight {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    line-height: 1.38;
}
.bb-passage-ref-bar {
    margin-top: 0.2rem;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.bb-reader-location-line {
    margin: -0.05rem 0 0.5rem;
    padding: 0.28rem 0 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color, #0f172a);
    letter-spacing: 0.01em;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    max-width: 42rem;
    line-height: 1.38;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
}
.bb-reader-location-line__primary {
    display: block;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.bb-reader-location-line__trail {
    display: block;
    max-width: 100%;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.96);
    line-height: 1.42;
    word-break: break-word;
    overflow-wrap: anywhere;
}
@media (max-width: 400px) {
    .passage-main > .bb-reader-location-line:not([hidden]) .bb-reader-location-line__primary,
    .passage-main > .bb-reader-location-line:not([hidden]) .bb-reader-location-line__trail,
    .passage-reader-workspace__status .bb-reader-location-line:not([hidden]) .bb-reader-location-line__primary,
    .passage-reader-workspace__status .bb-reader-location-line:not([hidden]) .bb-reader-location-line__trail {
        line-height: 1.34;
    }
}
.bb-reader-location-line.bb-reader-location-line--chapter {
    margin-top: 0.08rem;
    margin-bottom: 0.48rem;
    padding: 0.32rem 0.48rem 0.38rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    box-sizing: border-box;
}
.bb-reader-location-line.bb-reader-location-line--book {
    padding: 0.26rem 0.42rem 0.3rem;
    background: rgba(248, 250, 252, 0.72);
    border-color: rgba(148, 163, 184, 0.16);
}
.bb-reader-location-line.bb-reader-location-line--book .bb-reader-location-line__primary {
    font-weight: 600;
    font-size: 0.9375rem;
}
@media (max-width: 430px) {
    .passage-reader-header .passage-viewer-title {
        margin-bottom: 0.1rem;
    }
    .passage-main > .bb-reader-location-line:not([hidden]),
    .passage-reader-workspace__status .bb-reader-location-line:not([hidden]) {
        margin: -0.02rem 0 0.38rem;
        padding-top: 0.18rem;
        font-size: 0.8rem;
        gap: 0.1rem;
        max-width: 100%;
    }
    .passage-reader-header--reading-head .bb-reader-location-line:not([hidden]) {
        margin: 0 0 0.5rem;
        padding-top: 0.22rem;
    }
    .bb-reader-location-line__trail {
        font-size: 0.66rem;
        line-height: 1.34;
    }
    .passage-ref-bar {
        margin-bottom: 0.55rem;
        padding: 0.42rem 0.45rem 0.46rem;
        gap: 0.62rem 0.55rem;
    }
    .passage-browse-nav {
        padding: 0.5rem 0.52rem;
    }
    .passage-form {
        padding: 0.52rem 0.55rem;
    }
    .passage-nav.passage-nav--in-reading.passage-nav--chapter-reading .bb-passage-nav-chapter-cue {
        margin-top: 0.22rem;
        padding: 0.22rem 0.34rem 0.24rem;
        font-size: 0.66rem;
        line-height: 1.32;
    }
    .passage-nav.passage-nav--chapter-reading .passage-nav-step-btn-row .passage-nav-step-btn {
        padding: 0.32rem 0.52rem;
        font-size: 0.78rem;
    }
    .reading-area .verse-header.verse-header--chapter-reading .bb-chapter-reading-badge {
        margin-right: 0.32rem;
    }
    .reading-area .verse-header.verse-header--chapter-reading .verse-header-actions {
        gap: 0.32rem 0.42rem;
    }
    .bb-toc-reading-zone {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0.38rem;
        padding-right: 0.38rem;
    }
    .passage-results .reading-area__chrome-nav {
        padding-left: 0.36rem;
        padding-right: 0.36rem;
    }
    .bb-passage-nav-chapter-wrap {
        padding-left: 0.32rem;
        padding-right: 0.32rem;
    }
}
@media (max-width: 360px) {
    .passage-main h3.passage-viewer-title,
    .passage-reader-workspace .passage-viewer-title {
        margin-bottom: 0.28rem;
        font-size: 0.78rem;
        letter-spacing: 0.045em;
    }
    .passage-main > .bb-reader-location-line:not([hidden]),
    .passage-reader-workspace__status .bb-reader-location-line:not([hidden]) {
        margin: 0 0 0.36rem;
        padding-top: 0.16rem;
        gap: 0.1rem;
    }
    .passage-reader-header--reading-head .bb-reader-location-line:not([hidden]) {
        margin: 0 0 0.45rem;
        padding-top: 0.18rem;
    }
    .passage-main > .bb-reader-location-line.bb-reader-location-line--chapter:not([hidden]),
    .passage-reader-workspace__status .bb-reader-location-line.bb-reader-location-line--chapter:not([hidden]) {
        margin-bottom: 0.4rem;
        padding: 0.26rem 0.4rem 0.32rem;
        gap: 0.12rem;
    }
    .passage-main > .bb-reader-location-line:not([hidden]) + .passage-lead.bb-inline-help,
    .passage-reader-workspace__status .bb-reader-location-line:not([hidden]) + .passage-lead.bb-inline-help {
        margin-top: 0.08rem;
    }
    .passage-main > .bb-inline-help.passage-lead {
        margin-bottom: 0.42rem;
        line-height: 1.4;
    }
    .passage-ref-bar {
        margin-bottom: 0.52rem;
        padding: 0.44rem 0.46rem 0.48rem;
        gap: 0.56rem 0.48rem;
    }
    .passage-browse-nav {
        padding: 0.46rem 0.48rem;
    }
    .passage-form {
        padding: 0.48rem 0.5rem;
    }
    .reading-area .verse-header:not(.verse-header--chapter-reading) {
        margin-bottom: 0.54rem;
        padding-bottom: 0.26rem;
    }
    .reading-area .verse-header.verse-header--chapter-reading {
        gap: 0.32rem 0.48rem;
        margin-bottom: 0.58rem;
        padding-bottom: 0.3rem;
    }
    .reading-area .verse-header.verse-header--chapter-reading .bb-chapter-reading-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.34rem;
        margin-top: 0.12em;
    }
    .reading-area .verse-header.verse-header--chapter-reading .verse-header-actions {
        gap: 0.28rem 0.38rem;
    }
    .passage-nav.passage-nav--in-reading.passage-nav--chapter-reading .bb-passage-nav-chapter-cue {
        margin-top: 0.28rem;
    }
    .passage-reader-header__toolbelt .btn.btn-secondary {
        font-size: 0.72rem;
        padding-left: 0.12rem;
        padding-right: 0.12rem;
    }
}
.bb-reader-location-line[hidden] {
    display: none !important;
}

.reading-area .verse-header.verse-header--chapter-reading {
    padding-bottom: 0.35rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    gap: 0.4rem 0.55rem;
    align-items: center;
}
.reading-area .verse-header.verse-header--chapter-reading .result-reference {
    letter-spacing: 0.01em;
    flex: 1 1 min(0, 100%);
}
@media (max-width: 480px) {
    .reading-area .verse-header.verse-header--chapter-reading {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .reading-area .verse-header.verse-header--chapter-reading .verse-header-actions {
        flex: 1 1 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}
@media (max-width: 430px) {
    .reading-area .verse-header.verse-header--chapter-reading {
        align-items: flex-start;
    }
    .reading-area .verse-header.verse-header--chapter-reading .bb-chapter-reading-badge {
        margin-right: 0.28rem;
        margin-top: 0.2em;
        align-self: flex-start;
    }
    .reading-area .verse-header.verse-header--chapter-reading .result-reference {
        padding-top: 0.06em;
    }
}

.passage-desc {
    color: var(--light-text);
    margin-bottom: 0.85rem;
    font-size: 0.875rem;
    line-height: 1.48;
    max-width: 42rem;
}

.passage-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex: 1 1 16rem;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
@media (min-width: 880px) {
    .passage-ref-bar .passage-form {
        border-left: 1px solid rgba(148, 163, 184, 0.22);
        padding-left: 1rem;
        margin-left: 0.05rem;
    }
    .passage-ref-bar .passage-form.passage-form--reference-jump {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
}
.passage-lookup-primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem 0.65rem;
    width: 100%;
    align-items: end;
}
@media (min-width: 640px) {
    .passage-lookup-primary {
        grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 11rem) auto;
        gap: 0.55rem 0.75rem;
    }
}
.passage-ref-field,
.passage-translation-field,
.passage-load-submit-wrap {
    min-width: 0;
}
.passage-load-submit-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.passage-lookup-primary-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.2rem;
    font-size: 0.8125rem;
    color: var(--light-text);
}
.passage-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
    color: var(--light-text);
}
.passage-form select,
.passage-form input[type="number"],
.passage-form input[type="text"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
}
.passage-form select {
    min-width: 12rem;
}
.passage-translation-field select {
    min-width: 0;
    width: 100%;
}
.passage-form .passage-structured-field select#book {
    min-width: 0;
    width: 100%;
}
.passage-form input[type="number"] {
    width: 5rem;
    max-width: 100%;
}
.passage-ref-input-primary,
.quick-ref-input {
    width: 100%;
    min-width: 0;
}
.passage-load-btn {
    width: 100%;
    min-height: 2.75rem;
    font-weight: 600;
}
@media (min-width: 640px) {
    .passage-load-btn {
        width: auto;
        min-width: 5.75rem;
    }
}
.translation-pref-label {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
}
.passage-structured-details {
    margin-top: 0.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 0.35rem;
}
.passage-structured-summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--light-text);
    list-style-position: outside;
    padding: 0.35rem 0 0.15rem;
    user-select: none;
    border-radius: 4px;
}
.passage-structured-summary:hover {
    color: var(--text-color);
}
.passage-structured-summary:focus {
    outline: none;
}
.passage-structured-summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.passage-structured-summary::-webkit-details-marker {
    color: var(--light-text);
}
.passage-structured-summary-hint {
    font-weight: 500;
    color: var(--light-text);
    font-size: 0.85rem;
}
.passage-structured-details-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem 0.85rem;
    padding: 0.5rem 0 0.15rem;
}
.passage-structured-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 100%;
    min-width: 0;
}
.passage-structured-field--chapter {
    flex: 0 0 auto;
}
.passage-structured-field--chapter input[type="number"] {
    width: 5rem;
}
.passage-structured-field--verse {
    flex: 1 1 10rem;
    min-width: 0;
}
.passage-structured-field--verse input[type="text"] {
    width: 100%;
    min-width: 6rem;
}
@media (min-width: 640px) {
    .passage-structured-field {
        flex: 1 1 auto;
    }
    .passage-structured-field:first-child {
        flex: 1 1 14rem;
        min-width: 12rem;
    }
}

.passage-scripture-block-start {
    margin-top: 0.28rem;
    margin-bottom: 0.45rem;
    border-top-color: rgba(148, 163, 184, 0.32);
}

.search-highlight {
    background-color: rgba(250, 204, 21, 0.35);
    padding: 0 0.1em;
    border-radius: 0.15em;
}

.passage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
/* Verse nav inside .reading-area: visually tied to the loaded passage block (parent supplies reading max-width). */
.passage-nav.passage-nav--in-reading {
    margin-top: 0.35rem;
    margin-bottom: 0.85rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
/* Groups prev/next strip + copy link with chapter / book continuation — one “movement” band before study tray. */
.reading-area__chrome-nav {
    margin: 0.35rem 0 0.05rem;
    padding: 0.42rem 0.48rem 0.48rem;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.15) 0%, rgba(248, 250, 252, 0.72) 22%, rgba(255, 255, 255, 0.58) 100%);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    box-sizing: border-box;
}
.reading-area__chrome-nav .passage-nav.passage-nav--in-reading {
    margin-top: 0;
    margin-bottom: 0.45rem;
    padding-top: 0.28rem;
    border-top: none;
}
.reading-area__chrome-nav .bb-book-continue-wrap {
    border-top-color: rgba(148, 163, 184, 0.12);
    padding-top: 0.38rem;
}
/* Before first successful passage load: verse step + copy utilities read as inactive (buttons are disabled; this softens the strip). */
.passage-nav.passage-nav--awaiting-passage .passage-nav-steps,
.passage-nav.passage-nav--awaiting-passage .passage-nav-utilities,
.passage-nav.passage-nav--awaiting-passage .bb-reading-chrome-extras,
.passage-nav.passage-nav--awaiting-passage .bb-book-continue-wrap,
.passage-nav.passage-nav--awaiting-passage .bb-passage-nav-chapter-wrap,
.passage-nav.passage-nav--awaiting-passage .bb-passage-nav-chapter-strip {
    opacity: 0.72;
}
.passage-nav-steps {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    max-width: 100%;
}
.passage-nav-step-btn-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.bb-passage-nav-chapter-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    width: max-content;
    max-width: none;
    min-height: 2.55rem;
    padding: 0.12rem 0.05rem;
    margin-top: 0;
}
.bb-passage-nav-chapter-strip__btn {
    flex: 0 0 auto;
    scroll-snap-align: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.2rem 0.38rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    border-radius: 0.38rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.08s ease;
}
.bb-passage-nav-chapter-strip__btn:hover {
    background: rgba(241, 245, 249, 0.98);
    border-color: rgba(100, 116, 139, 0.55);
}
.bb-passage-nav-chapter-strip__btn:active {
    transform: scale(0.96);
}
.bb-passage-nav-chapter-strip__btn--current {
    border-color: rgba(37, 99, 235, 0.65);
    background: rgba(59, 130, 246, 0.2);
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.bb-passage-nav-chapter-strip__btn--current:hover {
    background: rgba(59, 130, 246, 0.26);
    border-color: rgba(29, 78, 216, 0.75);
}
.passage-nav--book-reading .bb-passage-nav-chapter-strip__btn--current {
    border-color: rgba(5, 122, 85, 0.55);
    background: rgba(16, 185, 129, 0.18);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12);
}
.passage-nav-utilities {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-left: auto;
}
/* Reading chrome: history + copy/present sit behind one disclosure; keep aligned with verse step row. */
.passage-nav.passage-nav--in-reading .bb-reading-chrome-extras {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-start;
}
.bb-reading-chrome-extras__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
    padding-top: 0.18rem;
}
.bb-reading-chrome-extras__body .passage-nav-utilities {
    margin-left: 0;
    justify-content: flex-start;
}
.bb-book-continue-wrap {
    flex: 1 1 100%;
    margin-top: 0.12rem;
    padding-top: 0.48rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    max-width: 100%;
}
.bb-book-continue-progress {
    margin: 0 0 0.38rem;
    font-size: 0.78rem;
    line-height: 1.38;
    color: rgba(71, 85, 105, 0.96);
    max-width: 40rem;
}
.bb-book-continue-next {
    font-size: 0.8125rem;
}

/* Book Navigator: overview + chapter map (Browse) */
.bb-book-overview {
    margin-top: 0.55rem;
    max-width: 42rem;
}
.bb-book-overview__body {
    padding: 0.35rem 0 0.25rem;
}
.bb-book-overview__title {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}
.bb-book-overview__meta {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(71, 85, 105, 0.95);
}
.bb-book-overview__desc {
    margin: 0 0 0.65rem;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(51, 65, 85, 0.92);
}
.bb-book-overview__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.bb-chapter-map-wrap {
    margin-top: 0.65rem;
    margin-bottom: 0.35rem;
    max-width: none;
}
.bb-chapter-map-wrap__visible-label {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(30, 41, 59, 0.95);
}
.bb-continue-reading-bar {
    margin: 0;
}
.bb-continue-reading-bar__btn {
    max-width: 100%;
    white-space: normal;
    text-align: left;
}
.bb-chapter-map-wrap__label {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.88);
}
.bb-chapter-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.85rem, 1fr));
    gap: 0.42rem;
    align-items: stretch;
    max-width: 100%;
}
@media (min-width: 520px) {
    .bb-chapter-map-grid {
        grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr));
        gap: 0.48rem;
    }
}
.bb-chapter-map-btn {
    box-sizing: border-box;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.48);
    border-radius: 0.38rem;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.bb-chapter-map-btn:hover {
    background: rgba(241, 245, 249, 0.95);
    border-color: rgba(100, 116, 139, 0.55);
}
.bb-chapter-map-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.bb-chapter-map-btn--active {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(37, 99, 235, 0.55);
    color: rgb(30, 64, 175);
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

/* Book reading: compact progress under reader location */
.bb-book-reading-progress-strip {
    margin: 0.35rem 0 0.75rem;
    padding: 0.6rem 0.7rem 0.65rem;
    max-width: none;
    border-radius: 0.45rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(236, 253, 245, 0.65);
}
.bb-book-reading-progress-strip__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.4rem;
}
.bb-book-reading-progress-strip__label {
    font-size: 0.84rem;
    line-height: 1.35;
    color: rgba(30, 41, 59, 0.92);
}
.bb-book-reading-progress-strip__fraction {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(71, 85, 105, 0.9);
}
.bb-book-reading-progress-bar {
    display: block;
    width: 100%;
    height: 0.28rem;
    margin-bottom: 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    overflow: hidden;
}
.bb-book-reading-progress-bar__fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.55), rgba(37, 99, 235, 0.75));
    transition: width 0.2s ease;
}
.bb-book-reading-progress-strip__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

/* Reader navigator drawer / wide sidebar */
.bb-reader-nav-open-btn,
.bb-toc-open-btn {
    font-size: 0.875rem;
}

.bb-maps-explorer-open-btn {
    font-size: 0.875rem;
}

body.bb-maps-explorer-open {
    overflow: hidden;
}

.bb-maps-explorer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1240;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

body.bb-maps-explorer-open .bb-maps-explorer-backdrop {
    animation: bb-maps-explorer-backdrop-in 0.22s ease-out;
}

@keyframes bb-maps-explorer-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.bb-maps-explorer-panel {
    position: fixed;
    inset: 0;
    z-index: 1250;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

/* [hidden] must win over author `display: flex` (see setBbMapsExplorerOpen in passage.html — without this, the closed panel stays a full-screen pointer sink). */
#bbMapsExplorerPanel[hidden] {
    display: none !important;
    pointer-events: none !important;
}

body.bb-maps-explorer-open .bb-maps-explorer-panel {
    animation: bb-maps-explorer-panel-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scripture-first: brief cue when Maps opens from the passage reader (separate from below-text Places). */
body.bb-maps-explorer-open.bb-maps-explorer-entry-v1 .bb-maps-explorer-panel {
    box-shadow:
        inset 0 3px 0 rgba(22, 163, 74, 0.38),
        0 18px 48px rgba(15, 23, 42, 0.12);
}
body.bb-maps-explorer-open.bb-maps-explorer-entry-v1 .bb-maps-explorer-head {
    background: linear-gradient(180deg, rgba(220, 252, 231, 0.55) 0%, rgba(255, 255, 255, 0.97) 100%);
}

@keyframes bb-maps-explorer-panel-in {
    from {
        opacity: 0.92;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bb-maps-explorer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.96);
    flex-shrink: 0;
}

.bb-maps-explorer-head__main {
    flex: 1;
    min-width: 0;
}

.bb-maps-explorer-head__subtitle {
    margin: 0.14rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    font-weight: 400;
    color: rgba(71, 85, 105, 0.88);
}

.bb-maps-explorer-panel.bb-maps-explorer-panel--passage-mode .bb-maps-explorer-head__subtitle {
    color: rgba(21, 94, 50, 0.9);
}

#bbMapsExplorerCloseBtn {
    align-self: center;
}

.bb-maps-explorer-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--text-color);
}

.bb-maps-explorer-panel.bb-maps-explorer-panel--passage-mode .bb-maps-explorer-mode-btn:not(.bb-maps-explorer-mode-btn--active) {
    opacity: 0.78;
    font-size: 0.68rem;
    padding: 0.18rem 0.42rem;
}

.bb-maps-explorer-panel.bb-maps-explorer-panel--passage-mode .bb-maps-explorer-mode-btn--active {
    border-color: rgba(22, 163, 74, 0.45);
    background: rgba(220, 252, 231, 0.92);
}

.bb-maps-explorer-toolbar {
    padding: 0.45rem 0.75rem 0.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.98);
    flex-shrink: 0;
}

.bb-maps-explorer-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

/* Passage Maps sheet: passage-scoped only; full atlas lives on Explore Map / Workbench. */
.bb-maps-explorer-panel.bb-maps-explorer-panel--passage-mode .bb-maps-explorer-modes {
    display: none;
}

.bb-maps-explorer-mode-btn--active {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(219, 234, 254, 0.95);
}

.bb-maps-explorer-browse-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
}

.bb-maps-explorer-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(71, 85, 105, 0.9);
}

.bb-maps-explorer-select {
    font-size: 0.8125rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: var(--text-color);
}

.bb-maps-explorer-chip-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.bb-maps-explorer-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
}

.bb-maps-explorer-chip--active {
    border-color: rgba(37, 99, 235, 0.65);
    background: rgba(219, 234, 254, 0.9);
}

.bb-maps-explorer-search-row {
    margin-top: 0.15rem;
}

.bb-maps-explorer-search {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    font-size: 0.9rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.55);
}

.bb-maps-explorer-passage-hint {
    margin: 0;
    padding: 0.28rem 0.75rem 0.12rem;
    font-size: 0.72rem;
    line-height: 1.38;
    color: rgba(71, 85, 105, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.bb-maps-explorer-status {
    margin: 0;
    padding: 0.2rem 0.75rem;
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.95);
    min-height: 1.25rem;
}

.bb-maps-explorer-status--loading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: #1e3a8a;
}

.bb-maps-explorer-status--loading::before {
    content: "";
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.22);
    border-top-color: #2563eb;
    animation: bb-maps-explorer-spin 0.7s linear infinite;
}

@keyframes bb-maps-explorer-spin {
    to {
        transform: rotate(360deg);
    }
}

.bb-maps-explorer-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 17rem);
    grid-template-rows: 1fr;
    gap: 0;
    min-height: 0;
}

.bb-maps-explorer-linked-zone {
    display: grid;
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 0;
    min-width: 0;
    align-self: stretch;
    border-radius: 0.45rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.75);
}

.bb-maps-explorer-panel.bb-maps-explorer-panel--passage-mode .bb-maps-explorer-linked-zone {
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.2);
    background: linear-gradient(165deg, rgba(250, 253, 250, 0.88) 0%, rgba(241, 245, 249, 0.65) 100%);
}

.bb-maps-explorer-list-aside {
    position: relative;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bb-maps-explorer-list-aside--loading {
    min-height: 4.5rem;
}

.bb-maps-explorer-list-aside--loading::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, #2563eb, #93c5fd, #2563eb);
    background-size: 220% 100%;
    animation: bb-maps-explorer-list-progress 1.05s linear infinite;
}

@keyframes bb-maps-explorer-list-progress {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

.bb-maps-explorer-list-aside--loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        -12deg,
        transparent,
        transparent 10px,
        rgba(241, 245, 249, 0.35) 10px,
        rgba(241, 245, 249, 0.35) 20px
    );
    opacity: 0.55;
}

.bb-maps-explorer-list-aside--loading .bb-maps-explorer-list {
    pointer-events: none;
}

.bb-maps-explorer-panel--busy .bb-maps-explorer-map-wrap {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22);
}

.bb-maps-explorer-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.bb-maps-explorer-list__empty {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: rgba(71, 85, 105, 0.95);
}

.bb-maps-explorer-list__empty--error {
    color: #881337;
    font-weight: 600;
    background: rgba(254, 226, 226, 0.88);
    border: 1px solid rgba(190, 24, 93, 0.42);
    border-radius: 0.4rem;
    box-shadow: 0 1px 2px rgba(159, 18, 57, 0.08);
}

.bb-maps-explorer-list__empty--hint {
    background: rgba(239, 246, 255, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.32);
    border-radius: 0.4rem;
    line-height: 1.5;
}

.bb-maps-explorer-hint-strong {
    font-weight: 700;
    color: #1d4ed8;
}

.bb-maps-explorer-row {
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    background: transparent;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.bb-maps-explorer-row:hover {
    background: rgba(241, 245, 249, 0.9);
}

.bb-maps-explorer-row--active {
    background: rgba(191, 219, 254, 0.95);
    box-shadow: inset 3px 0 0 0 #2563eb;
}

.bb-maps-explorer-row--active .bb-maps-explorer-row__name {
    color: #0f172a;
}

.bb-maps-explorer-row__name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-color);
}

.bb-maps-explorer-row__meta,
.bb-maps-explorer-row__syn {
    font-size: 0.72rem;
    color: rgba(71, 85, 105, 0.92);
}

.bb-maps-explorer-row__badge {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(16, 185, 129, 0.18);
    color: rgba(6, 95, 70, 0.95);
    vertical-align: middle;
}

.bb-maps-explorer-map-wrap {
    min-height: 0;
    position: relative;
    background: #e2e8f0;
}

.bb-maps-explorer-map-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bb-maps-explorer-detail {
    border-left: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.88);
    overflow-y: auto;
    padding: 0.5rem 0.65rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.bb-maps-explorer-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.bb-maps-explorer-detail__title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.25;
    font-weight: 650;
}

.bb-maps-explorer-detail__body {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(30, 41, 59, 0.95);
}

.bb-maps-explorer-detail-meta {
    margin: 0 0 0.35rem;
    color: rgba(71, 85, 105, 0.95);
    font-size: 0.78rem;
}

.bb-maps-explorer-detail-syn {
    margin: 0 0 0.35rem;
}

.bb-maps-explorer-detail-summary {
    margin: 0 0 0.5rem;
}

.bb-maps-explorer-detail-inpass {
    margin: 0 0 0.45rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.35rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    font-size: 0.78rem;
}

.bb-maps-explorer-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.bb-maps-explorer-detail-actions .bb-maps-explorer-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.bb-maps-explorer-refs {
    margin-top: 0.25rem;
}

.bb-maps-explorer-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr));
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.bb-maps-explorer-detail .bb-maps-explorer-ref-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
    box-sizing: border-box;
    word-break: break-word;
}

.bb-maps-explorer-detail-loading {
    margin: 0.5rem 0;
    padding: 0.65rem 0.7rem;
    border-radius: 0.4rem;
    background: rgba(239, 246, 255, 0.9);
    border: 1px dashed rgba(59, 130, 246, 0.4);
    color: #1e3a8a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.bb-maps-explorer-detail-loading::before {
    content: "";
    flex-shrink: 0;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    animation: bb-maps-explorer-spin 0.7s linear infinite;
}

.bb-maps-explorer-more-refs {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: rgba(71, 85, 105, 0.9);
}

@media (max-width: 960px) {
    .bb-maps-explorer-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(11rem, 46vh) auto;
    }

    .bb-maps-explorer-linked-zone {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(8rem, 30vh) minmax(10rem, 34vh);
    }

    .bb-maps-explorer-list-aside {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    }

    .bb-maps-explorer-detail {
        border-left: none;
        border-top: 1px solid rgba(148, 163, 184, 0.35);
    }

    .bb-maps-explorer-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bb-maps-explorer-detail-actions .bb-maps-explorer-action-btn {
        width: 100%;
        justify-content: center;
    }

    .bb-maps-explorer-ref-grid {
        grid-template-columns: 1fr;
    }
}

.bb-toc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1220;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(1px);
}
.bb-toc-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1230;
    width: min(100%, 22.5rem);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: rgba(252, 253, 255, 0.97);
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: -4px 0 28px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}
.bb-toc-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.52rem 0.65rem 0.52rem 0.72rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.88);
    flex-shrink: 0;
}
.bb-toc-panel__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: rgba(15, 23, 42, 0.92);
}
.bb-toc-close-btn {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.42);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(29, 78, 216, 1));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.bb-toc-close-btn:hover {
    border-color: rgba(30, 58, 138, 0.55);
    color: #fff;
}
.bb-toc-close-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
}
.bb-toc-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.42rem 0.62rem 1rem;
    -webkit-overflow-scrolling: touch;
}
.bb-toc-section__title,
.bb-toc-testament__title {
    margin: 0.38rem 0 0.28rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.88);
}
.bb-toc-section--recent .bb-toc-section__title {
    margin-top: 0;
}
.bb-toc-empty {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(100, 116, 139, 0.95);
}
.bb-toc-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-toc-recent-item {
    margin-bottom: 0.22rem;
}
.bb-toc-recent-btn {
    width: 100%;
    text-align: left;
    padding: 0.32rem 0.45rem;
    border-radius: 0.38rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    color: var(--primary-color);
    cursor: pointer;
}
.bb-toc-group {
    margin-bottom: 0.42rem;
}
.bb-toc-group__title {
    margin: 0.28rem 0 0.2rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: rgba(51, 65, 85, 0.9);
}
.bb-toc-book-list {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}
.bb-toc-book-row {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.34rem 0.42rem;
    border-radius: 0.38rem;
    border: 1px solid rgba(226, 232, 240, 0.75);
    background: rgba(255, 255, 255, 0.65);
}
.bb-toc-book-row--current {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(239, 246, 255, 0.85);
}
.bb-toc-book-row--in-book-mode {
    box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.35);
}
.bb-toc-book-row__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}
.bb-toc-book-name {
    font-weight: 700;
    font-size: 0.86rem;
    color: rgba(15, 23, 42, 0.94);
    letter-spacing: -0.015em;
}
.bb-toc-book-meta {
    font-size: 0.75rem;
    color: rgba(100, 116, 139, 0.95);
    font-variant-numeric: tabular-nums;
}
.bb-toc-book-badge {
    margin-left: 0.35rem;
    font-weight: 600;
    color: rgba(37, 99, 235, 0.9);
}
.bb-toc-book-progress {
    width: 100%;
    max-width: 100%;
    height: 0.22rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    overflow: hidden;
}
.bb-toc-book-progress__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgba(59, 130, 246, 0.55);
}
.bb-toc-book-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}
.bb-toc-book-view__head {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}
.bb-toc-book-view__titles {
    flex: 1;
    min-width: 0;
}
.bb-toc-book-view__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.bb-toc-book-view__mode {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgb(5, 122, 85);
}
.bb-toc-book-view__jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.bb-toc-jump-label {
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.95);
}
.bb-toc-jump-input {
    width: 4.5rem;
    min-height: 2.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.55);
    font-size: 0.9rem;
}
.bb-toc-book-view__bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
}
.bb-toc-main-host {
    margin-top: 0.38rem;
    padding-top: 0.48rem;
    border-top: 1px solid rgba(203, 213, 225, 0.65);
}
.bb-toc-book-view__matrix-zone {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(203, 213, 225, 0.85);
}
.bb-toc-chapter-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.28rem, 1fr));
    gap: 0.22rem;
}
.bb-toc-chapter-matrix__btn {
    min-height: 2.28rem;
    padding: 0.1rem;
    border-radius: 0.32rem;
    border: 1px solid rgba(148, 163, 184, 0.38);
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease;
}
.bb-toc-chapter-matrix__btn--current {
    border-color: rgba(37, 99, 235, 0.6);
    background: rgba(59, 130, 246, 0.16);
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.bb-toc-chapter-matrix__btn:hover {
    background: rgba(241, 245, 249, 0.98);
    border-color: rgba(100, 116, 139, 0.52);
}
@media (max-width: 520px) {
    .bb-toc-chapter-matrix {
        grid-template-columns: repeat(auto-fill, minmax(2.85rem, 1fr));
        gap: 0.42rem;
    }
    .bb-toc-chapter-matrix__btn {
        min-height: 2.85rem;
        font-size: 0.875rem;
        font-weight: 600;
    }
    .bb-toc-jump-input {
        min-height: 2.75rem;
        font-size: 1rem;
    }
    .bb-toc-book-view__bulk-actions .btn {
        min-height: 2.6rem;
    }
}
@media (min-width: 900px) {
    .bb-toc-backdrop {
        background: rgba(15, 23, 42, 0.16);
    }
    .bb-toc-panel {
        box-shadow: -6px 0 32px rgba(15, 23, 42, 0.07);
    }
}
body.bb-toc-open .passage-layout {
    overflow: hidden;
}
body.bb-toc-open .passage-reader-header .bb-toc-open-btn,
body.bb-toc-open .passage-reader-header__toolbelt .bb-toc-open-btn {
    border-color: rgba(37, 99, 235, 0.42);
    background: rgba(239, 246, 255, 0.92);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.bb-reader-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(1px);
}

.bb-reader-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1210;
    width: min(100%, 22rem);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    display: flex;
    flex-direction: column;
    background: #fafbfc;
    border-left: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: -6px 0 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

#bbReaderNavPanel[hidden] {
    display: none !important;
    pointer-events: none !important;
}
.bb-reader-nav-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.92);
    flex-shrink: 0;
}
.bb-reader-nav-panel__title-wrap {
    flex: 1;
    min-width: 0;
}
.bb-reader-nav-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}
.bb-reader-nav-panel__lede {
    margin: 0.28rem 0 0;
    font-size: 0.6875rem;
    line-height: 1.38;
    font-weight: 400;
    color: rgba(71, 85, 105, 0.95);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-nav-panel__lede {
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(51, 65, 85, 0.95);
}
.bb-reader-nav-close-btn {
    align-self: center;
    flex-shrink: 0;
    font-size: 0.8125rem;
    padding: 0.3rem 0.55rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: white;
    color: var(--text-color);
    cursor: pointer;
}
.bb-reader-nav-close-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.bb-reader-nav-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.45rem 0.75rem 1rem;
    -webkit-overflow-scrolling: touch;
}
.bb-reader-nav-panel__body > .bb-reader-nav-secondary--collapsible:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.bb-reader-nav-primary {
    padding-top: 0.45rem;
    margin-top: 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.bb-reader-nav-secondary {
    padding-top: 0.15rem;
}
.bb-reader-nav-secondary--collapsible {
    margin-top: 0.35rem;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    padding-top: 0.35rem;
}
.bb-reader-nav-secondary__summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.95);
    list-style: none;
}
.bb-reader-nav-secondary__summary::-webkit-details-marker {
    display: none;
}
.bb-reader-nav-secondary__inner {
    padding-top: 0.45rem;
}
.bb-reader-nav-section--chapters-primary .bb-reader-nav-section__title {
    font-size: 0.8rem;
    color: rgba(30, 64, 175, 0.92);
}
.bb-reader-nav-section--muted .bb-reader-nav-section__title {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: rgba(100, 116, 139, 0.78);
}
.bb-reader-nav-section--muted {
    margin-bottom: 0.55rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.65);
}
.bb-reader-nav-actions--links {
    margin-top: 0.45rem;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}
.bb-reader-nav-section--current .bb-reader-nav-section__title {
    color: rgba(37, 99, 235, 0.85);
}
.bb-reader-nav-section--chapters.bb-reader-nav-section--emphasized .bb-reader-nav-section__title {
    font-size: 0.76rem;
    color: rgba(30, 64, 175, 0.9);
}
.bb-reader-nav-section {
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}
.bb-reader-nav-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.bb-reader-nav-section__title {
    margin: 0 0 0.38rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.95);
}
.bb-reader-nav-section__content {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--text-color);
}
.bb-reader-nav-empty {
    margin: 0;
    font-size: 0.76rem;
    color: rgba(71, 85, 105, 0.9);
    line-height: 1.38;
}
.bb-reader-nav-meta {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: rgba(71, 85, 105, 0.95);
}
.bb-reader-nav-meta--progress {
    font-weight: 500;
    color: rgba(30, 41, 59, 0.9);
}
.bb-reader-nav-meta--mono {
    margin: 0.12rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: rgba(51, 65, 85, 0.92);
}
.bb-reader-nav-kicker {
    font-weight: 600;
    color: rgba(51, 65, 85, 0.88);
    margin-right: 0.25rem;
}
.bb-reader-nav-current-ref {
    margin: 0 0 0.28rem;
    line-height: 1.32;
    word-break: break-word;
}
.bb-read-mode-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.12rem 0.38rem;
    border-radius: 0.25rem;
    vertical-align: middle;
    margin-right: 0.2rem;
    border: 1px solid transparent;
}
.bb-read-mode-badge--passage {
    background: rgba(148, 163, 184, 0.2);
    color: rgb(51, 65, 85);
    border-color: rgba(148, 163, 184, 0.45);
}
.bb-read-mode-badge--chapter {
    background: rgba(59, 130, 246, 0.12);
    color: rgb(30, 64, 175);
    border-color: rgba(59, 130, 246, 0.35);
}
.bb-read-mode-badge--book {
    background: rgba(16, 185, 129, 0.14);
    color: rgb(6, 78, 59);
    border-color: rgba(16, 185, 129, 0.35);
}
.bb-read-mode-badge--small {
    font-size: 0.6rem;
    padding: 0.08rem 0.28rem;
}
.bb-reader-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}
@media (max-width: 480px) {
    .bb-reader-nav-actions--links {
        flex-direction: column;
        align-items: stretch;
    }

    .bb-reader-nav-actions--links .bb-reader-nav-action {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 2.5rem;
    }
}
.bb-reader-nav-inline-actions {
    margin-bottom: 0.45rem;
}
.bb-reader-nav-chapter-scroll {
    max-height: 14rem;
    overflow-y: auto;
    border: 1px solid rgba(226, 232, 240, 0.75);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.55);
    padding: 0.22rem;
}
.bb-reader-nav-section--chapters.bb-reader-nav-section--emphasized .bb-reader-nav-chapter-scroll {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.04);
}
.bb-reader-nav-chapter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 0.26rem 0.36rem;
    margin: 0.06rem 0;
    border: none;
    border-radius: 0.3rem;
    background: transparent;
    font-size: 0.84rem;
    cursor: pointer;
    color: var(--text-color);
}
.bb-reader-nav-chapter-row:hover {
    background: rgba(241, 245, 249, 0.9);
}
.bb-reader-nav-chapter-row--current {
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}
.bb-reader-nav-chapter-row:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}
.bb-reader-nav-chapter-num {
    font-variant-numeric: tabular-nums;
}
.bb-reader-nav-chapter-star {
    font-size: 0.75rem;
    color: rgb(217, 119, 6);
    flex-shrink: 0;
}
.bb-reader-nav-chapter-star--empty {
    width: 0.75rem;
    opacity: 0;
}
.bb-reader-nav-history-list,
.bb-reader-nav-bookmarks-list,
.bb-reader-nav-collections-shortcuts {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-reader-nav-history-item,
.bb-reader-nav-bookmark-item {
    margin-bottom: 0.25rem;
}
.bb-reader-nav-history-btn {
    width: 100%;
    text-align: left;
    padding: 0.35rem 0.45rem;
    border-radius: 0.3rem;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.84rem;
    color: var(--primary-color);
    cursor: pointer;
}
.bb-reader-nav-history-btn:hover {
    background: rgba(241, 245, 249, 0.95);
    border-color: rgba(148, 163, 184, 0.35);
}
.bb-reader-nav-history-item--current .bb-reader-nav-history-btn,
.bb-reader-nav-bookmark-item--current {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
}
.bb-reader-nav-bookmark-row {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}
.bb-reader-nav-bookmark-open {
    flex: 1;
    text-align: left;
    padding: 0.3rem 0.35rem;
    border: none;
    background: transparent;
    font-size: 0.82rem;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 0.25rem;
}
.bb-reader-nav-bookmark-open:hover {
    background: rgba(241, 245, 249, 0.9);
}
.bb-reader-nav-bookmark-remove {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: rgba(71, 85, 105, 0.85);
}
.bb-reader-nav-collections-shortcuts li {
    margin-bottom: 0.3rem;
}
.bb-reader-nav-collection-open {
    width: 100%;
    text-align: left;
    padding: 0.35rem 0.45rem;
    border-radius: 0.3rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: white;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-color);
}
.bb-reader-nav-collection-open:hover {
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--primary-color);
}
.bb-reader-nav-collections-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.55rem;
}
.bb-reader-nav-text-link {
    font-size: 0.8125rem;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 900px) {
    body.bb-reader-nav-open .passage-layout {
        padding-right: 22rem;
        max-width: calc(960px + 22rem);
    }
    .bb-reader-nav-panel {
        width: 22rem;
        box-shadow: -4px 0 20px rgba(15, 23, 42, 0.08);
    }
    body.bb-reader-nav-open .bb-reader-nav-backdrop {
        display: none !important;
    }
}

.passage-nav .btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.passage-nav .btn-secondary:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}
.passage-nav .passage-nav-utilities .passage-nav-util-btn {
    color: var(--light-text);
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(148, 163, 184, 0.06);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.passage-nav .passage-nav-utilities .passage-nav-util-btn:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(100, 116, 139, 0.45);
    color: var(--text-color);
}
.passage-nav .passage-nav-utilities .passage-nav-util-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.passage-nav .passage-nav-utilities .passage-nav-util-btn:disabled {
    opacity: 0.55;
}
.passage-nav .btn-secondary:disabled {
    opacity: 0.5;
    cursor: default;
}
.passage-error {
    margin-bottom: 1rem;
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(185, 28, 28, 0.38);
    background: rgba(185, 28, 28, 0.07);
    color: #991b1b;
    font-size: 0.9375rem;
    line-height: 1.45;
    max-width: var(--reading-max, 52rem);
}
.passage-loading {
    margin-bottom: 1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(148, 163, 184, 0.09);
    color: var(--light-text);
    font-size: 0.9375rem;
    line-height: 1.45;
    max-width: var(--reading-max, 52rem);
}
.reading-area {
    max-width: var(--reading-max);
    margin-left: auto;
    margin-right: auto;
}

.passage-results .reading-area .verse-header {
    gap: 0.3rem 0.48rem;
    margin-bottom: 0.04rem;
    padding-bottom: 0.04rem;
    border-bottom: none;
}

.passage-results .reading-area .verse-header .verse-header-actions {
    gap: 0.26rem 0.42rem;
}

.passage-results .reading-area .verse-header .verse-header-actions__primary .btn {
    font-size: 0.78rem;
    padding: 0.22rem 0.48rem;
    min-height: 1.95rem;
}

.passage-results .reading-area .verse-header .verse-header-actions__icons {
    padding: 0.06rem 0.14rem 0.06rem 0.2rem;
    background: rgba(248, 250, 252, 0.55);
    border-color: rgba(148, 163, 184, 0.12);
}

.passage-results .reading-area .section-divider.passage-scripture-block-start {
    margin: 0.06rem 0 0.14rem;
}

.passage-results .reading-area .passage-nav--in-reading {
    margin-top: 0.18rem;
    margin-bottom: 0.38rem;
}

.passage-results .reading-area .reading-area__chrome-nav + .bb-study-tray-wrap {
    margin-top: 0.28rem;
    padding-top: 0;
    border-top: none;
}

.passage-results {
    margin-top: 0.38rem;
}

/* Reading surface: scripture reads as one column; movement band + translation row stay clearly “utility”. */
.passage-results .reading-area__chrome-nav {
    margin: 0.18rem 0 0.02rem;
    padding: 0.26rem 0.32rem 0.34rem;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.09);
    box-shadow: none;
}

.passage-results .reading-area__chrome-nav .passage-nav-utilities {
    gap: 0.3rem;
}

.passage-results .reading-area__chrome-nav .passage-nav-utilities .passage-nav-util-btn {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.28rem 0.52rem;
    color: rgba(71, 85, 105, 0.92);
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.65);
}

.passage-results .reading-area .go-to-compare-btn {
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.2rem 0.48rem;
    opacity: 0.9;
    color: rgba(71, 85, 105, 0.95);
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.55);
}

.passage-results .translations-heading {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(100, 116, 139, 0.88);
}

#passageResults .translations-toolbar {
    margin: 0.02rem 0 0.28rem;
    padding: 0.18rem 0.3rem 0.2rem;
    gap: 0.24rem 0.48rem;
    border-radius: 5px;
    border-color: rgba(148, 163, 184, 0.1);
    background: rgba(252, 253, 255, 0.55);
}

#passageResults .translations-toolbar--compare {
    margin-top: 0.1rem;
    padding: 0.18rem 0.3rem 0.22rem;
    border-color: rgba(148, 163, 184, 0.09);
    background: rgba(252, 253, 255, 0.48);
}

#passageResults .translations-toolbar--filtered-active {
    margin: 0.02rem 0 0.36rem;
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.16);
}

#passageResults .translations-toolbar--show-matches-saved-pref {
    background: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.28);
}

#passageResults .translations-toolbar--filtered-active.translations-toolbar--show-matches-saved-pref {
    border-color: rgba(22, 163, 74, 0.32);
    background: rgba(22, 163, 74, 0.06);
}

#passageResults .translations-toolbar--visibility-single-other.translations-toolbar--filtered-active {
    border-color: rgba(202, 138, 4, 0.28);
    background: rgba(234, 179, 8, 0.05);
}

#passageResults .translations-toolbar label {
    font-size: 0.78rem;
    color: rgba(100, 116, 139, 0.92);
}

.result-reference {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

/* Loaded passage: reference line leads; stronger than page chrome, ties into translation body. */
.reading-area .verse-header .result-reference {
    font-size: clamp(1.15rem, 2.8vw, 1.35rem);
    font-weight: 700;
    line-height: 1.28;
    color: var(--text-color);
    letter-spacing: -0.01em;
}
.passage-results .reading-area .verse-header .result-reference {
    font-size: clamp(1.06rem, 2.5vw, 1.28rem);
    line-height: 1.22;
    letter-spacing: -0.014em;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.88);
}
.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.25rem 0;
}
.context-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.95rem 0 0.5rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.context-heading {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}
.context-expand-controls {
    display: flex;
    gap: 0.25rem;
}
.context-expand-btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.context-expand-btn:hover {
    background-color: rgba(59, 130, 246, 0.08);
}
.context-list {
    margin-bottom: 0;
    font-size: 0.95rem;
}
.context-verse {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.context-verse:last-child {
    border-bottom: none;
}
.context-verse:hover {
    background-color: rgba(59, 130, 246, 0.08);
}
.context-verse-current {
    background-color: rgba(59, 130, 246, 0.12);
    font-weight: 500;
}
.context-ref {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Surrounding verses sit inline after main translations — subordinate, not a peer “study module” */
.passage-surrounding-verses {
    margin: 0.35rem 0 0;
}
.context-section-header--reading-inline {
    margin-top: 0.45rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.context-section-header--reading-inline .context-heading {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--light-text);
}
.passage-surrounding-verses-hint {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--light-text);
    margin: 0.1rem 0 0.35rem;
    max-width: 42rem;
}
.passage-surrounding-verses .context-list {
    font-size: 0.9rem;
}

.bb-context-subtabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 0.5rem;
    padding: 0.15rem;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.78);
}
.bb-context-subtabs__tab {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.32rem 0.62rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--light-text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
}
.bb-context-subtabs__tab:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-color);
}
.bb-context-subtabs__tab:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}
.bb-context-subtabs__tab[aria-selected='true'] {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.12);
    color: var(--text-color);
}
.bb-context-subtabs__tab:disabled,
.bb-context-subtabs__tab[aria-disabled='true'] {
    cursor: not-allowed;
    opacity: 0.48;
}

.passage-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.places-heading {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.timeline-heading {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.timeline-panel {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-color);
}
.bb-context-subtab-panel[hidden] {
    display: none !important;
}
.bb-context-subtab-panel {
    min-width: 0;
}
.timeline-ref-line {
    font-size: 0.82rem;
    color: var(--light-text);
    margin: 0 0 0.45rem;
}

/* Passage anchor + follow-up: data from API ``passage_cues`` only. */
.timeline-reading-anchor {
    margin: 0 0 0.65rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.06);
    max-width: var(--reading-max, 52rem);
}
.timeline-reading-anchor__title {
    margin: 0 0 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--light-text);
}
.timeline-reading-anchor__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin-bottom: 0.35rem;
}
.timeline-reading-anchor__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-color);
    border: 1px solid rgba(37, 99, 235, 0.25);
}
.timeline-reading-anchor__ref {
    font-size: 0.85rem;
    color: var(--light-text);
}
.timeline-reading-anchor__summary {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
}
.timeline-reading-anchor__lit {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-color);
}
.timeline-reading-anchor__lit-k {
    font-weight: 600;
    color: var(--light-text);
    margin-right: 0.25rem;
}
.timeline-reading-anchor__principle {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--light-text);
}
.timeline-passage-more {
    margin: 0 0 0.75rem;
    max-width: var(--reading-max, 52rem);
}
.timeline-passage-more__title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}
.timeline-passage-more__intro {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted-text);
}
.timeline-passage-more__list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-color);
}
.timeline-passage-more__list li {
    margin: 0.2rem 0;
}

.timeline-segment-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    padding: 0;
    color: var(--text-color);
}
.timeline-segment-body .timeline-segment-label {
    margin-top: 0;
}
.timeline-segment-summary {
    margin: 0;
    line-height: 1.45;
}
.timeline-segment-summary--muted {
    color: var(--light-text);
    font-size: 0.85rem;
}
.timeline-panel-soft-note {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--light-text);
    margin: 0 0 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}
.timeline-segment-body {
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.5rem 0.5rem;
    border-radius: 6px;
    border-left: 3px solid rgba(59, 130, 246, 0.45);
    background: rgba(148, 163, 184, 0.06);
}
.timeline-era-context {
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.5rem 0.5rem;
    border-radius: 6px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(148, 163, 184, 0.04);
}
.timeline-era-context__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--light-text);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.timeline-era-context__text {
    font-size: 0.82rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.45;
    font-style: italic;
}
.timeline-era-context__hint {
    font-size: 0.72rem;
    color: var(--light-text);
    margin: 0.4rem 0 0;
    line-height: 1.4;
}
.timeline-book-context {
    margin: 0.6rem 0 0.75rem;
    padding: 0.55rem 0.65rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
}
.timeline-book-context__title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    color: var(--light-text);
    margin: 0 0 0.35rem;
}
.timeline-book-context__name {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}
.timeline-book-context__meta {
    font-size: 0.8rem;
    color: var(--text-color);
    margin: 0 0 0.35rem;
    line-height: 1.45;
}
.timeline-book-context__chapter {
    font-size: 0.85rem;
    color: var(--text-color);
    margin: 0 0 0.4rem;
    line-height: 1.45;
}
.timeline-book-context__list {
    margin: 0 0 0.45rem;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-color);
}
.timeline-book-context__list li {
    margin: 0.18rem 0;
}
.timeline-book-context__hint {
    font-size: 0.72rem;
    color: var(--light-text);
    margin: 0;
    line-height: 1.4;
}
.timeline-book-osis {
    font-size: 0.78rem;
}
.timeline-transition-callout {
    margin: 0.6rem 0 0.75rem;
    padding: 0.55rem 0.65rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-left: 3px solid rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.06);
}
.timeline-transition-callout__title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    color: var(--light-text);
    margin: 0 0 0.35rem;
}
.timeline-transition-callout__body {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-color);
    margin: 0;
}
.timeline-study-briefs {
    margin: 0.75rem 0 0.65rem;
}
.timeline-study-briefs__heading {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    color: var(--text-color);
}
.timeline-study-briefs__intro {
    font-size: 0.78rem;
    color: var(--light-text);
    margin: 0 0 0.55rem;
    line-height: 1.45;
}
.timeline-study-briefs__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}
@media (min-width: 720px) {
    .timeline-study-briefs__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem 0.75rem;
    }
}
.timeline-study-card {
    margin: 0;
    padding: 0.5rem 0.55rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.45);
}
.timeline-study-card__title {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text-color);
    line-height: 1.3;
}
.timeline-study-card__body {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
    opacity: 0.95;
}
.timeline-study-context-buckets {
    margin: 0 0 0.75rem;
    max-width: var(--reading-max, 52rem);
}
.timeline-study-context-buckets__heading {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 0.45rem;
    color: var(--text-color);
}
.timeline-study-context-buckets__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
@media (min-width: 720px) {
    .timeline-study-context-buckets__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.timeline-study-context-bucket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.48rem;
    align-items: start;
    margin: 0;
    padding: 0.5rem 0.55rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    background: rgba(240, 253, 244, 0.72);
}
.timeline-study-context-bucket--direct {
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(239, 246, 255, 0.78);
}
.timeline-study-context-bucket--nearby {
    border-color: rgba(14, 165, 233, 0.24);
    background: rgba(240, 249, 255, 0.78);
}
.timeline-study-context-bucket__title {
    grid-column: 1;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    color: var(--text-color);
    line-height: 1.3;
}
.timeline-study-context-bucket__text {
    grid-column: 1;
    font-size: 0.8rem;
    line-height: 1.52;
    color: var(--text-color);
    margin: 0;
}
.timeline-study-context-bucket__meta {
    grid-column: 1;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--light-text);
    margin: 0.35rem 0 0;
}
.timeline-study-context-bucket .bb-passage-context-study-sources {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    margin: 0;
    z-index: 5;
}
.timeline-study-context-bucket .bb-passage-context-study-sources[open] {
    grid-column: 1 / -1;
    grid-row: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0;
    margin-top: 0.42rem;
    z-index: 40;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--bb-color-link, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__summary::-webkit-details-marker {
    display: none;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__panel {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 0.32rem;
    padding: 0.38rem 0.48rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    background: var(--bbp-panel-bg, #ffffff);
    box-sizing: border-box;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
    z-index: 30;
}
.timeline-study-context-bucket .bb-passage-context-study-sources:not([open]) > .bb-passage-context-study-sources__panel {
    display: none;
}
.timeline-study-context-bucket .bb-passage-context-study-sources[open] .bb-passage-context-study-sources__summary {
    grid-column: 2;
    justify-self: end;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__dl {
    display: grid;
    grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr);
    gap: 0.18rem 0.55rem;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.32;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__dl dt {
    margin: 0;
    color: var(--light-text);
    font-weight: 600;
}
.timeline-study-context-bucket .bb-passage-context-study-sources__dl dd {
    margin: 0;
    color: var(--text-color);
}
.timeline-source-anchors {
    margin: 0 0 0.75rem;
    max-width: var(--reading-max, 52rem);
}
.timeline-source-anchors__heading {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    color: var(--text-color);
}
.timeline-source-anchors__intro {
    margin: 0 0 0.45rem;
    color: var(--light-text);
    font-size: 0.78rem;
    line-height: 1.45;
}
.timeline-source-anchors__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
}
@media (min-width: 720px) {
    .timeline-source-anchors__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.timeline-source-anchor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.12rem 0.45rem;
    align-items: baseline;
    padding: 0.45rem 0.52rem;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-color);
    text-decoration: none;
}
.timeline-source-anchor:hover,
.timeline-source-anchor:focus-visible {
    border-color: rgba(37, 99, 235, 0.42);
    background: rgba(239, 246, 255, 0.92);
    color: var(--text-color);
}
.timeline-source-anchor__kind {
    align-self: center;
    padding: 0.08rem 0.34rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--bb-color-link, #2563eb);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}
.timeline-source-anchor__label {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.25;
}
.timeline-source-anchor__meta {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--light-text);
    font-size: 0.72rem;
    line-height: 1.35;
}
.bb-context-lens {
    margin: 0 0 0.75rem;
    max-width: var(--reading-max, 52rem);
    padding: 0.76rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bb-color-bg-surface-raised, #ffffff) 86%, var(--bb-color-bg-subtle, #f8fafc));
    overflow: visible;
}
.bb-context-lens__header {
    display: grid;
    gap: 0.18rem;
    margin: 0 0 0.6rem;
}
.bb-context-lens__title {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 700;
}
.bb-context-lens__intro {
    margin: 0;
    color: var(--light-text);
    font-size: 0.78rem;
    line-height: 1.42;
}
.bb-context-lens__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.65rem;
}
.bb-context-lens__summary-total,
.bb-context-lens__summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1.55rem;
    padding: 0.16rem 0.42rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-color);
    font-size: 0.72rem;
    line-height: 1.2;
}
.bb-context-lens__summary-total {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(239, 246, 255, 0.75);
}
.bb-context-lens__summary-label {
    color: var(--light-text);
    font-weight: 650;
}
.bb-context-lens__summary-value {
    color: var(--text-color);
    font-weight: 800;
}
.bb-context-lens--empty {
    padding: 0.6rem 0.7rem;
    background: color-mix(in srgb, var(--bb-color-bg-surface-raised, #ffffff) 82%, var(--bb-color-bg-subtle, #f8fafc));
}
.bb-context-lens--empty .bb-context-lens__header {
    margin: 0;
}
.bb-context-lens__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    align-items: start;
    overflow: visible;
}
@media (min-width: 760px) {
    .bb-context-lens__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1080px) {
    .bb-context-lens__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.bb-context-lens-group {
    min-width: 0;
    padding: 0;
    overflow: visible;
}
.bb-context-lens-group__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.35rem;
    color: var(--light-text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.bb-context-lens-group__count {
    flex: 0 0 auto;
    min-width: 1.2rem;
    padding: 0.02rem 0.28rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.07);
    color: var(--text-color);
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
}
.bb-context-lens-group__list {
    display: grid;
    gap: 0.34rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
}
.bb-context-lens-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(1.5rem, auto);
    align-items: start;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.44rem 0.48rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
}
.bb-context-lens-item__link {
    min-width: 0;
    color: var(--text-color);
    text-decoration: none;
}
.bb-context-lens-item__link:hover .bb-context-lens-item__label,
.bb-context-lens-item__link:focus-visible .bb-context-lens-item__label {
    color: var(--bb-color-link, #2563eb);
    text-decoration: underline;
}
.bb-context-lens-item__text {
    display: grid;
    gap: 0.13rem;
    min-width: 0;
}
.bb-context-lens-item__label {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}
.bb-context-lens-item__meta,
.bb-context-lens-item__detail {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--light-text);
    font-size: 0.72rem;
    line-height: 1.34;
}
.bb-context-lens-item__sources {
    position: relative;
    margin: 0;
    justify-self: end;
}
.bb-context-lens .bb-context-lens-item__sources.bb-disclosure.bb-disclosure--compact {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: none;
}
.bb-context-lens-item__sources[open] {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    z-index: 45;
}
.bb-context-lens-item__sources[open] > .bb-context-lens-item__sources-summary {
    grid-column: 2;
    justify-self: end;
}
.bb-context-lens-item__sources-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--bb-color-link, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}
.bb-context-lens-item__sources-summary::-webkit-details-marker {
    display: none;
}
.bb-context-lens-item__sources-panel {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 0.32rem;
    padding: 0.38rem 0.48rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    background: var(--bbp-panel-bg, #ffffff);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
    z-index: 44;
}
.bb-context-lens-item__sources:not([open]) > .bb-context-lens-item__sources-panel {
    display: none;
}
.bb-context-lens-item__sources-dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.18rem 0.55rem;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.32;
}
.bb-context-lens-item__sources-dl dt {
    margin: 0;
    color: var(--light-text);
    font-weight: 650;
}
.bb-context-lens-item__sources-dl dd {
    margin: 0;
    color: var(--text-color);
    overflow-wrap: anywhere;
}
@media (max-width: 520px) {
    .bb-context-lens-item__sources-panel {
        width: 100%;
    }
}
.timeline-reading-orientation {
    margin: 0.15rem 0 0.75rem;
}
.timeline-context-unit__verses {
    display: grid;
    gap: 0.35rem;
}
.timeline-context-unit__verse {
    padding: 0.28rem 0.35rem;
    border-radius: 6px;
}
.timeline-context-unit__verse.context-verse-current {
    background: rgba(59, 130, 246, 0.08);
}
.timeline-ctx-sections {
    margin: 0.65rem 0 0.75rem;
    overflow: visible;
}
.timeline-ctx-sections__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.45rem;
    overflow: visible;
}
.timeline-ctx-sections__heading {
    flex: 1 1 min(16rem, 100%);
    min-width: 0;
    padding-right: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}
.timeline-ctx-sections__sources {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-start;
}
.timeline-ctx-sections__sources[open] {
    display: grid;
    order: 2;
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-left: 0;
    z-index: 40;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--bb-color-link, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}
.timeline-ctx-sections__sources[open] .bb-passage-context-study-sources__summary {
    grid-column: 2;
    justify-self: end;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__summary::-webkit-details-marker {
    display: none;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__panel {
    position: absolute;
    top: calc(100% + 0.26rem);
    right: 0;
    width: max-content;
    min-width: 13rem;
    max-width: min(22rem, calc(100vw - 2rem));
    margin-top: 0;
    padding: 0.38rem 0.48rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    background: var(--bbp-panel-bg, #ffffff);
    box-sizing: border-box;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
    z-index: 30;
}
.timeline-ctx-sections__sources[open] .bb-passage-context-study-sources__panel {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 0.32rem;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__dl {
    display: grid;
    grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr);
    gap: 0.18rem 0.55rem;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.32;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__dl dt {
    margin: 0;
    color: var(--light-text);
    font-weight: 600;
}
.timeline-ctx-sections__sources .bb-passage-context-study-sources__dl dd {
    margin: 0;
    color: var(--text-color);
}
.timeline-ctx-section {
    margin: 0 0 0.55rem;
    padding: 0.5rem 0.55rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.42);
}
.timeline-ctx-section__title {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text-color);
    line-height: 1.3;
}
.timeline-ctx-section__body {
    font-size: 0.8rem;
    line-height: 1.52;
    color: var(--text-color);
}
.timeline-ctx-section__body p {
    margin: 0 0 0.4rem;
}
.timeline-ctx-section__body p:last-child {
    margin-bottom: 0;
}
.timeline-ctx-section__body .timeline-ctx-section__list {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.45;
}
.timeline-ctx-section__body .timeline-ctx-section__list li {
    margin: 0 0 0.35rem;
}
.timeline-ctx-section__body .timeline-ctx-section__list li:last-child {
    margin-bottom: 0;
}
.timeline-panel-unavailable {
    margin: 0.35rem 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-color);
}
.timeline-panel-unavailable-detail {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
}
.timeline-uncertainty-hint {
    font-size: 0.75rem;
    color: var(--light-text);
    margin: 0.35rem 0 0.25rem;
    line-height: 1.4;
}
.timeline-state {
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: var(--light-bg);
}
.timeline-state--loading {
    font-style: italic;
    color: var(--light-text);
    border-style: dashed;
}
.timeline-state .timeline-state-title {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.timeline-state .timeline-state-detail {
    display: block;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--light-text);
}
.timeline-state--loading .timeline-state-title {
    font-style: normal;
    opacity: 0.92;
}
.timeline-state--loading .timeline-state-detail {
    font-style: italic;
}
.timeline-state--empty {
    color: var(--light-text);
    border-style: dashed;
}
.timeline-state--empty .timeline-state-title {
    opacity: 0.88;
}
.timeline-state--idle {
    color: var(--light-text);
    border-style: dashed;
}
.timeline-state--idle .timeline-state-title {
    opacity: 0.9;
}
.timeline-state--error {
    border-style: solid;
    border-color: rgba(192, 57, 43, 0.35);
    background: rgba(192, 57, 43, 0.05);
    color: var(--text-color);
}
.timeline-state--error .timeline-state-title {
    color: var(--error-color, #c0392b);
}
.timeline-state--error .timeline-state-detail {
    color: var(--text-color);
}
.timeline-retry {
    color: var(--primary-color);
    font-weight: 500;
}
.timeline-neighbors {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--light-text);
    margin: 0 0 0.65rem;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
}
.timeline-neighbors__part {
    display: inline;
}
.timeline-neighbors__lbl {
    font-weight: 600;
    color: var(--light-text);
    margin-right: 0.15rem;
}
.timeline-how-placed {
    margin: 0.55rem 0 0.4rem;
    font-size: 0.82rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.45rem 0.55rem;
    background: rgba(148, 163, 184, 0.06);
}
.timeline-how-placed-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    list-style: none;
}
.timeline-how-placed-summary::-webkit-details-marker {
    display: none;
}
.timeline-how-placed-body {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-color);
    line-height: 1.45;
}
.timeline-how-placed-body p {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
}
.timeline-how-placed-body p:last-child {
    margin-bottom: 0;
}
.timeline-placement-path {
    margin: 0.45rem 0;
}
.timeline-placement-path--compact {
    margin: 0.6rem 0 0.75rem;
    padding: 0.52rem 0.62rem;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(239, 246, 255, 0.6);
}
.timeline-placement-path__intro {
    color: var(--light-text);
}
.timeline-placement-path--compact .timeline-placement-path__intro {
    margin: 0 0 0.35rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 650;
}
.timeline-placement-path__list {
    margin: 0.25rem 0 0.45rem 1.1rem;
    padding: 0;
}
.timeline-placement-path--compact .timeline-placement-path__list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.28rem 0.42rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.timeline-placement-path__list li {
    margin: 0.2rem 0;
    padding-left: 0.1rem;
}
.timeline-placement-path--compact .timeline-placement-path__list li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}
.timeline-placement-path--compact .timeline-placement-path__list li:not(:last-child)::after {
    content: "›";
    color: var(--light-text);
    font-weight: 700;
}
.timeline-placement-path__label {
    display: block;
    font-weight: 600;
}
.timeline-placement-path--compact .timeline-placement-path__label {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-color);
    font-size: 0.78rem;
    line-height: 1.25;
}
.timeline-placement-path__basis {
    display: block;
    color: var(--light-text);
    font-size: 0.74rem;
    line-height: 1.35;
}
.timeline-placement-path--compact .timeline-placement-path__basis {
    display: none;
}
.timeline-how-placed-footnote {
    font-size: 0.75rem !important;
    color: var(--light-text) !important;
    margin-top: 0.55rem !important;
    padding-top: 0.45rem !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
    line-height: 1.4 !important;
}
.timeline-rail-wrap {
    margin: 0 0 0.5rem;
}
.timeline-rail-intro {
    font-size: 0.78rem;
    color: var(--light-text);
    margin: 0 0 0.45rem;
    line-height: 1.45;
}
.timeline-rail-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    height: 5px;
    margin: 0 0 0.5rem;
    padding: 2px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.18);
    box-sizing: border-box;
}
.timeline-rail-track__seg {
    min-height: 3px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.12);
}
.timeline-rail-track__seg--active {
    background: var(--primary-color);
    opacity: 0.65;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.timeline-rail-position {
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--light-text);
    margin: 0.5rem 0 0;
    padding: 0.35rem 0.4rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
}
.timeline-rail {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    align-items: stretch;
}
.timeline-rail__item {
    margin: 0;
    padding: 0.4rem 0.35rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.06);
    text-align: center;
    min-width: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.timeline-rail__item--active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
    box-shadow: inset 3px 0 0 var(--primary-color);
    font-weight: 600;
}
.timeline-rail__idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-bottom: 0.25rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-color);
}
.timeline-rail__item--active .timeline-rail__idx {
    background: var(--primary-color);
    color: #fff;
}
.timeline-rail__name {
    display: block;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-color);
    overflow-wrap: anywhere;
    hyphens: auto;
}
.timeline-rail__range {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.66rem;
    line-height: 1.25;
    color: var(--light-text);
    overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
    .timeline-rail__item {
        transition: none;
    }
}
@media (max-width: 520px) {
    .timeline-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        margin-bottom: 0.6rem;
    }
    .timeline-rail-intro {
        margin-bottom: 0.4rem;
    }
    .timeline-rail-track {
        margin-bottom: 0.45rem;
    }
    .timeline-how-placed {
        margin-top: 0.6rem;
        padding: 0.5rem 0.45rem;
    }
    .timeline-neighbors {
        margin-bottom: 0.55rem;
    }
}
.places-list {
    margin-bottom: 0;
    font-size: 0.95rem;
}
.places-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.places-panel-intro {
    font-size: 0.85rem;
    color: var(--light-text);
    margin: 0 0 0.38rem;
    line-height: 1.32;
}
.places-map-banner {
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}
.places-map-banner--none {
    color: var(--text-color);
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.25);
}
.places-map-banner--partial {
    color: var(--text-color);
    background: var(--light-bg);
}
.place-synonyms {
    font-size: 0.82rem;
    color: var(--secondary-color);
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}
.place-ref-matched {
    font-size: 0.82rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
    opacity: 0.92;
}
.place-no-coords {
    font-size: 0.78rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}
.place-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}
.place-item-head .place-name {
    flex: 1 1 auto;
    min-width: 0;
}
.place-explore-map-handoff {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--light-text);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
    border-radius: 4px;
    padding: 0.12rem 0.28rem;
    margin: 0 0 0 0.15rem;
    opacity: 0.88;
}
.place-explore-map-handoff:hover {
    text-decoration: underline;
    color: var(--secondary-color);
    opacity: 1;
}
.place-explore-map-handoff:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.place-explore-map-handoff--secondary {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.72;
    margin-left: auto;
    padding: 0.08rem 0.22rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.85);
    color: rgba(71, 85, 105, 0.92);
}

.place-explore-map-handoff--secondary:hover {
    color: rgba(30, 41, 59, 0.95);
    border-color: rgba(100, 116, 139, 0.55);
}
.place-coords-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--secondary-color);
    opacity: 0.88;
    white-space: nowrap;
    flex-shrink: 0;
}
.place-coords-indicator__dot {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.62;
}
.place-coords-indicator__text {
    font-size: inherit;
}
.places-state {
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: var(--light-bg);
}
.places-state--loading {
    font-style: italic;
    color: var(--light-text);
    border-style: dashed;
}
.places-state--loading .places-state-title {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-style: normal;
}
.places-state--loading .places-state-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.45;
}
.places-state--idle {
    color: var(--light-text);
    border-style: dashed;
}
.places-state--idle .places-state-title {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.88;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.places-state--idle .places-state-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--light-text);
}
.places-state--empty {
    color: var(--light-text);
    border-style: dashed;
}
.places-state--empty .places-state-title {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.88;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.places-state--empty .places-state-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--light-text);
}
.places-state--error {
    border-style: solid;
    border-color: rgba(192, 57, 43, 0.35);
    background: rgba(192, 57, 43, 0.05);
}
.places-state--error .places-state-title {
    display: block;
    font-weight: 600;
    color: var(--error-color, #c0392b);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.places-state--error .places-state-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--text-color);
}
.places-state--error .places-retry {
    color: var(--primary-color);
    font-weight: 500;
}
/* Original-language token / interlinear tables reuse places-state blocks inside cells. */
.token-table td.token-table-status-cell .places-state,
.interlinear-table td.token-table-status-cell .places-state {
    margin: 0.3rem 0;
    max-width: 100%;
    box-sizing: border-box;
}
.place-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.14s ease;
}
.place-item:last-child {
    border-bottom: none;
}
/* List-only rows: dashed rail + light panel (readable; not a dimmed “disabled” row). */
.place-item--no-coords {
    border-left: 2px dashed var(--border-color);
    padding-left: 0.5rem;
    margin-left: -0.15rem;
    border-radius: 0.3rem;
    background: var(--light-bg);
    cursor: default;
}
/* Map highlight: solid fill + left bar (distinct from keyboard focus ring below). Slightly stronger so list row matches an open popup. */
.place-item.place-item-active {
    border-left: 4px solid var(--primary-color);
    padding: 0.45rem 0.5rem 0.45rem 0.65rem;
    margin: 0.15rem 0 0.15rem -0.35rem;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.42);
}
/* Keyboard: dashed ring (tab to row / link / button). Map-highlighted row uses solid blue panel instead. */
.place-item--has-coords:focus-within {
    outline: 2px dashed var(--secondary-color);
    outline-offset: 3px;
    border-radius: 0.375rem;
}
.place-item--has-coords:focus-within:not(.place-item-active) {
    outline-color: rgba(37, 99, 235, 0.55);
}
.place-item.place-item-active.place-item--has-coords:focus-within {
    outline: 1px dashed rgba(30, 64, 175, 0.65);
    outline-offset: 2px;
    /* Softer halo so focus ring + highlight panel are not doubly heavy. */
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.28);
}
.place-item-active .place-focus-map-btn:focus-visible {
    outline-width: 2px;
    outline-offset: 1px;
}
.place-map-active-badge {
    display: none;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    margin: 0 0 0.15rem;
    line-height: 1.2;
}
.place-item.place-item-active .place-map-active-badge {
    display: block;
}
.place-item.place-item--has-coords:not(.place-item-active):hover {
    background-color: rgba(248, 250, 252, 0.92);
    border-radius: 0.3rem;
}
.place-item--no-coords:not(.place-item-active):hover {
    background-color: rgba(241, 245, 249, 0.95);
    border-radius: 0.3rem;
}
/* Show on map: stronger “selected” look while this row is the map highlight (text unchanged). */
.place-item-active .place-focus-map-btn {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    padding: 0.12em 0.5em;
    text-decoration: none;
}
.place-item-active .place-focus-map-btn:hover {
    background: rgba(59, 130, 246, 0.26);
    border-color: rgba(37, 99, 235, 0.65);
    color: var(--primary-color);
}

/* Scripture-first passage places: density tokens on #placesList (overridden 431–768, ≤430; ≤360 tweaks actions gap) */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #placesList {
    --sf-pad-row: 0.42rem;
    --sf-gap-stack: 0.24rem;
    --sf-gap-head: 0.4rem;
    --sf-gap-head-trail: 0.08rem;
    --sf-gap-title-y: 0.35rem;
    --sf-gap-title-x: 0.6rem;
    --sf-gap-actions-y: 0.35rem;
    --sf-gap-actions-x: 0.5rem;
    --sf-atlas-ml: auto;
    --sf-name-py: 0.2rem;
    --sf-name-px-end: 0.32rem;
    --sf-name-lh: 1.33;
    --sf-atlas-font-size: 0.62rem;
    --sf-atlas-pad-y: 0.1rem;
    --sf-atlas-pad-x: 0.35rem;
    --sf-act-row-py: 0.48rem;
    --sf-act-row-px-end: 0.5rem;
    --sf-act-row-px-start: 0.58rem;
    --sf-act-row-my: 0.1rem;
    --sf-act-row-mx: -0.3rem;
    --sf-act-head-pad: 0.38rem;
    --sf-act-head-pad-x: 0.42rem;
    --sf-act-pill-py: 0.12rem;
    --sf-act-pill-px-end: 0.42rem;
    --sf-act-pill-px-start: 0.32rem;
    --sf-act-dot: 0.48rem;
    --sf-sum-mt: 0.06rem;
    --sf-sum-pt: 0.2rem;
    --sf-sum-lh: 1.44;
    --sf-meta-mt: 0.04rem;
    --sf-meta-lh: 1.38;
    --sf-det-mt: 0.12rem;
    --sf-det-pad-y: 0.16rem;
    --sf-det-pad-x: 0.3rem;
    --sf-det-pad-b: 0.2rem;
    --sf-det-open-y: 0.28rem;
    --sf-det-open-x: 0.38rem;
    --sf-det-open-b: 0.4rem;
    --sf-ref-list-mt: 0.4rem;
    --sf-prof-body-mt: 0.32rem;
    --sf-prof-body-pt: 0.14rem;
    --sf-prof-line-mb: 0.32rem;
    --sf-radius-head: 8px;
    --sf-radius-details: 6px;
}

/* Scripture-first passage places: scan hierarchy (title → on map → actions), quieter metadata, calmer active row */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf {
    padding: var(--sf-pad-row) 0;
    gap: var(--sf-gap-stack);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head--sf {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sf-gap-head);
    margin-bottom: var(--sf-gap-head-trail);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sf-gap-title-y) var(--sf-gap-title-x);
    min-width: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__title-line .place-name {
    flex: 1 1 auto;
    min-width: 0;
    min-height: auto;
    margin-bottom: 0;
    padding: var(--sf-name-py) var(--sf-name-px-end) var(--sf-name-py) 0;
    line-height: var(--sf-name-lh);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sf-gap-actions-y) var(--sf-gap-actions-x);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-item-head__actions .place-explore-map-handoff--secondary {
    margin-left: var(--sf-atlas-ml);
}
/* Highlight reads as the primary row action; Explore Map stays visually secondary */
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf:not(.place-item-active)
    .place-item-head__actions
    .place-focus-map-btn {
    box-sizing: border-box;
    font-weight: 600;
    min-height: var(--sf-btn-min-h, auto);
    padding: var(--sf-hl-pad-y, 0.28em) var(--sf-hl-pad-x, 0.65em);
    font-size: var(--sf-hl-font-size, inherit);
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-color);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf:not(.place-item-active)
    .place-item-head__actions
    .place-focus-map-btn:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(37, 99, 235, 0.55);
    color: var(--primary-color);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-explore-map-handoff--secondary {
    box-sizing: border-box;
    opacity: 0.78;
    font-size: var(--sf-atlas-font-size);
    min-height: var(--sf-btn-min-h, auto);
    padding: var(--sf-atlas-pad-y) var(--sf-atlas-pad-x);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.65);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-coords-indicator {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.78;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-coords-indicator__dot {
    opacity: 0.55;
    width: 0.4rem;
    height: 0.4rem;
}
/* Body under head: secondary rhythm; optional details read as collapsible, not cards */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-synonyms,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-matched {
    font-size: 0.72rem;
    line-height: var(--sf-meta-lh);
    color: var(--light-text);
    opacity: 0.82;
    margin: var(--sf-meta-mt) 0 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-no-coords {
    font-size: 0.72rem;
    line-height: var(--sf-meta-lh);
    font-weight: 500;
    color: var(--light-text);
    opacity: 0.88;
    margin: var(--sf-meta-mt) 0 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item--no-coords {
    background: rgba(248, 250, 252, 0.65);
    border-left-color: rgba(148, 163, 184, 0.42);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-summary {
    margin-top: var(--sf-sum-mt);
    padding-top: var(--sf-sum-pt);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.82rem;
    line-height: var(--sf-sum-lh);
    color: var(--light-text);
    opacity: 0.94;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-summary:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-details {
    margin-top: var(--sf-det-mt);
    font-size: 0.72rem;
    border-radius: var(--sf-radius-details);
    padding: var(--sf-det-pad-y) var(--sf-det-pad-x) var(--sf-det-pad-b);
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.4);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-details:not([open]) {
    border-style: dashed;
    background: rgba(248, 250, 252, 0.22);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-details[open] {
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.78);
    padding: var(--sf-det-open-y) var(--sf-det-open-x) var(--sf-det-open-b);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-details-summary {
    font-weight: 500;
    font-size: 0.72rem;
    color: rgba(71, 85, 105, 0.9);
    line-height: 1.35;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-details-summary:hover {
    color: var(--secondary-color);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-ref-list {
    margin-top: var(--sf-ref-list-mt);
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--light-text);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-profile-body {
    margin-top: var(--sf-prof-body-mt);
    padding-top: var(--sf-prof-body-pt);
    border-top-color: rgba(148, 163, 184, 0.16);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-profile-line {
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--light-text);
    margin: 0 0 var(--sf-prof-line-mb);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-profile-label {
    font-size: 0.66rem;
    opacity: 0.92;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-profile-see-also {
    font-size: 0.74rem;
    line-height: 1.38;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf .place-profile-ref-plain {
    opacity: 0.92;
}
/* Active / map-highlighted: clearer at a glance without the legacy badge stack */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active {
    border-left-width: 4px;
    padding: var(--sf-act-row-py) var(--sf-act-row-px-end) var(--sf-act-row-py) var(--sf-act-row-px-start);
    margin: var(--sf-act-row-my) 0 var(--sf-act-row-my) var(--sf-act-row-mx);
    background: rgba(59, 130, 246, 0.14);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-item-head--sf {
    margin: 0;
    padding: var(--sf-act-head-pad) var(--sf-act-head-pad-x);
    border-radius: var(--sf-radius-head);
    background: rgba(59, 130, 246, 0.09);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-name {
    color: rgba(30, 64, 175, 0.98);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-coords-indicator {
    opacity: 1;
    color: rgba(30, 64, 175, 0.95);
    padding: var(--sf-act-pill-py) var(--sf-act-pill-px-end) var(--sf-act-pill-py) var(--sf-act-pill-px-start);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-coords-indicator__dot {
    opacity: 1;
    width: var(--sf-act-dot);
    height: var(--sf-act-dot);
    background: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf.place-item-active
    .place-item-head__actions
    .place-focus-map-btn {
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.98) 100%);
    border: 1px solid rgba(30, 64, 175, 0.85);
    box-shadow: 0 1px 2px rgba(30, 58, 138, 0.22);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf.place-item-active
    .place-item-head__actions
    .place-focus-map-btn:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(37, 99, 235, 1) 0%, rgba(29, 78, 216, 1) 100%);
    border-color: rgba(30, 64, 175, 1);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf.place-item-active
    .place-item-head__actions
    .place-focus-map-btn:active {
    color: #fff;
    background: linear-gradient(180deg, rgba(29, 78, 216, 1) 0%, rgb(23, 63, 173) 100%);
    border-color: rgba(23, 37, 84, 0.95);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .place-item--sf.place-item-active
    .place-item-head__actions
    .place-focus-map-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active.place-item--has-coords:focus-within {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.26);
    outline: 1px dashed rgba(30, 64, 175, 0.55);
    outline-offset: 2px;
}
/* Active row: body stays secondary to head; light tie-in without new chrome */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-summary {
    border-top-color: rgba(30, 64, 175, 0.12);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-ref-details:not([open]) {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(255, 255, 255, 0.32);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active .place-ref-details[open] {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(255, 255, 255, 0.92);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .place-item--sf.place-item-active.place-item--no-coords {
    background: rgba(255, 255, 255, 0.52);
}

.place-name {
    display: block;
    color: var(--primary-color-strong, #1d4ed8);
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1.33;
    overflow-wrap: break-word;
}
a.place-name {
    text-decoration: none;
}
a.place-name:hover {
    text-decoration: underline;
}
.place-summary {
    margin: 0;
    margin-top: 0.1rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.52;
}
.place-profile-details.place-ref-details {
    margin-top: 0.35rem;
}
.place-profile-body {
    margin-top: 0.45rem;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.place-profile-line {
    margin: 0 0 0.42rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-color);
}
.place-profile-line:last-child {
    margin-bottom: 0;
}
.place-profile-label {
    display: block;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.12rem;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.place-profile-value {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding-left: 0.05rem;
}
.place-profile-line--see-also .place-profile-label {
    margin-bottom: 0.2rem;
}
.place-profile-see-also {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.42;
    list-style-type: disc;
}
.place-profile-see-also li {
    margin-bottom: 0.22rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.place-profile-see-also li:last-child {
    margin-bottom: 0;
}
.place-profile-see-also .ref-link.place-profile-see-also-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.place-profile-see-also .ref-link.place-profile-see-also-link:hover {
    text-decoration: underline;
}
.place-profile-ref-plain {
    color: var(--text-color);
    opacity: 0.88;
}
.map-popup-see-also-wrap {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.74rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.map-popup-see-also-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.map-popup-see-also-link:hover {
    text-decoration: underline;
}
.map-popup-see-also-plain {
    color: inherit;
    opacity: 0.9;
}
.place-ref-details {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.32rem 0.48rem 0.4rem;
    background: rgba(148, 163, 184, 0.06);
}
.place-ref-details-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--light-text);
    list-style: none;
    line-height: 1.4;
}
.place-ref-details-summary-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, var(--accent-color, #2563eb));
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color, #fff) 92%, var(--accent-color, #2563eb));
    color: var(--accent-color, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}
.place-ref-details summary::-webkit-details-marker {
    display: none;
}
.place-ref-details[open] {
    padding-bottom: 0.45rem;
}
.place-ref-list {
    margin: 0.55rem 0 0;
    padding-left: 1.1rem;
    padding-top: 0.05rem;
    color: var(--text-color);
    font-size: 0.8rem;
    line-height: 1.42;
}
.place-ref-list li {
    margin-bottom: 0.28rem;
}
.place-ref-list li:last-child {
    margin-bottom: 0;
}

.translations-block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    max-width: var(--reading-max, 52rem);
    margin: 0 0 0.28rem;
}
.licenses-inline-link--translations {
    margin: 0;
    font-size: 0.72rem;
}
.translations-heading {
    font-size: 0.75rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: var(--light-text);
}
.translations-heading .section-icon {
    opacity: 0.7;
    margin-right: 0.25rem;
    font-size: 1.05em;
    vertical-align: -0.05em;
}
.translations-heading.translations-heading--chapter-reading {
    color: rgba(30, 58, 138, 0.92);
}
.passage-nav.passage-nav--in-reading.passage-nav--chapter-reading {
    border-top-color: rgba(59, 130, 246, 0.32);
}
.passage-nav.passage-nav--chapter-reading .passage-nav-step-btn {
    font-weight: 600;
}
.bb-passage-nav-chapter-cue {
    margin: 0.28rem 0 0;
    padding: 0.28rem 0.42rem 0.3rem;
    font-size: 0.72rem;
    line-height: 1.38;
    color: rgba(51, 65, 85, 0.92);
    max-width: min(36rem, 100%);
    border-radius: 6px;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-left: 3px solid rgba(59, 130, 246, 0.38);
    box-sizing: border-box;
}
.passage-nav.passage-nav--chapter-reading .passage-nav-steps {
    gap: 0.22rem;
}
.bb-passage-nav-chapter-cue[hidden] {
    display: none !important;
}
.translations-toolbar {
    margin: 0.1rem 0 0.5rem;
    padding: 0.3rem 0.48rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 6px;
    background: rgba(248, 250, 252, 0.85);
}
.translations-toolbar--compare {
    margin-top: 0.18rem;
    padding: 0.26rem 0.42rem 0.28rem;
    gap: 0.32rem 0.55rem;
    border-color: rgba(148, 163, 184, 0.1);
    background: rgba(248, 250, 252, 0.55);
}
.translations-toolbar label {
    margin-right: 0;
    font-size: 0.8125rem;
    color: var(--light-text);
}
.translation-filter-status {
    font-size: 0.85rem;
    color: var(--light-text);
    flex: 1 1 12rem;
    min-width: 0;
}
.translations-toolbar--filtered-active .translation-filter-status {
    font-weight: 600;
    color: var(--text-color);
}
.translations-toolbar select {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--light-bg);
}
.translations-toolbar--filtered-active {
    margin: 0.05rem 0 0.65rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.translations-toolbar--show-matches-saved-pref {
    border-color: rgba(22, 163, 74, 0.45);
    background: rgba(22, 163, 74, 0.07);
}
.translations-toolbar--filtered-active.translations-toolbar--show-matches-saved-pref {
    border-color: rgba(22, 163, 74, 0.52);
    background: rgba(22, 163, 74, 0.1);
}
.translations-toolbar--visibility-single-other.translations-toolbar--filtered-active {
    border-color: rgba(202, 138, 4, 0.42);
    background: rgba(234, 179, 8, 0.07);
}
.translations-context-status {
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(71, 85, 105, 0.95);
    margin: 0 0 0.42rem;
    padding: 0.28rem 0.42rem 0.3rem;
    border-radius: 6px;
    max-width: var(--reading-max, 52rem);
    border: none;
}
.translations-context-status--solo {
    background: rgba(248, 250, 252, 0.95);
    border-left: 2px solid rgba(148, 163, 184, 0.45);
    color: var(--text-color);
}
.translations-context-status--filtered {
    background: rgba(59, 130, 246, 0.06);
    border-left: 2px solid rgba(37, 99, 235, 0.4);
    color: var(--text-color);
}
.translations-context-status--warning {
    background: rgba(185, 28, 28, 0.06);
    border-left: 2px solid rgba(185, 28, 28, 0.4);
    color: var(--text-color);
}
.translation-availability-notice {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-color);
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    max-width: var(--reading-max, 52rem);
    background: rgba(234, 179, 8, 0.12);
    border-left: 3px solid rgba(202, 138, 4, 0.55);
}
.translation-availability-notice--warn {
    background: rgba(185, 28, 28, 0.08);
    border-left-color: rgba(185, 28, 28, 0.45);
}
.translation-pref-control-status {
    margin: 0.25rem 0 0;
    display: block;
    font-size: 0.78rem;
    line-height: 1.38;
    font-weight: 500;
    color: var(--text-color);
    max-width: 22rem;
}
.translation-pref-hint {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    line-height: 1.38;
    color: var(--muted-text);
    max-width: 22rem;
}
/* Passage navbar + Workbench: options without API backing (bbMergeTranslationNavRows). */
#translationPrefSelect option:disabled,
.bb-wb-grounding-select option:disabled {
    color: var(--muted-text, #64748b);
    font-style: italic;
}
.translation-preference-summary {
    font-size: 0.78rem;
    line-height: 1.42;
    color: rgba(51, 65, 85, 0.95);
    margin: 0 0 0.38rem;
    padding: 0.32rem 0.45rem 0.35rem;
    border-radius: 6px;
    max-width: var(--reading-max, 52rem);
    background: rgba(248, 250, 252, 0.9);
    border: none;
    border-left: 2px solid rgba(37, 99, 235, 0.28);
}
.passage-reading-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.55rem;
    max-width: var(--reading-max, 52rem);
    margin: 0.15rem auto 0.28rem;
}
.passage-reading-translation-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    color: rgba(71, 85, 105, 0.88);
}
.passage-reading-translation-control .translation-pref-label {
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.82);
}
.passage-reading-translation-control #translationPrefSelect {
    width: min(100%, 16rem);
    min-width: 9.5rem;
    min-height: 2.15rem;
    padding: 0.32rem 1.8rem 0.32rem 0.52rem;
    border-radius: 8px;
    border-color: rgba(203, 213, 225, 0.95);
    background-color: rgba(255, 255, 255, 0.94);
    font-size: 0.9rem;
    line-height: 1.2;
}
.passage-reading-translation-control #translationPrefControlStatus {
    margin: 0;
    max-width: 11rem;
    font-size: 0.7rem;
    line-height: 1.22;
    color: rgba(100, 116, 139, 0.78);
}
.translations-toolbar__show-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.translation-selector-label {
    font-size: 0.9rem;
    color: var(--light-text);
    font-weight: 600;
}
.translation-selector-hint {
    flex: 1 1 100%;
    margin: 0.2rem 0 0;
    font-size: 0.76rem;
    line-height: 1.38;
    color: var(--muted-text);
    max-width: 36rem;
}
.bb-passage-compare-picker {
    position: relative;
    flex: 1 1 14rem;
    max-width: 100%;
}
.bb-passage-compare-picker__summary {
    min-height: 2.1rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    background: var(--light-bg);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.3;
}
@media (max-width: 480px) {
    .translations-toolbar--compare.bb-sf-translations-toolbar--reading .bb-passage-compare-picker__summary {
        min-height: 44px;
    }
}
.bb-passage-compare-picker__body {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.3rem);
    left: 0;
    min-width: min(22rem, 88vw);
    max-width: 92vw;
    padding: 0.55rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}
.bb-passage-compare-picker__options {
    display: grid;
    gap: 0.25rem;
    max-height: 15rem;
    overflow: auto;
    padding-right: 0.15rem;
}
.bb-passage-compare-picker__option {
    display: grid;
    grid-template-columns: auto max-content 1fr;
    gap: 0.4rem;
    align-items: center;
    padding: 0.28rem 0.25rem;
    border-radius: 6px;
    font-size: 0.86rem;
}
.bb-passage-compare-picker__option:hover {
    background: rgba(241, 245, 249, 0.95);
}
.bb-passage-compare-picker__code {
    font-weight: 700;
    color: var(--text-color);
}
.bb-passage-compare-picker__name {
    color: var(--muted-text);
    min-width: 0;
}
.bb-passage-compare-picker__actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: 0.55rem;
}
.bb-reader-unified-compare__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin: 0 0 0.65rem;
}
.bb-reader-unified-compare__head .bb-study-workspace__title {
    margin: 0;
}
.bb-reader-unified-compare__ref {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.86rem;
    font-weight: 600;
}
.bb-reader-unified-compare-picker {
    display: grid;
    gap: 0.48rem;
    margin: 0 0 0.72rem;
    padding: 0.58rem 0.66rem;
    border: 1px solid color-mix(in srgb, var(--border-color, #e2e8f0) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 72%, transparent);
}
.bb-reader-unified-compare-picker--empty {
    gap: 0.18rem;
}
.bb-reader-unified-compare-picker__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.18rem 0.65rem;
}
.bb-reader-unified-compare-picker__label,
.bb-reader-unified-compare-picker__status {
    margin: 0;
}
.bb-reader-unified-compare-picker__label {
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-text, #64748b);
}
.bb-reader-unified-compare-picker__status {
    font-size: 0.82rem;
    color: var(--text-color, #1f2937);
}
.bb-reader-unified-compare-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.bb-reader-unified-compare-picker__option {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 2rem;
    padding: 0.22rem 0.48rem;
    border: 1px solid color-mix(in srgb, var(--border-color, #e2e8f0) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color, #fff) 86%, transparent);
    font-size: 0.84rem;
}
.bb-reader-unified-compare-picker__option:hover,
.bb-reader-unified-compare-picker__option:focus-within {
    border-color: color-mix(in srgb, var(--primary-color, #2f5f8f) 45%, var(--border-color, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 54%, var(--surface-color, #fff));
}
.bb-reader-unified-compare-picker__code {
    font-weight: 750;
    color: var(--text-color, #1f2937);
}
.bb-reader-unified-compare-picker__name {
    color: var(--muted-text, #64748b);
}
.bb-reader-unified-compare-picker__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}
.bb-reader-unified-compare__list .translation-block {
    margin-bottom: 0.65rem;
}
.interlinear-toggle {
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
}
.interlinear-toggle:hover {
    background: var(--border-color);
}
.result-translations {
    margin-bottom: 0;
}

/* Translation column: scripture blocks carry visual weight; outer panel stays quiet. */
.passage-results .result-translations.study-panel {
    margin-top: 0;
    padding: 0.1rem 0 0.06rem 0.22rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-left: 2px solid rgba(226, 232, 240, 0.85);
}

.passage-results .translation-text,
.passage-results .translation-text--passage-prose {
    font-size: 1.105rem;
    line-height: 1.76;
    color: rgba(15, 23, 42, 0.94);
}

.passage-results .licenses-inline-link {
    font-size: 0.75rem;
    margin: 0.02rem 0 0.48rem;
    color: var(--light-text);
}
.passage-results .translations-block-head {
    margin-top: 0;
    margin-bottom: 0.05rem;
}

.passage-results .pinned-verse-panel {
    margin-bottom: 0.42rem;
    padding: 0.38rem 0.45rem 0.42rem 0.55rem;
    background: rgba(248, 250, 252, 0.42);
    box-shadow: none;
}
/* —— Scripture-first mock v1: reading shell, peach selection, dock toolbar, hint line —— */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header .passage-viewer-title {
    display: none;
}
/* Passage identity: #resultReference in header is canonical when loaded; picker label shows “Choose” when it would duplicate (syncBbReaderRefPickerLabel). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-page-chrome-passage-heading .result-reference {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: rgba(100, 116, 139, 0.78);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-page-chrome-passage-heading .verse-header__ref-row {
    gap: 0.22rem;
    align-items: baseline;
    min-width: 0;
    flex: 1 1 auto;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
    /* Matches default “comfortable” preset when `data-bb-reader-text-size` is not yet applied. */
    font-size: 1.14rem;
    line-height: var(--bb-reader-copy-line-height, 1.84);
    font-weight: var(--bb-reader-copy-font-weight, 400);
    letter-spacing: var(--bb-reader-copy-letter-spacing, 0.008em);
    color: rgba(15, 23, 42, 0.97);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-block.verse-selected-for-note {
    background: rgba(255, 237, 213, 0.82);
    box-shadow:
        inset 0 0 0 1px rgba(251, 146, 60, 0.38),
        inset 3px 0 0 0 rgba(234, 88, 12, 0.48);
    border-radius: 0.3rem;
    transition:
        background-color 0.16s ease,
        box-shadow 0.16s ease;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-block.verse-selected-for-note .verse-num {
    color: rgba(124, 45, 18, 0.95);
    font-weight: 800;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-block[data-verse-ref]:focus-visible:not(
        .verse-selected-for-note
    ):not(.verse-note-editing-active):not(.bb-translate-compare-flash) {
    outline: 2px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
    border-radius: 0.3rem;
}
@media (hover: hover) {
    .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-block[data-verse-ref]:hover:not(.verse-selected-for-note):not(.verse-note-editing-active):not(.bb-translate-compare-flash) {
        background-color: rgba(51, 65, 85, 0.095);
        border-radius: 0.3rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-block[data-verse-ref]:hover:not(.verse-selected-for-note):not(.verse-note-editing-active):not(.bb-translate-compare-flash)
        .verse-num {
        color: rgba(71, 85, 105, 0.92);
        font-weight: 600;
    }
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-num {
    color: rgba(148, 163, 184, 0.88);
    font-weight: 500;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
    /* Canonical scripture entry: this border-top is the only horizontal rule above the text (section-divider + shell hairlines suppressed in SF). */
    border-left: none;
    border-top: 1px solid rgba(226, 232, 240, 0.72);
    padding-left: 0.04rem;
    padding-top: 0.08rem;
    margin-bottom: 0.02rem;
}
html[data-bb-reader-font='classic'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-font='classic'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
}
html[data-bb-reader-font='literary'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-font='literary'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: Baskerville, 'Baskerville Old Face', Garamond, 'Times New Roman', serif;
    letter-spacing: 0.004em;
}
html[data-bb-reader-font='clean'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-font='clean'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
}
html[data-bb-reader-theme='parchment'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
    background:
        radial-gradient(circle at top, rgba(255, 251, 235, 0.92), rgba(248, 243, 220, 0.92) 55%, rgba(241, 233, 206, 0.96));
    border-top-color: rgba(180, 152, 108, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 250, 236, 0.86),
        0 18px 34px -28px rgba(91, 69, 39, 0.24);
}
html[data-bb-reader-theme='parchment'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-theme='parchment'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    color: rgba(58, 42, 21, 0.97);
}
html[data-bb-reader-theme='sepia'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
    background:
        linear-gradient(180deg, rgba(249, 241, 226, 0.95), rgba(240, 226, 198, 0.97));
    border-top-color: rgba(167, 125, 74, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 235, 0.8),
        0 16px 30px -28px rgba(120, 79, 36, 0.25);
}
html[data-bb-reader-theme='sepia'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-theme='sepia'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    color: rgba(78, 51, 21, 0.97);
}
html[data-bb-reader-theme='parchment'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-num,
html[data-bb-reader-theme='sepia'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-num {
    color: rgba(145, 101, 47, 0.92);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .translation-block-heading {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(100, 116, 139, 0.58);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .translation-block-heading strong {
    font-weight: 600;
    color: rgba(71, 85, 105, 0.68);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .translation-block:first-of-type
    .verse-block:first-child {
    font-size: 1.045em;
    letter-spacing: 0.01em;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-page-chrome-passage-heading.verse-header--sf-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem 0.36rem;
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    align-self: center;
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-page-chrome-chapter-badge {
    flex: 0 0 auto;
    font-size: 0.6rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.24rem;
    border-radius: 6px;
    color: rgba(71, 85, 105, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.65);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.02rem 0 0.04rem;
    margin: 0;
    border-bottom: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-sf-reader-context-band:has(> #bbContinueReadingBar[hidden]):has(> #bbReaderLocationLine[hidden]):has(> #bbBookReadingProgressStrip[hidden]) {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-continue-reading-bar:not([hidden]) .bb-continue-reading-bar__btn {
    font-size: 0.7rem;
    font-weight: 550;
    padding: 0.24rem 0.44rem;
    min-height: 2.12rem;
    border-radius: 6px;
    box-shadow: none;
    background: rgba(248, 250, 252, 0.88);
    color: rgba(71, 85, 105, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.95);
}
/* Scripture-first: subtle companion line under scripture while Context / References overlay is active */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-companion-cue:not([hidden]) {
    margin: 0.04rem 0 0;
    padding: 0.06rem 0.04rem 0.08rem;
    font-size: 0.72rem;
    line-height: 1.38;
    letter-spacing: 0.015em;
    font-weight: 400;
    color: rgba(100, 116, 139, 0.62);
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReadingModeShell[data-bb-sf-companion] .result-translations {
    box-shadow: none;
    border-radius: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.12rem 0.28rem;
    row-gap: 0.06rem;
    opacity: 1;
    background: transparent;
    border: none;
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.04rem 0 0.04rem;
    margin: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .passage-nav {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .passage-nav--in-reading {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .passage-nav-steps {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.14rem 0.28rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .passage-nav-step-btn-row {
    gap: 0.18rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .passage-nav-step-btn {
    font-size: 0.64rem;
    font-weight: 600;
    padding: 0.12rem 0.32rem;
    min-height: 2.05rem;
    border-radius: 6px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.55);
    color: rgba(71, 85, 105, 0.88);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .bb-reading-chrome-extras {
    flex: 0 0 auto;
    margin: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .bb-book-continue-wrap {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .reading-area__chrome-nav--sf-continuation .bb-book-continue-next {
    font-size: 0.64rem;
    padding: 0.12rem 0.34rem;
    min-height: 2.05rem;
    border-radius: 6px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.55);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-wrap:not([hidden]) {
    margin: 0;
    padding: 0.04rem 0 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-wrap__chrome {
    font-size: 0.54rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.62);
    margin-bottom: 0.04rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-wrap__viewport {
    border: none;
    border-radius: 6px;
    background: rgba(241, 245, 249, 0.45);
    padding: 0.02rem 0.06rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-strip__btn {
    min-width: 2.05rem;
    min-height: 2rem;
    font-size: 0.68rem;
    border-radius: 6px;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-strip__btn--current {
    border-color: rgba(100, 116, 139, 0.35);
    background: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-passage-nav-chapter-strip__btn:focus-visible {
    outline: 2px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-page-chrome-passage-heading.verse-header--chapter-reading {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup .bb-reader-passage-lookup-details__summary {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.88);
    padding: 0.18rem 0.28rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup .bb-reader-passage-lookup-details__summary:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.55);
}
@keyframes bb-sf-dock-settle {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
}
@media (max-width: 520px) {
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbVerseOverlayAskHint[data-bb-sf-optional-hint='1'] {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbVerseOverlayToolHubEyebrow {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbVerseOverlayToolHub .bb-verse-overlay-tool-hub__tile--study-quiet:not(:disabled) {
    opacity: 0.76;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbVerseOverlayToolHub .bb-verse-overlay-tool-hub__grid {
    grid-template-columns: 1fr 1fr;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbVerseOverlayToolHub .bb-verse-overlay-tool-hub__tile--maps-prominent:not(:disabled) {
    grid-column: 1 / -1;
    min-height: 2.62rem;
    font-size: 0.88rem;
    opacity: 1;
    font-weight: 650;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbMapsExplorerOpenBtn.bb-maps-explorer-open-btn {
    opacity: 0.4;
    font-size: 0.72rem;
    font-weight: 500;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbMapsExplorerOpenBtn.bb-maps-explorer-open-btn:hover,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbMapsExplorerOpenBtn.bb-maps-explorer-open-btn:focus-visible {
    opacity: 0.95;
}
/* Verse-gated study discoverability: one line + optional compact disclosure before jump nav. */
.passage-results .passage-verse-gated-study-bridge {
    max-width: var(--reading-max, 52rem);
    margin: 0.15rem auto 0.35rem;
    padding: 0 0.12rem;
}
.passage-results .passage-verse-gated-study-bridge__lead {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    line-height: 1.38;
    color: var(--light-text);
    opacity: 0.95;
}
.passage-results .passage-verse-gated-study-bridge__details {
    margin-top: 0;
}
.passage-results .passage-verse-gated-study-bridge__panel {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--light-text);
}

/* Below-reading surfaces: shared header chrome (notes, Q&A, etc.). */
.passage-results .reading-area > .bb-passage-surface + .bb-passage-surface {
    margin-top: 1rem;
}
.passage-results .bb-study-workspace__chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    max-width: var(--reading-max, 52rem);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.45rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}
.passage-results #bbReaderUnifiedOverlayContextBodyMount .context-section-header.bb-study-workspace__chrome {
    border-bottom-color: rgba(100, 116, 139, 0.38);
}
.passage-results #bbReaderUnifiedOverlayContextBodyMount #passageTimelineSection .bb-timeline-surface__head.bb-study-workspace__chrome {
    border-bottom-color: rgba(14, 165, 233, 0.38);
}
.passage-results .bb-study-workspace__title {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 600;
    color: rgba(30, 41, 59, 0.92);
    min-width: 0;
    line-height: 1.25;
}
.passage-results .bb-study-workspace__title .section-icon {
    margin-right: 0.28rem;
}
.passage-results .bb-study-workspace__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}
.passage-results .bb-study-workspace__nav-link,
.passage-results .bb-study-workspace__nav a.bb-study-workspace__nav-link {
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.passage-results .bb-study-workspace__nav-link:hover,
.passage-results .bb-study-workspace__nav-link:focus-visible,
.passage-results .bb-study-workspace__nav a.bb-study-workspace__nav-link:hover,
.passage-results .bb-study-workspace__nav a.bb-study-workspace__nav-link:focus-visible {
    border-bottom-color: currentColor;
    outline: none;
}
.passage-results .context-section-header.bb-study-workspace__chrome {
    border-top: none;
    padding-top: 0.2rem;
    margin-top: 0.35rem;
}
.passage-results .context-section-header .context-heading.bb-study-workspace__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 1;
}
.passage-results #interlinearSection {
    margin-top: 0.55rem;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.passage-results #passageWordStudyRegion {
    margin-top: 0.55rem;
    padding-top: 0.38rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.passage-results .bb-ol-workflow-stack #passageWordStudyRegion {
    margin-top: 0.44rem;
    padding-top: 0.4rem;
    padding-bottom: 0.15rem;
    border-top: 2px solid rgba(37, 99, 235, 0.22);
    border-radius: 0 0 9px 9px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(255, 255, 255, 0) 72%);
}
/* Greek/Hebrew: one workspace stack (tokens → interlinear → word study) */
.passage-results .bb-ol-workflow-stack {
    max-width: var(--reading-max, 52rem);
    margin: 0 auto 0.55rem;
    padding: 0.38rem 0.48rem 0.52rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
}
.passage-results .bb-ol-workflow-stack #interlinearSection {
    margin-top: 0.38rem;
    padding-top: 0.32rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.passage-results .bb-ol-workflow-stack .tokens-heading,
.passage-results .bb-ol-workflow-stack .interlinear-heading {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0.28rem 0 0.42rem;
    padding: 0.2rem 0 0.2rem 0.5rem;
    border-left: 3px solid rgba(37, 99, 235, 0.45);
    color: var(--text-color);
}
.passage-results .bb-ol-workflow-stack .bb-ol-workflow-stack__subhead {
    margin: 0.28rem 0 0.36rem;
    padding: 0.22rem 0 0.22rem 0.5rem;
    border-left: 3px solid rgba(37, 99, 235, 0.55);
    border-radius: 0;
    background: transparent;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.96;
}
.passage-results .bb-ol-workflow-stack .bb-ol-workflow-eyebrow__hint {
    font-weight: 500;
    font-size: 0.72rem;
    margin-left: 0.35rem;
}
.passage-results .bb-places-map-chrome.bb-study-workspace__chrome {
    align-items: stretch;
    margin-bottom: 0.42rem;
    padding: 0 0.12rem 0.38rem;
}
.passage-results .bb-study-workspace__nav-sep {
    color: var(--light-text, #64748b);
    font-weight: 400;
    user-select: none;
}
.passage-results .bb-cross-surface__head.bb-study-workspace__chrome {
    align-items: flex-end;
}
.passage-results .bb-cross-surface__chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    max-width: none;
}

/* Optional surfaces: sibling context strips + tighter study lane rhythm */
.passage-results .bb-study-context-strip {
    box-sizing: border-box;
    max-width: var(--reading-max, 52rem);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.34rem;
    padding: 0.32rem 0.48rem 0.36rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-left-width: 3px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.78));
}
.passage-results .bb-study-context-strip--notes {
    border-left-color: rgba(245, 158, 11, 0.62);
}
.passage-results .bb-study-context-strip--cross {
    border-left-color: rgba(99, 102, 241, 0.58);
}
.passage-results .bb-study-context-strip--ai {
    border-left-color: rgba(168, 85, 247, 0.55);
}
.passage-results .bb-study-context-strip--ol {
    border-left-color: rgba(37, 99, 235, 0.55);
    margin-bottom: 0.4rem;
}
.passage-results #bbOlContextStrip.bb-ol-context-strip.study-panel {
    padding: 0.34rem 0.5rem 0.38rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.78));
    border-color: rgba(148, 163, 184, 0.26);
}
.bb-reader-unified-notes .note-surface-target {
    margin-bottom: 0.34rem;
    padding-bottom: 0.26rem;
    border-bottom-color: rgba(148, 163, 184, 0.22);
}
.bb-reader-unified-notes .note-study-context-hint {
    margin-bottom: 0.28rem;
}
.bb-reader-unified-notes .note-actions {
    margin-top: 0.08rem;
}
.bb-reader-unified-crossrefs .cross-ref-filter-wrap {
    margin-bottom: 0.28rem;
}
.bb-reader-unified-crossrefs .cross-ref-verse-focus-bar {
    margin-bottom: 0.26rem;
}

.passage-results #bbReaderUnifiedOverlayContextBodyMount .context-list.study-panel {
    margin-top: 0.28rem;
    padding: 0.48rem 0.55rem 0.52rem;
    border-radius: 0 0 9px 9px;
}
.passage-results #bbReaderUnifiedOverlayContextBodyMount #timelinePanel.timeline-panel.study-panel {
    margin-top: 0.28rem;
    padding: 0.55rem 0.6rem 0.6rem;
}
.passage-results .bb-study-tray-card {
    padding: 0.5rem 0.62rem 0.56rem;
}
.passage-results .bb-study-tray-card__head {
    margin-bottom: 0.36rem;
}
.passage-results .bb-study-tray-card__preset-row {
    gap: 0.35rem;
    margin-bottom: 0.24rem;
}
.passage-results .bb-study-tray-card__preset-summary {
    margin-bottom: 0.34rem;
    padding: 0.3rem 0.45rem;
}

/* Passage places + map: title row + single toolbar (scope | layout) */
.passage-results .bb-places-map-chrome {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
    max-width: var(--reading-max, 52rem);
    margin: 0 auto 0.35rem;
    padding: 0 0.12rem;
}

.passage-results .bb-places-map-chrome__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.35rem 0.65rem;
}

.passage-results .bb-places-map-chrome .places-heading {
    margin: 0;
    flex: 1 1 10rem;
    min-width: 0;
}

.passage-results .bb-places-map-chrome__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.32rem 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.75);
    max-width: 100%;
    box-sizing: border-box;
}

.passage-results .bb-places-toolbar-divider {
    flex: 0 0 1px;
    align-self: stretch;
    min-height: 1.5rem;
    margin: 0 0.15rem;
    background: rgba(148, 163, 184, 0.45);
}

.passage-results .bb-places-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.passage-results .bb-places-mode-btn {
    margin: 0;
    padding: 0.28rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color, #1e293b);
    cursor: pointer;
    min-height: 36px;
    box-sizing: border-box;
}

.passage-results .bb-places-mode-btn:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.passage-results .bb-places-mode-btn--active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.passage-results .bb-places-mode-btn--active:hover {
    color: #fff;
    filter: brightness(1.05);
}

.passage-results .bb-places-list-column {
    min-width: 0;
}

.passage-results .bb-places-browse-pane {
    min-width: 0;
}

.passage-results .bb-places-browse-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.4rem;
}

.passage-results .bb-places-browse-search {
    flex: 1 1 8rem;
    min-width: 0;
    margin: 0;
    padding: 0.32rem 0.45rem;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.3;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    box-sizing: border-box;
    min-height: 36px;
}

.passage-results .bb-places-browse-passage-first {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--light-text, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    cursor: pointer;
    white-space: nowrap;
}

.passage-results .bb-places-browse-results {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 14rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.1rem;
}

.passage-results .bb-places-browse-item {
    margin: 0;
    padding: 0.3rem 0.42rem;
    text-align: left;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.35;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    background: #fff;
    color: var(--text-color, #1e293b);
    cursor: pointer;
    min-height: 40px;
    box-sizing: border-box;
    font-weight: 500;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.passage-results .bb-places-browse-item:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
    background: rgba(241, 245, 249, 0.88);
}

.passage-results .bb-places-browse-item--active {
    border-color: var(--primary-color, #2563eb);
    background: rgba(37, 99, 235, 0.06);
    font-weight: 600;
}

.passage-results .bb-places-browse-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.08rem 0.28rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color, #2563eb);
    vertical-align: middle;
}

.passage-results .bb-places-browse-empty {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: var(--light-text, #64748b);
}

.passage-results .bb-places-layout-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.passage-results .bb-places-layout-btn {
    margin: 0;
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color, #1e293b);
    cursor: pointer;
    min-height: 36px;
    box-sizing: border-box;
}

.passage-results .bb-places-layout-btn:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}

.passage-results .bb-places-layout-btn--active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.passage-results .bb-places-layout-btn--active:hover {
    color: #fff;
    filter: brightness(1.05);
}

.passage-results .bb-places-map-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: var(--reading-max, 52rem);
    margin: 0 auto;
    padding: 0 0.12rem;
}

.passage-results .bb-places-map-stack--map-first {
    flex-direction: column-reverse;
}

.passage-results .bb-places-map-panel {
    margin: 0;
}

.passage-results .bb-places-map-panel .map-section {
    margin-top: 0;
}

.passage-results .map-heading--passage-inline {
    font-size: 0.98rem;
}

.passage-results .bb-verse-study-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem 0.45rem;
    margin: 0.12rem 0 0.22rem;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--light-text);
}

.passage-results .bb-verse-study-quick__label {
    font-weight: 600;
    color: var(--light-text);
}

.passage-results .bb-verse-study-quick__btn {
    margin: 0;
    padding: 0.22rem 0.5rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    background: #fff;
    color: var(--primary-color, #2563eb);
    cursor: pointer;
    min-height: 36px;
    box-sizing: border-box;
}

.passage-results .bb-verse-study-quick__btn:hover {
    border-color: var(--primary-color, #2563eb);
}

.passage-results .bb-verse-study-quick__btn:focus-visible {
    outline: 2px solid var(--primary-color, #2563eb);
    outline-offset: 2px;
}

/* Original-language readiness (verse selected): one line between verse-gated bridge and jump nav. */
.passage-results .passage-ol-readiness-status {
    max-width: var(--reading-max, 52rem);
    margin: 0.05rem auto 0.28rem;
    padding: 0 0.12rem;
    font-size: 0.78rem;
    line-height: 1.42;
    color: var(--light-text);
}
.passage-results .passage-ol-readiness-status[data-ol-readiness-state='loading'],
.passage-results .passage-ol-readiness-status[data-ol-readiness-state='idle_open'] {
    font-style: italic;
}

/* Passage results: compact “On this page” jump nav (after translation + verse nav; scripture-first). */
.passage-page-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    margin: 0.38rem auto 0.42rem;
    padding: 0.36rem 0.48rem;
    max-width: var(--reading-max, 52rem);
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.92);
    font-size: 0.78rem;
    line-height: 1.38;
    color: var(--light-text);
}
.passage-page-jump__label {
    font-weight: 600;
    color: var(--light-text);
    margin-right: 0.1rem;
    white-space: nowrap;
}
.passage-page-jump a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.passage-page-jump a:hover {
    text-decoration: underline;
}
.passage-page-jump a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

.passage-page-jump.passage-page-jump--empty {
    display: none !important;
}

.passage-page-jump--compact {
    margin-top: 0.28rem;
    margin-bottom: 0.32rem;
    padding: 0.28rem 0.38rem;
    font-size: 0.74rem;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(248, 250, 252, 0.78);
}

/* Anchor targets (jump-nav only): clear sticky navbar (~3.5–4.5rem) */
.passage-results #passageSurroundingVersesRegion,
.passage-results #passageTimelineSection,
.passage-results #placesPanelHeading,
.passage-results #mapSectionWrap,
.bb-reader-unified-crossrefs #crossRefsPanelHeading,
.passage-results #passageSourceTokensHeading {
    scroll-margin-top: 5.25rem;
}

.esv-attribution {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--light-text);
    max-width: var(--reading-max);
}
.esv-attribution a {
    color: var(--primary-color);
}
.licenses-inline-link {
    font-size: 0.8125rem;
    margin: 0.15rem 0 0.65rem;
}
.licenses-inline-link a {
    color: var(--primary-color);
}
.licenses-page {
    padding: 1.25rem 20px 3rem;
    max-width: 42rem;
}
.licenses-page-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.licenses-page-lead {
    color: var(--light-text);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}
.licenses-section h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}
.licenses-section p {
    font-size: 0.9375rem;
    margin: 0.5rem 0;
    line-height: 1.6;
}
.licenses-section blockquote {
    margin: 0.65rem 0;
    padding: 0.65rem 0.85rem;
    border-left: 3px solid var(--border-color);
    background: var(--light-bg);
    font-size: 0.875rem;
    line-height: 1.55;
}
.licenses-section .source-ref {
    font-size: 0.8125rem;
    color: var(--light-text);
    margin-top: 2rem;
    line-height: 1.5;
}
/* Secondary / contextual note on licenses page (e.g. Guide to Permissions pointer). */
.licenses-section .licenses-secondary {
    font-size: 0.875rem;
    color: var(--light-text);
    line-height: 1.55;
    margin: 0.65rem 0 0.5rem;
}
.study-panel {
    padding: 1.05rem 1.3rem;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.translation-block {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.translation-block:last-child { margin-bottom: 0; }

/* Translation label row (WEB/KJV/ESV): shared hierarchy; body stays in .translation-text */
.translation-block-heading {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--light-text);
}
.translation-block-heading strong {
    font-size: inherit;
    font-weight: 700;
    color: var(--text-color);
}
.translation-name-display {
    font-weight: 500;
    color: var(--light-text);
}
.translation-block-dash {
    font-weight: 400;
    color: var(--light-text);
}

.translation-text {
    margin: 0.65rem 0 0;
    color: var(--text-color);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* ESV (and any future passage-API row): one continuous text blob vs per-verse VerseText rows */
.translation-block--passage-level {
    border-left: 3px solid rgba(37, 99, 235, 0.42);
    /* Align prose with WEB/KJV: border + padding-left equals default left padding */
    padding-left: calc(1.25rem - 3px);
}
.translation-passage-ref {
    margin: 0.3rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--light-text);
    line-height: 1.4;
    text-transform: none;
}
.translation-text--passage-prose {
    margin: 0.4rem 0 0;
    padding: 0;
    font-size: 1.0625rem;
    line-height: 1.75;
    max-width: 52rem;
}
.translation-text--passage-prose:not(:last-child) {
    margin-bottom: 0;
}

.verse-block {
    display: block;
    margin-top: 0.5em;
}
.passage-results .result-translations .verse-block[data-verse-ref] {
    cursor: pointer;
    transition: background-color 0.14s ease, box-shadow 0.14s ease;
}
.passage-results .result-translations .verse-block[data-verse-ref]:focus-visible:not(.verse-selected-for-note):not(.verse-note-editing-active):not(
        .bb-translate-compare-flash
    ) {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
    border-radius: 0.28rem;
}
.verse-block.verse-selected-for-note {
    border-radius: 0.25rem;
    background-color: rgba(59, 130, 246, 0.11);
    box-shadow: inset 2px 0 0 0 rgba(37, 99, 235, 0.58);
}
.passage-results .result-translations .verse-block.verse-selected-for-note {
    margin-left: -0.06rem;
    margin-right: -0.06rem;
    padding: 0.14rem 0.28rem 0.16rem 0.34rem;
    border-radius: 0.28rem;
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.88) 0%, rgba(59, 130, 246, 0.09) 48%, rgba(59, 130, 246, 0.035) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(59, 130, 246, 0.14),
        inset 3px 0 0 0 rgba(29, 78, 216, 0.78);
}
@media (prefers-reduced-motion: no-preference) {
    .passage-results .result-translations .verse-block.verse-selected-for-note {
        transition: background 0.15s ease, box-shadow 0.15s ease;
    }
}
.passage-results .result-translations .verse-block.verse-selected-for-note .verse-num {
    font-weight: 800;
    color: rgba(23, 37, 84, 0.96);
}
@media (hover: hover) {
    .passage-results .result-translations .verse-block[data-verse-ref]:hover:not(.verse-selected-for-note):not(.verse-note-editing-active):not(
            .bb-translate-compare-flash
        ) {
        background-color: rgba(148, 163, 184, 0.2);
        border-radius: 0.28rem;
    }
    .passage-results .result-translations .verse-block[data-verse-ref]:hover:not(.verse-selected-for-note):not(.verse-note-editing-active):not(
            .bb-translate-compare-flash
        )
        .verse-num {
        color: rgba(71, 85, 105, 0.95);
    }
}

/* Transient highlight when aligning the same verse across visible translations (passage compare). */
.result-translations .verse-block.bb-translate-compare-flash {
    border-radius: 0.25rem;
}
@media (prefers-reduced-motion: no-preference) {
    .result-translations .verse-block.bb-translate-compare-flash {
        animation: bb-translate-compare-verse-bg 2s ease-out forwards;
    }
}
@keyframes bb-translate-compare-verse-bg {
    0% {
        background-color: rgba(59, 130, 246, 0.2);
        box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
    }
    100% {
        background-color: rgba(59, 130, 246, 0.06);
        box-shadow: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .result-translations .verse-block.bb-translate-compare-flash {
        animation: none;
        background-color: rgba(59, 130, 246, 0.12);
        box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
    }
}
.verse-block:first-child {
    margin-top: 0;
}
.bb-red-letter-toggle-wrap {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}
.bb-red-letter-toggle-wrap[hidden] {
    display: none;
}
.bb-red-letter-toggle {
    white-space: nowrap;
}
.bb-red-letter-toggle[aria-pressed='true'] {
    color: #8f4040;
    border-color: rgba(191, 90, 90, 0.34);
    background: rgba(191, 90, 90, 0.08);
}
.verse-jesus-words {
    color: inherit;
}
html[data-bb-red-letter='on'] .verse-jesus-words {
    color: #b24c4c;
}
.verse-block + .verse-block::before {
    display: none;
}
.verse-num {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--light-text);
    margin-right: 0.15em;
}

.verse-note-indicator {
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    border-radius: 999px;
    background: var(--primary-color);
    opacity: 0.65;
    margin-left: 0.35em;
    vertical-align: middle;
    cursor: pointer;
}

.verse-note-indicator[hidden] { display: none; }

.verse-note-indicator:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.verse-note-highlight {
    background-color: rgba(37, 99, 235, 0.12);
    border-radius: 0.25rem;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* Align with .context-verse-current: verses inside the loaded same-chapter range (Batch C: quiet cue, not a banner). */
.translation-text .verse-block--active-passage {
    background-color: rgba(59, 130, 246, 0.04);
    border-radius: 0.2rem;
    box-shadow: inset 1px 0 0 0 rgba(59, 130, 246, 0.22);
}

/* Persistent while the note editor targets this verse (subtler than .verse-note-highlight click flash) */
.verse-note-editing-active {
    border-radius: 0.25rem;
    background-color: rgba(37, 99, 235, 0.05);
    box-shadow: inset 3px 0 0 0 rgba(37, 99, 235, 0.4);
}
.verse-block.verse-note-highlight.verse-note-editing-active {
    background-color: rgba(37, 99, 235, 0.14);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.35),
        inset 3px 0 0 0 rgba(37, 99, 235, 0.45);
}
.bb-trans-selection-copy-feedback {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--light-text);
    margin: 0 0 0.35rem;
    min-height: 1.2em;
}
.bb-trans-selection-copy-feedback:not([hidden]) {
    display: block;
}
.bb-trans-selection-copy-feedback.bb-trans-selection-copy-feedback--error {
    color: #b45309;
}
.bb-trans-selection-copy-btn--done {
    color: var(--primary-color);
}
.no-translations {
    color: var(--light-text);
}

/* Greek/Hebrew tray surface: verse-scoped summary + in-flow section links */
.bb-ol-context-strip {
    margin: 0 auto 0.65rem;
    padding: 0.45rem 0.55rem 0.5rem;
    max-width: var(--reading-max, 52rem);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.07), rgba(148, 163, 184, 0.05));
}
.bb-ol-context-strip__inner {
    min-width: 0;
}
.bb-ol-context-strip__line1 {
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--text-color);
}
.bb-ol-context-strip[data-ol-context-state='no-verse'] .bb-ol-context-strip__line1 {
    font-weight: 500;
    color: var(--light-text);
}
.bb-ol-context-strip__study {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--primary-color, #2563eb);
    font-weight: 600;
}
.bb-ol-context-strip__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}
.bb-ol-context-strip__nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0 0.18rem;
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.bb-ol-context-strip__nav-link:hover,
.bb-ol-context-strip__nav-link:focus-visible {
    border-bottom-color: currentColor;
    outline: none;
}
.bb-ol-context-strip__nav-sep {
    color: var(--light-text);
    font-weight: 400;
}
.bb-ol-workflow-eyebrow {
    margin: 0 0 0.4rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--light-text);
    border-left: 3px solid rgba(37, 99, 235, 0.55);
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 6px 6px 0;
}
.bb-ol-workflow-eyebrow__hint {
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--light-text);
    margin-left: 0.35rem;
    font-size: 0.68rem;
}
.bb-ol-word-study-lead {
    margin: 0 0 0.55rem;
    max-width: var(--reading-max, 52rem);
    line-height: 1.42;
}
.bb-places-mode-hint {
    margin: 0.12rem auto 0.38rem;
    max-width: var(--reading-max, 52rem);
    line-height: 1.4;
}
.bb-places-browse-status--loading {
    margin: 0.4rem 0;
    font-style: italic;
    color: var(--light-text);
}

.tokens-heading {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.tokens-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.source-tokens-corpus-banner {
    margin: 0 0 0.55rem;
    padding: 0.4rem 0.55rem 0.45rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    max-width: var(--reading-max, 52rem);
}
.source-tokens-corpus-banner__line {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}
.source-tokens-corpus-banner__sep {
    color: var(--muted-text);
    font-weight: 400;
}
.source-tokens-corpus-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-color);
}
.source-tokens-corpus-badge--greek {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(59, 130, 246, 0.1);
}
.source-tokens-corpus-badge--hebrew {
    border-color: rgba(120, 53, 15, 0.35);
    background: rgba(180, 83, 9, 0.1);
}
.source-tokens-corpus-banner__mode {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--light-text);
}
.source-tokens-strong-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--light-text);
}
.source-tokens-strong-hint--active {
    color: var(--text-color, inherit);
    font-weight: 500;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.06);
}

.source-tokens-toolbar {
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.5rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
}
.source-tokens-toolbar--has-active-filters {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.05);
}
.source-tokens-toolbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
}
.source-tokens-toolbar__control {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.source-tokens-toolbar__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.source-tokens-toolbar__select {
    min-height: 44px;
    padding: 0.35rem 0.5rem;
    font-size: 0.88rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    max-width: 100%;
}
.source-tokens-toolbar__check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.15rem 0;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-color);
}
.source-tokens-toolbar__check input {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}
.source-tokens-toolbar__reset {
    min-height: 44px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
    align-self: flex-end;
}
.source-tokens-toolbar__reset:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.source-tokens-toolbar__active {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0.4rem 0 0;
    line-height: 1.4;
}
.source-tokens-toolbar__hint {
    font-size: 0.72rem;
    color: var(--light-text);
    margin: 0.35rem 0 0;
    line-height: 1.35;
}
.source-tokens-toolbar__pronunciation-hint {
    font-size: 0.7rem;
    color: var(--light-text);
    margin: 0.3rem 0 0;
    line-height: 1.35;
    padding: 0.35rem 0.45rem;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}
.source-tokens-toolbar__status {
    font-size: 0.75rem;
    color: var(--light-text);
    margin: 0.4rem 0 0;
    line-height: 1.4;
}
.bb-ol-row-copy-feedback {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--light-text);
    margin: 0 0 0.35rem;
    min-height: 1.2em;
}
.bb-ol-row-copy-feedback:not([hidden]) {
    display: block;
}
.bb-ol-row-copy-feedback.bb-ol-row-copy-feedback--error {
    color: #b45309;
}
.token-table .bb-ol-copy-col,
.interlinear-table .bb-ol-copy-col {
    width: 2.6rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}
.token-table .bb-ol-copy-cell,
.interlinear-table .bb-ol-copy-cell {
    width: 2.6rem;
    text-align: center;
    vertical-align: middle;
    padding: 0.25rem 0.35rem;
}
.bb-ol-row-copy-btn {
    box-sizing: border-box;
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.2rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--light-text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}
.bb-ol-row-copy-btn:hover,
.bb-ol-row-copy-btn:focus-visible {
    color: var(--text-color);
    background: rgba(148, 163, 184, 0.12);
    outline: none;
}
.bb-ol-row-copy-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}
.bb-ol-row-copy-btn--copied {
    color: var(--primary-color);
}
.bb-ol-row-copy-btn__glyph {
    display: inline-block;
    transform: translateY(0.05em);
}
.bb-ol-morph-cell {
    vertical-align: top;
    min-width: 0;
    max-width: 16rem;
}
.bb-ol-morph-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem 0.32rem;
}
.bb-ol-morph-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 500;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.9);
    color: rgba(51, 65, 85, 0.95);
    max-width: 100%;
    word-break: break-word;
}
.bb-ol-morph-chip--code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    background: rgba(219, 234, 254, 0.65);
    border-color: rgba(96, 165, 250, 0.45);
}
.bb-ol-morph-cell__empty {
    color: var(--light-text);
    font-size: 0.85rem;
}

/* Original-language token tables: avoid flex overflow clipping; scroll stays inside wrap. */
.bb-ol-workflow-stack .tokens-wrap,
.bb-ol-workflow-stack .interlinear-wrap,
.word-study-pinned-host .tokens-wrap,
.word-study-pinned-host .interlinear-wrap,
.bb-reader-unified-original .tokens-wrap,
.bb-reader-unified-original .interlinear-wrap {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.token-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.token-table th,
.token-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}
.token-verse-divider-row td.token-verse-divider-cell {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(59, 130, 246, 0.06);
    border-top: 2px solid rgba(59, 130, 246, 0.25);
    border-bottom: 1px solid rgba(59, 130, 246, 0.18);
}
.token-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}
.original-language-section-tagline {
    font-size: 0.72rem;
    line-height: 1.38;
    color: var(--light-text);
    margin: 0 0 0.45rem;
    max-width: 42rem;
}
.original-language-section-tagline--source {
    margin-bottom: 0.35rem;
}
.original-language-section-tagline.bb-inline-help {
    margin-bottom: 0.32rem;
    line-height: 1.4;
}
.original-language-pair-hint {
    font-size: 0.72rem;
    line-height: 1.38;
    color: var(--light-text);
    margin: 0 0 0.4rem;
    padding: 0.3rem 0.45rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.07);
    border: 1px dashed rgba(59, 130, 246, 0.28);
    max-width: 42rem;
}
.interlinear-heading {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.interlinear-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.interlinear-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.interlinear-table th,
.interlinear-table td {
    padding: 0.35rem 0.5rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

/* Transient highlight when locating reader-selected verse(s) in OL tables (passage page). */
.token-table tr.bb-ol-locate-flash td,
.interlinear-table tr.bb-ol-locate-flash td {
    background-color: rgba(59, 130, 246, 0.12);
}
@media (prefers-reduced-motion: no-preference) {
    .token-table tr.bb-ol-locate-flash td,
    .interlinear-table tr.bb-ol-locate-flash td {
        animation: bb-ol-locate-row-bg 2s ease-out forwards;
    }
}
@keyframes bb-ol-locate-row-bg {
    0% {
        background-color: rgba(59, 130, 246, 0.22);
    }
    100% {
        background-color: rgba(59, 130, 246, 0.08);
    }
}
@media (prefers-reduced-motion: reduce) {
    .token-table tr.bb-ol-locate-flash td,
    .interlinear-table tr.bb-ol-locate-flash td {
        animation: none;
        background-color: rgba(59, 130, 246, 0.14);
        box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
    }
}

.token-verse-chip {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.02rem 0.35rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--light-text);
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.34);
    vertical-align: baseline;
}
.interlinear-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}
.token-table th abbr,
.interlinear-table th abbr {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}
.logo-link {
    text-decoration: none;
    color: inherit;
}
.logo-link:hover {
    color: var(--primary-color);
}

.strong-link { cursor: pointer; text-decoration: underline; }
.strong-link:hover { color: var(--primary-color); }
.strong-link-selected { color: var(--primary-color); font-weight: 600; }
.token-table tr.token-row--word-study-anchor td,
.interlinear-table tr.token-row--word-study-anchor td {
    background: rgba(59, 130, 246, 0.07);
}
.token-table tr.token-row--word-study-anchor td:first-child,
.interlinear-table tr.token-row--word-study-anchor td:first-child {
    box-shadow: inset 3px 0 0 var(--primary-color);
}
.token-table .strong-link--in-token-table.strong-link-selected,
.interlinear-table .strong-link--in-token-table.strong-link-selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}
.token-table .strong-link--in-token-table,
.interlinear-table .strong-link--in-token-table {
    display: inline-block;
    padding: 0.06rem 0.32rem;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}
.token-table .strong-link--in-token-table:hover,
.interlinear-table .strong-link--in-token-table:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(37, 99, 235, 0.55);
}
.token-table .strong-link--in-token-table:focus-visible,
.interlinear-table .strong-link--in-token-table:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}
.word-study-provenance {
    margin: 0 0 0.45rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--light-text);
    background: rgba(59, 130, 246, 0.06);
    border-left: 3px solid rgba(59, 130, 246, 0.42);
    border-radius: 0 4px 4px 0;
}
.word-study-provenance--loading {
    margin: 0 0 0.4rem;
    border-left-style: dashed;
}
.word-study-provenance--from-token .word-study-provenance-token-surface {
    font-weight: 600;
    font-style: italic;
}
.word-study-scope-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.2;
    border-radius: 3px;
    padding: 0.12rem 0.4rem;
    margin-right: 0.35rem;
    border: 1px solid var(--border-color);
}
.word-study-scope-label--passage {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
}
.word-study-scope-label--corpus {
    color: var(--light-text);
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.35);
}
.word-study-provenance-cue {
    display: inline;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--light-text);
}
.word-study-lexicon-block,
.word-study-stepbible,
.word-study-sample-block {
    margin-bottom: 0.45rem;
}
.word-study-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--light-text);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}
.word-study-lexicon-block .word-study-meta {
    margin-bottom: 0;
}
.word-study-stepbible {
    padding: 0.42rem 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.72));
}
.word-study-stepbible__row,
.word-study-stepbible__foot {
    margin: 0.18rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
}
.word-study-stepbible__row:first-of-type {
    margin-top: 0;
}
.word-study-stepbible__code {
    display: inline-block;
    padding: 0.05rem 0.34rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
}
.word-study-stepbible__foot {
    color: var(--light-text);
}
.word-study-stepbible__foot a {
    color: var(--primary-color, #2563eb);
}
.word-study-refs .word-study-refs-cue {
    font-size: 0.78rem;
    color: var(--light-text);
    font-weight: 500;
}
.rtl-token-cell { text-align: right; }
.word-study-result { margin-top: 0; padding: 1rem 1.25rem; background: var(--light-bg); border-radius: 8px; border: 1px solid var(--border-color); font-size: 0.9rem; }
#wordStudyResult.word-study-result--has-study {
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}
.word-study-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.35rem; gap: 0.5rem; }
.word-study-header-title-group {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    flex: 1;
    min-width: 0;
}
.word-study-header-strong {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.1rem 0.45rem;
    border: 1px solid rgba(59, 130, 246, 0.38);
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.08);
    white-space: nowrap;
}
.word-study-header-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; flex-shrink: 0; }
.word-study-clear,
.word-study-pin,
.word-study-active-collapse { font-size: 0.8rem; padding: 0.15rem 0.4rem; cursor: pointer; background: transparent; border: 1px solid var(--border-color); border-radius: 3px; }
.word-study-clear:hover,
.word-study-pin:hover,
.word-study-active-collapse:hover { background: var(--border-color); }
#wordStudyResult.word-study-result--collapsed .word-study-body { display: none !important; }

/* Compare, pin helper, pinned, active — one vertical column, shared spacing */
.word-study-controls-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.word-study-controls-stack > .word-study-compare-summary.study-panel,
.word-study-controls-stack > .note-pin-study-helper.study-panel,
.word-study-controls-stack > .word-study-pinned-wrap.study-panel {
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
}
.word-study-controls-stack > .word-study-result.study-panel {
    padding: 0.65rem 0.85rem;
}
.word-study-controls-stack .word-study-compare-summary {
    margin-bottom: 0;
    padding: 0;
    border: none;
    background: transparent;
}
.word-study-controls-stack .note-pin-study-helper {
    margin-bottom: 0;
}
.word-study-controls-stack .word-study-pinned-wrap {
    margin-bottom: 0;
}
.word-study-controls-stack .word-study-pinned-toolbar {
    margin-bottom: 0.25rem;
    gap: 0.3rem 0.5rem;
}

.word-study-compare-summary { font-size: 0.8rem; color: var(--light-text); margin-bottom: 0.35rem; line-height: 1.4; padding: 0.35rem 0.65rem; background: var(--light-bg); border-radius: 6px; border: 1px dashed var(--border-color); }
.word-study-compare-summary-intro,
.word-study-compare-summary-mid { font-weight: normal; color: var(--light-text); }
.word-study-compare-chip { font: inherit; font-size: 0.8rem; display: inline; margin: 0 0.1rem; padding: 0.15rem 0.4rem; vertical-align: baseline; cursor: pointer; color: var(--primary-color); background: var(--light-bg); border: 1px solid var(--border-color); border-radius: 3px; text-decoration: none; line-height: 1.35; }
.word-study-compare-chip:hover { background: rgba(59, 130, 246, 0.08); border-color: var(--primary-color); }
.word-study-compare-chip:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.note-pin-study-helper { margin-bottom: 0.35rem; }
.note-pin-study-helper-btn { font-size: 0.8rem; padding: 0.15rem 0.4rem; cursor: pointer; background: transparent; border: 1px solid var(--border-color); border-radius: 3px; color: var(--light-text); }
.note-pin-study-helper-btn:hover { background: var(--border-color); color: var(--text-color, inherit); }
.word-study-pinned-wrap { margin-bottom: 0.5rem; }
.word-study-pinned-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin-bottom: 0.35rem; font-size: 0.8rem; color: var(--light-text); }
.word-study-pinned-label { font-weight: 600; color: var(--light-text); letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.72rem; }
.word-study-pinned-toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.word-study-pinned-collapse,
.word-study-pinned-open-active,
.word-study-pinned-remove { font-size: 0.8rem; padding: 0.15rem 0.4rem; cursor: pointer; background: transparent; border: 1px solid var(--border-color); border-radius: 3px; color: var(--light-text); }
.word-study-pinned-collapse:hover,
.word-study-pinned-open-active:hover,
.word-study-pinned-remove:hover { background: var(--border-color); }
.word-study-pinned-wrap--collapsed .word-study-pinned-host { display: none !important; }
.word-study-pinned-host { opacity: 0.92; font-size: 0.88rem; border-style: dashed; }
.word-study-inner.word-study-inner--pinned .word-study-header strong { color: var(--light-text); }
.word-study-meta { margin-bottom: 0.35rem; line-height: 1.45; }
.word-study-meta-translit { font-weight: 500; }
.word-study-meta-translit-value { font-style: italic; font-weight: 400; }
.word-study-meta-translit-prov {
    font-size: 0.78em;
    font-weight: 500;
    color: var(--light-text);
}
.word-study-pronunciation {
    margin: 0 0 0.4rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.78rem;
    line-height: 1.4;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(248, 250, 252, 0.6);
}
.word-study-pronunciation--pending {
    color: var(--light-text);
    border-style: dashed;
    background: transparent;
}
.word-study-pronunciation--transliteration {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.05);
}
.word-study-pronunciation__label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.25rem;
}
.word-study-pronunciation__provenance {
    font-size: 0.72em;
    font-weight: 500;
    color: var(--light-text);
}
.word-study-pronunciation__value {
    font-style: italic;
}
.word-study-pronunciation__pending {
    display: block;
}
.word-study-refs { font-size: 0.9rem; margin-bottom: 0.5rem; }
/* Interpretive guardrail: visible but subordinate; sits between meta/pronunciation and sample verses.
   Intent is to keep teachers from treating the gloss as a verse-specific definition. */
.word-study-guardrail {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--light-text);
    background: var(--surface-subtle, rgba(0, 0, 0, 0.03));
    border-left: 3px solid var(--border-color);
    padding: 0.45rem 0.6rem;
    margin: 0.35rem 0 0.55rem;
    border-radius: 2px;
}
.word-study-guardrail strong { color: var(--primary-color); font-weight: 600; }
.study-breadcrumb-bar { font-size: 0.85rem; color: var(--light-text); margin-bottom: 0.35rem; line-height: 1.45; }
.study-breadcrumb-bar .study-trail-label { font-weight: 600; color: var(--primary-color); margin-right: 0.35rem; }
.study-breadcrumb-bar .study-trail-link { text-decoration: underline; cursor: pointer; color: var(--primary-color); }
.study-breadcrumb-bar .study-trail-sep { margin: 0 0.2rem; color: var(--light-text); font-weight: normal; }

.word-study-occurrences { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border-color); }
.occurrences-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.2rem;
}
.occurrences-heading-row .occurrences-heading {
    margin-bottom: 0;
}
.occurrences-heading { font-size: 0.85rem; font-weight: 600; color: var(--primary-color); margin-bottom: 0.35rem; }
.occurrences-scope-cue {
    font-size: 0.72rem;
    color: var(--light-text);
    line-height: 1.35;
    margin: 0 0 0.4rem;
    max-width: 42rem;
}
.occurrence-count-note { font-size: 0.8rem; color: var(--light-text); margin: 0 0 0.5rem; }

.occurrence-stats-summary {
  font-size: 0.8rem;
  color: var(--light-text);
  opacity: 0.92;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}
.occurrence-filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0 0 0.35rem; }
.occurrence-filter-label { font-size: 0.8rem; color: var(--light-text); white-space: nowrap; }
.occurrence-filter-label .nav-ref-input { width: 10rem; max-width: 42vw; min-width: 5.5rem; vertical-align: middle; }
.occurrence-filter-label select.occurrence-filter-morph {
    font-size: 0.85rem;
    min-width: 8rem;
    max-width: min(100%, 18rem);
    padding: 0.25rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text);
    vertical-align: middle;
}
.occurrence-explorer { font-size: 0.9rem; }
.occurrence-group { margin-bottom: 0.75rem; }
.occurrence-group:last-child { margin-bottom: 0; }
.occurrence-group-heading { font-weight: 600; color: var(--primary-color); font-size: 0.85rem; margin-bottom: 0.35rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--border-color); }
.occurrence-rows { display: flex; flex-direction: column; gap: 0; }
.occurrence-row { display: grid; grid-template-columns: 8rem 4rem 1fr 1fr; gap: 0.75rem; align-items: baseline; padding: 0.35rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
.occurrence-row:last-child { border-bottom: none; }
.occurrence-row:hover { background-color: rgba(59, 130, 246, 0.06); }
.occurrence-row.occurrence-row-current {
    background-color: rgba(59, 130, 246, 0.08);
    border-radius: 0.25rem;
}
.occurrence-ref { flex-shrink: 0; }
.occurrence-surface { font-style: italic; color: var(--text-color); }
.occurrence-lemma-cell { min-width: 0; color: var(--primary-color); }
.occurrence-lemma { color: inherit; }
.occurrence-translit {
    color: var(--light-text);
    font-size: 0.86em;
    font-weight: 400;
}
.occurrence-gloss { color: var(--light-text); }
.ref-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    border-radius: 0.2rem;
    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}
.ref-link:hover {
    text-decoration: underline;
    color: var(--primary-color-strong);
    background-color: rgba(59, 130, 246, 0.09);
}
.ref-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.08);
}
.ref-link-active { background-color: rgba(59, 130, 246, 0.2); border-radius: 0.25rem; }
.ref-link-from { font-weight: 600; }
.cross-ref-retry {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.2rem;
    cursor: pointer;
    border-radius: 0.2rem;
    padding: 0.08rem 0.12rem;
    transition: background-color 0.16s ease, color 0.16s ease;
}
.cross-ref-retry:hover {
    text-decoration: underline;
    color: var(--primary-color-strong);
    background-color: rgba(59, 130, 246, 0.09);
}
.cross-ref-retry:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Cross-reference preview popup (above unified verse-tools overlay ~10072) */
.ref-preview {
    position: fixed;
    z-index: 10100;
    max-width: 320px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}
.ref-preview.ref-preview--touch {
    max-width: none;
}
.ref-preview-title { font-weight: 600; color: var(--primary-color); margin-bottom: 0.25rem; }
.ref-preview-text { color: var(--text-color); }
.ref-preview-touch-hint {
    margin: 0.4rem 0 0;
    padding-top: 0.38rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--light-text);
    border-top: 1px solid var(--bb-disclosure-border);
}
.ref-preview-actions {
    margin: 0.45rem 0 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--bb-disclosure-border);
}
.ref-preview-dismiss {
    margin: 0;
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color, #fff);
    color: var(--primary-color, #2563eb);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ref-preview-dismiss:hover {
    background: var(--light-bg);
    border-color: var(--secondary-color);
}
.ref-preview-dismiss:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.section-icon { margin-right: 0.35rem; font-size: 0.95em; opacity: 0.85; }
.section-heading-with-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-heading-with-toggle .section-icon {
    flex: 0 0 auto;
}
.section-collapsed-hint {
    margin-left: 0.2rem;
    font-size: 0.7rem;
    line-height: 1.25;
    color: var(--light-text);
    font-weight: 400;
    opacity: 0.86;
}
.section-collapse-toggle {
    margin-left: auto;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-color);
    border-radius: 999px;
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 600;
    padding: 0.14rem 0.58rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.section-collapse-toggle:hover {
    border-color: rgba(100, 116, 139, 0.55);
    background: rgba(148, 163, 184, 0.16);
}
.section-collapse-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.section-heading-collapsed {
    color: var(--light-text);
}
.section-heading-collapsed .section-icon {
    opacity: 0.65;
}
.reader-collapsible-body.reader-collapsed {
    display: none !important;
}
@media (max-width: 640px) {
    .section-heading-with-toggle {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }
    .section-collapsed-hint {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
}
.loading-placeholder {
    color: var(--light-text);
    font-style: italic;
    line-height: 1.5;
}
.empty-placeholder {
    color: var(--light-text);
    line-height: 1.5;
}
p.loading-placeholder,
p.empty-placeholder {
    margin: 0.12em 0;
}

/* Collapsed secondary sections (reading context, cross-refs): loading/empty/error read as deliberate panel states */
.context-list.study-panel:not(:has(.context-verse)),
.cross-ref-list.study-panel:not(:has(.cross-ref-items)) {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}
.context-list.study-panel:not(:has(.context-verse)) > p,
.cross-ref-list.study-panel:not(:has(.cross-ref-items)) > p {
    margin: 0;
}
.context-list.study-panel:not(:has(.context-verse)) > p.loading-placeholder,
.context-list.study-panel:not(:has(.context-verse)) > p.empty-placeholder,
.cross-ref-list.study-panel:not(:has(.cross-ref-items)) > p.loading-placeholder,
.cross-ref-list.study-panel:not(:has(.cross-ref-items)) > p.empty-placeholder {
    display: block;
    padding: 0.62rem 0.82rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: var(--light-bg);
    box-sizing: border-box;
    width: 100%;
}
.context-list.study-panel:not(:has(.context-verse)) > p.loading-placeholder,
.cross-ref-list.study-panel:not(:has(.cross-ref-items)) > p.loading-placeholder {
    font-style: italic;
    color: var(--light-text);
}
.context-retry {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.15rem;
}
.context-retry:hover {
    text-decoration: underline;
}

.token-table td.token-table-status-cell,
.interlinear-table td.token-table-status-cell {
    padding: 0.65rem 0.75rem !important;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: var(--light-bg);
    font-size: 0.9rem;
    line-height: 1.45;
    vertical-align: middle;
}
.token-table td.token-table-status-cell.loading-placeholder,
.interlinear-table td.token-table-status-cell.loading-placeholder {
    font-style: italic;
    color: var(--light-text);
}
.cross-ref-heading { font-size: 1rem; margin: 0; font-weight: 600; color: var(--text-color); }
.bb-reader-unified-crossrefs .cross-ref-list.study-panel {
    border-color: rgba(217, 119, 6, 0.28);
    box-shadow: 0 1px 0 rgba(217, 119, 6, 0.06);
}
.bb-cross-surface__chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.75rem;
    margin: 0;
}
#bbReaderUnifiedOverlayViewEaston:not([hidden]) #passageEastonSearchForm.bb-cross-surface__chrome,
#bbReaderUnifiedOverlayViewTopics:not([hidden]) #passageTopicsSearchForm.bb-cross-surface__chrome,
#bbReaderUnifiedOverlayViewEncyclopedia:not([hidden]) #passageEncyclopediaSearchForm.bb-cross-surface__chrome {
    justify-content: flex-start;
    gap: 0.45rem 0.55rem;
    margin: 0.2rem 0 0.55rem;
    padding: 0.5rem 0.58rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.92);
}
#bbReaderUnifiedOverlayViewEaston:not([hidden]) #passageEastonSearchInput,
#bbReaderUnifiedOverlayViewTopics:not([hidden]) #passageTopicsSearchInput,
#bbReaderUnifiedOverlayViewEncyclopedia:not([hidden]) #passageEncyclopediaSearchInput {
    min-width: min(20rem, 100%);
    background: rgba(255, 255, 255, 0.96);
}
#bbReaderUnifiedOverlayViewEaston:not([hidden]) #passageEastonSearchClear,
#bbReaderUnifiedOverlayViewTopics:not([hidden]) #passageTopicsSearchClear,
#bbReaderUnifiedOverlayViewEncyclopedia:not([hidden]) #passageEncyclopediaSearchClear {
    min-width: 4.5rem;
}
.bb-dictionary-source-switch {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
        margin: 0.18rem 0 0.42rem;
}
.bb-dictionary-source-switch__btn[aria-pressed='true'],
.bb-dictionary-source-switch__btn--active {
        background: rgba(30, 64, 175, 0.1);
        border-color: rgba(59, 130, 246, 0.45);
        color: #1e3a8a;
}

.bb-dictionary-source-switch__btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 0.04rem;
    text-align: center;
}

.bb-dictionary-source-switch__label,
.bb-dictionary-source-switch__availability {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bb-dictionary-source-switch__availability {
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.6rem;
    font-weight: 650;
    line-height: 1;
    text-transform: uppercase;
}

.bb-dictionary-source-switch__btn--unavailable,
.bb-dictionary-source-switch__btn--unavailable[aria-disabled='true'] {
    border-style: dashed;
    color: var(--bbp-text-muted, #64748b);
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 72%, transparent);
}

.bb-dictionary-source-switch__btn--gated,
.bb-dictionary-source-switch__btn--gated:disabled {
    color: #64748b;
    border-style: dashed;
    background: rgba(248, 250, 252, 0.92);
    cursor: not-allowed;
    opacity: 0.86;
}

.bb-dictionary-source-switch__gate {
    display: inline-flex;
    margin-left: 0.22rem;
    padding: 0.02rem 0.28rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.bb-wb-lookup-mode .bb-dictionary-source-switch__btn {
    min-height: 2.2rem;
    border-color: rgba(203, 213, 225, 0.95);
}

.bb-wb-lookup-mode .bb-dictionary-source-switch__btn[aria-pressed='true'],
.bb-wb-lookup-mode .bb-dictionary-source-switch__btn--active {
    background: var(--bg-color);
    border-color: var(--light-text);
    box-shadow:
        var(--bb-shadow-panel),
        0 1px 0 var(--bb-color-state-selected);
    color: var(--primary-color);
    font-weight: 700;
}
.bb-reference-entry-card {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}
.bb-reference-entry-card + .bb-reference-entry-card {
    margin-top: 0.9rem;
}
/* -----------------------------------------------------------------------------
   Topics layout tokens (frozen)
   Do not tweak without visual review + screenshot test.
----------------------------------------------------------------------------- */
.bb-reference-entry-card--topics,
.bb-wb-card--topics {
    --bb-topics-rhythm-1: 0.2rem;
    --bb-topics-rhythm-2: 0.4rem;
    --bb-topics-rhythm-3: 0.6rem;
    --bb-topics-rhythm-4: 0.8rem;
}
.bb-reference-entry-card--topics {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__body {
    gap: var(--bb-topics-rhythm-3);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__header {
    gap: var(--bb-topics-rhythm-3);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__meta-pills {
    margin-top: var(--bb-topics-rhythm-2);
    gap: var(--bb-topics-rhythm-2);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__section {
    gap: var(--bb-topics-rhythm-2);
}
.bb-reference-entry-card--topics .place-profile-label {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: rgba(100, 116, 139, 0.98);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__refs {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    align-content: flex-start;
    gap: var(--bb-topics-rhythm-2) 0.45rem;
    margin-top: var(--bb-topics-rhythm-1);
}
/* Scripture references: subtle rule + padding (body gap already separates from content above) */
.bb-reference-entry-card--topics .bb-reference-entry-card__section:has(a.topics-ref-link) {
    margin-top: 0;
    padding-top: var(--bb-topics-rhythm-3);
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 55%, transparent);
}
/* Split buckets (entry_structured): softer break between in-text vs catalog lists */
.bb-reference-entry-card--topics .bb-topics-refs-buckets .bb-reference-entry-card__section + .bb-reference-entry-card__section {
    margin-top: 0.35rem;
    padding-top: var(--bb-topics-rhythm-2);
    border-top: 1px dashed color-mix(in srgb, var(--bb-card-border, #e2e8f0) 48%, transparent);
}
.bb-wb-card__ref-buckets .bb-wb-card__refs-wrap + .bb-wb-card__refs-wrap {
    margin-top: 0.4rem;
}
/* Single Summary or Outline only: stronger break before refs (scanability; pairs with data-bb-topics-body-sections) */
.bb-reference-entry-card--topics[data-bb-topics-body-sections='1']
    .bb-reference-entry-card__section:has(a.topics-ref-link) {
    padding-top: calc(var(--bb-topics-rhythm-3) + 2px);
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 72%, transparent);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__refs a.bb-reference-entry-card__ref-link {
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 0.22rem 0.47rem;
    cursor: pointer;
    text-decoration: none;
    color: rgba(30, 64, 175, 0.97);
    background: color-mix(in srgb, rgba(191, 219, 254, 0.55) 78%, #fff 22%);
    border: 1px solid color-mix(in srgb, rgba(59, 130, 246, 0.42) 55%, rgba(191, 219, 254, 0.95) 45%);
    border-radius: 999px;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}
.bb-reference-entry-card--topics .bb-reference-entry-card__refs a.bb-reference-entry-card__ref-link:hover,
.bb-reference-entry-card--topics .bb-reference-entry-card__refs a.bb-reference-entry-card__ref-link:focus-visible {
    color: rgba(23, 37, 84, 1);
    background: color-mix(in srgb, rgba(191, 219, 254, 0.98) 72%, #fff 28%);
    border-color: color-mix(in srgb, rgba(37, 99, 235, 0.72) 50%, rgba(59, 130, 246, 0.55) 50%);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
    box-shadow: 0 0 0 1px color-mix(in srgb, rgba(37, 99, 235, 0.22) 100%, transparent);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__refs a.bb-reference-entry-card__ref-link:focus-visible {
    outline: 2px solid color-mix(in srgb, rgba(59, 130, 246, 0.65) 100%, transparent);
    outline-offset: 2px;
}
.bb-reference-entry-card--topics .bb-ref-prose--topics .bb-ref-prose__refs {
    margin: var(--bb-topics-rhythm-2) 0 var(--bb-topics-rhythm-3);
    gap: var(--bb-topics-rhythm-2) 0.42rem;
}
.bb-reference-entry-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip {
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, rgba(148, 163, 184, 0.45) 100%, transparent);
    padding: 0.12rem 0.38rem;
    border-radius: 0.35rem;
    color: rgba(30, 64, 175, 0.96);
    background: color-mix(in srgb, rgba(241, 245, 249, 0.95) 78%, rgba(224, 231, 255, 0.4) 22%);
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}
.bb-reference-entry-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:hover,
.bb-reference-entry-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:focus-visible {
    color: rgba(23, 37, 84, 1);
    background: color-mix(in srgb, rgba(219, 234, 254, 0.98) 80%, #fff 20%);
    border-color: color-mix(in srgb, rgba(59, 130, 246, 0.6) 55%, rgba(99, 102, 241, 0.3) 45%);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    box-shadow: 0 0 0 1px color-mix(in srgb, rgba(37, 99, 235, 0.2) 100%, transparent);
}
.bb-reference-entry-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:focus-visible {
    outline: 2px solid color-mix(in srgb, rgba(59, 130, 246, 0.6) 100%, transparent);
    outline-offset: 2px;
}
.bb-reference-entry-card--topics .bb-reference-entry-card__copy--topics-summary .bb-ref-prose {
    font-size: 0.95rem;
    line-height: 1.6;
}
.bb-reference-entry-card--topics .bb-reference-entry-card__copy--topics-outline .bb-ref-prose {
    font-size: 0.9rem;
    line-height: 1.48;
}
.bb-reference-entry-card--topics .bb-reference-entry-card__copy--topics-outline .bb-ref-prose__list {
    margin: var(--bb-topics-rhythm-2) 0 var(--bb-topics-rhythm-3);
    padding-left: var(--bb-topics-rhythm-1);
}
.bb-reference-entry-card--topics .bb-reference-entry-card__copy--topics-outline .bb-ref-prose__item {
    margin: var(--bb-topics-rhythm-1) 0;
}
.bb-reference-entry-card--topics .bb-reference-entry-card__copy--topics-outline .bb-ref-prose__marker {
    color: rgba(100, 116, 139, 0.92);
}
.bb-reference-entry-card--topics
    .bb-reference-entry-card__copy--topics-summary
    .bb-ref-prose__paragraph,
.bb-reference-entry-card--topics
    .bb-reference-entry-card__copy--topics-outline
    .bb-ref-prose__paragraph {
    margin: 0 0 var(--bb-topics-rhythm-3);
}
.bb-reference-entry-card--topics
    .bb-reference-entry-card__copy--topics-summary
    .bb-ref-prose__paragraph:last-child,
.bb-reference-entry-card--topics
    .bb-reference-entry-card__copy--topics-outline
    .bb-ref-prose__paragraph:last-child {
    margin-bottom: 0;
}
.bb-reference-entry-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.78rem;
}
.bb-result-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.28rem;
    margin: 0 0 0.28rem;
    width: 100%;
    box-sizing: border-box;
}

.bb-result-badge {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.03em;
    color: color-mix(in srgb, var(--text-muted, #64748b) 90%, var(--text-color, #0f172a) 10%);
    background: color-mix(in srgb, var(--text-muted, #64748b) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 70%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-result-badge--source-info {
    min-height: 1.38rem;
    padding: 0.12rem;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-result-badge--source-info .bb-wb-source-info {
    width: 1rem;
    height: 1rem;
    font-size: 0.68rem;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-sources {
    display: inline-grid;
    max-width: 100%;
    margin: 0.46rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-sources > .bb-disclosure__summary {
    gap: 0.28rem;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 1.9rem;
    padding: 0.12rem 0.54rem 0.12rem 0.24rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 999px;
    background: var(--bbp-control-bg, #f8fafc);
    color: var(--bbp-accent, #2563eb);
    font-size: 0.76rem;
    font-weight: 720;
    line-height: 1.1;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-sources > .bb-disclosure__panel {
    margin-top: 0.36rem;
    padding: 0.48rem 0.56rem;
    border: 1px solid var(--bbp-border-subtle, #e2e8f0);
    border-radius: 8px;
    background: var(--bbp-panel-bg, #ffffff);
}

.bb-wb-dictionary-aggregate {
    display: grid;
    gap: 0.5rem;
}

.bb-wb-dictionary-source-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
}

.bb-wb-dictionary-source-preview {
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
    min-width: 0;
    padding: 0.54rem 0.6rem;
    border: 1px solid rgba(203, 213, 225, 0.88);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.74);
}

.bb-wb-dictionary-source-preview--unavailable {
    border-style: dashed;
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 72%, transparent);
    color: var(--bbp-text-muted, #64748b);
}

.bb-wb-dictionary-source-preview__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.bb-wb-dictionary-source-preview__status {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.22rem 0.48rem;
    border: 1px dashed color-mix(in srgb, var(--bbp-border, #cbd5e1) 84%, transparent);
    border-radius: 999px;
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.bb-wb-dictionary-source-preview__title {
    margin: 0;
    color: var(--primary-color);
    font-size: 0.82rem;
    line-height: 1.2;
}

.bb-wb-dictionary-source-preview__meta {
    margin: 0;
    color: var(--light-text);
    font-size: 0.74rem;
}

.bb-wb-dictionary-source-preview__body {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.84rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
}

.bb-wb-dictionary-source-preview__body p:last-child {
    margin-bottom: 0;
}

.bb-wb-dictionary-gated {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    color: var(--light-text);
    font-size: 0.76rem;
}

.bb-wb-dictionary-gated__pill {
    display: inline-flex;
    max-width: 100%;
    padding: 0.18rem 0.46rem;
    border: 1px dashed rgba(100, 116, 139, 0.45);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.86);
    color: #475569;
    overflow-wrap: anywhere;
}

.bb-wb-dictionary-gated__note {
    min-width: min(18rem, 100%);
    overflow-wrap: anywhere;
}

body[data-bb-page="workbench"] .bb-wb-card--dictionary .bb-wb-card__body {
    display: grid;
    gap: 0.34rem;
}

body[data-bb-page="workbench"] .bb-wb-card--dictionary .bb-ref-prose--dictionary {
    min-width: 0;
}

body[data-bb-page="workbench"] .bb-wb-card--dictionary .bb-ref-prose--dictionary .bb-ref-prose__paragraph:last-child {
    margin-bottom: 0;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-assets,
body[data-bb-page="workbench"] .bb-wb-dictionary-chart-previews,
body[data-bb-page="workbench"] .bb-wb-dictionary-visuals {
    display: grid;
    gap: 0.22rem;
    width: min(100%, 42rem);
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-assets {
    justify-items: center;
    margin-inline: auto;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-assets > .bb-wb-card__meta-line,
body[data-bb-page="workbench"] .bb-wb-dictionary-chart-previews > .bb-wb-card__meta-line,
body[data-bb-page="workbench"] .bb-wb-dictionary-visuals > .bb-wb-card__meta-line {
    margin: 0;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card,
body[data-bb-page="workbench"] .bb-wb-dictionary-chart-card {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.42rem;
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 8px;
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 72%, #fff 28%);
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card {
    width: min(100%, 34rem);
    justify-self: center;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card--expanded {
    width: min(100%, 54rem);
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card .bb-wb-card__title,
body[data-bb-page="workbench"] .bb-wb-dictionary-chart-card .bb-wb-card__title {
    margin: 0;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-preview {
    display: block;
    width: 100%;
    aspect-ratio: 640 / 430;
    max-height: 18rem;
    margin: 0;
    object-fit: contain;
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 8px;
    background: var(--surface-subtle, #f8fafc);
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card--expanded .bb-wb-dictionary-map-preview {
    max-height: 70vh;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-preview[hidden] {
    display: none !important;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-preview-fallback {
    display: none;
    margin: 0;
    padding: 0.38rem 0.5rem;
    color: var(--light-text, #64748b);
    border: 1px dashed var(--bb-card-border, #e2e8f0);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-subtle, #f8fafc) 82%, #fff 18%);
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-card--preview-missing .bb-wb-dictionary-map-preview-fallback {
    display: block;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-link {
    justify-self: start;
    width: auto;
    min-width: 7rem;
}

body[data-bb-page="workbench"] .bb-wb-dictionary-map-link-status {
    margin: 0;
    color: var(--light-text, #64748b);
    font-size: 0.78rem;
}

.bb-reference-entry-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.bb-reference-entry-card__title-wrap {
    min-width: 0;
    flex: 1 1 auto;
}
.bb-reference-entry-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text-color);
}
.bb-reference-entry-card__send {
    flex: 0 0 auto;
    white-space: nowrap;
}
.bb-reference-entry-card__meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.bb-reference-entry-card__meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.7);
    color: rgba(51, 65, 85, 0.92);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
}
.bb-reference-entry-card__section {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}
.bb-reference-entry-card__copy {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.62;
}
.bb-reference-entry-card__copy--muted {
    color: rgba(71, 85, 105, 0.96);
}
/* Shared structured prose: Dictionary / Topics / Encyclopedia (js/reference-formatting.js) */
.bb-ref-prose {
    font-size: 0.95rem;
    line-height: 1.55;
    min-width: 0;
}
.bb-ref-prose__paragraph {
    margin: 0 0 0.4em;
}
.bb-ref-prose__paragraph:last-child {
    margin-bottom: 0;
}
.bb-ref-prose__heading {
    margin: 0.45em 0 0.2em;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--light-text, #64748b);
}
.bb-ref-prose__list {
    list-style: none;
    margin: 0.2em 0 0.4em;
    padding: 0 0 0 0.12em;
}
.bb-ref-prose__item {
    display: flex;
    gap: 0.4em;
    align-items: flex-start;
    margin: 0.2em 0;
}
.bb-ref-prose__marker {
    flex: 0 0 auto;
    font-weight: 600;
    color: rgba(51, 65, 85, 0.88);
    min-width: 1.5em;
    text-align: right;
}
.bb-ref-prose__text {
    flex: 1 1 auto;
    min-width: 0;
}
.bb-ref-prose--dictionary .bb-ref-prose__item,
.bb-ref-prose--encyclopedia .bb-ref-prose__item {
    display: block;
}
.bb-ref-prose--dictionary .bb-ref-prose__marker,
.bb-ref-prose--encyclopedia .bb-ref-prose__marker {
    display: inline;
    min-width: 0;
    margin-right: 0.28em;
    text-align: left;
}
.bb-ref-prose--dictionary .bb-ref-prose__text,
.bb-ref-prose--encyclopedia .bb-ref-prose__text {
    display: inline;
}
.bb-ref-prose__refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.45rem;
    margin: 0.1em 0 0.3em;
}
.bb-ref-prose__refs-inline {
    margin: 0.28em 0 0.22em;
    line-height: 1.55;
}
.bb-ref-prose__refs-inline .bb-ref-prose__inline-ref-sep {
    user-select: none;
}
.bb-ref-prose__ref-chip {
    display: inline-block;
    padding: 0.1rem 0.33rem;
    border-radius: 0.3rem;
    background: rgba(241, 245, 249, 0.92);
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(51, 65, 85, 0.92);
}
.bb-ref-prose__ref-chip {
    text-decoration: none;
}
.bb-ref-prose__ref-chip:hover,
.bb-ref-prose__ref-chip:focus-visible {
    background: rgba(219, 234, 254, 0.98);
    border-color: rgba(96, 165, 250, 0.55);
    text-decoration: none;
}
.bb-ref-prose__inline-ref {
    color: rgba(29, 78, 216, 0.96);
    font-weight: 500;
    text-decoration: none;
}
.bb-ref-prose__inline-ref:hover,
.bb-ref-prose__inline-ref:focus-visible {
    color: rgba(30, 64, 175, 1);
    text-decoration: underline;
}
.bb-ref-prose__inline-ref-sep {
    color: rgba(100, 116, 139, 0.92);
}
.bb-reference-entry-card__copy--muted .bb-ref-prose,
.bb-reference-entry-card__copy--muted .bb-ref-prose__text,
.bb-reference-entry-card__copy--muted .bb-ref-prose__paragraph {
    color: rgba(71, 85, 105, 0.96);
}
.bb-reference-entry-card__copy--muted .bb-ref-prose__marker {
    color: rgba(100, 116, 139, 0.95);
}
.bb-wb-card__body > .bb-ref-prose--dictionary:first-child,
.bb-wb-card__body > .bb-ref-prose--encyclopedia:first-child {
    margin-top: 0.08rem;
}
.bb-wb-card--topics .bb-wb-card__body > .bb-ref-prose--topics:first-child {
    margin-top: var(--bb-topics-rhythm-1);
}
.bb-wb-card__body .bb-ref-prose a.ref-link {
    text-underline-offset: 0.14em;
    word-break: break-word;
}
.bb-study-gather-queue__preview--structured .bb-ref-prose,
.bb-study-draft-gathered__preview--structured .bb-ref-prose {
    font-size: 0.88rem;
    line-height: 1.42;
    max-height: 6.8em;
    overflow: hidden;
}
.bb-study-draft-gathered__preview--structured {
    margin: 0.2rem 0 0;
}
.bb-study-gather-queue__preview--structured {
    margin: 0.36rem 0 0;
    color: #64748b;
}
p.bb-study-gather-queue__preview {
    white-space: pre-line;
    line-height: 1.42;
    font-size: 0.86em;
}
.bb-reference-entry-card__refs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}
.bb-reference-entry-card__ref-link,
.bb-reference-entry-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.49rem;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1.2;
}
.bb-reference-entry-card__ref-link {
    text-decoration: none;
    background: rgba(219, 234, 254, 0.75);
    border: 1px solid rgba(96, 165, 250, 0.45);
}
.bb-reference-entry-card__ref-link:hover,
.bb-reference-entry-card__ref-link:focus-visible {
    background: rgba(191, 219, 254, 0.95);
    text-decoration: none;
}
.bb-reference-entry-card__tag {
    background: rgba(241, 245, 249, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.78);
    color: rgba(51, 65, 85, 0.94);
}
.bb-reference-entry-card__refs-more {
    font-size: 0.78rem;
    color: var(--light-text);
}
.bb-reference-entry-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(226, 232, 240, 0.82);
    color: var(--light-text);
    font-size: 0.78rem;
    line-height: 1.45;
}
.bb-reference-entry-card__footer-item a {
    font-weight: 600;
}
@media (max-width: 640px) {
    .bb-reference-entry-card__header {
        flex-direction: column;
    }
    .bb-reference-entry-card__send {
        width: 100%;
    }
}
.bb-cross-surface__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}
.bb-cross-surface__nav-link {
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.bb-cross-surface__nav-link:hover,
.bb-cross-surface__nav-link:focus-visible {
    border-bottom-color: currentColor;
    outline: none;
}
.bb-cross-surface__nav-sep {
    color: var(--light-text);
    font-weight: 400;
}
.bb-cross-context-strip {
    margin: 0 0 0.5rem;
    padding: 0.38rem 0.5rem 0.44rem;
    border-radius: 8px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(148, 163, 184, 0.06));
}
/* Unified References sheet: tighter context strip so cross-ref rows sit closer to metadata (Workbench-like density). */
#bbReaderUnifiedOverlayReferencesBodyMount .bb-cross-context-strip {
    margin: 0 0 0.26rem;
    padding: 0.22rem 0.42rem 0.26rem;
}
.bb-cross-context-strip__meta {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.42;
    color: var(--light-text);
    word-break: break-word;
}
.cross-ref-trust-legend {
    margin: 0 0 0.22rem;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--light-text);
}
.cross-ref-filter-wrap { margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cross-ref-filter-wrap[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.cross-ref-trust-legend[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
.cross-ref-filter-label { font-size: 0.85rem; color: var(--light-text); }
.cross-ref-filter-chips { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.cross-ref-filter-chip { font-size: 0.8rem; padding: 0.2rem 0.5rem; border: 1px solid var(--border-color); border-radius: 0.25rem; background: transparent; color: var(--light-text); cursor: pointer; }
.cross-ref-filter-chip:hover { border-color: var(--secondary-color); color: var(--secondary-color); }
.cross-ref-filter-chip:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.cross-ref-filter-chip-active { border-color: var(--secondary-color); color: var(--secondary-color); background: var(--light-bg); }
.cross-ref-verse-focus-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    margin: 0 0 0.45rem;
}
.cross-ref-verse-focus-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.35;
}
.cross-ref-type-label { font-size: 0.72rem; color: var(--light-text); margin-right: 0.18rem; }
.cross-ref-list { margin-bottom: 0; font-size: 0.95rem; }
/* Passage cross-refs: Workbench-aligned list wrap; block flow (no spare flex height in overlay). */
#crossRefsList.cross-ref-list.study-panel:has(.bb-wb-xref-list-wrap) {
    display: block;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    align-items: unset;
    align-content: unset;
    justify-content: unset;
    min-height: 0;
}
#crossRefsList .bb-wb-xref-list-wrap {
    flex: 0 0 auto;
    flex-grow: 0;
    min-height: 0;
}
body.bb-verse-study-overlay-open
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    #crossRefsList.cross-ref-list.study-panel {
    display: block;
    flex: 0 0 auto;
    flex-grow: 0;
    min-height: 0;
    margin-top: 0.05rem;
    padding: 0.28rem 0.12rem 0.18rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    justify-content: flex-start;
    align-content: flex-start;
}
.cross-ref-grouped {
    display: block;
    margin: 0;
}
body.bb-verse-study-overlay-open
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    #crossRefsList
    .bb-wb-xref-list-wrap {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    justify-content: flex-start;
    align-content: flex-start;
}
.cross-ref-group {
    margin: 0;
}
.cross-ref-group + .cross-ref-group {
    margin-top: 0.12rem;
}
body.bb-verse-study-overlay-open
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .cross-ref-group {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    justify-content: flex-start;
    align-content: flex-start;
}
.cross-ref-group__head {
    margin: 0 0 0.06rem;
}
.cross-ref-group__label.place-profile-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    line-height: 1.25;
}
.cross-ref-group__count {
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--light-text);
    margin-left: 0.2rem;
}
.cross-ref-group__count-sep {
    margin-right: 0.12rem;
    font-weight: 400;
    opacity: 0.75;
}
/* Theme / keyword buckets stay visually quieter than parallels and quotations. */
.cross-ref-grouped .cross-ref-group--deemphasize {
    opacity: 0.94;
}
.cross-ref-grouped .cross-ref-group--deemphasize .cross-ref-group__head {
    margin-bottom: 0.04rem;
}
.cross-ref-grouped .cross-ref-group--deemphasize .cross-ref-group__label {
    color: color-mix(in srgb, var(--text-color) 55%, var(--light-text));
}
.cross-ref-item.cross-ref-item--weak .cross-ref-chip-hint {
    font-size: 0.66rem;
    opacity: 0.88;
}
.cross-ref-item.cross-ref-item--weak .ref-link {
    font-weight: 500;
    font-size: 0.92rem;
    color: color-mix(in srgb, var(--text-color) 72%, var(--light-text));
}
.cross-ref-item.cross-ref-item--strong .ref-link {
    font-weight: 700;
}
.cross-ref-group .cross-ref-group__list {
    margin-top: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.16rem 0;
}
.cross-ref-chip-hint {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--light-text);
    margin-left: 0.28rem;
    white-space: nowrap;
}
.cross-ref-group-more {
    margin: 0.16rem 0 0 0.05rem;
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 0.14rem 0.38rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--primary-color);
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.cross-ref-group-more:hover {
    background: var(--light-bg);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--primary-color-strong, var(--primary-color));
}
.cross-ref-group-more:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.cross-ref-items { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.42rem; }
.cross-ref-items li { margin-bottom: 0; display: flex; align-items: baseline; }
.cross-ref-items li.cross-ref-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.35rem;
    max-width: min(36rem, 100%);
}
.cross-ref-line-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.22rem;
}
.cross-ref-line-main--scripture-first {
    flex-wrap: nowrap;
    align-items: baseline;
    width: 100%;
    gap: 0.35rem;
}
.cross-ref-line-main--scripture-first > a.ref-link {
    flex: 1 1 auto;
    min-width: 0;
}
.cross-ref-row-tail {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    flex: 0 1 auto;
    justify-content: flex-end;
}
.cross-ref-line-main a.ref-link {
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.28;
}
.cross-ref-trust-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.05rem;
    vertical-align: 0.12em;
    flex-shrink: 0;
}
.cross-ref-trust-dot--high { background: var(--secondary-color); opacity: 0.55; }
.cross-ref-trust-dot--medium { background: var(--light-text); opacity: 0.45; }
.cross-ref-trust-dot--low { background: var(--border-color); opacity: 0.85; }
.cross-ref-why {
    font-size: 0.72rem;
    line-height: 1.32;
    font-weight: 400;
    color: var(--light-text);
    /* Slightly closer to body text than `--light-text` alone; falls back to line above if unsupported */
    color: color-mix(in srgb, var(--text-color) 18%, var(--light-text));
    padding-left: 0.38rem;
    margin-top: 0.02rem;
    border-left: 1px solid rgba(148, 163, 184, 0.45);
    max-width: 100%;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.show-more-refs {
    margin-top: 0.32rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.show-more-refs:hover {
    background: var(--light-bg);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--primary-color-strong);
}
.show-more-refs:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.bb-ai-study-context-strip {
    margin: 0 0 0.42rem;
    padding: 0.36rem 0.48rem 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.055), rgba(148, 163, 184, 0.05));
}
.bb-ai-study-context-strip[hidden],
.bb-ai-study-context-strip:empty {
    display: none;
}
.bb-ai-study-context-strip__ref {
    margin: 0 0 0.22rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.35;
    word-break: break-word;
}
.bb-ai-study-context-strip__meta {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--light-text);
    word-break: break-word;
}
.bb-ai-study-context-strip__focus {
    margin: 0 0 0.14rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 1.28;
    color: rgba(30, 64, 175, 0.95);
}
.ai-study-presets {
    margin: 0 0 0.48rem;
    max-width: 100%;
}
.ai-study-presets__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.28rem;
}
.ai-study-presets-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--light-text);
}
.ai-study-presets__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}
.ai-study-preset-chip {
    margin: 0;
    padding: 0.32rem 0.55rem;
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 500;
    color: var(--light-text);
    background: var(--bb-disclosure-bg-compact);
    border: 1px solid var(--bb-disclosure-border);
    border-radius: 999px;
    cursor: pointer;
    min-height: 36px;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ai-study-preset-chip:hover {
    border-color: var(--bb-disclosure-border-quiet);
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.88);
}
.ai-study-preset-chip:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.ai-summarize-chip { margin-top: 0; width: auto; }
.ai-study-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.ai-study-loading {
    font-size: 0.9rem;
    color: var(--light-text);
    font-style: italic;
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: var(--light-bg);
    line-height: 1.45;
}
.ai-study-error {
    margin-top: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.28);
    background: rgba(241, 245, 249, 0.75);
    line-height: 1.45;
}
.ai-study-error-summary {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}
.ai-study-error-detail {
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--light-text);
    line-height: 1.42;
    word-break: break-word;
}
.ai-study-error--validation {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.9);
}
.ai-study-error--validation .ai-study-error-summary {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--light-text);
}
.ai-study-result { font-size: 0.95rem; color: var(--text-color); margin-top: 0.5rem; line-height: 1.5; }
.ai-study-transcript {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(52vh, 30rem);
    overflow-y: auto;
    padding: 0.1rem 0.2rem 0.25rem 0;
    -webkit-overflow-scrolling: touch;
}
.ai-study-turn {
    padding: 0.5rem 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.ai-study-loading--panel {
    margin-top: 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.9);
    font-size: 0.88rem;
    color: var(--light-text);
}
.ai-study-result-status {
    margin: 0 0 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgb(21, 128, 61);
    line-height: 1.35;
}
/* Echo of the prompt for this response (reduces confusion when asking multiple times). */
.ai-study-question-echo {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0.45rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.35;
    word-break: break-word;
}
.ai-study-question-echo-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.35rem;
}
.ai-study-answer { margin-bottom: 0.25rem; }
.ai-study-grounding-translation {
    margin: 0.3rem 0 0.15rem;
}
.ai-study-grounding-translation-badge {
    display: inline-block;
    font-size: 0.76rem;
    line-height: 1.3;
    color: var(--light-text);
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.12rem 0.48rem;
}
.ai-study-citations { font-size: 0.85rem; color: var(--light-text); margin-top: 0.5rem; }
.ai-study-citations .ai-study-citation-ref { color: var(--primary-color); }
.ai-study-supporting-passages {
    font-size: 0.82rem;
    color: var(--light-text);
    margin-top: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
}
.ai-study-supporting-passages-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}
.ai-study-supporting-item {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    margin-top: 0.35rem;
}
.ai-study-supporting-item:first-of-type { margin-top: 0.15rem; }
.ai-study-supporting-refline .ai-study-citation-ref { color: var(--primary-color); }
.ai-study-supporting-source { opacity: 0.85; font-weight: 400; }
.ai-study-supporting-text { line-height: 1.35; word-break: break-word; }
.ai-study-confidence-notes { font-size: 0.8rem; color: var(--light-text); margin-top: 0.5rem; opacity: 0.85; }
.ai-study-save-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
    margin-top: 0.45rem;
}
.ai-study-next-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    width: 100%;
}
.ai-study-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
}
.ai-study-action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-color, #2563eb);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ai-study-action-icon-btn::before {
    content: attr(data-bb-action-icon);
    font-size: 1rem;
    line-height: 1;
}
.ai-study-action-icon-btn:hover {
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(239, 246, 255, 0.84);
    color: var(--primary-color-strong, #1d4ed8);
}
.ai-study-action-icon-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.ai-study-inline-btn {
    margin: 0;
    padding: 0.32rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    min-height: 2.25rem;
    box-sizing: border-box;
    color: var(--primary-color, #2563eb);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ai-study-inline-btn:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.18);
}
.ai-study-inline-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.ai-study-save-hint {
    font-size: 0.78rem;
    color: var(--light-text);
    margin: 0;
    line-height: 1.35;
    max-width: 100%;
    word-break: break-word;
}
.ai-study-save-wrap .bb-study-send-queue-cue {
    margin: 0.05rem 0 0;
    font-size: 0.7rem;
    line-height: 1.3;
    max-width: 26rem;
}
.ai-study-add-to-note-btn { align-self: auto; }
/* Client-side summary of which /ask request fields were sent (not model behavior). */
.ai-study-provenance {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-top: 0.5rem;
    line-height: 1.4;
}
.ai-study-provenance-label {
    font-weight: 500;
    margin-right: 0.25rem;
    opacity: 0.9;
}
.ai-study-provenance-chip {
    display: inline-block;
    margin: 0.15rem 0.35rem 0 0;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.map-section { margin-bottom: 0; padding: 1rem 1.25rem; background: var(--light-bg); border-radius: 8px; border: 1px solid var(--border-color); }
.map-heading { font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--primary-color); }
.map-canvas { width: 100%; min-height: 260px; border: 1px solid var(--border-color); border-radius: 0.375rem; margin-bottom: 0.5rem; }
.map-caption { margin: 0; font-size: 0.85rem; color: var(--light-text); line-height: 1.4; }
.map-focus-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin: 0 0 0.35rem 0;
}
.map-focus-row .map-focused-place {
    margin: 0;
    flex: 1 1 12rem;
    min-width: 0;
}
.map-focused-place { font-size: 0.85rem; line-height: 1.4; color: var(--primary-color); font-weight: 500; opacity: 0.92; }
.map-clear-focus-btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    color: var(--light-text);
    cursor: pointer;
    flex-shrink: 0;
}
.map-clear-focus-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}
.map-clear-focus-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.map-caption--loading { font-style: italic; color: var(--light-text); }
.map-caption--info { color: var(--light-text); border-left: 3px solid var(--secondary-color); padding-left: 0.5rem; }
.map-caption--warn { color: var(--error-color, #c0392b); }
.map-caption--success { color: var(--light-text); }
.leaflet-popup-content .map-popup-inner {
    margin: 0;
    min-width: 0;
    max-width: min(280px, calc(100vw - 2.75rem));
}
.leaflet-popup-content .map-popup-sections {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
}
.leaflet-popup-content .map-popup-sections .map-popup-label {
    margin-top: 0;
}
.leaflet-popup-content .map-popup-sections .map-popup-summary {
    margin-top: 0;
    line-height: 1.45;
    word-break: break-word;
    hyphens: auto;
}
.leaflet-popup-content .map-popup-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.28;
    margin: 0 0 0.28rem;
    color: var(--primary-color);
    word-break: break-word;
}
.leaflet-popup-content .map-popup-summary {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-color);
    word-break: break-word;
    hyphens: auto;
}
.leaflet-popup-content .map-popup-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--light-text);
    margin-top: 0.45rem;
    margin-bottom: 0.1rem;
    line-height: 1.3;
}
.leaflet-popup-content .map-popup-block {
    display: block;
    font-size: 0.82rem;
    line-height: 1.42;
    color: var(--text-color);
    word-break: break-word;
    hyphens: auto;
}
.leaflet-popup-content .map-popup-matched,
.leaflet-popup-content .map-popup-refs {
    color: var(--light-text);
}
/* Long “Other references” lists: scroll inside popup instead of stretching height. */
.leaflet-popup-content .map-popup-block.map-popup-refs {
    max-height: 6.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-wrap: break-word;
    padding-right: 0.35rem;
    margin-top: 0.08rem;
    line-height: 1.4;
}
.place-focus-map-btn {
    margin-left: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--light-bg);
    color: var(--secondary-color);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0.22em 0.55em;
    line-height: 1.25;
}
.place-focus-map-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.07);
    color: var(--primary-color);
}
.place-focus-map-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.place-focus-map-state-hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--light-text);
    white-space: nowrap;
    user-select: none;
}

/* Passage layout: main + sidebar */
.passage-layout {
    display: flex;
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.passage-main {
    flex: 1;
    min-width: 0;
}

.passage-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Verse header: reference + actions */
.verse-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}
.verse-header__ref-row {
    display: contents;
}
.verse-header .result-reference {
    margin-bottom: 0;
    flex: 1 1 12rem;
    min-width: 0;
    word-break: break-word;
}
.verse-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.55rem;
    flex: 0 1 auto;
    margin-left: auto;
    max-width: 100%;
}
.verse-header-actions__primary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 1 auto;
    min-width: 0;
}
.verse-header-actions__icons {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
    padding: 0.1rem 0.2rem 0.1rem 0.28rem;
    margin-left: 0.05rem;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}
.go-to-compare-btn {
    font-size: 0.8125rem;
    font-weight: 500;
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    flex-shrink: 0;
    white-space: nowrap;
    opacity: 0.92;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}
.go-to-compare-btn:hover,
.go-to-compare-btn:focus-visible {
    opacity: 1;
}
.translations-compare-hint {
    font-size: 0.875rem;
    color: var(--light-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.45;
}
.verse-header-icon-btn,
.bookmark-btn {
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    cursor: pointer;
    color: var(--light-text);
    opacity: 0.95;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.pin-verse-btn,
.add-to-collection-btn {
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.25rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    cursor: pointer;
    color: var(--light-text);
    opacity: 0.95;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.bookmark-btn:hover,
.pin-verse-btn:hover,
.add-to-collection-btn:hover {
    color: var(--secondary-color);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.35);
}
.bookmark-btn:focus-visible,
.pin-verse-btn:focus-visible,
.add-to-collection-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.bookmark-btn.bookmark-active {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.08);
}
.bookmark-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pin-verse-btn.pin-verse-active {
    color: var(--secondary-color);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.06);
}

.pinned-verse-panel[data-busy] .pinned-verse-move-up,
.pinned-verse-panel[data-busy] .pinned-verse-move-down,
.pinned-verse-panel[data-busy] .pinned-verse-unpin,
.pinned-verse-panel[data-busy] .pinned-clear-all-btn,
.pinned-verse-panel[data-busy] .pinned-verse-ref-link {
    pointer-events: none;
    opacity: 0.6;
}
.pinned-verse-panel {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem 0.72rem 0.85rem;
    background: rgba(248, 250, 252, 0.65);
    border: none;
    border-left: 3px solid rgba(59, 130, 246, 0.35);
    border-radius: 0 10px 10px 0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.pinned-verse-panel__head {
    margin-bottom: 0.28rem;
}
.pinned-verse-panel__title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(30, 41, 59, 0.92);
    line-height: 1.25;
}
.pinned-verse-panel__context {
    margin: 0.12rem 0 0;
    font-size: 0.74rem;
    color: rgba(71, 85, 105, 0.92);
    line-height: 1.38;
}
.pinned-verse-panel__lead {
    margin: 0 0 0.42rem;
    line-height: 1.38;
    font-size: 0.8rem;
    color: rgba(71, 85, 105, 0.95);
}
.pinned-save-wrap__hint {
    margin: 0 0 0.45rem;
    max-width: 40rem;
}
.pinned-save-wrap__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
}
.pinned-verses-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.pinned-verse-item {
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-color);
}
.pinned-verse-item.pinned-verse-current {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 0.25rem;
}
.pinned-verse-item.pinned-verse-current-ref {
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 0.25rem;
    border-left: 2px solid rgba(59, 130, 246, 0.4);
}
.pinned-verse-current-label {
    display: inline-block;
    align-self: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(30, 64, 175, 0.95);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
    padding: 0.14rem 0.45rem;
    margin-right: 0.35rem;
    line-height: 1.2;
}
.pinned-verse-ref-only-label {
    font-style: normal;
    font-weight: 600;
    color: rgba(71, 85, 105, 0.95);
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.35);
}
.pinned-verse-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.pinned-verse-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}
.pinned-verse-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
}
.pinned-verse-ref-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
}
.pinned-verse-ref-link {
    text-decoration: none;
}
.pinned-verse-ref-link:hover {
    text-decoration: underline;
}
.pinned-verse-code {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-left: 0.25rem;
}
.pinned-verse-reorder {
    display: inline-flex;
    gap: 0.15rem;
}
.pinned-verse-move-up,
.pinned-verse-move-down {
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.2rem;
    cursor: pointer;
    color: var(--light-text);
}
.pinned-verse-move-up:hover:not(:disabled),
.pinned-verse-move-down:hover:not(:disabled) {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.pinned-verse-move-up:disabled,
.pinned-verse-move-down:disabled {
    opacity: 0.4;
    cursor: default;
}
.pinned-verse-unpin {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--light-text);
}
.pinned-verse-unpin:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.pinned-verse-send-study {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.42rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: rgba(239, 246, 255, 0.85);
    color: #1d4ed8;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.pinned-verse-send-study:hover {
    background: rgba(219, 234, 254, 0.95);
    border-color: rgba(29, 78, 216, 0.45);
}
.pinned-verse-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

.study-trail-context {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}
.study-trail-context.study-trail-clickable {
    color: var(--secondary-color);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}
.study-trail-context.study-trail-clickable:hover {
    text-decoration: underline;
}
.study-trail-context.study-trail-clickable:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.back-to-ref-wrap {
    margin-bottom: 0.5rem;
    padding: 0.32rem 0.45rem;
    max-width: var(--reading-max, 52rem);
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--bb-disclosure-border);
    border-radius: 8px;
    background: var(--bb-disclosure-bg-compact);
}
.back-to-ref-link {
    display: inline-block;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--secondary-color);
    text-decoration: none;
    max-width: 100%;
}
.back-to-ref-target {
    font-weight: 600;
    color: var(--text-color);
    word-break: break-word;
}
.back-to-ref-link:hover {
    text-decoration: underline;
}
.back-to-ref-link:hover .back-to-ref-target {
    color: var(--secondary-color);
}
.back-to-ref-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Note section */
.note-section {
    margin-bottom: 1rem;
}
.bb-reader-unified-notes.note-section {
    border-color: rgba(5, 150, 105, 0.28);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.06);
}
.bb-notes-surface__chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    max-width: var(--reading-max, 52rem);
    margin: 0 0 0.45rem;
}
.passage-results .bb-notes-surface__chrome.bb-study-workspace__chrome {
    margin-bottom: 0;
}
.bb-notes-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}
.bb-notes-surface__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}
.bb-notes-surface__nav-link {
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.bb-notes-surface__nav-link:hover,
.bb-notes-surface__nav-link:focus-visible {
    border-bottom-color: currentColor;
    outline: none;
}
.bb-notes-surface__nav-sep {
    color: var(--light-text);
    font-weight: 400;
}
.bb-notes-surface__nav-link.bb-notes-surface__nav-link--off,
.bb-notes-surface__nav-sep.bb-notes-surface__nav-sep--off {
    display: none !important;
}
.bb-notes-context-strip {
    margin: 0 0 0.55rem;
    padding: 0.38rem 0.5rem 0.44rem;
    border-radius: 8px;
    border: 1px solid rgba(5, 150, 105, 0.22);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.07), rgba(148, 163, 184, 0.06));
}
.bb-notes-context-strip__meta {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.42;
    color: var(--light-text);
    word-break: break-word;
}
.note-surface-target {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.55rem;
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
}
.note-surface-target__ref {
    margin: 0;
    flex: 1 1 10rem;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-color);
    word-break: break-word;
}
.note-context-badge {
    flex-shrink: 0;
    display: inline-block;
    margin-top: 0.12rem;
    padding: 0.14rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-color);
}
.note-context-badge--passage {
    border-color: rgba(5, 150, 105, 0.35);
    background: rgba(16, 185, 129, 0.12);
    color: rgb(6, 95, 70);
}
.note-context-badge--verse {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color, #1d4ed8);
}
.note-context-badge--multi {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(139, 92, 246, 0.1);
    color: rgb(91, 33, 182);
}
.note-dirty-pill {
    flex-shrink: 0;
    margin-top: 0.08rem;
    padding: 0.12rem 0.42rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgb(154, 52, 18);
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
}
.note-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}
.back-to-passage-note-wrap {
    margin-bottom: 0.35rem;
}
.note-study-context-hint {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0 0 0.4rem;
    line-height: 1.35;
}
.note-editor-wrap {
    position: relative;
    min-height: 4.5rem;
}
.note-read-preview-hint {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0 0 0.35rem;
    line-height: 1.35;
}
.note-editor-wrap .note-textarea,
.note-editor-wrap .note-body-read-view {
    width: 100%;
    box-sizing: border-box;
}
.note-body-read-view {
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    min-height: 4.5rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
    background: var(--bg-color, #fff);
    color: var(--text-color);
}
.note-body-read-view .note-study-context-jump {
    display: inline;
    font: inherit;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: underline;
    color: var(--primary-color);
}
.note-body-read-view .note-study-context-jump:hover {
    color: var(--secondary-color, var(--primary-color));
}
/* Plain-text --- AI Study --- markers (read view only; storage is unchanged) */
.note-body-read-view .note-ai-study-heading {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--light-text);
    margin-top: 0.75em;
    margin-bottom: 0.2em;
}
.note-body-read-view .note-ai-study-heading:first-child {
    margin-top: 0;
}
.back-to-passage-note-btn {
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--secondary-color);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}
.back-to-passage-note-btn:hover {
    color: var(--primary-color);
}
.back-to-passage-note-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.note-dirty-indicator {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--light-text);
    margin-left: 0.35rem;
}
.note-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.5rem;
}
.note-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}
.note-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}
.note-save-inline-status {
    font-size: 0.8rem;
    color: var(--success-color);
    align-self: center;
}
.note-shortcut-hint {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--light-text);
    align-self: center;
}
.btn-note {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    border: 1px solid var(--secondary-color);
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
}
.btn-note:hover {
    opacity: 0.9;
}
.btn-note:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-note-secondary {
    background: white;
    color: var(--text-color);
    border-color: var(--border-color);
}
.btn-note-secondary:hover {
    background: var(--light-bg);
}

/* Bookmarks sidebar */
.bookmarks-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}
.bookmarks-sidebar-heading {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--primary-color);
}
.bookmarks-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bookmarks-list li {
    margin-bottom: 0.35rem;
}
.bookmark-sidebar-item {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.2rem 0;
    border-radius: 0.25rem;
}
.bookmark-sidebar-item-current {
    background-color: rgba(59, 130, 246, 0.12);
}
.bookmark-sidebar-current-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary-color);
    flex-shrink: 0;
}
.bookmark-ref {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}
.bookmark-ref:hover {
    text-decoration: underline;
}
.bookmark-send-study {
    font-size: 0.68rem;
    font-weight: 650;
    padding: 0.12rem 0.38rem;
    margin-left: auto;
    border-radius: 0.25rem;
    border: 1px solid rgba(37, 99, 235, 0.3);
    background: rgba(239, 246, 255, 0.9);
    color: #1d4ed8;
    cursor: pointer;
    font-family: inherit;
}
.bookmark-send-study:hover {
    background: rgba(219, 234, 254, 0.98);
}

/* Passage / Workbench: brief outline when a Send-to-Study queue succeeds (non-blocking). */
.bb-send-to-study--affirmed {
    outline: 2px solid rgba(34, 197, 94, 0.42);
    outline-offset: 2px;
    transition: outline-color 0.15s ease;
}

/* Passage Dictionary + Ask + any .bb-send-to-study-btn: transient cue beside trigger (absolute; no layout shift). */
.dictionary-send-study.bb-send-to-study--affirmed,
.ai-study-send-gather-btn.bb-send-to-study--affirmed,
.bb-send-to-study-btn.bb-send-to-study--affirmed {
    position: relative;
    overflow: visible;
}
@keyframes bb-passage-send-study-cue-fade {
    0% {
        opacity: 0;
        transform: translateY(2px);
    }
    12% {
        opacity: 0.92;
        transform: translateY(0);
    }
    58% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: translateY(-1px);
    }
}
.bb-passage-send-study-cue {
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 6;
    display: block;
    max-width: min(12rem, 70vw);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: var(--light-text, rgba(71, 85, 105, 0.82));
    pointer-events: none;
    animation: bb-passage-send-study-cue-fade 1s ease-out forwards;
}
.bookmarks-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.4;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}
.sessions-sidebar-heading {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--primary-color);
}
.sessions-create {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.session-name-input {
    flex: 1;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}
.btn-session {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 0.375rem;
    border: 1px solid var(--secondary-color);
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
}
.btn-session:hover:not(:disabled) { opacity: 0.9; }
.btn-session:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-session-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--border-color);
}
.btn-session-secondary:hover { background: rgba(59, 130, 246, 0.08); }
.session-json-hint {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--light-text);
}
.session-export-import {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.sessions-list-wrap { margin-top: 0.25rem; }
.sessions-loading { margin: 0; font-size: 0.85rem; color: var(--light-text); font-style: italic; }
.sessions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.sessions-list li { margin-bottom: 0.35rem; }
.session-item { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.session-ref { cursor: pointer; padding: 0.2rem 0; border-radius: 0.25rem; }
.session-ref:hover { background-color: rgba(59, 130, 246, 0.08); }
.session-ref.session-active { background-color: rgba(59, 130, 246, 0.12); }
.session-active-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary-color);
    flex-shrink: 0;
}
.session-name { flex: 1; min-width: 0; }
.session-date { font-size: 0.8rem; color: var(--light-text); flex-shrink: 0; }
.session-rename-btn,
.session-delete-btn {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 0.15rem;
    flex-shrink: 0;
}
.session-rename-btn:hover,
.session-delete-btn:hover { color: var(--primary-color); }
.sessions-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--light-text);
}

.collections-list-wrap { margin-top: 0.25rem; }
.collections-loading { margin: 0; font-size: 0.85rem; color: var(--light-text); font-style: italic; }
.collections-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.collections-list li { margin-bottom: 0.35rem; }
.collection-item {
    cursor: pointer;
    padding: 0.2rem 0;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
}
.collection-item:hover { background-color: rgba(59, 130, 246, 0.08); }
.collection-item.collection-item-expanded {
    background-color: rgba(59, 130, 246, 0.12);
}
.collection-name { flex: 1; min-width: 0; }
.collection-count { font-size: 0.75rem; color: var(--light-text); }
.collection-rename,
.collection-delete {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0 0.15rem;
}
.collection-rename:hover,
.collection-delete:hover { color: var(--primary-color); }
.collection-expand { font-size: 0.7rem; color: var(--light-text); margin-left: 0.25rem; }
.collection-verses {
    list-style: none;
    padding: 0.25rem 0 0 0.75rem;
    margin: 0;
    font-size: 0.85rem;
    flex-basis: 100%;
}
.collection-verses[hidden] { display: none; }
.collection-verse-item {
    margin-bottom: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.collection-verse-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}
.collection-verse-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}
.collection-verse-send-study {
    font-size: 0.68rem;
    font-weight: 650;
    padding: 0.1rem 0.32rem;
    border-radius: 0.22rem;
    border: 1px solid rgba(37, 99, 235, 0.28);
    background: rgba(239, 246, 255, 0.88);
    color: #1d4ed8;
    cursor: pointer;
    font-family: inherit;
}
.collection-verse-send-study:hover {
    background: rgba(219, 234, 254, 0.95);
}
.collection-verse-ref {
    color: var(--primary-color);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.collection-verse-ref:hover { text-decoration: underline; }
.collection-verse-translation {
    font-size: 0.8rem;
    color: var(--light-text);
    flex-shrink: 0;
    overflow-wrap: break-word;
}
.collection-verse-note-preview {
    font-size: 0.8rem;
    color: var(--light-text);
    padding: 0.15rem 0 0 0.35rem;
    margin-left: 0.15rem;
    border-left: 2px solid var(--border-color);
    line-height: 1.35;
}
.collection-verse-note-preview:not([hidden]) {
    cursor: pointer;
}
.collection-verse-note-preview:not([hidden]):hover {
    color: var(--primary-color);
}
.collection-verse-note-preview:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.collection-verse-add-note {
    font-size: 0.8rem;
    color: var(--light-text);
    padding: 0.15rem 0 0 0.35rem;
    margin-left: 0.15rem;
    border-left: 2px solid var(--border-color);
    line-height: 1.35;
}
.collection-verse-add-note:not([hidden]) {
    cursor: pointer;
}
.collection-verse-add-note:not([hidden]):hover {
    color: var(--primary-color);
}
.collection-verse-add-note:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.collection-verse-bookmark {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 0.1rem 0.2rem;
    flex-shrink: 0;
}
.collection-verse-bookmark:hover { color: var(--secondary-color); }
.collection-verse-bookmark.bookmark-active { color: var(--secondary-color); }
.collection-verse-bookmark:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.collection-verse-pin {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 0.1rem 0.2rem;
    flex-shrink: 0;
}
.collection-verse-pin:hover { color: var(--secondary-color); }
.collection-verse-pin.pin-verse-active { color: var(--secondary-color); }
.collection-verse-pin:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.collection-verse-pin:disabled,
.collection-verse-bookmark:disabled,
.collection-verse-remove:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.collection-verse-remove {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.3;
    padding: 0.1rem 0.25rem;
    flex-shrink: 0;
}
.collection-verse-remove:hover { color: var(--primary-color); }
.collection-verse-item.collection-verse-current {
    background-color: rgba(59, 130, 246, 0.08);
    border-radius: 0.25rem;
    padding: 0.3rem 0.4rem;
}
.collection-verse-current-label {
    font-size: 0.75rem;
    color: var(--light-text);
    flex-shrink: 0;
    margin-right: 0.1rem;
    line-height: 1.3;
}
.collections-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.4;
}

.active-session-banner {
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
    border-left: 4px solid var(--secondary-color);
}
.active-session-icon { margin-right: 0.25rem; }

/* Presentation mode: distraction-reduced teaching/reading view */
.exit-presentation-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.exit-presentation-btn:hover {
    background: var(--secondary-color);
}

body.presentation-mode .passage-form,
body.presentation-mode .passage-lookup-intro,
body.presentation-mode .passage-reader-workspace__lookup,
body.presentation-mode .bb-reader-nav-open-btn,
body.presentation-mode .bb-toc-open-btn,
body.presentation-mode .bb-reader-nav-backdrop,
body.presentation-mode .bb-reader-nav-panel,
body.presentation-mode .bb-toc-backdrop,
body.presentation-mode .bb-toc-panel,
body.presentation-mode .bb-maps-explorer-open-btn,
body.presentation-mode .bb-maps-explorer-backdrop,
body.presentation-mode .bb-maps-explorer-panel,
body.presentation-mode .bookmarks-sidebar,
body.presentation-mode .active-session-banner,
body.presentation-mode .note-section,
body.presentation-mode .context-expand-controls,
body.presentation-mode .passage-surrounding-verses-help,
body.presentation-mode .timeline-section,
body.presentation-mode .translations-toolbar,
body.presentation-mode .go-to-compare-btn,
body.presentation-mode .translations-compare-hint-wrap,
body.presentation-mode .cross-ref-heading,
body.presentation-mode .bb-cross-surface__head,
body.presentation-mode .bb-cross-surface__chrome,
body.presentation-mode .bb-cross-context-strip,
body.presentation-mode .cross-ref-trust-legend,
body.presentation-mode .cross-ref-filter-wrap,
body.presentation-mode .cross-ref-verse-focus-bar,
body.presentation-mode .cross-ref-list,
body.presentation-mode .tokens-heading,
body.presentation-mode .tokens-wrap,
body.presentation-mode #interlinearSection,
body.presentation-mode .word-study-controls-stack,
body.presentation-mode .passage-page-jump,
body.presentation-mode .bb-below-passage-nav-details,
body.presentation-mode .passage-verse-gated-study-bridge,
body.presentation-mode .passage-ol-readiness-status,
body.presentation-mode .bb-ol-context-strip,
body.presentation-mode .bb-ol-workflow-stack,
body.presentation-mode .bb-study-tray-wrap,
body.presentation-mode .bb-study-tray {
    display: none !important;
}
body.presentation-mode .passage-reader-header__toolbelt {
    display: none !important;
}
body.presentation-mode .passage-reader-header__ref-picker-wrap {
    display: none !important;
}
body.presentation-mode .bb-reader-unified-overlay-host {
    display: none !important;
    pointer-events: none !important;
}
body.presentation-mode .passage-main h3.passage-viewer-title,
body.presentation-mode .passage-reader-workspace .passage-viewer-title {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    color: var(--light-text);
}
body.presentation-mode .passage-layout {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
body.presentation-mode .result-reference {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
body.presentation-mode .translation-block {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    line-height: 1.7;
}
body.presentation-mode .translation-block--passage-level {
    padding-left: calc(1.25rem - 3px);
}
body.presentation-mode .translation-block-heading {
    font-size: 0.875rem;
}
body.presentation-mode .translation-text {
    font-size: 1.1rem;
    margin-top: 0.55rem;
}
body.presentation-mode .translation-passage-ref {
    font-size: 0.9rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
    color: var(--light-text);
}
body.presentation-mode .translation-text--passage-prose {
    font-size: 1.12rem;
    line-height: 1.78;
    max-width: none;
    margin-top: 0.45rem;
}
body.presentation-mode .context-list {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}
body.presentation-mode .translations-heading {
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
    letter-spacing: 0.05em;
    color: var(--light-text);
}
body.presentation-mode .section-divider {
    margin: 1.25rem 0;
}

/* Presentation mode: mobile tweaks */
@media (max-width: 768px) {
    body.presentation-mode .passage-layout {
        max-width: none;
        padding: 0 1rem;
    }

    body.presentation-mode .result-reference {
        font-size: 1.25rem;
    }

    body.presentation-mode .translation-text {
        font-size: 1rem;
    }

    body.presentation-mode .translation-text--passage-prose {
        font-size: 1.02rem;
    }

    body.presentation-mode .translation-block {
        padding: 0.75rem 1rem;
    }

    body.presentation-mode .translation-block--passage-level {
        padding-left: calc(1rem - 3px);
    }
}

@media (max-width: 430px) {
    body.presentation-mode .result-reference {
        font-size: 1.1rem;
    }

    body.presentation-mode .translation-text {
        font-size: 0.9375rem;
    }

    body.presentation-mode .translation-text--passage-prose {
        font-size: 0.9375rem;
    }

    body.presentation-mode .translation-passage-ref {
        font-size: 0.82rem;
    }

    body.presentation-mode .passage-main h3.passage-viewer-title {
        font-size: 0.7rem;
        margin-bottom: 0.28rem;
    }
}

/* Status toast (collection save feedback, etc.) */
.status-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1rem;
    background: var(--text-color);
    color: white;
    font-size: 0.9rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 12000;
    max-width: 320px;
    will-change: opacity, transform;
}
.status-toast:not([hidden]) {
    animation: bb-status-toast-in 0.16s ease-out;
}
@keyframes bb-status-toast-in {
    from {
        opacity: 0.65;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .status-toast:not([hidden]) {
        animation: none;
    }
}
.status-toast-error {
    background: #b91c1c;
}

/* Passage: add-to-collection inline picker (anchored to #addToCollectionBtn or Save shelf) */
.bb-collection-picker-popover {
    box-sizing: border-box;
    min-width: 15.5rem;
    max-width: min(18.5rem, calc(100vw - 1rem));
    padding: 0.38rem 0.42rem 0.45rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow:
        0 12px 32px -16px rgba(15, 23, 42, 0.22),
        0 2px 6px -2px rgba(15, 23, 42, 0.06);
}
.bb-collection-picker-popover__head {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.bb-collection-picker-popover__intro {
    margin: 0;
    flex: 1;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(51, 65, 85, 0.95);
}
.bb-collection-picker-popover__close {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    margin: -0.12rem -0.08rem 0 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(100, 116, 139, 0.9);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.bb-collection-picker-popover__close:hover,
.bb-collection-picker-popover__close:focus-visible {
    background: rgba(239, 246, 255, 0.88);
    color: rgba(30, 64, 175, 0.95);
    outline: none;
}
.bb-collection-picker-popover__list {
    max-height: 11rem;
    overflow-y: auto;
    margin: 0 0 0.4rem;
    padding: 0.12rem 0;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}
.bb-collection-picker-popover__empty {
    margin: 0.2rem 0 0.15rem;
    font-size: 0.74rem;
    line-height: 1.35;
    color: rgba(100, 116, 139, 0.92);
}
.bb-collection-picker-popover__row {
    display: block;
    width: 100%;
    margin: 0.08rem 0;
    padding: 0.42rem 0.48rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(51, 65, 85, 0.92);
    text-align: left;
    font-size: 0.78rem;
    font-weight: 520;
    line-height: 1.3;
    cursor: pointer;
}
.bb-collection-picker-popover__row:hover,
.bb-collection-picker-popover__row:focus-visible {
    background: rgba(239, 246, 255, 0.88);
    outline: none;
}
.bb-collection-picker-popover__new {
    margin-top: 0.35rem;
}
.bb-collection-picker-popover__new-label {
    display: block;
    margin: 0 0 0.28rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.82);
}
.bb-collection-picker-popover__new-row {
    display: flex;
    gap: 0.35rem;
    align-items: stretch;
}
.bb-collection-picker-popover__input {
    flex: 1;
    min-width: 0;
    padding: 0.32rem 0.45rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 8px;
    font-size: 0.8rem;
}
.bb-collection-picker-popover__input:focus {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 1px;
}

/* Explore Map MVP (standalone, dataset-driven) */
.explore-map-main {
    outline: none;
}
.explore-map-error {
    margin-bottom: 0.9rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(185, 28, 28, 0.45);
    background: rgba(254, 226, 226, 0.35);
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.explore-map-retry {
    margin-left: 0.5rem;
    vertical-align: middle;
    min-height: 2.5rem;
    padding: 0.15rem 0.65rem;
    border-radius: 6px;
}
.explore-map-error .explore-map-retry:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-canvas--pending {
    background: repeating-linear-gradient(
        -45deg,
        rgba(148, 163, 184, 0.08),
        rgba(148, 163, 184, 0.08) 8px,
        rgba(148, 163, 184, 0.02) 8px,
        rgba(148, 163, 184, 0.02) 16px
    );
}
.explore-map-section {
    padding: 1.5rem 0 2.5rem;
}
.explore-map-inner {
    max-width: 1200px;
}
.explore-map-title {
    margin-bottom: 0.3rem;
}
.explore-map-intro {
    color: var(--light-text);
    margin-bottom: 1.25rem;
    line-height: 1.55;
    max-width: 52rem;
}
.explore-map-lead {
    margin-bottom: 0.28rem;
    max-width: 52rem;
    line-height: 1.4;
}
.explore-map-help {
    margin-bottom: 0.7rem;
    max-width: 52rem;
}
.explore-map-filter-hint-inline {
    flex: 1 1 12rem;
    min-width: 0;
}
.explore-map-toolbar .bb-inline-help.explore-map-filter-hint-inline {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.36;
    align-self: center;
}
.explore-map-filter-help {
    flex: 0 1 auto;
    margin: 0;
    max-width: 18rem;
}
.explore-map-layer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.25;
}
.explore-map-layer-toggle[hidden] {
    display: none !important;
}
.explore-map-layer-toggle:has(.explore-map-layer-toggle__input:checked) {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
}
.explore-map-layer-toggle:has(.explore-map-layer-toggle__input:disabled) {
    opacity: 0.72;
    cursor: not-allowed;
}
.explore-map-layer-toggle__input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--primary-color);
}
.explore-map-layer-toggle__input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-layer-toggle__text {
    white-space: nowrap;
}
.explore-map-browse-pool-hint {
    flex: 1 1 22rem;
    margin: 0;
    max-width: none;
    font-size: 0.78rem;
    line-height: 1.42;
    color: var(--light-text);
    min-height: 0;
}
.explore-map-layer-summary {
    flex: 1 1 18rem;
    margin: 0;
    max-width: none;
    font-size: 0.76rem;
    line-height: 1.38;
    color: var(--text-color);
}
.explore-map-layer-view {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 40px;
    padding: 0.18rem;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
}
.explore-map-layer-view[hidden] {
    display: none !important;
}
.explore-map-layer-view__label {
    padding: 0 0.34rem 0 0.42rem;
    color: var(--light-text);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.2;
}
.explore-map-layer-view__btn {
    min-height: 32px;
    padding: 0.18rem 0.54rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}
.explore-map-layer-view__btn:hover,
.explore-map-layer-view__btn:focus-visible {
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(59, 130, 246, 0.08);
}
.explore-map-layer-view__btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-layer-view__btn--active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.16);
    color: var(--primary-color);
}
.explore-place-detail__title-wrap .explore-place-detail-help {
    margin-top: 0.35rem;
}
.explore-map-intro a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}
.explore-map-toolbar {
    margin-bottom: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem 0.75rem;
}
.explore-map-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: auto;
    flex: 0 0 auto;
}
.explore-map-mode-btn {
    min-height: 44px;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 600;
}
.explore-map-mode-btn--active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
}
.explore-map-journey-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem 0.75rem;
    margin-bottom: 0.85rem;
}
.explore-map-journey-toolbar[hidden] {
    display: none !important;
}
.explore-map-journey-meta {
    flex-basis: 100%;
    min-width: 0;
    padding: 0.36rem 0.52rem;
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: rgba(239, 246, 255, 0.58);
    color: var(--text-color);
    font-size: 0.78rem;
    line-height: 1.42;
}
.explore-map-journey-meta[hidden] {
    display: none !important;
}
.explore-map-journey-stop-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    margin-right: 0.45rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
}
.explore-map-filter-label {
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    white-space: nowrap;
}
.explore-map-filter-input {
    min-width: min(16rem, 100%);
    flex: 1 1 18rem;
    min-height: 44px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    max-width: 100%;
}
.explore-map-filter-input:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    background: rgba(148, 163, 184, 0.06);
}
.explore-map-filter-input:focus-visible:not(:disabled) {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-filter-hint {
    font-size: 0.75rem;
    color: var(--light-text);
    flex-basis: 100%;
}
.explore-map-code-hint {
    font-size: 0.72rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.15);
    word-break: break-all;
}
.explore-map-profile-filters {
    margin-bottom: 0.42rem;
    max-width: 100%;
}
.explore-map-profile-filters[hidden] {
    display: none !important;
}
.explore-map-profile-filters__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    font-size: 0.84rem;
    line-height: 1.35;
    min-height: 38px;
    padding-top: 0.12rem;
    padding-bottom: 0.1rem;
}
.explore-map-profile-filters__title {
    font-weight: 700;
    color: var(--text-color);
}
.explore-map-profile-filters__subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--light-text);
    flex: 1 1 auto;
    min-width: 0;
}
.explore-map-profile-filters__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
.explore-map-profile-filters__badge[hidden] {
    display: none !important;
}
.explore-map-profile-filters__panel {
    padding-top: 0.2rem;
}
.explore-map-chip-wrap {
    margin-bottom: 0.72rem;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}
.explore-map-chip-wrap--nested {
    margin-bottom: 0;
}
.explore-map-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}
.explore-map-chip-legend {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--light-text);
    min-width: 5.5rem;
}
.explore-map-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}
.explore-map-quick-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem;
    margin: -0.04rem 0 0.12rem;
    min-width: 0;
}
.explore-map-quick-searches[hidden] {
    display: none;
}
.explore-map-quick-searches__label {
    flex: 0 0 auto;
    color: var(--light-text);
    font-size: 0.72rem;
    font-weight: 700;
}
.explore-map-chip {
    min-height: 36px;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-color);
    font-size: 0.82rem;
    cursor: pointer;
    line-height: 1.3;
}
.explore-map-chip--quick {
    min-height: 32px;
    padding: 0.18rem 0.55rem;
    font-size: 0.78rem;
}
.explore-map-chip--clear {
    border-style: dashed;
    color: var(--light-text);
}
.explore-map-chip:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}
.explore-map-chip:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-chip--active:focus-visible {
    outline-offset: 3px;
}
.explore-map-chip--active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.18);
    font-weight: 600;
}
.explore-map-active-filters {
    margin-bottom: 0.55rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.06);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-color);
}
.explore-map-active-filters__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    justify-content: space-between;
}
.explore-map-active-filters__summary {
    flex: 1 1 12rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.explore-map-active-filters__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.explore-map-filter-clear-btn {
    min-height: 32px;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: var(--light-bg);
    color: var(--text-color);
    font-size: 0.78rem;
    cursor: pointer;
    line-height: 1.3;
}
.explore-map-filter-clear-btn:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}
.explore-map-filter-clear-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.explore-map-filter-clear-btn--all {
    font-weight: 600;
    border-color: rgba(59, 130, 246, 0.45);
}
.explore-map-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
}
.explore-map-list-panel {
    flex: 1 1 280px;
    max-width: 100%;
    min-width: 260px;
}
.explore-map-list-heading {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}
.explore-map-list-status {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.06);
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.5;
}
.explore-place-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.04);
}
.explore-place-list:empty {
    min-height: 3.5rem;
    background: rgba(148, 163, 184, 0.03);
}
.explore-place-item {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    cursor: pointer;
    outline: none;
    transition: background-color 120ms ease-in-out, border-left-color 120ms ease-in-out;
}
.explore-place-item:last-child {
    border-bottom: none;
}
.explore-place-item:hover:not(.explore-place-item-active) {
    background: rgba(148, 163, 184, 0.08);
}
.explore-place-item:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary-color);
}
.explore-place-item-active:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}
.explore-place-item-active {
    background: rgba(59, 130, 246, 0.16);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(0.75rem - 3px);
}
@keyframes bbExplorePlaceRowLand {
    0% {
        box-shadow: inset 0 0 0 0 rgba(59, 130, 246, 0.45);
    }
    40% {
        box-shadow: inset 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
    100% {
        box-shadow: inset 0 0 0 0 transparent;
    }
}
.explore-place-item--landed {
    animation: bbExplorePlaceRowLand 1s ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
    .explore-place-item--landed {
        animation: none;
    }
}
.explore-place-detail--landed {
    border-color: rgba(59, 130, 246, 0.52);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.1), 0 0 0 2px rgba(59, 130, 246, 0.26);
}
.explore-place-item-head {
    line-height: 1.32;
}
.explore-place-item-head--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.explore-place-item-head__main {
    display: inline-flex;
    flex: 1 1 10rem;
    min-width: 0;
    align-items: center;
    gap: 0.24rem;
    flex-wrap: wrap;
}
.explore-place-item-head--row .explore-place-name {
    flex: 1 1 8rem;
    min-width: 0;
}
.explore-place-extended-badge-slot {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.explore-place-extended-badge-slot:empty {
    display: none;
    min-width: 0;
}
.explore-place-extended-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0.14rem 0.38rem;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    color: rgba(71, 85, 105, 0.92);
    background: rgba(148, 163, 184, 0.12);
    white-space: nowrap;
}
.explore-place-extended-badge--unmapped {
    border-color: rgba(217, 119, 6, 0.36);
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
}
.explore-place-row-cue {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    margin-left: auto;
    padding: 0.12rem 0.44rem;
    border: 1px solid color-mix(in srgb, var(--primary-color) 26%, rgba(148, 163, 184, 0.55));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-color);
    font-size: 0.68rem;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
}
.explore-place-item-active .explore-place-row-cue {
    border-color: color-mix(in srgb, var(--primary-color) 40%, rgba(148, 163, 184, 0.55));
    background: rgba(255, 255, 255, 0.96);
}
.explore-place-item-head .explore-place-name {
    font-weight: 700;
}
.explore-place-item .explore-place-name:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}
.explore-place-meta {
    margin: 0.26rem 0 0;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.38;
    color: var(--light-text);
    letter-spacing: 0.02em;
}
.explore-place-summary {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.47;
    color: var(--text-color);
}
.explore-place-syns {
    margin: 0.38rem 0 0;
    font-size: 0.78rem;
    color: var(--light-text);
    line-height: 1.42;
}
.explore-place-profile {
    margin-top: 0.44rem;
    font-size: 0.78rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.42rem 0.52rem;
    background: rgba(148, 163, 184, 0.06);
}
.explore-place-profile summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--light-text);
    list-style: none;
}
.explore-place-profile summary::-webkit-details-marker {
    display: none;
}
.explore-place-profile summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}
.explore-place-profile-body {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.explore-profile-line {
    margin-bottom: 0.28rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.explore-profile-line:last-child {
    margin-bottom: 0;
}
.explore-profile-label {
    font-weight: 600;
    color: var(--light-text);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-right: 0.25rem;
}
.explore-profile-ref-link {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.explore-profile-ref-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}
.explore-map-map-panel {
    flex: 2 1 360px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.explore-map-canvas {
    width: 100%;
    min-height: min(62vh, 520px);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    z-index: 0;
}
.explore-map-canvas:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}
.explore-map-caption {
    margin: 0;
    font-size: 0.82rem;
}

/* Explore Map: selected-place study panel (below list + map) */
.explore-place-detail {
    margin-top: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.65);
}
.explore-place-detail__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
}
.explore-place-detail__title-wrap {
    flex: 1 1 12rem;
    min-width: 0;
}
.explore-place-detail__heading {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}
.explore-place-detail__subheading {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--muted-text);
    font-weight: 400;
}
.explore-place-detail__close {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}
.explore-place-detail__body {
    font-size: 0.9rem;
    line-height: 1.45;
}
.explore-place-detail__meta {
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    color: var(--light-text);
}
.explore-place-detail__summary {
    margin: 0 0 0.5rem;
}
.explore-place-detail__muted {
    color: var(--muted-text);
    font-style: italic;
}
.explore-place-detail__synonyms {
    margin: 0 0 0.65rem;
    font-size: 0.84rem;
    color: var(--light-text);
}
.explore-place-detail__label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.25rem;
}
.explore-place-detail__section {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.explore-place-detail__h {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-text);
    font-weight: 700;
}
.explore-place-detail__profile {
    margin: 0;
}
.explore-place-detail__refs {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
}
.explore-place-detail__ref-list {
    margin: 0;
    padding-left: 1.15rem;
    max-height: 11rem;
    overflow-y: auto;
}
.explore-place-detail__ref-list a {
    text-underline-offset: 2px;
}
.explore-place-detail__previews {
    display: grid;
    gap: 0.4rem;
}
.explore-place-detail__previews .explore-map-popup-verse-preview {
    margin: 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
}
.explore-place-detail__previews .explore-map-popup-verse-label {
    margin: 0 0 0.12rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--light-text);
}
.explore-place-detail__previews .explore-map-popup-verse-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.42;
    overflow-wrap: anywhere;
}
.explore-place-detail__inline-status {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted-text);
}
.explore-place-detail__inline-status--error {
    color: #b91c1c;
}
.explore-place-detail__primary-wrap {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}
.explore-place-detail__cta--passage {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.15rem;
    padding: 0.5rem 0.85rem;
    line-height: 1.25;
}
.explore-place-detail__cta-passage-title {
    font-weight: 700;
    font-size: 0.95rem;
}
.explore-place-detail__cta-passage-ref {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.95;
}
.explore-place-detail__cta-hint {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--muted-text);
    max-width: 28rem;
}
.explore-place-detail[hidden] {
    display: none !important;
}
.explore-place-detail:focus {
    outline: none;
}
.explore-place-detail:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}
.explore-place-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.explore-place-detail__cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
}

.map-popup-external {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
}
/* Explore map popups use the same .map-popup-inner / .map-popup-sections stack as passage.html */
.leaflet-popup-content .map-popup-inner > .map-popup-external {
    margin-top: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.leaflet-popup-content .map-popup-inner--explore .map-popup-external a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}
/* Explore Map marker popups only (passage uses .map-popup-inner without --explore). */
.leaflet-popup-content .map-popup-inner--explore > .map-popup-title {
    margin-bottom: 0.36rem;
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-title {
    margin-bottom: 0.22rem;
}
.leaflet-popup-content .map-popup-inner--explore > .map-popup-meta.explore-place-meta {
    margin: 0 0 0.36rem;
    line-height: 1.38;
}
.leaflet-popup-content .map-popup-inner--explore > .map-popup-sections {
    gap: 0.5rem;
    margin-top: 0;
}
.leaflet-popup-content .map-popup-inner--explore:not(:has(> .map-popup-meta.explore-place-meta)) > .map-popup-sections > .map-popup-label:first-child,
.leaflet-popup-content .map-popup-inner--explore:not(:has(> .map-popup-meta.explore-place-meta)) > .map-popup-sections > .map-popup-summary:first-child {
    margin-top: 0;
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-sections {
    padding-top: 0.42rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-sections > .map-popup-label:first-child {
    margin-top: 0;
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-sections > .map-popup-label {
    margin-top: 0.34rem;
    margin-bottom: 0.06rem;
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) .map-popup-sections .map-popup-summary {
    font-size: 0.8rem;
    line-height: 1.42;
    color: var(--light-text);
}
.leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-sections > .map-popup-block {
    font-size: 0.8rem;
    line-height: 1.4;
}
.leaflet-popup-content .map-popup-inner--explore:not(:has(> .map-popup-meta.explore-place-meta)) .map-popup-sections .map-popup-summary {
    line-height: 1.48;
}
.leaflet-popup-content .map-popup-inner--explore .map-popup-see-also-wrap {
    line-height: 1.42;
    margin-top: 0.1rem;
}
.leaflet-popup-content .map-popup-inner--explore > .map-popup-external {
    margin-top: 0.48rem;
    padding-top: 0.38rem;
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-section-label {
    margin-top: 0.28rem;
    margin-bottom: 0.14rem;
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-previews {
    margin: 0.02rem 0 0.18rem;
    display: grid;
    gap: 0.28rem;
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-inline-status {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.36;
    color: var(--muted-text);
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-preview {
    margin: 0;
    padding: 0.34rem 0.42rem;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.07);
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-label {
    margin: 0 0 0.12rem;
    font-size: 0.72rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--light-text);
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.42;
    color: var(--text-color);
    overflow-wrap: anywhere;
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-ref-list {
    margin-top: 0.08rem;
    padding-left: 1rem;
}
.leaflet-popup-content .map-popup-inner--explore .explore-map-ref-list a {
    text-underline-offset: 2px;
}
@media (max-width: 768px) {
    .explore-map-section {
        padding: 0.72rem 0 1.35rem;
    }
    .explore-map-title {
        font-size: 1.38rem;
        margin-bottom: 0.14rem;
        line-height: 1.2;
    }
    .explore-map-intro {
        margin-bottom: 0.85rem;
    }
    .explore-map-lead.bb-inline-help {
        margin-bottom: 0.14rem;
        font-size: 0.8rem;
        line-height: 1.32;
    }
    .explore-map-help.bb-disclosure {
        margin-bottom: 0.34rem;
        padding: 0 0.48rem 0.26rem;
        max-width: none;
    }
    .explore-map-help .bb-disclosure__summary {
        min-height: 44px;
        padding-top: 0.18rem;
        padding-bottom: 0.1rem;
        font-size: 0.77rem;
        line-height: 1.24;
    }
    .explore-map-help .bb-disclosure__panel {
        font-size: 0.82rem;
        line-height: 1.4;
    }
    .explore-map-help .bb-disclosure__panel > p:first-child {
        margin-top: 0.3rem;
    }
    .explore-map-error {
        margin-bottom: 0.5rem;
        padding: 0.42rem 0.55rem;
        font-size: 0.8125rem;
    }
    .explore-map-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.28rem;
        margin-bottom: 0.46rem;
    }
    .explore-map-mode-row {
        width: 100%;
    }
    .explore-map-toolbar .bb-inline-help.explore-map-filter-hint-inline {
        flex: 1 1 100%;
        width: 100%;
        font-size: 0.73rem;
        line-height: 1.3;
    }
    .explore-map-filter-help.bb-disclosure--compact {
        margin-top: 0;
        margin-bottom: 0;
        padding: 0 0.4rem 0.2rem;
        max-width: none;
    }
    .explore-map-filter-help .bb-disclosure__summary {
        min-height: 44px;
        padding-top: 0.16rem;
        padding-bottom: 0.08rem;
        font-size: 0.73rem;
        line-height: 1.22;
    }
    .explore-map-filter-label {
        margin-bottom: 0.05rem;
        font-size: 0.8125rem;
    }
    .explore-map-filter-input {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 44px;
        padding: 0.32rem 0.65rem;
        touch-action: manipulation;
    }
    .explore-map-layer-view {
        justify-content: space-between;
        width: 100%;
        min-height: 44px;
    }
    .explore-map-layer-view__btn {
        flex: 1 1 0;
        /* Tablet widths (481–768): slightly denser than phone while staying tappable */
        min-height: 44px;
        padding-right: 0.48rem;
        padding-left: 0.48rem;
    }
    .explore-map-profile-filters {
        margin-bottom: 0.42rem;
    }
    .explore-map-profile-filters.bb-disclosure--compact {
        padding: 0 0.4rem 0.2rem;
    }
    .explore-map-profile-filters__summary {
        min-height: 44px;
        padding-top: 0.14rem;
        padding-bottom: 0.06rem;
        font-size: 0.8rem;
    }
    .explore-map-profile-filters__subtitle {
        font-size: 0.74rem;
        flex-basis: 100%;
    }
    .explore-map-chip-wrap {
        gap: 0.48rem;
        margin-bottom: 0.72rem;
    }
    .explore-map-chip-wrap--nested {
        margin-bottom: 0;
    }
    .explore-map-chip-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    .explore-map-chip-legend {
        min-width: 0;
        font-size: 0.8rem;
        margin-bottom: 0.06rem;
    }
    .explore-map-chips {
        width: 100%;
        gap: 0.42rem;
    }
    .explore-map-quick-searches {
        flex-wrap: nowrap;
        gap: 0.38rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 0.08rem;
        scrollbar-width: none;
    }
    .explore-map-quick-searches::-webkit-scrollbar {
        display: none;
    }
    .explore-map-quick-searches__label,
    .explore-map-chip--quick {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .explore-map-chip {
        min-height: 44px;
        padding: 0.26rem 0.68rem;
        font-size: 0.8125rem;
        touch-action: manipulation;
    }
    .explore-map-active-filters {
        margin-bottom: 0.62rem;
        padding: 0.45rem 0.55rem;
        font-size: 0.8125rem;
        line-height: 1.42;
    }
    .explore-map-active-filters__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.38rem;
    }
    .explore-map-active-filters__summary {
        flex: none;
        width: 100%;
    }
    .explore-map-active-filters__actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.42rem;
    }
    .explore-map-filter-clear-btn {
        min-height: 44px;
        padding: 0.24rem 0.58rem;
        font-size: 0.77rem;
        touch-action: manipulation;
    }
    .explore-map-layout {
        flex-direction: column;
        gap: 0.62rem;
    }
    .explore-map-list-panel,
    .explore-map-map-panel {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }
    .explore-map-list-heading {
        font-size: 1rem;
        margin-bottom: 0.26rem;
    }
    .explore-map-list-status {
        font-size: 0.84rem;
        line-height: 1.44;
        margin-bottom: 0.42rem;
        padding: 0.38rem 0.5rem;
    }
    .explore-place-item {
        padding: 0.72rem 0.82rem;
        touch-action: manipulation;
    }
    .explore-place-item-active {
        padding-left: calc(0.82rem - 3px);
    }
    .explore-place-meta {
        font-size: 0.74rem;
        margin-top: 0.3rem;
        line-height: 1.38;
    }
    .explore-place-summary {
        margin-top: 0.44rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    .explore-place-syns {
        margin-top: 0.4rem;
        line-height: 1.43;
    }
    .explore-place-profile {
        margin-top: 0.5rem;
        padding: 0.48rem 0.58rem;
    }
    .explore-place-profile-body {
        margin-top: 0.4rem;
        padding-top: 0.4rem;
    }
    .explore-place-list {
        max-height: min(38vh, 300px);
        min-height: 10.5rem;
    }
    .explore-map-canvas {
        min-height: min(40vh, 300px);
    }
    .explore-map-caption {
        line-height: 1.45;
        font-size: 0.78rem;
    }
    .explore-place-detail {
        margin-top: 0.85rem;
        padding: 0.68rem 0.75rem 0.8rem;
    }
    .explore-place-detail__header {
        margin-bottom: 0.4rem;
        gap: 0.32rem 0.5rem;
        align-items: center;
    }
    .explore-place-detail__heading {
        font-size: 0.98rem;
        line-height: 1.22;
    }
    .explore-place-detail__title-wrap .explore-place-detail-help {
        margin-top: 0.1rem;
    }
    .explore-place-detail-help.bb-disclosure--compact {
        padding: 0 0.38rem 0.18rem;
    }
    .explore-place-detail-help .bb-disclosure__summary {
        min-height: 44px;
        padding-top: 0.14rem;
        padding-bottom: 0.06rem;
        font-size: 0.73rem;
        line-height: 1.2;
    }
    .explore-place-detail__close {
        min-height: 44px;
        padding: 0.28rem 0.62rem;
        font-size: 0.8125rem;
    }
    /* Explore Map marker popups only (passage omits --explore) */
    .leaflet-popup-content .map-popup-inner--explore {
        max-width: min(300px, calc(100vw - 2rem));
    }
    .leaflet-popup-content .map-popup-inner--explore .map-popup-title {
        font-size: 1rem;
        line-height: 1.25;
    }
    .leaflet-popup-content .map-popup-inner--explore .map-popup-summary {
        font-size: 0.86rem;
    }
    .leaflet-popup-content .map-popup-inner--explore .map-popup-block {
        font-size: 0.84rem;
    }
    .leaflet-popup-content .map-popup-inner--explore > .map-popup-meta.explore-place-meta {
        font-size: 0.74rem;
        line-height: 1.38;
    }
    .leaflet-popup-content .map-popup-inner--explore:has(> .map-popup-meta.explore-place-meta) > .map-popup-sections {
        gap: 0.5rem;
        padding-top: 0.42rem;
    }
    .leaflet-popup-content .map-popup-inner--explore .map-popup-see-also-wrap {
        line-height: 1.45;
    }
    .leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-preview {
        padding: 0.36rem 0.46rem;
    }
    .leaflet-popup-content .map-popup-inner--explore .explore-map-popup-verse-text {
        font-size: 0.8rem;
        line-height: 1.46;
    }
    .leaflet-popup-content .map-popup-inner--explore > .map-popup-external a {
        display: inline-block;
        padding: 0.25rem 0;
        min-height: 44px;
        line-height: 1.4;
        box-sizing: border-box;
        touch-action: manipulation;
    }
}

@media (max-width: 480px) {
    .explore-map-layer-view__btn {
        min-height: 44px;
    }
}

/* Cognito app hosts (biblebot.heisrisen.net, biblebot.io, www) — sign-in gate */
.app-auth-gate {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.app-auth-gate[hidden] {
    display: none !important;
}
.app-auth-gate-inner {
    width: 100%;
    max-width: 28rem;
}
.app-auth-card {
    background: var(--bb-card-bg);
    border: 1px solid var(--bb-card-border);
    border-radius: 0.75rem;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
.app-auth-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}
.app-auth-lead {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}
.app-auth-muted {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 1.25rem;
    line-height: 1.45;
}
.app-auth-muted code {
    font-size: 0.82rem;
    word-break: break-all;
}
.app-signin-btn {
    width: 100%;
    justify-content: center;
}
.app-main[hidden] {
    display: none !important;
}
.app-callback-main {
    padding: 3rem 1rem;
    text-align: center;
}

/* App home: avoid flash of full marketing chrome while session is checked */
/* pointer-events is not inherited: children of #app-main default to auto and would still capture clicks
   on top of the sign-in gate. Disable hits on the whole subtree while pending. */
html.bb-index-auth-pending #app-main,
html.bb-index-auth-pending #app-main * {
    pointer-events: none !important;
}
html.bb-index-auth-pending #app-main {
    visibility: hidden;
}
html.bb-index-auth-pending #app-auth-gate {
    display: flex !important;
    position: relative;
    z-index: 2;
}

.app-signed-in-banner {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 0;
    font-size: 0.9rem;
}
.app-signed-in-banner[hidden] {
    display: none !important;
}
.app-signed-in-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}
.app-signed-in-label {
    margin-right: 0.25rem;
    color: var(--light-text);
}

/* Protected app pages: sign-in gate overlay */
.bb-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.45);
    box-sizing: border-box;
}
.bb-auth-overlay[hidden] {
    display: none !important;
}
.bb-auth-overlay-card {
    width: 100%;
    max-width: 22rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
.bb-auth-overlay-msg {
    margin: 0 0 1rem;
    line-height: 1.45;
    color: var(--text-color);
}
.bb-auth-overlay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.bb-auth-overlay-actions[hidden] {
    display: none !important;
}
.bb-auth-overlay-forgot {
    flex-basis: 100%;
    margin: 0.75rem 0 0;
    width: 100%;
    font-size: 0.9rem;
    text-align: center;
}
.bb-auth-overlay-forgot a {
    color: var(--primary-color, #2563eb);
    text-decoration: underline;
}

/* Standalone forgot-password.html (Cognito IDP JSON, not Hosted UI) */
.bb-forgot-password-main {
    max-width: 28rem;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
}
.bb-forgot-password-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}
.bb-forgot-password-lead {
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.bb-forgot-password-form {
    margin-bottom: 1.5rem;
}
.bb-forgot-password-label {
    display: block;
    margin: 0.75rem 0 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.bb-forgot-password-input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    font-size: 1rem;
    background: var(--light-bg);
    color: var(--text-color);
}
.bb-forgot-password-submit {
    margin-top: 1rem;
}
.bb-forgot-password-alert {
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 0.35rem;
    line-height: 1.45;
}
.bb-forgot-password-alert--error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: var(--text-color);
}
.bb-forgot-password-alert--ok {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: var(--text-color);
}
.bb-forgot-password-done {
    margin: 1rem 0;
    line-height: 1.6;
}
.bb-forgot-password-footer {
    margin-top: 2rem;
    font-size: 0.95rem;
}

.bb-account-status {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.35rem;
    line-height: 1.5;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--text-color);
}
.bb-account-status[hidden] {
    display: none !important;
}
.bb-account-section-title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}
.bb-account-actions-row {
    margin: 0 0 0.75rem;
}
.bb-account-done-panel .btn {
    display: inline-block;
    margin: 0.25rem 0.35rem 0.25rem 0;
    text-decoration: none;
}

html.bb-study-auth-pending #bb-study-home-main,
html.bb-study-auth-pending #bb-study-home-main * {
    pointer-events: none !important;
}

html.bb-study-auth-pending #bb-study-home-main {
    visibility: hidden;
}

.bb-auth-overlay:not([hidden]) ~ * {
    visibility: hidden;
    pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   BibleBot help layer: subordinate to scripture / primary content (.bb-disclosure,
   .bb-inline-help). Summaries use min-height 44px for tap targets; focus-visible
   ring on .bb-disclosure__summary is unchanged.
   -------------------------------------------------------------------------- */

.bb-inline-help {
    margin: 0 0 0.32rem;
    font-size: var(--bb-help-font-size);
    line-height: var(--bb-help-line-height);
    color: var(--light-text);
    font-weight: 400;
    max-width: 48rem;
    overflow-wrap: anywhere;
}
.bb-inline-help:last-child {
    margin-bottom: 0;
}
.bb-inline-help strong {
    color: var(--text-color);
    font-weight: 600;
}

.bb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bb-onboarding-hint {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
    margin: 0 0 0.55rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(239, 246, 255, 0.82);
}

.bb-onboarding-hint[hidden] {
    display: none !important;
}

.bb-onboarding-hint__text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #475569;
}

.bb-onboarding-hint__text strong {
    color: #1e293b;
    font-weight: 600;
}

.bb-onboarding-hint__dismiss {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 0.08rem 0;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.bb-onboarding-hint__dismiss:hover {
    color: #1d4ed8;
}

.bb-onboarding-hint__dismiss:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
    border-radius: 6px;
}

.hero .bb-inline-help {
    font-size: 0.98rem;
    line-height: 1.46;
    margin-bottom: 1.25rem;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.96;
    font-weight: 400;
}
.hero .bb-inline-help--hero {
    letter-spacing: 0.01em;
}
@media (max-width: 768px) {
    .hero .bb-inline-help {
        font-size: 0.9rem;
        line-height: 1.42;
        margin-bottom: 1rem;
    }
    .bb-inline-help {
        margin-bottom: 0.28rem;
    }
    .explore-map-toolbar {
        gap: 0.32rem 0.55rem;
    }
}

.bb-disclosure {
    margin: 0 0 0.48rem;
    border: 1px solid var(--bb-disclosure-border);
    border-radius: 8px;
    background: var(--bb-disclosure-bg);
    padding: 0 0.52rem 0.38rem;
    max-width: 52rem;
}
.bb-disclosure:last-child {
    margin-bottom: 0;
}
.bb-disclosure__summary {
    list-style: none;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.3rem 0.12rem 0.22rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--light-text);
    line-height: 1.28;
    user-select: none;
    border-radius: 6px;
    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease;
}
.bb-disclosure__summary:hover {
    background: rgba(241, 245, 249, 0.72);
    color: rgba(30, 41, 59, 0.92);
}
.bb-disclosure__summary:active {
    transform: translateY(0.5px);
}
.bb-disclosure__summary::-webkit-details-marker {
    display: none;
}
.bb-disclosure__summary::marker {
    content: '';
}
.bb-disclosure__summary:focus {
    outline: none;
}
.bb-disclosure__summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.bb-disclosure__panel {
    padding: 0 0 0.28rem;
    border-top: 1px solid var(--bb-disclosure-panel-border);
    margin-top: 0.08rem;
}
.bb-disclosure[open] > .bb-disclosure__panel {
    animation: bb-disclosure-panel-in 0.16s ease-out;
}
.bb-disclosure__panel > p:first-child,
.bb-disclosure__panel > ul:first-child {
    margin-top: 0.34rem;
}
.bb-disclosure__panel > p:last-child {
    margin-bottom: 0;
}

.bb-disclosure--compact {
    margin-bottom: 0.3rem;
    padding: 0 0.44rem 0.28rem;
    max-width: none;
    border: 1px solid var(--bb-disclosure-border);
    background: var(--bb-disclosure-bg-compact);
}
.bb-disclosure--compact .bb-disclosure__summary {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.26;
    min-height: 44px;
    padding: 0.26rem 0.1rem 0.18rem 0;
    color: var(--light-text);
}
.bb-disclosure--compact .bb-disclosure__panel {
    padding-bottom: 0.22rem;
    font-size: var(--bb-help-font-size);
    line-height: var(--bb-help-line-height);
    color: var(--light-text);
}
.bb-disclosure--compact .bb-disclosure__panel > p:first-child {
    margin-top: 0.34rem;
}

.bb-disclosure--help {
    background: color-mix(in srgb, var(--bb-disclosure-bg-compact) 86%, var(--bb-color-bg-surface-raised, #fff));
}

.bb-disclosure--help .bb-disclosure__summary {
    gap: 0.42rem;
}

.bb-disclosure--help .bb-disclosure__summary::before {
    content: "?";
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.34rem;
    height: 1.34rem;
    border: 1px solid color-mix(in srgb, var(--primary-color) 28%, var(--bb-disclosure-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bb-color-bg-surface-raised, #fff) 78%, var(--primary-color) 8%);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.bb-disclosure--help .bb-disclosure__summary--icon-only {
    justify-content: center;
    width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
}
@keyframes bb-disclosure-panel-in {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bb-disclosure--form {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
    margin-bottom: 0;
}

.source-code .bb-disclosure--compact {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.75rem;
    margin-top: 0;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    padding: 0 0.5rem 0.32rem;
}
.source-code .bb-disclosure--compact .bb-disclosure__summary {
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding-top: 0.26rem;
    padding-bottom: 0.18rem;
    min-height: 44px;
}
.source-code .bb-disclosure--compact .bb-disclosure__panel {
    border-top-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    line-height: 1.45;
}
.source-code .bb-disclosure--compact .bb-disclosure__panel > p:first-child {
    margin-top: 0.34rem;
}
.index-open-source-btn {
    display: inline-flex;
    justify-content: center;
    margin-top: 0.35rem;
}

/* Passage: lookup & reading chrome */
.passage-lookup-help.bb-disclosure,
.passage-lookup-intro.bb-disclosure {
    max-width: 48rem;
    margin-bottom: 0.4rem;
    border-color: var(--bb-disclosure-border-quiet);
    background: var(--bb-disclosure-bg-quiet);
}
.passage-main .passage-lookup-help .bb-disclosure__summary,
.passage-main .passage-lookup-intro .bb-disclosure__summary {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--light-text);
}
.passage-lookup-help .passage-desc,
.passage-lookup-intro .passage-desc {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.48;
    color: var(--light-text);
}
.passage-main > .passage-lead.bb-inline-help {
    margin-bottom: 0.12rem;
    font-size: 0.76rem;
    line-height: 1.38;
    opacity: 0.9;
}
.passage-lead {
    margin-bottom: 0.22rem;
    max-width: 48rem;
}
.translation-pref-help.bb-disclosure {
    margin-top: 0.18rem;
    margin-bottom: 0;
}
.translation-pref-help .translation-pref-hint {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
}
.translations-toolbar .translation-selector-help.bb-disclosure {
    margin-top: 0.22rem;
    margin-bottom: 0;
}
.translation-selector-help .translation-selector-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}
.translations-compare-hint-wrap .translations-compare-help {
    margin-bottom: 0;
}
.translations-compare-hint-wrap .translations-compare-hint {
    margin: 0.28rem 0 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgba(71, 85, 105, 0.92);
}
.translations-compare-hint-wrap {
    margin: 0.08rem 0 0.22rem;
}
.translations-compare-hint-wrap .bb-disclosure__summary {
    font-size: 0.78rem;
}
.passage-surrounding-verses-help.bb-disclosure {
    margin: 0.15rem 0 0.35rem;
}
.passage-surrounding-verses-help .bb-disclosure__summary--icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.9);
    font-size: 0.95rem;
    line-height: 1;
    color: var(--light-text, #64748b);
    cursor: pointer;
    box-sizing: border-box;
}
.passage-surrounding-verses-help .bb-disclosure__summary--icon-only:hover,
.passage-surrounding-verses-help .bb-disclosure__summary--icon-only:focus-visible {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
    outline: none;
}
.passage-surrounding-verses-help .passage-surrounding-verses-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}
.source-tokens-toolbar__lead {
    margin: 0.28rem 0 0.18rem;
}
.source-tokens-help.bb-disclosure {
    margin-top: 0.18rem;
    margin-bottom: 0;
}
.source-tokens-help .source-tokens-toolbar__hint,
.source-tokens-help .source-tokens-toolbar__pronunciation-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Passage page — mobile readability & density (≤768px). Tighter chrome before
   scripture, compact disclosures, translation toolbar column layout, balanced
   body type when multiple translations stack.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .passage-main h3.passage-viewer-title {
        margin-bottom: 0.18rem;
    }

    .passage-main > .passage-lead.bb-inline-help {
        margin-bottom: 0.14rem;
        font-size: 0.76rem;
        line-height: 1.36;
    }

    .passage-main .passage-lookup-help.bb-disclosure,
    .passage-main .passage-lookup-intro.bb-disclosure {
        margin-bottom: 0.24rem;
        padding: 0 0.48rem 0.28rem;
    }

    .passage-main .passage-lookup-help .bb-disclosure__summary,
    .passage-main .passage-lookup-intro .bb-disclosure__summary {
        min-height: 40px;
        padding-top: 0.2rem;
        padding-bottom: 0.12rem;
        font-size: 0.74rem;
        line-height: 1.28;
    }

    .passage-main .passage-lookup-help .passage-desc,
    .passage-main .passage-lookup-intro .passage-desc {
        margin-top: 0.32rem;
        font-size: 0.8rem;
        line-height: 1.44;
    }

    .passage-main .translation-pref-help.bb-disclosure {
        margin-top: 0.12rem;
    }

    .passage-main .translation-pref-help .bb-disclosure__summary,
    .passage-results .translations-compare-help .bb-disclosure__summary,
    .passage-results .translation-selector-help .bb-disclosure__summary,
    .passage-results .reading-area .passage-surrounding-verses-help .bb-disclosure__summary {
        min-height: 40px;
        padding-top: 0.18rem;
        padding-bottom: 0.1rem;
        font-size: 0.74rem;
        line-height: 1.26;
    }

    .passage-main .translation-pref-help.bb-disclosure,
    .passage-results .translations-compare-help.bb-disclosure,
    .passage-results .translations-toolbar .translation-selector-help.bb-disclosure {
        padding: 0 0.42rem 0.22rem;
        margin-bottom: 0.18rem;
    }

    .passage-ref-bar {
        gap: 0.5rem;
        margin-bottom: 0.48rem;
    }

    .passage-form {
        padding: 0.52rem 0.62rem;
        gap: 0.35rem;
    }

    .passage-lookup-primary {
        gap: 0.32rem 0.5rem;
    }

    .passage-structured-details {
        margin-top: 0.08rem;
        padding-top: 0.26rem;
    }

    .passage-structured-summary {
        padding-top: 0.22rem;
        font-size: 0.8rem;
        line-height: 1.28;
    }

    .passage-results {
        margin-top: 0.34rem;
    }

    .passage-results .section-divider.passage-scripture-block-start {
        margin: 0.08rem 0 0.12rem;
    }

    .passage-results .translations-heading {
        margin-bottom: 0.18rem;
        font-size: 0.66rem;
        letter-spacing: 0.05em;
    }

    .passage-results .licenses-inline-link {
        margin-bottom: 0.32rem;
        font-size: 0.72rem;
    }

    .passage-results .translation-preference-summary {
        margin-bottom: 0.38rem;
        padding: 0.38rem 0.52rem;
        font-size: 0.78rem;
        line-height: 1.42;
    }

    .passage-results .translations-context-status,
    .passage-results .translation-availability-notice {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 0.42rem;
        padding: 0.35rem 0.48rem;
    }

    .passage-results .translations-compare-hint-wrap .translations-compare-hint {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    #passageResults .translations-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.22rem;
        padding: 0.24rem 0.32rem;
        margin: 0.04rem 0 0.3rem;
    }

    #passageResults .translations-toolbar--filtered-active {
        margin: 0.02rem 0 0.32rem;
    }

    .passage-results .translations-toolbar__show-wrap {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.28rem 0.45rem;
        width: 100%;
    }

    .passage-results .translations-toolbar .translation-selector-label {
        flex: 1 1 100%;
        font-size: 0.8125rem;
        line-height: 1.25;
    }

    .passage-results .translations-toolbar select {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        min-height: 2.5rem;
        font-size: 0.9375rem;
    }

    .passage-results .translations-toolbar .translation-filter-status {
        flex: 1 1 100%;
        font-size: 0.78rem;
        line-height: 1.36;
    }

    .passage-results .reading-area {
        padding: 0.06rem 0;
    }

    .passage-results .reading-area__chrome-nav {
        margin-top: 0.12rem;
        padding: 0.22rem 0.26rem 0.28rem;
    }

    #passageResults .result-translations.study-panel {
        padding-left: 0.14rem;
        border-left-color: rgba(226, 232, 240, 0.75);
    }

    .passage-results .reading-area .verse-header .result-reference {
        font-size: clamp(1.02rem, 3.6vw, 1.2rem);
        line-height: 1.2;
        margin-bottom: 0.08rem;
        font-weight: 600;
        color: rgba(15, 23, 42, 0.86);
    }

    .passage-results .result-translations.study-panel {
        padding-top: 0.08rem;
    }

    .passage-results .translation-text,
    .passage-results .translation-text--passage-prose {
        font-size: 1.06rem;
        line-height: 1.74;
    }

    .passage-results .translation-block {
        margin-bottom: 1.05rem;
        padding: 0.88rem 0.92rem;
    }

    .passage-results .translation-block--passage-level {
        padding-left: calc(0.92rem - 3px);
    }

    .passage-results .reading-area .passage-surrounding-verses-help.bb-disclosure {
        margin: 0.18rem 0 0.32rem;
    }

    .passage-results .passage-verse-gated-study-bridge {
        margin: 0.1rem auto 0.28rem;
        padding: 0 0.08rem;
    }

    .passage-results .passage-verse-gated-study-bridge__lead {
        font-size: 0.76rem;
        margin-bottom: 0.22rem;
    }

    .passage-results .passage-verse-gated-study-bridge__panel {
        font-size: 0.74rem;
    }

    .passage-results .passage-ol-readiness-status {
        font-size: 0.74rem;
        margin-bottom: 0.22rem;
    }

    .passage-results .passage-page-jump {
        margin: 0.22rem 0 0.42rem;
        padding: 0.26rem 0.38rem;
        font-size: 0.74rem;
        gap: 0.2rem 0.42rem;
    }

    .passage-results #passageSurroundingVersesRegion,
    .passage-results #passageTimelineSection,
    .passage-results #placesPanelHeading,
    .passage-results #mapSectionWrap,
    .bb-reader-unified-crossrefs #crossRefsPanelHeading,
    .passage-results #passageSourceTokensHeading {
        scroll-margin-top: 4.75rem;
    }
}

@media (max-width: 430px) {
    .passage-main > .passage-lead.bb-inline-help {
        font-size: 0.74rem;
    }

    .passage-results .translation-text,
    .passage-results .translation-text--passage-prose {
        font-size: 1.03rem;
        line-height: 1.68;
    }

    .passage-results .reading-area .verse-header .result-reference {
        font-size: clamp(0.98rem, 4.2vw, 1.14rem);
    }
}

/* Legacy reading surface: outer tray disclosure is structural only; keep prior single-band look. */
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-study-tray-dashboard-details__summary {
    display: none;
}
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-study-tray-dashboard-details__body {
    padding: 0;
    border-top: none;
}

/* Passage study tray: scripture-first — hide optional surfaces until enabled */
.bb-passage-surface.bb-passage-surface--off {
    display: none !important;
}

a.bb-page-jump__link--off {
    display: none !important;
}

.bb-study-tray-wrap {
    margin: 0.52rem 0 0.55rem;
    max-width: 100%;
}
.passage-results .bb-study-tray-wrap + .passage-verse-gated-study-bridge {
    margin-top: 0.12rem;
}
.passage-results .passage-verse-gated-study-bridge + .bb-below-passage-nav-details {
    margin-top: 0.08rem;
}

/*
 * Scripture-first v1: legacy inline tray is hidden; passage toolbar + unified overlay carry study UX.
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayWrap {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details {
    margin: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details__summary {
    display: block;
    width: 100%;
    padding: 0.12rem 0.2rem 0.1rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(100, 116, 139, 0.52);
    list-style: none;
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details__summary::-webkit-details-marker {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.12rem 0 0;
    margin-top: 0.06rem;
    border-top: none;
    text-align: left;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-card__preset-row {
    margin-top: 0;
    margin-bottom: 0.14rem;
    gap: 0.28rem;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-study-tray-card,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard {
    padding: 0.32rem 0.42rem 0.42rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Scripture-first shelf: row-set strip reads as a muted footer, not a card (see refreshBbStudyTrayUi + .bb-study-tray-card--sf-light-shelf). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.04rem 0 0.12rem;
    margin-top: 0.06rem;
    border-top: none;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-segmented {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    gap: 0.04rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-segmented .bb-study-preset--seg {
    border: none;
    border-right: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-preset:hover {
    border-color: transparent;
    color: rgba(30, 64, 175, 0.88);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-card__preset-summary:empty {
    margin: 0;
    padding: 0;
    min-height: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf > .bb-study-tray-card__head {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-card__chips-row {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-card__preset-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.06rem 0.12rem;
    margin: 0.1rem 0 0;
    padding: 0.1rem 0 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(226, 232, 240, 0.32);
    box-shadow: none;
    opacity: 0.55;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-card__preset-row:hover {
    opacity: 0.88;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-preset--seg {
    min-height: 1.38rem;
    padding: 0.06rem 0.28rem;
    font-size: 0.52rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    border-radius: 5px;
    border-color: transparent;
    background: transparent;
    color: rgba(100, 116, 139, 0.72);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-tray-segmented .bb-study-preset--seg.bb-study-preset--active {
    color: rgba(30, 64, 175, 0.92);
    background: rgba(255, 255, 255, 0.5);
    border-color: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-preset--custom.bb-study-preset--active {
    border: none;
    background: rgba(255, 255, 255, 0.5);
    color: rgba(30, 64, 175, 0.92);
    font-weight: 600;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf .bb-study-preset--custom {
    min-height: 1.38rem;
    padding: 0.06rem 0.3rem;
    font-size: 0.52rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 5px;
    border: none;
    background: transparent;
    opacity: 0.82;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf ~ #bbBelowPassageNavDetails .bb-below-passage-nav-details__summary {
    padding: 0.06rem 0.14rem;
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.62);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard.bb-study-tray-card--sf-light-shelf ~ #bbBelowPassageNavDetails .passage-page-jump {
    font-size: 0.62rem;
}

/*
 * Scripture-first: verse quick bridge only after below-text is engaged (tray surfaces, companion lane, or tray drawer open).
 * Matches syncBbVerseStudyQuickActions + bbSfBelowTextEngagedForQuickBridge in passage.html.
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-verse-gated-study-bridge {
    display: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .reading-area:has(#bbStudyTrayWrap[data-bb-tray-any-on='true']):has(#bbVerseStudyQuick:not([hidden])) .passage-verse-gated-study-bridge,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .reading-area:has(#bbBelowPassageStudyZone[data-bb-companion-active='on']):has(#bbVerseStudyQuick:not([hidden])) .passage-verse-gated-study-bridge,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .reading-area:has(#bbStudyTrayDashboardDetails[open]):has(#bbVerseStudyQuick:not([hidden])) .passage-verse-gated-study-bridge {
    display: block;
    max-height: none;
    overflow: visible;
    margin-top: 0.14rem;
}
/* Dock: scripture-first — Ask + passage map (Maps) primary/secondary; More optional; legacy OL/Notes quick nodes stay hidden for tool-hub synthetic clicks. */
/* Section jumps: only inside “More below” disclosure — not on the main reading path. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details .bb-below-passage-nav-details--in-tray {
    margin: 0.08rem 0 0;
    padding-top: 0.14rem;
    border-top: 1px solid rgba(226, 232, 240, 0.45);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details .bb-below-passage-nav-details--in-tray .bb-below-passage-nav-details__summary {
    min-height: 1.42rem;
    padding: 0.06rem 0.2rem;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.48);
    list-style: none;
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details .bb-below-passage-nav-details--in-tray .bb-below-passage-nav-details__body {
    padding: 0.12rem 0 0.06rem;
    border-top: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details .bb-below-passage-nav-details--in-tray .passage-page-jump {
    margin: 0.08rem 0 0;
}
/* Scripture-first: when the tray dashboard is open, below-passage jump links render as a flat row (no nested disclosure summary). */
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbStudyTrayDashboardDetails[open]
    #bbBelowPassageNavDetails.bb-below-passage-nav-details--in-tray:not(.bb-below-passage-nav-details--empty)
    > summary {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbStudyTrayDashboardDetails[open]
    #bbBelowPassageNavDetails.bb-below-passage-nav-details--in-tray:not(.bb-below-passage-nav-details--empty)
    .bb-below-passage-nav-details__body {
    padding: 0;
    border: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbStudyTrayDashboardDetails[open]
    .bb-below-passage-nav-details--in-tray:not(.bb-below-passage-nav-details--empty) {
    margin-top: 0.04rem;
    padding-top: 0.04rem;
    border: none;
    border-top: none;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbStudyTrayDashboardDetails[open]
    .bb-below-passage-nav-details--in-tray:not(.bb-below-passage-nav-details--empty)
    .passage-page-jump {
    gap: 0.1rem 0.28rem;
    margin: 0.02rem 0 0;
    padding: 0.04rem 0 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 0.6rem;
    max-width: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbStudyTrayDashboardDetails[open]
    .bb-below-passage-nav-details--in-tray:not(.bb-below-passage-nav-details--empty)
    .passage-page-jump__label {
    font-weight: 500;
    font-size: 0.58rem;
    color: rgba(148, 163, 184, 0.72);
    margin-right: 0.06rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details .bb-below-passage-nav-details--in-tray.bb-below-passage-nav-details--empty {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-wrap[data-bb-tray-any-on='false'] {
    opacity: 0.38;
    transition: opacity 0.15s ease;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-wrap[data-bb-tray-any-on='false']:not([data-bb-companion-active='on']) {
    margin: 0.28rem auto 0.02rem;
    opacity: 0.32;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-study-tray-wrap[data-bb-tray-any-on='false']:not([data-bb-companion-active='on'])
    .bb-study-tray-dashboard-details__summary {
    padding: 0.06rem 0.12rem 0.05rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-study-tray-wrap[data-bb-tray-any-on='false']:not([data-bb-companion-active='on'])
    .bb-study-tray-dashboard-details__body {
    margin-top: 0.06rem;
    padding-top: 0.16rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-study-tray-wrap[data-bb-tray-any-on='false']:not([data-bb-companion-active='on'])
    .bb-study-tray-card__chips-row {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-wrap[data-bb-tray-any-on='false']:hover,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-wrap[data-bb-tray-any-on='false']:focus-within {
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) {
    margin-top: 0.18rem;
    padding-top: 0.08rem;
    border-top: none;
    border-radius: 0;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) .bb-study-workspace__chrome,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) .context-section-header.bb-study-workspace__chrome {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0.1rem 0.04rem 0.12rem;
    border-bottom: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) .bb-study-workspace__title,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) .context-heading.bb-study-workspace__title {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(71, 85, 105, 0.58);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-surface:not(.bb-passage-surface--off) .study-panel {
    box-shadow: none;
    border: none;
    background: transparent;
}

/* Single secondary stack: all below-text study surfaces read as one quiet column. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone {
    margin-top: 0.35rem;
    padding: 0.5rem clamp(0.45rem, 2.5vw, 1rem) 0.42rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.28);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageStudyZone:not([data-bb-companion-active='on']) {
    margin-top: 0.14rem;
    padding: 0.18rem clamp(0.45rem, 2.5vw, 1rem) 0.2rem;
    gap: 0.1rem;
    border-radius: 0;
    background: transparent;
    border-top: 1px solid rgba(148, 163, 184, 0.05);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-lane-strip {
    order: -1;
    margin: 0 0 0.04rem;
    padding: 0.1rem 0.2rem 0.12rem;
    align-self: center;
    max-width: min(100%, 36rem);
    font-size: 0.68rem;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.01em;
    text-transform: none;
    text-align: center;
    color: rgba(71, 85, 105, 0.48);
    border-radius: 0;
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-lane-strip[hidden] {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionStack .bb-passage-surface:not(.bb-passage-surface--off) {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    background: transparent !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone .bb-study-workspace__chrome .section-icon {
    display: none !important;
}

/* One secondary lane: workspace titles become screen-reader only (footer summary names the lane). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone .bb-study-workspace__chrome {
    position: relative;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone .ai-study-presets__head {
    margin-bottom: 0.08rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone .ai-study-presets-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.5);
}
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-study-tray__sf-below-cap {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray__sf-below-cap {
    font-size: 0.66rem;
    line-height: 1.35;
    color: rgba(100, 116, 139, 0.78);
    margin: 0 0 0.32rem;
    max-width: 34rem;
}

/*
 * Scripture-first: passage lookup disclosure (base). Header row body + quiet overrides ~13942; layout ~16530.
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-passage-lookup-details {
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(252, 253, 255, 0.5);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-passage-lookup-details__summary {
    padding: 0.12rem 0.22rem 0.12rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.035em;
    color: rgba(100, 116, 139, 0.82);
    list-style: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-passage-lookup-details__summary::-webkit-details-marker {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-passage-lookup-details__body {
    padding: 0.28rem 0.34rem 0.34rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-passage-lookup-details__summary-label {
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Thin opener strip above scripture — reduce vertical competition with the first verse block. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace {
    margin: 0;
    padding: 0 0.1rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__lookup {
    padding-top: 0 !important;
}
@media (min-width: 880px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace {
        gap: 0.04rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
        padding-bottom: 0;
        border-bottom: none;
    }
}

/*
 * Reading mode shell + quiet header (scripture-first v1).
 * Structural bridge: one column for “read here”, Library drawer for navigation surfaces.
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] {
    --reading-max: 46rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-mode-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 0;
}
/* Header chrome: title row + action row (when not [hidden]) stack reading chrome; .bb-sf-page-chrome-title-row is the same node. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem 0.36rem;
    row-gap: 0.02rem;
    padding: 0 0 0.02rem;
    margin: 0;
    border-bottom: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header .passage-viewer-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt {
    margin: 0;
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.92rem;
    padding: 0.14rem 0.48rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(71, 85, 105, 0.72);
    list-style: none;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.55);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt__summary::-webkit-details-marker {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt__body {
    margin-top: 0.22rem;
    padding: 0.28rem 0.32rem 0.32rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(252, 253, 255, 0.96);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt__body .passage-reader-header__toolbelt {
    flex-wrap: wrap;
    gap: 0.28rem;
    margin: 0;
}

/* Status strip inside workspace: no extra bottom padding (workspace card border removed in SF). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
    padding-bottom: 0;
}
@media (min-width: 880px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
        padding-bottom: 0;
    }
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head .passage-reader-header__title-row.bb-sf-page-chrome-title-row {
    margin-bottom: 0;
}
/* Shell chip shows the passage address; keep #resultReference in DOM for loaders, focus, and scroll targets. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfReadingHeadingHost .verse-header__ref-row {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfReadingHeadingHost {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 0;
    min-width: 0;
}
/* Add-verses mode: reader header can stack above the selection rail — pass hits through except known interactive subtrees. */
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header.passage-reader-header--reading-head {
    pointer-events: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    #bbSfPassageMultiSelectAffordance,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    #bbSfPassageMultiSelectAffordance *,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    .passage-reader-header__actions--scripture-first,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    .passage-reader-header__actions--scripture-first *,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    #bbPassageStudyActionRow,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    #bbPassageStudyActionRow *,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    .bb-sf-reader-context-band,
.passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
    .passage-reader-header--reading-head
    .bb-sf-reader-context-band * {
    pointer-events: auto !important;
}
/* Book / chapter context: flat band under title — not a second “card” stack. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-continue-reading-bar.bb-continue-reading-bar--visible {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-reader-location-line {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.9);
    border: none;
    border-radius: 0;
    background: transparent;
    gap: 0.1rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-reader-location-line__trail {
    font-size: 0.62rem;
    color: rgba(100, 116, 139, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-reader-location-line.bb-reader-location-line--chapter {
    padding: 0.06rem 0;
    background: transparent;
    border: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-reader-location-line.bb-reader-location-line--book {
    padding: 0.06rem 0;
    border: none;
    border-left: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-reader-location-line.bb-reader-location-line--book .bb-reader-location-line__primary {
    font-size: 0.72rem;
    font-weight: 600;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip:not([hidden]) {
    margin: 0;
    padding: 0.08rem 0 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__row {
    margin-bottom: 0.12rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__label {
    font-size: 0.68rem;
    color: rgba(51, 65, 85, 0.88);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__fraction {
    font-size: 0.62rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-bar {
    height: 3px;
    margin: 0.08rem 0 0.06rem;
    border-radius: 2px;
    background: rgba(226, 232, 240, 0.9);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__actions {
    gap: 0.2rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__actions .btn-sm {
    font-size: 0.66rem;
    padding: 0.16rem 0.32rem;
    min-height: 2.05rem;
    border-radius: 6px;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-book-reading-progress-strip__actions .btn-secondary:focus-visible,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .reading-area
    .reading-area__chrome-nav--sf-continuation
    .btn.btn-secondary:focus-visible {
    outline: 2px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-book-mode-badge:not([hidden]) {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.12rem 0.34rem;
    opacity: 0.92;
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(236, 253, 245, 0.55);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #activeSessionBanner.active-session-banner:not([hidden]) {
    margin-top: 0.12rem;
    margin-bottom: 0.12rem;
    padding: 0.22rem 0.38rem;
    font-size: 0.78rem;
    border-radius: 6px;
    opacity: 0.95;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-book-continue-wrap:not([hidden]) {
    margin-top: 0.1rem;
    padding-top: 0.08rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area__chrome-nav--sf-continuation .bb-book-continue-wrap:not([hidden]) {
    margin-top: 0;
    padding-top: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-book-continue-progress:not([hidden]) {
    font-size: 0.68rem;
    opacity: 0.86;
    margin-bottom: 0.18rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area__chrome-nav--sf-continuation .bb-book-continue-progress:not([hidden]) {
    margin-bottom: 0.06rem;
    font-size: 0.62rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-book-continue-next {
    font-size: 0.78rem;
    padding: 0.22rem 0.48rem;
    min-height: 2.1rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-passage-nav-chapter-cue:not([hidden]) {
    font-size: 0.62rem;
    opacity: 0.76;
    margin-top: 0.06rem;
    line-height: 1.35;
    color: rgba(100, 116, 139, 0.88);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-mode-shell .passage-reader-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsHeading .section-icon {
    display: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsHeading {
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(100, 116, 139, 0.55);
}

/* Slim utility rail: one compact action row (meta + tools + translation + marks). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-sf-reading-utility-rail {
    margin: 0 0 0.01rem;
    padding: 0 0 0.03rem;
    border-top: none;
    border-bottom: none;
    opacity: 0.97;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.08rem 0.24rem;
    max-width: var(--reading-max, 52rem);
    margin: 0 auto;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__translations {
    order: 2;
    flex: 1 1 10rem;
    min-width: 0;
    max-width: min(100%, 18rem);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar__show-wrap {
    min-width: 0;
    flex: 1 1 auto;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-sf-reading-utility-rail .translations-toolbar {
    flex: 1 1 min(100%, 12rem);
    min-width: 0;
    margin: 0;
    max-width: none;
    padding: 0;
    gap: 0.12rem 0.2rem;
    font-size: 0.64rem;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    color: rgba(100, 116, 139, 0.68);
    opacity: 0.94;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__marks {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.06rem 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
    opacity: 0.88;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .verse-header-icon-btn {
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0.12rem;
    font-size: 0.92rem;
    line-height: 1;
    border-radius: 8px;
    border-color: rgba(148, 163, 184, 0.09);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        transform 0.12s ease;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .verse-header-icon-btn:hover {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.45);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .verse-header-icon-btn:focus-visible {
    outline: 2px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .verse-header-icon-btn:active {
    transform: translateY(0.5px);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__quick {
    order: 1;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open {
    order: 3;
    flex: 0 0 auto;
    align-self: center;
    min-height: 2.28rem;
    margin-left: auto;
    padding: 0.1rem 0.26rem;
    font-size: 0.56rem;
    font-weight: 450;
    letter-spacing: 0.04em;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(100, 116, 139, 0.55);
    box-shadow: none;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open:hover {
    border-color: rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.55);
    color: rgba(71, 85, 105, 0.78);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translation-selector-label {
    font-weight: 480;
    color: rgba(100, 116, 139, 0.66);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translation-filter-status {
    font-size: 0.58rem;
    font-weight: 450;
    line-height: 1.22;
    color: rgba(100, 116, 139, 0.58);
    flex: 1 1 5.5rem;
    min-width: 0;
    max-width: min(100%, 14rem);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar--filtered-active,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar--show-matches-saved-pref,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-sf-reading-utility-rail
    .translations-toolbar.translations-toolbar--visibility-single-other.translations-toolbar--filtered-active {
    margin: 0;
    border-radius: 6px;
    border-color: rgba(148, 163, 184, 0.12) !important;
    background: rgba(248, 250, 252, 0.4) !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-sf-reading-utility-rail
    .translations-toolbar--filtered-active
    .translation-filter-status {
    font-weight: 450;
    color: rgba(71, 85, 105, 0.68);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open:hover {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.55);
    color: rgba(71, 85, 105, 0.9);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open:focus-visible {
    outline: 2px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open:active {
    transform: translateY(0.5px);
}
/* Translation + marks: light trailing utility band (only when translation row is shown). */
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-sf-reading-utility-rail__translations:not([hidden])
    + .bb-sf-reading-utility-rail__marks {
    margin-left: 0.12rem;
    padding-left: 0.36rem;
    border-left: 1px solid rgba(148, 163, 184, 0.075);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail #translationSelector {
    min-height: 2.1rem;
    padding: 0.18rem 0.42rem 0.18rem 0.36rem;
    font-size: 0.72rem;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.55);
    color: rgba(51, 65, 85, 0.9);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail #translationSelector:hover {
    border-color: rgba(148, 163, 184, 0.26);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail #translationSelector:focus-visible {
    outline: 2px solid rgba(100, 116, 139, 0.38);
    outline-offset: 2px;
    border-color: rgba(100, 116, 139, 0.32);
}
/* Wide screens: drop decorative mount divider; micro-tighten strip rhythm (phone/tablet share base tokens above). */
@media (min-width: 768px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-sf-reading-utility-rail {
        margin-bottom: 0.04rem;
        padding: 0.02rem 0 0.05rem;
        border-bottom-color: rgba(148, 163, 184, 0.055);
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__row {
        gap: 0.12rem 0.34rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__quick {
        margin-right: 0.05rem;
    }
}

/* Verse ref row: title reads first. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .verse-header__ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.22rem 0.4rem;
    width: 100%;
    min-width: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .verse-header__ref-row .result-reference {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-weight: 480;
    font-size: clamp(0.94rem, 0.22vw + 0.9rem, 1.02rem);
    color: rgba(100, 116, 139, 0.72);
    letter-spacing: -0.012em;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsContextStatus:not([hidden]) {
    margin: 0.08rem auto 0.12rem;
    padding: 0.1rem 0.28rem 0.12rem;
    font-size: 0.62rem;
    line-height: 1.35;
    max-width: var(--reading-max, 52rem);
    border-radius: 6px;
    background: rgba(248, 250, 252, 0.55);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationPreferenceSummary {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-chrome-extras {
    margin: 0;
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-chrome-extras__summary {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.14rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 650;
    color: rgba(71, 85, 105, 0.88);
    list-style: none;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.72);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-chrome-extras__summary::-webkit-details-marker {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-chrome-extras__body {
    margin-top: 0.12rem;
    padding-top: 0.12rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details {
    margin: 0.06rem auto 0.1rem;
    max-width: var(--reading-max, 52rem);
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details__summary {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.12rem 0.38rem;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: rgba(71, 85, 105, 0.88);
    list-style: none;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(252, 253, 255, 0.65);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details__summary::-webkit-details-marker {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details__body {
    padding: 0.1rem 0.06rem 0.04rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details .passage-page-jump {
    margin: 0.12rem 0 0.12rem;
}

/* No section-jump targets: hide the disclosure entirely (quiet reader + default v1). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-nav-details.bb-below-passage-nav-details--empty {
    display: none !important;
}

/*
 * Reader quiet mode (scripture-first v1): one coherent reading column.
 * Ref picker leads; Library / lookup / menus are minimal glyphs; study tray stays secondary.
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__titles {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.55rem;
    width: 100%;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__ref-picker-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem 0.55rem;
    flex: 3 1 0;
    min-width: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__actions {
    flex: 0 1 auto;
    min-width: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-book-mode-badge:not([hidden]) {
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    padding: 0.12rem 0.38rem;
    background: rgba(252, 253, 255, 0.75);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-header-toolbelt__summary,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-passage-lookup-details__summary,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reading-chrome-extras__summary,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-below-passage-nav-details__summary {
    opacity: 0.78;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    min-height: 1.9rem !important;
    padding: 0.08rem 0.32rem !important;
    border-color: rgba(148, 163, 184, 0.11) !important;
    background: rgba(252, 253, 255, 0.42) !important;
    color: rgba(71, 85, 105, 0.75) !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-header-toolbelt__summary {
    opacity: 0.48 !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-ref-picker-open-btn {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(51, 65, 85, 0.78);
    border-color: rgba(226, 232, 240, 0.75);
    background: rgba(252, 253, 255, 0.55);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-study-tray-dashboard-details {
    border: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .bb-reader-passage-lookup-details {
    border-color: rgba(148, 163, 184, 0.07);
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-ui--quiet
    .passage-reader-header__passage-lookup--in-title-row
    .bb-reader-passage-lookup-details[open] {
    background: rgba(252, 253, 255, 0.55);
    border-color: rgba(148, 163, 184, 0.1);
}
/* Header passage row: text-like disclosure, not a second chrome strip (overrides quiet !important above). */
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-ui--quiet
    .passage-reader-header__passage-lookup--in-title-row
    .bb-reader-passage-lookup-details__summary {
    opacity: 0.88 !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.035em !important;
    text-transform: none !important;
    min-height: 1.85rem !important;
    padding: 0.1rem 0.2rem 0.12rem !important;
    border: none !important;
    background: transparent !important;
    color: rgba(100, 116, 139, 0.82) !important;
    border-radius: 6px !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-ui--quiet
    .passage-reader-header__passage-lookup--in-title-row
    .bb-reader-passage-lookup-details[open]
    > .bb-reader-passage-lookup-details__summary {
    background: rgba(248, 250, 252, 0.65) !important;
    border: 1px solid rgba(148, 163, 184, 0.1) !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet #passageResults .translations-toolbar .translation-selector-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(100, 116, 139, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet #passageResults .translations-toolbar select {
    font-size: 0.72rem;
    padding: 0.14rem 0.32rem;
}

/*
 * Scripture-first reader-first: one calm reading column; study UI as whisper.
 * Scripture hero + flat companion band (not isolated label polish).
 */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results:not([hidden]) {
    margin-top: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #passageLoading.passage-loading:not([hidden]),
.passage-main[data-bb-reading-surface='scripture-first-v1'] #passageError.passage-error:not([hidden]) {
    margin-top: 0.06rem;
    margin-bottom: 0.22rem;
    padding: 0.3rem 0.48rem;
    font-size: 0.82rem;
    line-height: 1.38;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
    max-width: var(--reading-max);
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
    padding-left: clamp(0.65rem, 3.2vw, 1.35rem);
    padding-right: clamp(0.65rem, 3.2vw, 1.35rem);
    padding-bottom: 0.18rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translations-block-head {
    margin-bottom: 0.08rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .translations-compare-hint-wrap:not([hidden]) {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails[open] #bbStudyTraySfBelowCap.bb-study-tray__sf-below-cap {
    display: block;
    margin: 0 0 0.12rem;
    max-width: none;
    font-size: 0.56rem;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.62);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone .ai-study-presets-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .pinned-verse-panel.study-panel {
    border: none;
    box-shadow: none;
    background: rgba(248, 250, 252, 0.35);
}


/* Non-SF: companion wrappers are layout-transparent (below-text DOM unchanged for other surfaces). */
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-shell,
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-stack {
    display: contents !important;
}
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-shell__body,
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-slot,
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-context-mount,
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-addon-mount {
    display: contents !important;
}
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-shell__head {
    display: none !important;
}
.passage-main:not([data-bb-reading-surface='scripture-first-v1']) .bb-below-passage-companion-shell__sub {
    display: none !important;
}
.bb-below-passage-companion-shell--pass-through {
    display: contents !important;
}
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-shell__head {
    display: none !important;
}
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-shell__body,
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-slot,
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-context-mount,
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-addon-mount {
    display: contents !important;
}
.bb-below-passage-companion-shell--pass-through .bb-below-passage-companion-shell__sub {
    display: none !important;
}

/* Scripture-first: shared companion shell — single visible chrome for below-text strip. */
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone:has(
        #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    ) {
    padding-top: 0.18rem;
    border-top: none;
    background: transparent;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone:has(
        #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    )
    .bb-below-passage-lane-strip {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageStudyZone[data-bb-companion-active='on'] {
    margin-top: 0.22rem;
    padding-top: 0.26rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayWrap[data-bb-companion-active='on'] {
    margin-top: 0.42rem;
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through) {
    max-width: var(--reading-max);
    margin-left: auto;
    margin-right: auto;
    padding: 0.4rem clamp(0.45rem, 2.5vw, 1rem) 0.44rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.07);
    background: rgba(248, 250, 252, 0.32);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-companion-shell__head {
    margin: 0 0 0.22rem;
    padding-bottom: 0.12rem;
    border-bottom: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-companion-shell__title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: rgba(30, 41, 59, 0.9);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    .bb-below-passage-companion-shell__body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-height: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone[data-bb-companion-layout='context-only']
    #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    .bb-below-passage-companion-shell__body,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone[data-bb-companion-layout='addon-only']
    #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    .bb-below-passage-companion-shell__body {
    gap: 0.16rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone[data-bb-companion-layout='context-addon']
    #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    .bb-below-passage-companion-shell__body {
    gap: 0.12rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through)
    .bb-below-passage-companion-shell__sub:not([hidden]) {
    margin: -0.08rem 0 0.06rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(71, 85, 105, 0.72);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionContextMount:empty,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionAddonMount:empty {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageCompanionContextSlot:has(#bbBelowPassageCompanionContextMount:empty),
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageCompanionAddonSlot:has(#bbBelowPassageCompanionAddonMount:empty) {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone[data-bb-companion-layout='context-addon']
    #bbBelowPassageCompanionAddonSlot:not(:has(#bbBelowPassageCompanionAddonMount:empty)) {
    margin-top: 0.02rem;
    padding-top: 0.28rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone:has(#bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through))
    #bbBelowPassageCompanionContextMount #bbBelowPassageCompanionContext {
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
    padding: 0;
    margin: 0;
    border: none !important;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone:has(#bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through))
    #bbBelowPassageCompanionAddonMount .study-panel {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone:has(#bbBelowPassageCompanionShell:not([hidden]):not(.bb-below-passage-companion-shell--pass-through))
    #bbBelowPassageCompanionStack
    > .bb-passage-surface.bb-passage-surface--off {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionStack {
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-below-passage-study-zone[data-bb-companion-context='off'] #bbBelowPassageCompanionContext {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionStack > #bbBelowPassageCompanionContext {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}
/* Verse tools: unified overlay session (scripture-first v1). */
body.bb-verse-study-overlay-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}

/* Reader Overlay Mode v1: primary Ask composer. */
.bb-verse-overlay-reader-ask {
    padding: 0.26rem 0.4rem 0.3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.72);
}
.bb-verse-overlay-reader-ask__label {
    display: block;
    margin-bottom: 0.12rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.78);
}
.bb-verse-overlay-reader-ask__row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: stretch;
}
.bb-verse-overlay-reader-ask__input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.35;
    padding: 0.32rem 0.42rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(252, 253, 255, 0.98);
    color: rgba(15, 23, 42, 0.9);
}
.bb-verse-overlay-reader-ask__send {
    flex-shrink: 0;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}
.bb-verse-overlay-reader-ask__hint {
    margin: 0.2rem 0 0;
    font-size: 0.66rem;
    line-height: 1.38;
    color: rgba(100, 116, 139, 0.9);
}
.bb-verse-overlay-reader-ask .ai-study-presets.bb-verse-overlay-reader-ask__presets {
    margin-top: 0.32rem;
    padding-top: 0.12rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.bb-verse-overlay-reader-ask .ai-study-presets.bb-verse-overlay-reader-ask__presets .ai-study-presets__head {
    margin-bottom: 0.06rem;
}
.bb-verse-overlay-reader-ask .ai-study-presets.bb-verse-overlay-reader-ask__presets .ai-study-presets__chips {
    gap: 0.22rem 0.32rem;
}
.bb-verse-overlay-reader-ask__summarize-wrap {
    margin-top: 0.35rem;
}

/* Verse Overlay Tools v2: first-class tool grid (delegates to legacy quick buttons). */
.bb-verse-overlay-tool-hub {
    padding: 0.2rem 0.38rem 0.26rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(252, 253, 255, 0.55);
}
.bb-verse-overlay-tool-hub__eyebrow {
    margin: 0 0 0.14rem;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.78);
}
.bb-verse-overlay-tool-hub__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.32rem 0.38rem;
}
.bb-verse-overlay-tool-hub__tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.28rem 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    color: rgba(51, 65, 85, 0.92);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition:
        background-color 0.12s ease,
        border-color 0.12s ease;
}
.bb-verse-overlay-tool-hub__tile:hover:not(:disabled) {
    border-color: rgba(100, 116, 139, 0.35);
    background: rgba(248, 250, 252, 0.98);
}
.bb-verse-overlay-tool-hub__tile:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.bb-verse-overlay-tool-hub__handoff {
    margin: 0.22rem 0 0;
    min-height: 2.1rem;
    padding: 0.18rem 0.28rem;
    font-size: 0.68rem;
    line-height: 1.38;
    font-weight: 500;
    color: rgba(30, 64, 175, 0.92);
    border-radius: 7px;
    border: 1px solid rgba(129, 140, 248, 0.35);
    background: rgba(238, 242, 255, 0.75);
}
.bb-verse-overlay-tool-hub__handoff[hidden] {
    display: none !important;
}

/* Study Surface Demotion v1 (scripture-first): Notes / OL / Context stay quiet; Maps reads as co-primary with Ask. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-verse-overlay-tool-hub__tile--study-quiet {
    min-height: 2.05rem;
    padding: 0.22rem 0.28rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(71, 85, 105, 0.88);
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(248, 250, 252, 0.65);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-verse-overlay-tool-hub__tile--study-quiet:hover:not(:disabled) {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(241, 245, 249, 0.92);
    color: rgba(51, 65, 85, 0.92);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-verse-overlay-tool-hub__tile--maps-prominent {
    border-style: solid;
    border-width: 1px;
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.95), rgba(220, 252, 231, 0.78));
    color: rgba(21, 88, 49, 0.94);
    font-weight: 700;
    min-height: 2.35rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-verse-overlay-tool-hub__tile--maps-prominent:hover:not(:disabled) {
    border-color: rgba(22, 163, 74, 0.58);
    background: linear-gradient(180deg, rgba(220, 252, 231, 1), rgba(187, 247, 208, 0.85));
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) .bb-notes-surface__chrome.bb-study-workspace__chrome {
    margin-bottom: 0.28rem;
    padding-bottom: 0.26rem;
    border-bottom-color: rgba(245, 158, 11, 0.22);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) .bb-notes-heading.bb-study-workspace__title {
    font-size: 0.86rem;
    font-weight: 600;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) .bb-notes-surface__nav {
    opacity: 0.9;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) #bbNotesContextStrip[data-notes-context-state]:not([data-notes-context-state='hidden']):not([data-notes-context-state='inactive']) {
    border-left: 3px solid rgba(245, 158, 11, 0.45);
    padding-left: calc(0.5rem - 2px);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) #noteSection.note-section.study-panel {
    border-radius: 12px;
    padding: 0.55rem 0.65rem 0.8rem;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 8px 22px rgba(15, 23, 42, 0.04);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) #noteStudyContextHint:not([hidden]),
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewNotes:not([hidden]) #noteReadPreviewHint:not([hidden]) {
    font-size: 0.68rem;
    opacity: 0.88;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) .context-section-header.bb-study-workspace__chrome {
    margin-top: 0.14rem;
    margin-bottom: 0.16rem;
    padding-bottom: 0.08rem;
    border-bottom-color: rgba(226, 232, 240, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) .timeline-section:not([hidden]) + .passage-context-expand-subsection {
    margin-top: 0.68rem;
    padding-top: 0.52rem;
    border-top: 1px solid rgba(226, 232, 240, 0.88);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) .context-heading.bb-study-workspace__title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(71, 85, 105, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) #surroundingVersesHint.passage-surrounding-verses-help {
    margin-top: 0.06rem;
    margin-bottom: 0.08rem;
    opacity: 0.88;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) #contextList.context-list.study-panel {
    border-color: rgba(226, 232, 240, 0.7);
    box-shadow: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) .bb-timeline-surface__head.bb-study-workspace__chrome {
    margin-bottom: 0.16rem;
    padding-bottom: 0.08rem;
    border-bottom-color: rgba(224, 242, 254, 0.92);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) .timeline-heading.bb-study-workspace__title {
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(15, 23, 42, 0.94);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewContext:not([hidden]) #timelinePanel.timeline-panel.study-panel {
    border-color: rgba(224, 242, 254, 0.82);
    box-shadow: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewOl:not([hidden]) #bbOlContextStrip:not([hidden]) {
    border-left: 3px solid rgba(79, 70, 229, 0.38);
    padding-left: calc(0.42rem - 3px);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewOl:not([hidden]) #passageSourceTokensHeading.tokens-heading {
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.32rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewOl:not([hidden]) #sourceTokensCorpusBanner.source-tokens-corpus-banner:not([hidden]) {
    opacity: 0.94;
    font-size: 0.92em;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface .bb-places-map-chrome.bb-study-workspace__chrome {
    margin-bottom: 0.28rem;
    padding-bottom: 0.26rem;
    border-bottom-color: rgba(34, 197, 94, 0.2);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface .places-heading.bb-study-workspace__title {
    font-size: 0.86rem;
    font-weight: 600;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #bbPlacesModeHint:not([hidden]) {
    display: block;
    margin: 0.06rem 0 0.26rem;
    padding: 0;
    max-width: var(--reading-max, 52rem);
    font-size: 0.74rem;
    line-height: 1.38;
    color: rgba(71, 85, 105, 0.88);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #placesList .places-state--loading .places-state-title,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #placesList .places-state--empty .places-state-title {
    font-weight: 600;
    letter-spacing: 0.01em;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #placesList .places-state--loading .places-state-detail,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #placesList .places-state--empty .places-state-detail {
    margin-top: 0.18rem;
    font-size: 0.82rem;
    line-height: 1.42;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewMaps:not([hidden]) #bbReaderUnifiedMapsSurface #placesList .places-panel-intro {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0 0 0.08rem;
    line-height: 1.3;
}


/* Reader unified overlay: #bbReaderUnifiedOverlayScrim owns dimming in unified mode; card views are pointer-events auto. */
.bb-reader-unified-overlay-host[hidden] {
    display: none !important;
}
.bb-reader-unified-overlay-host__scrim[hidden],
.bb-reader-unified-overlay-host__view[hidden] {
    display: none !important;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__scrim:not([hidden]) {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(118% 90% at 50% 28%, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.2) 52%, rgba(15, 23, 42, 0.34) 100%);
    pointer-events: auto;
    cursor: default;
    transition: background 0.2s ease;
    animation: bb-overlay-scrim-in 0.16s ease-out;
}
/* SF: full-viewport scrim sat above in-reader continuation chrome (Prev/Next, etc.). Let hits fall through
   so those controls match real use + Playwright; dimming stays visual. Close via Close tools / Back / step nav. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__scrim:not([hidden]) {
    pointer-events: none;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame {
    position: relative;
    z-index: 1;
    pointer-events: none;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] {
    position: fixed;
    inset: 0;
    z-index: 10072;
    pointer-events: none;
}
/* Batch B (desktop): scripture column + fixed-width tools rail; scrim off so text stays fully readable. */
@media (min-width: 1200px) {
    body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(400px, 38vw);
        align-items: start;
        gap: 0;
    }
    body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReadingModeShell {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        height: auto;
        min-height: 0;
        min-width: 0;
    }
    body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] {
        position: relative !important;
        inset: auto !important;
        grid-column: 2;
        grid-row: 1;
        display: flex !important;
        width: 100%;
        max-width: none;
        z-index: 5;
        align-self: stretch;
        min-height: calc(100vh - 6.25rem);
        max-height: calc(100vh - 6.25rem);
        overflow: hidden;
        pointer-events: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__frame {
        display: flex !important;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__scrim:not([hidden]) {
        display: none !important;
    }
    /* Batch C: tools rail reads secondary to scripture (no layout change). */
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        border-left: 1px solid rgba(148, 163, 184, 0.22);
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.99) 38%);
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel {
        position: static !important;
        inset: auto !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: auto !important;
        z-index: auto !important;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        max-width: none !important;
        width: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}
.bb-reader-unified-tools-surface {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}
/*
  Explicit stacking model:
  close (10)
  header (4)
  panels (1)
  Do NOT use z-index:auto in this system — it breaks overlay layering.
*/
.bb-reader-unified-tools-surface__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem 0.38rem;
    flex-shrink: 0;
    min-height: 0;
    position: relative;
    z-index: 4;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.99) 0%, rgba(252, 253, 255, 0.96) 72%, rgba(252, 253, 255, 0) 100%);
}
.bb-reader-unified-tools-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.14rem;
    flex: 1;
    min-width: 0;
}
.bb-reader-unified-tools-tabs__tab {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.9);
    color: rgba(51, 65, 85, 0.92);
    border-radius: 999px;
    padding: 0.14rem 0.42rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    flex: 0 1 auto;
}
.bb-reader-unified-tools-tabs__label {
    display: inline-block;
    white-space: nowrap;
}
.bb-reader-unified-tools-tabs__label--mobile {
    display: none;
}
.bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    border-color: rgba(37, 99, 235, 0.45);
    background: #eff6ff;
    color: rgba(30, 64, 175, 0.95);
}
.bb-reader-unified-tools-surface__scope {
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.95);
    margin: 0.04rem 0 0.12rem;
    flex-shrink: 0;
}
.bb-reader-unified-tools-surface__send-study-wrap {
    flex-shrink: 0;
    margin: 0 0 0.35rem;
}
.bb-reader-unified-tools-surface__panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
.bb-reader-unified-tools-panel {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}
.bb-reader-unified-tools-panel[hidden] {
    display: none !important;
}

/* Session close: frame is pointer-events none; restore hits for the chrome button. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__session-chrome {
    pointer-events: auto;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__session-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.48);
    background: #ffffff;
    color: rgba(51, 65, 85, 0.9);
    font-size: 1rem;
    line-height: 1;
    font-weight: 650;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 1) inset, 0 1px 2px rgba(15, 23, 42, 0.05);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__session-close:hover,
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__session-close:focus-visible {
    border-color: rgba(37, 99, 235, 0.45);
    background: #eff6ff;
    color: rgba(30, 58, 138, 0.95);
    outline: none;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']:is(
        [data-bb-unified-active-tab='cross'],
        [data-bb-unified-active-tab='topics']
    )
    .bb-reader-unified-overlay-host__chrome-dismiss {
    display: none !important;
}
/* Batch B: card chrome applies to the active tab panel’s primary view (panel [hidden] gates inactive tools). */
#bbReaderUnifiedToolsSurface .bb-reader-unified-tools-panel:not([hidden]) > .bb-reader-unified-overlay-host__view {
    pointer-events: auto;
    box-sizing: border-box;
    max-width: calc(100vw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-height: min(
        85dvh,
        calc(100dvh - 1.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))
    );
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.5rem 0.62rem 0.64rem;
    border-radius: 14px;
    border: 1px solid rgba(51, 65, 85, 0.11);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.998) 0%, rgba(252, 253, 255, 0.99) 100%);
    box-shadow:
        0 36px 90px rgba(15, 23, 42, 0.2),
        0 14px 36px rgba(15, 23, 42, 0.09),
        0 0 0 1px rgba(255, 255, 255, 0.82) inset;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Floor height so switching tools does not collapse the card while new content loads. */
    min-height: clamp(10.5rem, 32dvh, 21rem);
    animation: bb-sf-unified-subview-opacity-in 0.15s ease-out;
}

/* Cross-references subview: content-height card; do not inherit the generic subview min-height floor (avoids vertical stretch). */
#bbReaderUnifiedToolsSurface #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references {
    height: auto;
    min-height: 0;
    flex-grow: 0;
    align-items: flex-start;
    align-content: flex-start;
}

/* Selection-anchored: panel reads as continuation of the verse column (grounded shadow). Card height comes
 * from remaining viewport below the dock (bbReaderUnifiedOverlayLayoutActiveView maxHeight), not a low dvh floor. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewNotes.bb-reader-unified-overlay-host__view--notes:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewOl.bb-reader-unified-overlay-host__view--ol:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewContext.bb-reader-unified-overlay-host__view--context:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMore.bb-reader-unified-overlay-host__view--more:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references:not([hidden]),
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps:not([hidden]) {
    transition: max-height 0.2s ease-out, box-shadow 0.18s ease-out;
    box-shadow:
        0 3px 0 rgba(15, 23, 42, 0.04),
        0 14px 36px -12px rgba(15, 23, 42, 0.2),
        0 6px 16px -6px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.88) inset;
    border-color: rgba(51, 65, 85, 0.14);
}

/* Batch 2 - scripture-first narrow/medium (<=1199px): unified verse-tools as bottom sheet (see bbReaderUnifiedOverlayLayoutActiveView). */
@media (max-width: 1199px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReadingModeShell.bb-reading-mode-shell--mobile-sheet-reserve {
        padding-bottom: min(38vh, 22rem);
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-block.verse-selected-for-note {
        position: relative;
        top: -8px;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] {
        position: fixed !important;
        top: auto !important;
        left: var(--bbp-mobile-sheet-left, 0px) !important;
        right: auto !important;
        bottom: var(--bbp-mobile-sheet-bottom, 0px) !important;
        width: var(--bbp-mobile-sheet-width, 100%);
        max-width: 100vw;
        max-height: var(--bbp-mobile-sheet-max, min(96vh, 96dvh));
        display: flex !important;
        flex-direction: column;
        z-index: 10072;
        overflow: hidden;
        box-sizing: border-box;
        pointer-events: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__frame {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        box-sizing: border-box;
        border-radius: 16px 16px 0 0;
        background: rgba(255, 255, 255, 0.99);
        box-shadow:
            0 -16px 48px rgba(15, 23, 42, 0.16),
            0 -4px 18px rgba(15, 23, 42, 0.08),
            0 0 0 1px rgba(255, 255, 255, 0.9) inset;
        pointer-events: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-height: min(96vh, 96dvh);
        min-height: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.32);
        border-radius: 16px 16px 0 0;
        background: linear-gradient(180deg, rgba(252, 253, 255, 0.99) 0%, rgba(255, 255, 255, 0.995) 100%);
        pointer-events: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface button,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface input,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface textarea,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface select,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface a[href],
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface [role='button'],
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface [role='tab'] {
        pointer-events: auto;
    }

    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head {
        position: relative;
        z-index: 4;
        padding: 0.45rem 2.65rem 0.18rem 0.5rem;
        background: linear-gradient(180deg, rgba(252, 253, 255, 1) 0%, rgba(252, 253, 255, 0.97) 100%);
        pointer-events: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head button,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head [role='tab'] {
        pointer-events: auto;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        order: 1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: center;
        gap: 0.18rem;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        padding: 0.02rem 0 0.08rem;
        scrollbar-width: none;
        -webkit-mask-image: none;
        mask-image: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs::-webkit-scrollbar {
        display: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.65);
        border-radius: 999px;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__tab {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__session-chrome {
        order: 2;
        margin-left: auto;
        position: static !important;
        z-index: 1;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayCloseSessionBtn {
        position: absolute !important;
        top: 0.42rem;
        right: 0.5rem;
        z-index: 10;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__scope {
        padding: 0 0.5rem;
        margin-bottom: 0.22rem;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__panels {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
        padding: 0 0.42rem 0.5rem;
        box-sizing: border-box;
        z-index: 1;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        max-width: none;
        max-height: none;
        min-height: 0;
        overflow: visible;
        z-index: 1;
        padding: 0.48rem 0.6rem 0.64rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        [id^='bbReaderUnifiedOverlayView'].bb-reader-unified-overlay-host__view:not([hidden]) {
        max-width: none;
        border-radius: 16px 16px 0 0;
        box-shadow:
            0 -12px 44px rgba(15, 23, 42, 0.12),
            0 -3px 14px rgba(15, 23, 42, 0.06),
            0 0 0 1px rgba(255, 255, 255, 0.88) inset;
    }

}

/* Batch 4 — scripture-first mobile (≤767px): less pre-passage chrome; one visible verse-tool hint path. */
@media (max-width: 767px) {
    /* “Book reading” badge uses uppercase styling; progress strip + nav already convey book mode. */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderBookModeBadge {
        display: none !important;
    }
    /* Hide shorter duplicate above the action row (Batch 6 removes the longer #bbSfVerseToolsSelectHint on mobile as well). */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageActionRowHint.bb-passage-action-row-hint {
        display: none !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none;
    }
}

/* UX reset batch A — scripture-first mobile (≤767px): inline nav hidden; single Menu holds all destinations. */
@media (max-width: 767px) {
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links > li.bb-passage-nav-item--inline {
        display: none !important;
    }
}

/* Batch 9 — passage “More” menu: hidden by default; scripture-first ≤767px shows it (see Batch 6 media block). */
.bb-passage-nav-more--sf-mobile-only {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-lookup-mode-switch {
    margin: 0 0 0.5rem;
    flex-wrap: wrap;
}

/* Batch 6 — scripture-first mobile (≤767px): reading-surface hard simplification; study entry is verse-tap → unified sheet (see passage-app bbSfMobileReadingSurfaceAutoOpenVerseToolsSheet). */
@media (max-width: 767px) {
    /* Batch C: passage study actions on one row; horizontal scroll if the viewport is too narrow (avoid stacking Ask above Notes). */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0.28rem 0.4rem;
        min-height: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__primary,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.28rem 0.35rem;
    }
    /* Verse-tool instructional line (Batch 4 kept it; Batch 6 removes it for a scripture-first gutter). */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfVerseToolsSelectHint {
        display: none !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none;
    }
    /* Companion / reader cue lines that can appear above the translation columns. */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area #bbSfReaderCompanionCue {
        display: none !important;
    }

    /*
     * Batch 7 — scripture-first mobile viewport: eliminate horizontal scroll (390px gate),
     * contain chip rows, and keep picker shell + dock within the layout width.
     */
    html:has(.passage-main[data-bb-reading-surface='scripture-first-v1']),
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
        overflow-x: clip;
        max-width: 100%;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-section,
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-layout,
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-main {
        max-width: 100%;
        box-sizing: border-box;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-layout {
        min-width: 0;
    }
    /* Cap SF reading column to the viewport (--reading-max 46rem + --bb-reader-shell-max 1040px exceed narrow phones). */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        --reading-max: 100%;
        --bb-reader-shell-max: 100%;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReadingModeShell,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    /* Batch C: one navbar row — reference, translation, find; clip/truncate instead of wrapping. */
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-nav-passage-toolbar {
        flex-wrap: nowrap;
        max-width: 100%;
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .bb-passage-nav__band {
        min-width: 0;
    }
    /*
     * Batch 8 — scripture text wraps in the viewport (min-width:0 / max-width chain) instead of relying
     * on horizontal clipping on #resultTranslations.
     */
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #passageResults .reading-area {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #resultTranslations,
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #resultTranslations.result-translations {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow-x: visible;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #resultTranslations .translation-block,
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #resultTranslations .translation-text,
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #resultTranslations .verse-block {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-wrap: break-word;
    }

    /*
     * Batch 9 — scripture-first mobile polish: reading gutters, chapter accent, add-verses density,
     * compact “More” nav (Workbench / Explore Map / Licenses). Bottom-sheet dock tuning lives in passage-app.js.
     */
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links .bb-passage-nav-more--sf-mobile-only {
        display: list-item !important;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .container.bb-passage-nav {
        padding-left: clamp(8px, 2.5vw, 12px);
        padding-right: clamp(8px, 2.5vw, 12px);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .bb-passage-nav__band {
        flex-wrap: nowrap;
        align-items: center;
        min-width: 0;
        gap: 0.32rem 0.42rem;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-ref-input-wrap--passage-sf {
        order: 0;
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
        flex-basis: auto;
        margin-top: 0;
        align-self: center;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .navbar .nav-links {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-text-search-open-btn__text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-text-search-open-btn {
        position: relative;
        min-width: 2.35rem;
        padding-left: 0.42rem;
        padding-right: 0.42rem;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-text-search-open-btn__icon {
        display: inline-block;
        font-size: 1.05rem;
        line-height: 1;
        font-weight: 600;
        color: rgba(51, 65, 85, 0.88);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-shell-location-chip__ref {
        min-width: 0;
        max-width: min(11rem, 38vw);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .passage-section {
        padding: 0.5rem clamp(8px, 2.5vw, 12px) 0.85rem;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #passageResults .translation-block {
        padding-left: clamp(8px, 2.5vw, 12px);
        padding-right: clamp(8px, 2.5vw, 12px);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #passageResults .translation-block--passage-level {
        padding-left: max(0.5rem, calc(0.68rem - 3px));
    }
    /*
     * Chapter-reading accent was a 3px blue left border on .reading-area.bb-passage-scope--chapter (reading mode chrome).
     * On narrow SF screens it read as unexplained noise; keep a 1px hairline + lighter wash instead of removing structure entirely.
     */
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .reading-area.bb-passage-scope--chapter {
        border-left: 1px solid rgba(59, 130, 246, 0.09);
        padding-left: 0.38rem;
        margin-left: 0;
        background: rgba(248, 250, 252, 0.22);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1'])
        .reading-area.bb-passage-scope--chapter.bb-passage-scope--book-reading {
        border-left-color: rgba(16, 185, 129, 0.2);
        background: rgba(236, 253, 245, 0.28);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__details {
        position: relative;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__summary {
        list-style: none;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.875rem;
        color: rgba(51, 65, 85, 0.95);
        padding: 0.2rem 0.15rem;
        user-select: none;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.1rem;
        font-size: 1.05rem;
        line-height: 1;
        border-radius: 8px;
        border: 1px solid rgba(203, 213, 225, 0.75);
        background: rgba(255, 255, 255, 0.92);
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__summary::-webkit-details-marker {
        display: none;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__panel {
        position: absolute;
        right: 0;
        top: calc(100% + 0.2rem);
        z-index: 220;
        min-width: 10.75rem;
        padding: 0.28rem 0;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(226, 232, 240, 0.95);
        border-radius: 8px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
        box-sizing: border-box;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__link {
        display: block;
        padding: 0.42rem 0.78rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: rgba(37, 99, 235, 0.96);
        text-decoration: none;
    }
    body:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) .bb-passage-nav-more__link:active {
        background: rgba(239, 246, 255, 0.85);
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1']
        #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
        padding: 0.12rem 0.3rem 0.16rem;
        margin: 0 0 0.14rem;
        gap: 0.14rem 0.22rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1'] #bbPassageStudyActionRow .passage-action-marks {
        margin-left: 0.2rem;
        gap: 0.22rem;
        margin-top: 0.04rem;
        padding-top: 0.12rem;
        border-top-color: rgba(148, 163, 184, 0.16);
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1'] #bbSfPassageMultiSelectAffordance:not([hidden]) {
        gap: 0.12rem 0.22rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1'] .bb-sf-multi-select-affordance__group {
        gap: 0.12rem 0.22rem;
    }
}

@media (max-width: 767px) and (pointer: coarse) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-multi-select-affordance__btn {
        min-height: 2.34rem;
        min-width: 2.1rem;
        padding: 0.18rem 0.5rem;
        font-size: 0.76rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'][data-bb-sf-add-verses-mode='1'] .bb-sf-multi-select-affordance__btn {
        min-height: 2.12rem;
        min-width: 1.95rem;
        padding: 0.14rem 0.42rem;
    }
}

@keyframes bb-overlay-scrim-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
@keyframes bb-overlay-card-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.992);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Unified subview: opacity-only enter (tab switches + first open); no translate/shift. */
@keyframes bb-sf-unified-subview-opacity-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    .btn,
    .bb-disclosure__summary,
    .bb-maps-explorer-panel,
    .bb-study-draft-gathered__item,
    .bb-study-gather-queue__item {
        transition: none;
    }

    .btn:hover:not(:disabled),
    .btn:active:not(:disabled),
    .bb-disclosure__summary:active,
    .bb-study-draft-gathered__item:active,
    .bb-study-gather-queue__item:active {
        transform: none;
    }

    .bb-disclosure[open] > .bb-disclosure__panel,
    body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__scrim:not([hidden]),
    #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask:not([hidden]),
    #bbReaderUnifiedOverlayViewNotes.bb-reader-unified-overlay-host__view--notes:not([hidden]),
    #bbReaderUnifiedOverlayViewOl.bb-reader-unified-overlay-host__view--ol:not([hidden]),
    #bbReaderUnifiedOverlayViewContext.bb-reader-unified-overlay-host__view--context:not([hidden]),
    #bbReaderUnifiedOverlayViewMore.bb-reader-unified-overlay-host__view--more:not([hidden]),
    #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references:not([hidden]),
    #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references:not([hidden]),
    #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references:not([hidden]),
    #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references:not([hidden]),
    #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps:not([hidden]),
    .bb-study-toast.bb-study-toast--show:not([hidden]),
    .status-toast:not([hidden]) {
        animation: none;
    }

    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references:not([hidden]),
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references:not([hidden]),
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references:not([hidden]),
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references:not([hidden]) {
        transition: none;
    }
}

body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view button:focus-visible,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view input:focus-visible,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view textarea:focus-visible,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view select:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Unified card: one surface (Ask + tool hub share one panel rhythm). */
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame .bb-verse-overlay-tool-hub {
    border-top: none;
    margin-top: 0.04rem;
    padding-top: 0.16rem;
    background: rgba(255, 255, 255, 0.5);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame .bb-verse-overlay-reader-ask {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
/* Shared unified-overlay header chrome (Ask + subviews). Legacy __*-chrome / __*-title / __*-selection classes stay on elements for compatibility. */
.bb-reader-unified-overlay-host__view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.08rem;
    flex-shrink: 0;
}
.bb-reader-unified-overlay-host__view-header--dense {
    gap: 0.3rem 0.42rem;
    margin-bottom: 0.06rem;
}
.bb-reader-unified-overlay-host__title-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}
.bb-reader-unified-overlay-host__view-title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.92);
}
.bb-reader-unified-overlay-host__view-selection-summary {
    margin: 0 0 0.14rem;
    font-size: 0.74rem;
    line-height: 1.35;
    color: rgba(51, 65, 85, 0.88);
    flex-shrink: 0;
}
.bb-reader-unified-overlay-host__view-selection-summary--dense {
    margin: 0 0 0.1rem;
}
#bbReaderUnifiedOverlayOlBodyMount {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}
#bbReaderUnifiedOverlayContextBodyMount {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}
#bbReaderUnifiedOverlayReferencesBodyMount {
    flex: 0 0 auto;
    min-height: 0;
    min-width: 0;
}
/* Cross-references unified card: drop shared min-height floor + flex growth so grouped sections stack with normal block gaps (not stretched empty space). */
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references:not([hidden]) {
    height: auto;
    min-height: 0;
    flex-grow: 0;
    justify-content: flex-start;
    align-content: flex-start;
    align-items: flex-start;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    #bbReaderUnifiedOverlayReferencesBodyMount {
    flex: 0 0 auto;
    flex-grow: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: flex-start;
    min-height: 0;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-reader-unified-crossrefs {
    flex: 0 0 auto;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.18rem;
    min-height: 0;
    justify-content: flex-start;
    align-content: flex-start;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-reader-unified-crossrefs
    > .bb-cross-surface__head.bb-study-workspace__chrome {
    margin-bottom: 0;
    padding-bottom: 0.12rem;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    #crossRefsList.cross-ref-list.study-panel {
    margin-top: 0;
    padding-top: 0.06rem;
    padding-bottom: 0.06rem;
}
#bbReaderUnifiedOverlayMapsBodyMount {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
#bbReaderUnifiedOverlayViewMaps #bbReaderUnifiedMapsSurface {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
#bbReaderUnifiedOverlayViewMaps #bbReaderUnifiedMapsSurface .bb-places-map-stack {
    min-height: 0;
}
#bbReaderUnifiedOverlayViewMaps #placesList .places-panel-intro {
    margin-bottom: 0.28rem;
    line-height: 1.3;
}
#bbReaderUnifiedOverlayViewMaps #placesList .place-item {
    border-color: rgba(148, 163, 184, 0.35);
}
#bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps {
    border-left: 3px solid rgba(22, 101, 52, 0.55);
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.998) 0%, rgba(250, 253, 250, 0.99) 42%, rgba(236, 253, 245, 0.35) 100%);
    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.14),
        0 12px 28px rgba(22, 101, 52, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.88) inset;
}
#bbReaderUnifiedOverlayNotesBodyMount {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#bbReaderUnifiedOverlayViewNotes #noteSection.note-section {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
#bbReaderUnifiedOverlayViewNotes #noteSection .note-editor-wrap {
    flex: 1 1 auto;
    min-height: 0;
}
#bbReaderUnifiedOverlayViewNotes #noteText {
    min-height: 6rem;
}
#bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask {
    border-bottom: none;
    padding: 0;
    margin-top: 0;
    background: transparent;
}
#bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-tool-hub {
    margin-top: 0;
    padding: 0.2rem 0.02rem 0.16rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    border-bottom: none;
    background: rgba(248, 250, 252, 0.5);
}

#bbReaderUnifiedOverlayViewAsk .bb-reader-unified-overlay-host__ask-selection {
    display: none;
}


/* Selection-anchored tool opens: lighter scrim so the anchored verse stays more visible. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--selection-anchored[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__scrim:not([hidden]) {
    background: radial-gradient(118% 90% at 50% 28%, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.1) 52%, rgba(15, 23, 42, 0.16) 100%);
}

#bbReaderUnifiedOverlayAskComposerMount,
#bbReaderUnifiedOverlayToolHubMount {
    flex-shrink: 0;
}
.bb-reader-unified-overlay-host__ask-selection {
    margin: 0 0 0.16rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(51, 65, 85, 0.9);
    flex-shrink: 0;
}

/* Selection context: quiet caption under title (Ask / Maps). */
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__selection-context {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 0.55rem;
    padding: 0.14rem 0 0.06rem;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.42;
    color: rgba(71, 85, 105, 0.88);
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-sizing: border-box;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__selection-context.bb-reader-unified-overlay-host__selection-context--maps {
    color: rgba(22, 101, 52, 0.88);
    border-bottom-color: rgba(134, 239, 172, 0.45);
}

/* Unified overlay: study sheet hierarchy (visible polish only). */
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewNotes.bb-reader-unified-overlay-host__view--notes,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewOl.bb-reader-unified-overlay-host__view--ol,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewContext.bb-reader-unified-overlay-host__view--context,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewMore.bb-reader-unified-overlay-host__view--more,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps {
    padding: 0.5rem 0.52rem 0.48rem;
    gap: 0.1rem;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references {
    min-height: 0;
    padding: 0.34rem 0.46rem 0.3rem;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__ask-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__notes-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__ol-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__context-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__references-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__maps-title {
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 600;
    font-size: 0.82rem;
    color: rgba(30, 41, 59, 0.9);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayMapsTitle {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0.35rem;
    white-space: normal;
    line-height: 1.18;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__maps-title {
    font-size: 1.22rem;
    font-weight: 620;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: rgba(15, 23, 42, 0.96);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__maps-back {
    opacity: 0.55;
    font-size: 0.72rem;
    font-weight: 500;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__maps-back:hover {
    opacity: 0.88;
    background: rgba(241, 245, 249, 0.65);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMaps
    .bb-reader-unified-overlay-host__view-header.bb-reader-unified-overlay-host__maps-chrome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem 0.6rem;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0.08rem;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__view-header:not(.bb-reader-unified-overlay-host__maps-chrome) {
    padding-bottom: 0.12rem;
    margin-bottom: 0.08rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__ask-selection,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__view-selection-summary,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__notes-selection,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__ol-selection,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__context-selection,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__references-selection,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__maps-selection {
    font-size: 0.8rem;
    line-height: 1.42;
    color: rgba(51, 65, 85, 0.82);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__maps-selection.bb-reader-unified-overlay-host__selection-context {
    color: rgba(22, 78, 47, 0.92);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    .bb-reader-unified-overlay-host__ask-selection.bb-reader-unified-overlay-host__selection-context {
    color: rgba(30, 41, 59, 0.9);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__hint {
    display: none !important;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-tool-hub__eyebrow {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__chrome-dismiss {
    border-color: transparent;
    background: transparent;
    color: rgba(71, 85, 105, 0.75);
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: none;
    padding: 0.18rem 0.42rem;
    min-width: 2.25rem;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__chrome-dismiss:hover {
    color: rgba(15, 23, 42, 0.88);
    background: rgba(241, 245, 249, 0.75);
    border-color: rgba(148, 163, 184, 0.22);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskDoneBtn.bb-reader-unified-overlay-host__chrome-dismiss,
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayMapsDoneBtn.bb-reader-unified-overlay-host__chrome-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-width: 2.5rem;
    min-height: 2.5rem;
    margin-top: -0.08rem;
    margin-right: -0.12rem;
    padding: 0;
    border-radius: 999px;
    font-size: 1.42rem;
    line-height: 1;
    color: rgba(71, 85, 105, 0.5);
    transition:
        color 0.15s ease,
        background-color 0.15s ease;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskDoneBtn.bb-reader-unified-overlay-host__chrome-dismiss:hover,
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayMapsDoneBtn.bb-reader-unified-overlay-host__chrome-dismiss:hover {
    color: rgba(15, 23, 42, 0.9);
    background: rgba(241, 245, 249, 0.92);
    box-shadow: 0 1px 10px rgba(15, 23, 42, 0.07);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskTitle.bb-reader-unified-overlay-host__view-title,
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__ask-title {
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.14;
    color: rgba(15, 23, 42, 0.94);
}
/* Passage SF: trim subview Back for tab-driven tools (selection rail); keep Notes/Maps Back; × close + titles unchanged; nav stack JS untouched. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']:is(
        [data-bb-unified-active-tab='original'],
        [data-bb-unified-active-tab='more'],
        [data-bb-unified-active-tab='cross'],
        [data-bb-unified-active-tab='lookup'],
        [data-bb-unified-active-tab='topics']
    )
    .bb-reader-unified-overlay-host__chrome-back {
    display: none !important;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask {
    padding: 0.58rem 0.56rem 0.46rem;
    gap: 0;
    border-left: 3px solid rgba(59, 130, 246, 0.42);
    border-color: rgba(51, 65, 85, 0.1);
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.998) 0%, rgba(252, 253, 255, 0.99) 40%, rgba(239, 246, 255, 0.22) 100%);
    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.14),
        0 12px 28px rgba(37, 99, 235, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.82) inset;
    transition:
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskResultMount.bb-reader-unified-overlay-host__ask-result-mount {
    margin-top: 0.32rem;
    padding-top: 0.28rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskResultMount
    .ai-study-result {
    max-width: 100%;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__send {
    min-width: 5.1rem;
    min-height: 2.75rem;
    border-radius: 12px;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 3px 16px rgba(37, 99, 235, 0.22);
    border: 1px solid rgba(30, 64, 175, 0.14);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-reader-unified-overlay-host__view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem 0.6rem;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0.02rem;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskSelectionSummary.bb-reader-unified-overlay-host__selection-context {
    display: block;
    width: 100%;
    max-width: 38rem;
    align-self: stretch;
    box-sizing: border-box;
    margin: 0.02rem 0 0.36rem;
    padding: 0 0.04rem 0.4rem 0.48rem;
    font-size: 0.84rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.5;
    border-bottom-width: 1px;
    border-bottom-color: rgba(59, 130, 246, 0.12);
    border-left: 2px solid rgba(59, 130, 246, 0.28);
    color: rgba(51, 65, 85, 0.82);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskComposerMount {
    margin-top: 0;
    padding: 0.36rem 0.38rem 0.42rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.55) 0%, rgba(255, 255, 255, 0.72) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask {
    padding: 0.08rem 0.06rem 0.12rem;
    margin-top: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__label {
    margin-bottom: 0.22rem;
    font-size: 0.58rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.55);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__row {
    gap: 0.55rem;
    align-items: stretch;
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.82rem;
    padding: 0.54rem 0.64rem;
    font-size: 1.06rem;
    line-height: 1.32;
    border-radius: 11px;
    border-color: rgba(100, 116, 139, 0.16);
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 2px 5px rgba(15, 23, 42, 0.05) inset,
        0 0 0 1px rgba(59, 130, 246, 0.1);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-reader-ask__input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.06) inset,
        0 0 0 2px rgba(59, 130, 246, 0.22);
}
body.bb-verse-study-overlay-open .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-tool-hub {
    position: relative;
    margin-top: 0.56rem;
    padding-top: 0.32rem;
    border-top: 1px solid rgba(148, 163, 184, 0.05);
    background: transparent;
    opacity: 0.26;
    filter: saturate(0.75);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub:hover {
    opacity: 0.88;
    filter: saturate(1);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub__tile {
    min-height: 1.82rem;
    padding: 0.12rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 7px;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.65);
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub__grid {
    gap: 0.14rem 0.18rem;
}


/* Scripture-first (passage page): Ask composer is canonical; tool hub is a muted recovery strip under it; Maps tile leads the row. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub {
    margin-top: 0.42rem;
    padding-top: 0.26rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.32);
    background: rgba(248, 250, 252, 0.4);
    opacity: 0.44;
    filter: saturate(0.9);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub:hover {
    opacity: 0.92;
    filter: saturate(1);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskSelectionSummary.bb-reader-unified-overlay-host__selection-context {
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 500;
    margin-bottom: 0.28rem;
    padding-bottom: 0.26rem;
    border-left-width: 1px;
    opacity: 0.9;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 0.24rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub__tile--maps-prominent:not(:disabled) {
    grid-column: 1 / -1;
    min-height: 2.42rem;
    font-size: 0.9rem;
    font-weight: 650;
    opacity: 1;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-tool-hub__tile--study-quiet:not(:disabled) {
    min-height: 1.78rem;
    font-size: 0.65rem;
    font-weight: 580;
    opacity: 0.58;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.55);
}

/* Scripture-first: Ask overlay reads as a wide reading companion (not a narrow modal + dock tool strip). */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask {
    padding: 0.32rem 0.36rem 0.26rem;
    gap: 0;
    max-width: min(
        calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
        var(--reading-max, 52rem)
    );
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 3px solid rgba(59, 130, 246, 0.32);
    /* Slightly higher-opacity surface so type scans over the scripture scrim without heavy outer chrome */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.993) 0%, rgba(252, 253, 255, 0.985) 100%);
    box-shadow:
        0 12px 36px rgba(15, 23, 42, 0.055),
        0 4px 14px rgba(15, 23, 42, 0.028),
        0 0 0 1px rgba(255, 255, 255, 0.82) inset;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewOl
    :is(.tokens-wrap, .interlinear-wrap) {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
/* SF unified Ask: dock-style tool hub is redundant with the passage row; keep DOM/wiring, hide presentation. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
    #bbReaderUnifiedOverlayToolHubMount {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
    flex: 0 0 0 !important;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
    #bbReaderUnifiedOverlayToolHubMount .bb-verse-overlay-tool-hub {
    display: none !important;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
    .bb-reader-unified-overlay-host__frame .bb-verse-overlay-reader-ask {
    border-bottom: none;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
    .bb-reader-unified-overlay-host__frame .bb-verse-overlay-tool-hub {
    display: none !important;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}
/* SF unified session: lighter scrim so scripture remains visually present. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    > .bb-reader-unified-overlay-host__scrim:not([hidden]) {
    background: radial-gradient(120% 95% at 50% 22%, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.07) 45%, rgba(15, 23, 42, 0.12) 100%);
}
/* Scripture-first: other unified subviews — full ancestor chain on each target (:is) so rules never leak outside SF overlay. */
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    :is(
        #bbReaderUnifiedOverlayViewNotes.bb-reader-unified-overlay-host__view--notes,
        #bbReaderUnifiedOverlayViewOl.bb-reader-unified-overlay-host__view--ol,
        #bbReaderUnifiedOverlayViewContext.bb-reader-unified-overlay-host__view--context,
        #bbReaderUnifiedOverlayViewMore.bb-reader-unified-overlay-host__view--more,
        #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references,
        #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references,
        #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references,
        #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references,
        #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps
    ) {
    max-width: min(
        calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
        var(--reading-max, 52rem)
    );
    border-radius: 12px;
    padding: 0.4rem 0.44rem 0.36rem;
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(252, 253, 255, 0.982) 100%);
    box-shadow:
        0 12px 36px rgba(15, 23, 42, 0.055),
        0 4px 14px rgba(15, 23, 42, 0.028),
        0 0 0 1px rgba(255, 255, 255, 0.82) inset;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    :is(
        #bbReaderUnifiedOverlayViewNotes .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewOl .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewContext .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewReferences .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewTopics .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewEncyclopedia .bb-reader-unified-overlay-host__view-header,
        #bbReaderUnifiedOverlayViewEaston .bb-reader-unified-overlay-host__view-header
    ) {
    margin-bottom: 0.04rem;
    padding-bottom: 0.06rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMaps
    .bb-reader-unified-overlay-host__view-header.bb-reader-unified-overlay-host__maps-chrome {
    margin-bottom: 0.04rem;
    padding-bottom: 0.06rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    :is(
        #bbReaderUnifiedOverlayViewNotes .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewOl .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewContext .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewReferences .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewTopics .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewEncyclopedia .bb-reader-unified-overlay-host__view-selection-summary,
        #bbReaderUnifiedOverlayViewEaston .bb-reader-unified-overlay-host__view-selection-summary
    ) {
    margin-bottom: 0.08rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMaps
    .bb-reader-unified-overlay-host__maps-selection.bb-reader-unified-overlay-host__selection-context {
    margin-bottom: 0.1rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskTitle.bb-reader-unified-overlay-host__view-title,
    #bbReaderUnifiedOverlayAskTitle.bb-reader-unified-overlay-host__ask-title {
    font-size: 1.05rem;
    font-weight: 620;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.16;
    color: rgba(15, 23, 42, 0.94);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-reader-unified-overlay-host__view-header {
    margin-bottom: 0;
    padding-bottom: 0;
    gap: 0.28rem 0.4rem;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskSelectionSummary.bb-reader-unified-overlay-host__selection-context {
    margin: 0 0 0.08rem;
    padding: 0 0 0.12rem;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.36;
    max-width: 100%;
    color: rgba(30, 41, 59, 0.88);
    border-left: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: none;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskComposerMount {
    margin-top: 0.04rem;
    padding: 0.22rem 0.26rem 0.26rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-reader-ask__label {
    margin-bottom: 0.14rem;
}

body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayAskResultMount.bb-reader-unified-overlay-host__ask-result-mount {
    margin-top: 0.22rem;
    padding-top: 0.22rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.35);
    border-radius: 0 0 8px 8px;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    #bbReaderUnifiedOverlayAskResultMount
    .ai-study-transcript {
    gap: 0.58rem;
    padding: 0.08rem 0.12rem 0.12rem 0;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    #bbReaderUnifiedOverlayAskResultMount
    .ai-study-turn {
    padding: 0.42rem 0.48rem;
    border-radius: 9px;
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.94);
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    #bbReaderUnifiedOverlayAskResultMount
    .ai-study-result {
    color: rgba(15, 23, 42, 0.92);
    line-height: 1.55;
}
body.bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewAsk
    #bbReaderUnifiedOverlayAskResultMount
    .ai-study-question-echo {
    color: rgba(51, 65, 85, 0.82);
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps {
    padding: 0.54rem 0.52rem 0.46rem;
    gap: 0;
    transition:
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}
body.bb-verse-study-overlay-open
    .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
    #bbReaderUnifiedOverlayMapsSelectionSummary.bb-reader-unified-overlay-host__selection-context {
    display: block;
    width: 100%;
    max-width: 38rem;
    align-self: stretch;
    box-sizing: border-box;
    margin: 0.06rem 0 0.42rem;
    padding: 0 0.04rem 0.36rem 0.52rem;
    font-size: 0.84rem;
    font-style: italic;
    line-height: 1.5;
    border-bottom: 1px solid rgba(134, 239, 172, 0.28);
    border-left: 2px solid rgba(22, 163, 74, 0.35);
    color: rgba(30, 41, 59, 0.82);
}
/* Scripture-first v1: composition subtraction — reading first, dock + overlays primary, study stack deferred. */
.passage-section .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
    gap: 0;
    max-width: min(100%, 52rem);
}
.passage-section .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) #bookmarksSidebar {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #activeSessionBanner {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #pinnedVersePanel {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #studyTrailContext,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #backToRefWrap {
    display: none !important;
}
/* Deferred slab: tray + below-passage DOM stays for scripts; no reserved strip above scripture in SF. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-deferred-slab {
    margin: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    border-bottom: none;
    background: transparent;
    box-shadow: none;
    max-width: var(--reading-max, 52rem);
    margin-left: auto;
    margin-right: auto;
    contain: layout style;
}

/* Passage feedback lives outside #bbStudyTrayWrap so it stays visible when SF hides the legacy tray shell. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-passage-feedback-foot {
    margin: 0.28rem 0 0.12rem;
    padding: 0 0.35rem;
    font-size: 0.64rem;
    line-height: 1.4;
    text-align: center;
    color: rgba(100, 116, 139, 0.78);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-passage-feedback-foot__link {
    color: rgba(37, 99, 235, 0.92);
    font-weight: 500;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTraySub.bb-study-tray-card__sub {
    font-size: 0.66rem;
    line-height: 1.35;
    color: rgba(100, 116, 139, 0.52);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayTitle.bb-study-tray-card__title--quiet {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.72);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails.bb-study-tray-dashboard-details {
    border: none;
    background: transparent;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails .bb-study-tray-dashboard-details__summary {
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.68);
    padding: 0.16rem 0.06rem;
    list-style: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails .bb-study-tray-dashboard-details__summary:hover {
    color: rgba(100, 116, 139, 0.95);
}
body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails .bb-study-tray-dashboard-details__summary,
body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayTitle.bb-study-tray-card__title--quiet,
body.bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTraySub.bb-study-tray-card__sub {
    color: rgba(148, 163, 184, 0.52);
}
/* Below-passage study stack: hidden by default in scripture-first; shown when companion layout is active (surfaces below the text). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageStudyZone {
    display: none !important;
}
/* When no verse-tools overlay is open, show the below-passage stack while any companion strip surface is on. */
body:not(.bb-verse-study-overlay-open)
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbBelowPassageStudyZone[data-bb-companion-active='on'] {
    display: flex !important;
    flex-direction: column;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-verse-gated-study-bridge {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #passageOlReadinessStatus {
    display: none !important;
}
/* Scripture block: one top edge on #resultTranslations — drop the extra <hr> hairline above it. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area > .section-divider.passage-scripture-block-start {
    display: none;
    margin: 0;
    height: 0;
    border: none;
    background: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .bb-sf-translations-output-cue {
    display: none;
}

/* Scripture-first: shell already shows default translation — hide rail echo of the same state */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .translations-toolbar .translation-filter-status {
    display: none;
}

/* Scripture-first: “Tips” duplicates Reference + Compare; keep licenses, drop tips strip */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsCompareHint {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults.passage-results {
    margin-top: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header.passage-reader-header--reading-head {
    opacity: 0.9;
    margin-bottom: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn__label {
    font-weight: 600;
    letter-spacing: 0.02em;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn {
    border-color: rgba(226, 232, 240, 0.78);
    box-shadow: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-header-toolbelt__summary {
    opacity: 0.28;
    font-weight: 500;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reading-chrome-extras__summary {
    opacity: 0.32;
}

/* Primary tray: optional zone below scripture — state from data-bb-tray-* (set in refreshBbStudyTrayUi). */
.bb-study-tray-wrap[data-bb-tray-any-on="false"] .bb-study-tray-card {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
}
.bb-study-tray-wrap[data-bb-tray-any-on="true"] .bb-study-tray-card {
    border-color: rgba(37, 99, 235, 0.22);
    background: linear-gradient(165deg, rgba(59, 130, 246, 0.06), rgba(248, 250, 252, 0.99));
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.bb-study-tray-wrap[data-bb-tray-preset="custom"][data-bb-tray-any-on="true"] .bb-study-tray-card {
    border-color: rgba(109, 40, 217, 0.26);
    background: linear-gradient(165deg, rgba(109, 40, 217, 0.05), rgba(248, 250, 252, 0.99));
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.bb-study-tray-card {
    max-width: var(--reading-max, 52rem);
    margin: 0 auto;
    padding: 0.55rem 0.65rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}
.bb-study-tray-card__head {
    margin-bottom: 0.28rem;
}
.bb-study-tray-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}
.bb-study-tray-card__icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 7px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.12);
}
.bb-study-tray-card__titles {
    min-width: 0;
    flex: 1;
}
.bb-study-tray-card__title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color, #0f172a);
    letter-spacing: 0.01em;
}
.bb-study-tray-card__title--quiet {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(51, 65, 85, 0.92);
    letter-spacing: 0.01em;
}
.bb-study-tray-card__sub {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--light-text, #64748b);
    opacity: 0.94;
}
.bb-study-tray-card__sub strong {
    color: var(--text-color, #334155);
    font-weight: 600;
}
.bb-study-tray-wrap[data-bb-tray-preset="custom"][data-bb-tray-any-on="true"] .bb-study-tray-card__sub strong {
    color: #5b21b6;
}
.bb-study-tray-card > .bb-onboarding-hint {
    margin-bottom: 0.48rem;
}
.bb-onboarding-hint--passage {
    border-color: rgba(196, 181, 253, 0.88);
    background: rgba(245, 243, 255, 0.84);
}
.bb-onboarding-hint--passage .bb-onboarding-hint__dismiss {
    color: #6d28d9;
}
.bb-onboarding-hint--passage .bb-onboarding-hint__dismiss:hover {
    color: #5b21b6;
}
.bb-study-tray-card__preset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.4rem;
    margin-bottom: 0.28rem;
}
.bb-study-tray-card__preset-summary {
    margin: 0 0 0.32rem;
    padding: 0.22rem 0.32rem 0.24rem;
    font-size: 0.7rem;
    line-height: 1.38;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.95);
    border-radius: 6px;
    background: rgba(248, 250, 252, 0.65);
    border: none;
    border-left: 2px solid rgba(148, 163, 184, 0.35);
    max-width: 42rem;
}
.bb-study-tray-wrap[data-bb-tray-any-on='true'] .bb-study-tray-card__preset-summary {
    background: rgba(248, 250, 252, 0.85);
    border-left-color: rgba(37, 99, 235, 0.28);
}
.bb-study-tray-wrap[data-bb-tray-preset='custom'][data-bb-tray-any-on='true'] .bb-study-tray-card__preset-summary {
    border-left-color: rgba(109, 40, 217, 0.35);
}
.bb-study-tray-segmented {
    display: flex;
    flex-wrap: wrap;
    flex: 1 1 14rem;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
}
.bb-study-preset {
    margin: 0;
    padding: 0.32rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color, #1e293b);
    cursor: pointer;
    min-height: 40px;
    box-sizing: border-box;
}

.bb-study-preset--seg {
    flex: 1 1 auto;
    min-width: 4.25rem;
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
    font-size: 0.74rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}
.bb-study-tray-segmented .bb-study-preset--seg:last-child {
    border-right: 0;
}

.bb-study-preset:hover {
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}
.bb-study-tray-segmented .bb-study-preset--seg:hover {
    background: rgba(59, 130, 246, 0.06);
}

.bb-study-preset--active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}
.bb-study-tray-segmented .bb-study-preset--seg.bb-study-preset--active {
    background: var(--primary-color, #2563eb);
    color: #fff;
}
.bb-study-tray-segmented .bb-study-preset--seg.bb-study-preset--active:hover {
    color: #fff;
    filter: brightness(1.05);
}

.bb-study-preset--active:hover {
    color: #fff;
    filter: brightness(1.05);
}

.bb-study-preset--custom {
    border-radius: 8px;
    border-style: dashed;
    border-width: 2px;
    font-size: 0.74rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-color, #334155);
}
.bb-study-preset--custom.bb-study-preset--active {
    border-style: solid;
    border-width: 2px;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.14), rgba(37, 99, 235, 0.08));
    color: #5b21b6;
    border-color: rgba(109, 40, 217, 0.55);
    font-weight: 700;
}
.bb-study-preset--custom.bb-study-preset--active:hover {
    color: #4c1d95;
    filter: none;
}
.bb-study-preset--custom:focus-visible {
    outline: 2px solid rgba(109, 40, 217, 0.55);
    outline-offset: 2px;
}

.bb-study-tray-card__chips-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.35rem;
    min-height: 1.75rem;
}
.bb-study-tray-card__chips-kicker {
    flex: 0 0 auto;
    min-width: 1.85rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--light-text, #64748b);
    line-height: 1.2;
}
.bb-study-tray-card__chips-kicker[data-bb-chips-state="on"] {
    color: var(--primary-color, #2563eb);
}
.bb-study-tray-wrap[data-bb-tray-preset="custom"][data-bb-tray-any-on="true"] .bb-study-tray-card__chips-kicker[data-bb-chips-state="on"] {
    color: #6d28d9;
}
.bb-study-tray-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
    min-height: 1.6rem;
    margin-bottom: 0;
    flex: 1 1 12rem;
    min-width: 0;
}
.bb-study-tray-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color, #1d4ed8);
}
.bb-study-tray-chip--empty {
    border-style: dashed;
    border-color: var(--border-color, #cbd5e1);
    background: rgba(248, 250, 252, 0.9);
    color: var(--light-text, #64748b);
    font-weight: 500;
}

.bb-study-tray-card__status {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.38;
    color: var(--light-text, #64748b);
}
.bb-study-tray-wrap[data-bb-tray-any-on="true"] .bb-study-tray-card__status {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-color, #475569);
}
.bb-study-tray-wrap[data-bb-tray-preset="custom"][data-bb-tray-any-on="true"] .bb-study-tray-card__status {
    color: #5b21b6;
}

.bb-study-tray {
    margin: 0.35rem auto 0.5rem;
    padding: 0;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.375rem;
    background: var(--card-bg, #fafafa);
    max-width: var(--reading-max, 52rem);
}

.bb-study-tray__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-color, #334155);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
}

.bb-study-tray__summary::-webkit-details-marker {
    display: none;
}

.bb-study-tray__summary::after {
    content: "▾";
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: auto;
}

.bb-study-tray[open] .bb-study-tray__summary::after {
    content: "▴";
}

.bb-study-tray__panel {
    padding: 0 0.65rem 0.55rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.bb-study-tray__group {
    margin: 0 0 0.45rem;
    padding: 0 0 0.35rem;
    border: 0;
    min-width: 0;
}

.bb-study-tray__legend {
    padding: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--light-text, #64748b);
    margin-bottom: 0.2rem;
}

.bb-study-tray__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.35rem 0.75rem;
    padding-top: 0.45rem;
}

.bb-study-tray__grid--tight {
    padding-top: 0.15rem;
    gap: 0.2rem 0.5rem;
}

.bb-study-tray__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.35;
    cursor: pointer;
    min-height: 44px;
    padding: 0.12rem 0;
}

.bb-study-tray__row input {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary-color, #2563eb);
}

@media (max-width: 600px) {
    .bb-study-tray__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .bb-study-tray-segmented {
        flex-direction: column;
        border-radius: 8px;
    }
    .bb-study-preset--seg {
        border-right: 0;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
    }
    .bb-study-tray-segmented .bb-study-preset--seg:last-child {
        border-bottom: 0;
    }
    .bb-study-tray-card__preset-row {
        flex-direction: column;
        align-items: stretch;
    }
    .bb-study-preset--custom {
        width: 100%;
        justify-content: center;
    }
}


/* Scripture-first consolidation v3: top menu bar, cleaner lookup, secondary rows moved into gear access. */
:root {
    --bb-reader-shell-max: 1040px;
}
html[data-bb-reader-text-size='compact'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-text-size='compact'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-size: 1.02rem;
    line-height: 1.72;
}
html[data-bb-reader-text-size='comfortable'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-text-size='comfortable'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-size: 1.14rem;
    line-height: 1.84;
}
html[data-bb-reader-text-size='large'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-text-size='large'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-size: 1.24rem;
    line-height: 1.88;
}
@media (min-width: 960px) {
    html[data-bb-reader-text-size='compact'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
    html[data-bb-reader-text-size='compact'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
        font-size: 0.98rem;
        line-height: 1.68;
    }
    html[data-bb-reader-text-size='comfortable'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
    html[data-bb-reader-text-size='comfortable'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
        font-size: 1.1rem;
        line-height: 1.82;
    }
    html[data-bb-reader-text-size='large'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
    html[data-bb-reader-text-size='large'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
        font-size: 1.18rem;
        line-height: 1.86;
    }
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__lookup,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results {
    max-width: var(--bb-reader-shell-max);
    margin-left: auto;
    margin-right: auto;
}
/* One row: passage title + reader chrome; next row: single compact passage controls (closed by default). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__ref-picker-wrap {
    order: 1;
    min-width: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    position: relative;
    z-index: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row .bb-reader-passage-lookup-details[open] {
    position: relative;
    z-index: 4;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn__label {
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    font-size: clamp(1.45rem, 2vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: rgba(17, 24, 39, 0.96);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    max-width: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first {
    order: 2;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    position: relative;
    z-index: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu[open] {
    position: relative;
    z-index: 6;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__title-row:has(#bbReaderPassageLookupDetails[open]) .passage-reader-header__actions--scripture-first {
    opacity: 0.66;
}
/* Softer AA menu so the passage title stays visually primary (still ≥ ~44px tap height). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-pill,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu__summary.bb-reader-top-pill {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.42rem 0.55rem;
    border-radius: 12px;
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.42);
    color: rgba(71, 85, 105, 0.72);
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 500;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-pill:hover,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu__summary.bb-reader-top-pill:hover {
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(51, 65, 85, 0.88);
}
.bb-reader-top-pill {
    min-width: 2.75rem;
    min-height: 2.55rem;
    padding: 0.58rem 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--bb-card-border);
    background: var(--bb-card-bg);
    color: var(--bb-color-text-secondary);
    box-shadow: var(--bb-shadow-raised);
    cursor: pointer;
}
.bb-reader-top-menu { position: relative; }
.bb-reader-top-menu__summary { list-style: none; }
.bb-reader-top-menu__summary::-webkit-details-marker { display: none; }
.bb-reader-top-menu__body {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 35;
    min-width: 15rem;
    max-width: min(18rem, calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    padding: 0.8rem;
    border-radius: 18px;
    border: 1px solid var(--bb-menu-border);
    background: var(--bb-menu-bg);
    box-shadow: var(--bb-menu-shadow);
    box-sizing: border-box;
}
.bb-reader-feel-menu { display: grid; gap: 0.45rem; min-width: 15.5rem; }
.bb-reader-text-size-btn[aria-pressed='true'] {
    border-color: var(--bb-theme-active-border);
    background: var(--bb-theme-active-bg);
}
.bb-reader-font-btn[aria-pressed='true'],
.bb-reader-theme-btn[aria-pressed='true'] {
    border-color: var(--bb-theme-active-border);
    background: var(--bb-theme-active-bg);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__toolbelt {
    display: grid;
    gap: 0.45rem;
}
.bb-reader-top-menu__section { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--bb-color-border-subtle); }
.bb-reader-top-menu__section--first { margin-top: 0; padding-top: 0; border-top: none; }
.bb-reader-top-menu__label { margin: 0 0 0.45rem; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bb-color-text-muted); }
.bb-reader-top-menu__shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.45rem; }
.bb-reader-top-menu__shortcuts:has(.bb-reader-theme-btn) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bb-reader-top-menu__hint {
    margin: 0.08rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--bb-color-text-muted);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__lookup {
    margin-top: 0;
    margin-bottom: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row .bb-reader-passage-lookup-details__summary {
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row .bb-reader-passage-lookup-details__body {
    padding: 0.26rem 0.34rem 0.3rem;
    border-top: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header__passage-lookup--in-title-row
    .bb-passage-ref-bar--lookup-compact {
    margin-top: 0;
    padding-top: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header__passage-lookup--in-title-row
    .bb-passage-ref-bar--lookup-compact
    .bb-passage-ref-bar__secondary {
    padding: 0.32rem 0.38rem 0.36rem;
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(248, 250, 252, 0.65);
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-lookup-primary {
    display: grid;
    grid-template-columns: minmax(13rem, 2fr) minmax(9rem, 1fr) auto;
    gap: 0.45rem 0.55rem;
    align-items: end;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-structured-details {
    margin-top: 0.45rem;
    border-top: 1px solid rgba(226, 232, 240, 0.65);
    padding-top: 0.45rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-structured-summary {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-structured-details-body {
    display: grid;
    grid-template-columns: minmax(10rem, 1.6fr) minmax(6rem, 0.7fr) minmax(8rem, 0.9fr);
    gap: 0.45rem 0.55rem;
    padding: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-structured-field,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-ref-field,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-translation-field {
    margin: 0;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .translation-pref-help {
    margin-top: 0.22rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header__passage-lookup--in-title-row
    .passage-load-btn {
    min-height: 2.05rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    box-shadow: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .context-section-header,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-timeline-surface__head {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-study-tray-dashboard-details__summary {
    font-size: 0.82rem;
}
@media (max-width: 900px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-lookup-primary,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-structured-details-body {
        grid-template-columns: 1fr;
    }
    .bb-reader-top-menu__shortcuts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn__label {
        font-size: clamp(1.42rem, 5.2vw, 1.85rem);
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__title-row {
        align-items: flex-start;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first {
        align-self: flex-end;
    }
}

/* Scripture-first: narrow phones — top chrome, passage panel, scripture band, dock, overlay cards. */
@media (max-width: 520px) {
    /* Undo generic reader 520px column stack: SF uses row + order so ref+chrome share row 1, passage lookup is row 2. */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__title-row,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__title-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        max-width: none;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__ref-picker-wrap {
        width: auto;
        max-width: 100%;
        justify-content: flex-start;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ref-picker-open-btn {
        width: auto;
        max-width: 100%;
        justify-content: flex-start;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace {
        padding: 0.05rem 0.12rem 0.06rem;
        margin-bottom: 0;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
        padding-bottom: 0.08rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head .passage-reader-header__title-row {
        margin-bottom: 0.06rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet .passage-reader-header__title-row {
        gap: 0.32rem 0.42rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.26rem;
        width: auto;
        max-width: 100%;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-pill,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu__summary.bb-reader-top-pill {
        min-width: 2.6rem;
        min-height: 2.6rem;
        padding: 0.34rem 0.42rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu {
        max-width: 100%;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first .bb-reader-top-menu__body {
        right: 0;
        left: auto;
        max-width: min(
            18rem,
            calc(100vw - 0.85rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
        );
        min-width: min(
            11.25rem,
            calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
        );
        padding: 0.62rem 0.52rem 0.68rem;
        box-sizing: border-box;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row {
        margin-top: 0.02rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row .bb-reader-passage-lookup-details__body {
        padding: 0.28rem 0.32rem 0.34rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-reader-header__passage-lookup--in-title-row
        .bb-passage-ref-bar--lookup-compact
        .bb-passage-ref-bar__secondary {
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band .bb-continue-reading-bar.bb-continue-reading-bar--visible {
        margin-bottom: 0.06rem;
        padding: 0;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-ui--quiet #passageResults .bb-sf-reading-utility-rail .translations-toolbar {
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        gap: 0.14rem 0.26rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-sf-reading-utility-rail {
        padding-bottom: 0.08rem;
        margin-bottom: 0.08rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__marks {
        justify-content: flex-end;
        row-gap: 0.12rem;
        column-gap: 0.12rem;
        min-width: 0;
        flex: 1 1 100%;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .translations-toolbar {
        flex: 1 1 100%;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail .verse-header-icon-btn {
        min-width: 2.44rem;
        min-height: 2.44rem;
    }
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
        padding-left: clamp(0.5rem, 2.8vw, 1.1rem);
        padding-right: clamp(0.5rem, 2.8vw, 1.1rem);
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk.bb-reader-unified-overlay-host__view--ask,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewNotes.bb-reader-unified-overlay-host__view--notes,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewOl.bb-reader-unified-overlay-host__view--ol,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewContext.bb-reader-unified-overlay-host__view--context,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewEaston.bb-reader-unified-overlay-host__view--references,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewTopics.bb-reader-unified-overlay-host__view--references,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewEncyclopedia.bb-reader-unified-overlay-host__view--references,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewReferences.bb-reader-unified-overlay-host__view--references,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewMaps.bb-reader-unified-overlay-host__view--maps {
        max-width: calc(100vw - 0.65rem);
        max-height: min(86dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 0.65rem));
        padding: 0.34rem 0.36rem 0.38rem;
        border-radius: 14px;
    }
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__chrome-dismiss {
        min-width: 2.5rem;
        min-height: 2.5rem;
        padding: 0.2rem 0.45rem;
    }
}

/* Mobile overlay containment hotfix: keep Batch C narrow-phone view-card rules from detaching content from the sheet. */
@media (max-width: 767px) {
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view,
    body.bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        [id^='bbReaderUnifiedOverlayView'].bb-reader-unified-overlay-host__view:not([hidden]) {
        max-width: none !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0.24rem 0.08rem 0.35rem !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* ——— Study (study.html): compose + sources + helpers ——— */
.bb-study-page {
    padding-top: 1.1rem;
    padding-bottom: 2.25rem;
    max-width: 42rem;
}

.bb-study-page--workspace {
    max-width: min(80rem, 100%);
}

/* Win over global `.container` max-width when both classes apply (study workspace shell). */
.bb-study-page.bb-study-page--workspace.container {
    max-width: min(80rem, 100%);
}

/* Study workspace shell (compose above; Sources + Helpers below on wide screens). */
.bb-study-workspace {
    margin-top: 0.35rem;
    padding: 0.95rem 0.8rem 1.05rem;
    border-radius: 16px;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
}

/* Study: primary sermon / lesson composition (autosave studyDraft + studyDraftMeta). */
.bb-study-composition-primary {
    margin-bottom: 1.65rem;
    padding: 1.05rem 1rem 1.2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
}

@media (min-width: 1024px) {
    .bb-study-composition-primary {
        padding: 1.2rem 1.35rem 1.45rem;
    }
}

.bb-study-composition-primary__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    margin-bottom: 0.75rem;
}

.bb-study-composition-primary__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #334155;
}

.bb-study-composition-primary__status {
    font-size: 0.86rem;
    font-weight: 650;
    color: #64748b;
    white-space: nowrap;
}

.bb-study-composition-primary__status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    text-align: right;
    min-width: 0;
}

.bb-study-composition-primary__saved {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: normal;
    max-width: 16rem;
}

.bb-study-draft-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.75rem;
    margin-top: 0.75rem;
    min-height: 1.25rem;
}

.bb-study-draft-head .bb-study-composition-primary__label--draft {
    margin-top: 0;
}

.bb-study-draft-surface {
    margin-top: 0.35rem;
    padding: 0.45rem 0.5rem 0.5rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.35),
        0 10px 40px rgba(15, 23, 42, 0.06);
}

.bb-study-draft-wordcount {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.bb-study-composition-primary__draft.bb-study-composition-primary__draft--insert-flash {
    animation: bbStudyDraftInsertFlash 0.85s ease-out 1;
}

@keyframes bbStudyDraftInsertFlash {
    0% {
        background-color: rgba(254, 249, 195, 0.95);
        box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.45);
    }
    100% {
        background-color: #fafafa;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bb-study-composition-primary__draft.bb-study-composition-primary__draft--insert-flash {
        animation: none;
    }
}

.bb-study-composition-primary__label {
    display: block;
    margin: 0.5rem 0 0.2rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.bb-study-composition-primary__label:first-of-type {
    margin-top: 0;
}

.bb-study-composition-primary__label--draft {
    margin-top: 0.75rem;
}

.bb-study-composition-primary__input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.52rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    line-height: 1.35;
    color: #0f172a;
    background: #fff;
}

.bb-study-composition-primary__input--title {
    font-size: 1.12rem;
    font-weight: 650;
}

.bb-study-composition-primary__input:focus-visible,
.bb-study-composition-primary__draft:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 1px;
}

.bb-study-composition-primary__draft {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 18.5rem;
    padding: 0.78rem 0.88rem;
    border-radius: 11px;
    border: 1px solid #64748b;
    font-size: 1.05rem;
    line-height: 1.66;
    letter-spacing: 0.01em;
    color: #0f172a;
    background: #fff;
    resize: vertical;
    -webkit-text-size-adjust: 100%;
}
@media (max-width: 639px) {
    .bb-study-composition-primary__draft {
        font-size: max(1.03rem, 16px);
        line-height: 1.72;
        padding: 0.78rem 0.75rem;
    }
}

.bb-study-composition-primary__grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}

@media (min-width: 960px) {
    .bb-study-composition-primary__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 17.5rem);
        gap: 1.15rem 1.35rem;
        align-items: start;
    }
}

.bb-study-working-ref {
    margin: 0.35rem 0 0.55rem;
    padding: 0.32rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: #1e3a8a;
    background: rgba(224, 231, 255, 0.55);
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.4);
    max-width: 62rem;
}

.bb-study-working-ref[hidden] {
    display: none !important;
}

.bb-study-composition-primary__main {
    min-width: 0;
}

.bb-study-composition-gathered {
    padding: 0.78rem 0.82rem 0.9rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 1) 100%);
    border: 1px solid rgba(148, 163, 184, 0.52);
}

.bb-study-composition-gathered--working-set {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 1) 58%);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.bb-study-composition-gathered--tertiary {
    padding: 0.62rem 0.65rem 0.72rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: none;
}

.bb-study-composition-gathered--tertiary .bb-study-composition-gathered__title {
    font-size: 0.82rem;
    font-weight: 650;
    color: #64748b;
}

.bb-study-composition-gathered--tertiary .bb-study-composition-gathered__kicker {
    font-size: 0.6rem;
    color: #94a3b8;
}

.bb-study-composition-gathered--tertiary .bb-study-composition-gathered__empty {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Hide entire Saved-for-this-draft shelf when empty (no parked rows). Shown after Keep for later / attach. */
.bb-study-composition-gathered--empty-collapsed {
    display: none;
}

.bb-study-composition-gathered__kicker {
    margin: 0 0 0.2rem;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-composition-gathered__title {
    margin: 0 0 0.38rem;
    font-size: 0.92rem;
    font-weight: 760;
    color: #1e293b;
}

.bb-study-composition-gathered__empty {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.bb-study-composition-gathered__empty[hidden] {
    display: none !important;
}

.bb-study-composition-gathered__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(42vh, 24rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.bb-study-draft-gathered__item {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    padding: 0.55rem 0.5rem;
    margin-bottom: 0.45rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.12s ease,
        background-color 0.16s ease;
}
.bb-study-draft-gathered__item:hover {
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.bb-study-draft-gathered__item:active {
    transform: translateY(0.5px);
}

.bb-study-draft-gathered__item:last-child {
    margin-bottom: 0;
}

.bb-study-draft-gathered__ref {
    font-size: 0.92rem;
    font-weight: 650;
    color: #1e293b;
    word-break: break-word;
}

.bb-study-draft-gathered__main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.bb-study-draft-gathered__meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-draft-gathered__preview {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #475569;
    word-break: break-word;
    white-space: pre-line;
}

.bb-study-draft-gathered__used {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
    background: rgba(204, 251, 241, 0.85);
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    vertical-align: middle;
}

.bb-study-draft-gathered__item--used {
    opacity: 0.88;
    background: #f8fafc;
}

.bb-study-draft-gathered__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.bb-study-compose-advanced {
    margin-top: 0.7rem;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.bb-study-compose-advanced__summary {
    cursor: pointer;
    padding: 0.55rem 0.78rem;
    font-weight: 650;
    font-size: 0.9rem;
    color: #334155;
    list-style: none;
}

.bb-study-compose-advanced__summary::-webkit-details-marker {
    display: none;
}

.bb-study-compose-advanced__inner {
    padding: 0 0.78rem 0.85rem;
    border-top: 1px solid #e2e8f0;
}

@media (min-width: 1024px) {
    .bb-study-workspace {
        padding: 1.1rem 1.2rem 1.35rem;
    }
}

.bb-study-layout {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .bb-study-layout.bb-study-layout--supporting {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.1rem 1.35rem;
        align-items: start;
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources {
        padding: 0.5rem 0.55rem 0.65rem;
        border-radius: 12px;
        background: #fafafa;
        box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.75);
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources .bb-study-zone__title {
        font-size: 0.94rem;
        color: #475569;
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources .bb-study-zone__lede--tight {
        font-size: 0.8rem;
        color: #64748b;
    }

    .bb-study-library-details--merged .bb-study-ia-zone-title,
    .bb-study-layout__column--resources .bb-study-ia-zone-title {
        font-size: 0.98rem;
        font-weight: 700;
        color: #334155;
        letter-spacing: -0.01em;
    }

    .bb-study-library-details--merged {
        margin-top: 0.55rem;
        padding: 0.55rem 0.55rem 0.45rem;
        border-radius: 12px;
        background: #fafbfc;
        box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.75);
    }
}

.bb-study-layout__column {
    min-width: 0;
}

.bb-study-library-details--merged .bb-study-zone {
    margin-bottom: 1rem;
}

.bb-study-library-details--merged .bb-study-zone:last-child {
    margin-bottom: 0;
}

.bb-study-ia-zone-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.bb-study-ia-zone-title--secondary {
    color: #334155;
}

.bb-study-ia-zone-title--tertiary {
    color: #64748b;
    font-size: 0.98rem;
    font-weight: 700;
}

.bb-study-ia-zone-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.48;
    color: #475569;
    max-width: 40rem;
}

/* Short zone ledes under resource cards (reduced clutter). */
.bb-study-zone__lede--tight {
    margin-bottom: 0.38rem;
    font-size: 0.84rem;
    line-height: 1.38;
    max-width: none;
}

.bb-study-layout__column--resources .bb-study-ia-zone-intro {
    margin-bottom: 0.85rem;
}

.bb-study-subzone-title {
    margin: 0.85rem 0 0.32rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-zone--shortcuts .bb-study-subzone-title:first-of-type {
    margin-top: 0.35rem;
}

.bb-study-shortcuts-intro {
    margin-top: 0;
}

.bb-study-zone__panel--ask-shortcuts {
    margin-top: 0.25rem;
    border-top: none;
    padding-top: 0;
}

.bb-study-shortcut-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bb-study-shortcut-row {
    display: grid;
    grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto;
    gap: 0.35rem 0.5rem;
    align-items: start;
    padding: 0.42rem 0.5rem;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
    font-size: 0.84rem;
    line-height: 1.35;
}

.bb-study-shortcut-row__ref {
    font-weight: 700;
    color: #1e293b;
    word-break: break-word;
}

.bb-study-shortcut-row__q {
    color: #475569;
    word-break: break-word;
}

.bb-study-shortcut-row__actions {
    white-space: normal;
    font-weight: 600;
    font-size: 0.78rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
    justify-content: flex-end;
}

.bb-study-shortcut-row__btn {
    min-height: 2rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
}

.bb-study-shortcut-row__btn--quiet {
    opacity: 0.92;
}

.bb-study-shortcut-row--used {
    opacity: 0.88;
    background: rgba(241, 245, 249, 0.95);
}

.bb-study-shortcut-row--resource-active {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.32);
    background: rgba(239, 246, 255, 0.88);
}

.bb-study-shortcut-row__actions a {
    color: #2563eb;
    text-underline-offset: 2px;
}

.bb-study-shortcut-row__sep {
    margin: 0 0.2rem;
    color: #94a3b8;
}

@media (max-width: 520px) {
    .bb-study-shortcut-row {
        grid-template-columns: 1fr;
    }

    .bb-study-shortcut-row__actions {
        justify-self: start;
        justify-content: flex-start;
    }
}

.bb-study-compose {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(203, 213, 225, 0.65),
        0 10px 28px rgba(15, 23, 42, 0.06);
}

.bb-study-compose__label {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-compose__label:first-of-type {
    margin-top: 0;
}

.bb-study-compose__optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.bb-study-compose__title,
.bb-study-compose__subtitle {
    width: 100%;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 650;
    line-height: 1.25;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #fff;
    color: #0f172a;
}

.bb-study-compose__subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #334155;
}

.bb-study-compose__field {
    width: 100%;
    margin-top: 0.15rem;
    padding: 0.58rem 0.68rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.58;
    letter-spacing: 0.008em;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #fff;
    color: #0f172a;
    resize: vertical;
    min-height: 3.5rem;
    -webkit-text-size-adjust: 100%;
}
@media (max-width: 639px) {
    .bb-study-compose__field {
        font-size: max(0.95rem, 16px);
        line-height: 1.65;
        padding: 0.62rem 0.62rem;
    }
}

.bb-study-compose__templates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    margin-top: 0.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(241, 245, 249, 0.75);
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.55);
}

.bb-study-compose__templates-label {
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-right: 0.15rem;
}

.bb-study-compose__body {
    width: 100%;
    min-height: 16rem;
    margin-top: 0.15rem;
    padding: 0.65rem 0.75rem;
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #fff;
    color: #0f172a;
    resize: vertical;
}

.bb-study-compose__body:focus-visible,
.bb-study-compose__field:focus-visible,
.bb-study-compose__title:focus-visible,
.bb-study-compose__subtitle:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 1px;
    border-color: rgba(59, 130, 246, 0.35);
}

.bb-study-compose__footer {
    margin-top: 0.35rem;
}

.bb-study-compose__status {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.bb-study-gather-queue {
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem 0.85rem;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.88);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.75);
}

.bb-study-gather-queue__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 750;
    color: #0f172a;
}

.bb-study-gather-queue__hint {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    line-height: 1.42;
    color: #64748b;
    max-width: 46rem;
}

.bb-study-gather-queue__hint a {
    color: #2563eb;
    font-weight: 600;
}
.bb-onboarding-hint--study {
    margin-bottom: 0.65rem;
}

.bb-study-gather-queue__bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0 0 0.55rem;
}

.bb-study-gather-queue__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.58rem;
    max-height: min(44vh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.bb-study-gather-queue__empty {
    margin: 0;
    padding: 0.5rem 0.45rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #64748b;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
}

.bb-study-gather-queue__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem 0.65rem;
    padding: 0.52rem 0.54rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
    cursor: pointer;
    transition:
        background-color 0.14s ease,
        box-shadow 0.14s ease;
}

.bb-study-gather-queue__main {
    flex: 1 1 12rem;
    min-width: 0;
    min-height: 2.25rem;
    cursor: pointer;
    padding: 0.12rem 0.08rem 0.12rem 0;
    margin: -0.12rem 0;
    border-radius: 6px;
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.bb-study-gather-queue__main:hover {
    background: rgba(241, 245, 249, 0.65);
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.5);
}
.bb-study-gather-queue__main:focus-visible {
    outline: 2px solid var(--primary-color, #2f5f8f);
    outline-offset: 2px;
    background: rgba(241, 245, 249, 0.65);
}
.bb-study-gather-queue__item--active-ref .bb-study-gather-queue__main:hover {
    background: transparent;
    box-shadow: none;
}

@media (pointer: coarse), (max-width: 767px) {
    .bb-study-gather-queue__main {
        min-height: 2.75rem;
    }
}

.bb-study-gather-queue__topline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.28rem 0.45rem;
    min-width: 0;
}

.bb-study-gather-queue__statusline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.22rem;
    min-height: 0;
}

.bb-study-gather-queue__badge {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    color: #64748b;
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    padding: 0.06rem 0.34rem;
    border-radius: 5px;
    margin: 0;
    box-shadow: none;
}

.bb-study-gather-queue__ref {
    font-weight: 700;
    color: #0c1424;
    letter-spacing: -0.012em;
    word-break: break-word;
    flex: 1 1 8rem;
    min-width: 0;
}

.bb-study-gather-queue__tr {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
}

.bb-study-gather-queue__preview {
    margin: 0.32rem 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
    word-break: break-word;
}

.bb-study-gather-queue__meta {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.bb-study-gather-queue__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
    max-width: 100%;
    cursor: default;
}

.bb-study-gather-queue__controls .btn-sm {
    min-height: 2rem;
    padding: 0.22rem 0.42rem;
    font-size: 0.78rem;
    flex: 0 1 auto;
}

.bb-study-row-more {
    position: relative;
    flex: 0 0 auto;
}

.bb-study-row-more__summary {
    list-style: none;
    cursor: pointer;
    min-height: 2rem;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.2;
    user-select: none;
}

.bb-study-row-more__summary::-webkit-details-marker {
    display: none;
}

.bb-study-row-more__summary::marker {
    content: '';
}

.bb-study-row-more__summary:hover {
    background: rgba(241, 245, 249, 0.95);
    color: #1e293b;
    border-color: rgba(148, 163, 184, 0.55);
}

.bb-study-row-more__summary:focus {
    outline: none;
}

.bb-study-row-more__summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.bb-study-row-more__menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.3rem);
    z-index: 10;
    min-width: 10.5rem;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.bb-study-row-more[open] .bb-study-row-more__menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bb-study-row-more__menu .btn-sm {
    width: 100%;
    justify-content: flex-start;
}

.bb-study-row-more__menu .bb-study-row-more__passage {
    display: inline-flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.12rem;
    padding: 0.32rem 0.42rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.75);
}

.bb-study-row-more__menu .bb-study-row-more__passage:hover {
    background: rgba(241, 245, 249, 0.95);
    border-color: rgba(203, 213, 225, 0.95);
}

.bb-study-gather-queue__passage {
    font-size: 0.72rem;
    font-weight: 650;
    color: #0f766e;
    text-decoration: none;
    padding: 0.12rem 0.32rem;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.bb-study-gather-queue__passage:hover {
    text-decoration: underline;
    background-color: rgba(148, 163, 184, 0.16);
    color: #334155;
}

.bb-study-gather-queue__passage:focus-visible {
    outline: 2px solid rgba(71, 85, 105, 0.5);
    outline-offset: 2px;
}

.bb-study-gather-queue__item--used {
    opacity: 0.88;
    background: #f8fafc;
}

.bb-study-gather-queue__used {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
    background: rgba(204, 251, 241, 0.85);
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    vertical-align: middle;
}

/* Scripture links in inbox previews stay above row hit targets */
.bb-study-gather-queue__preview--structured a.ref-link,
.bb-study-draft-gathered__preview--structured a.ref-link {
    position: relative;
    z-index: 1;
}

.bb-study-gather-queue__state {
    display: inline-block;
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    vertical-align: middle;
}

.bb-study-draft-gathered__state {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    vertical-align: middle;
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
}

.bb-study-gather-queue__state--attached {
    color: #64748b;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.bb-study-gather-queue__state--inserted,
.bb-study-draft-gathered__state--inserted {
    color: #1d4ed8;
    background: rgba(239, 246, 255, 0.55);
    border: 1px solid rgba(191, 219, 254, 0.75);
}

.bb-send-to-study-btn {
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.22rem 0.48rem;
    border-radius: 6px;
    border: 1px solid rgba(37, 99, 235, 0.32);
    background: rgba(239, 246, 255, 0.92);
    color: #1d4ed8;
    cursor: pointer;
    font-family: inherit;
}
.bb-send-to-study-btn:hover {
    background: rgba(219, 234, 254, 0.98);
}

.bb-study-send-queue-cue {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
    margin: 0.4rem 0 0;
    max-width: 44rem;
}
.bb-wb-ask-turn .bb-study-send-queue-cue {
    margin-left: 0.05rem;
}
.note-actions .bb-study-send-queue-cue {
    flex: 1 1 100%;
    margin-top: 0.35rem;
}


#noteSendStudyGatherBtn.bb-send-to-study-btn {
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
}

.bb-study-zone--resource-placeholder .bb-study-zone__lede {
    margin-bottom: 0;
}

/* Study — maps resource (places by gathered ref, same API as Passage). */
.bb-study-zone--maps-resource .bb-study-maps-lede {
    margin-bottom: 0.65rem;
}
.bb-study-maps-shell {
    margin-top: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.bb-study-maps-ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
}
.bb-study-maps-ref-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: #334155;
}
.bb-study-maps-ref-select {
    flex: 1 1 12rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.92rem;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: #0f172a;
}
.bb-study-maps-ref-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.bb-study-maps-hint {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #64748b;
}
.bb-study-maps-body {
    min-height: 3.5rem;
}
.bb-study-maps-state {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.65rem 0.45rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.bb-study-maps-state__title {
    font-weight: 650;
    color: #0f172a;
}
.bb-study-maps-state__detail {
    color: #475569;
}
.bb-study-maps-state--empty .bb-study-maps-state__detail strong {
    font-weight: 650;
    color: #334155;
}
.bb-study-maps-state--loading .bb-study-maps-state__title {
    color: #1d4ed8;
}
.bb-study-maps-state--error .bb-study-maps-state__title {
    color: #b91c1c;
}
.bb-study-maps-card__summary {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #334155;
}
.bb-study-maps-card__summary strong {
    font-weight: 700;
    color: #0f172a;
}
.bb-study-maps-card__coords {
    font-weight: 500;
    color: #2563eb;
}
.bb-study-maps-mini {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.bb-study-maps-mini__item {
    margin: 0;
    padding: 0.55rem 0.62rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
}
.bb-study-maps-mini__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.2rem;
}
.bb-study-maps-mini__name {
    font-weight: 650;
    font-size: 0.95rem;
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.bb-study-maps-mini__name:hover {
    color: #1e3a8a;
}
.bb-study-maps-mini__pin {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #15803d;
    white-space: nowrap;
}
.bb-study-maps-mini__pin--off {
    color: #94a3b8;
    font-weight: 600;
    text-transform: none;
}
.bb-study-maps-mini__summary {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.42;
    color: #475569;
}
.bb-study-maps-mini__source {
    margin: 0.28rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}
.bb-study-maps-mini__atlas {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
}
.bb-study-maps-mini__atlas-link {
    font-weight: 600;
    color: #2563eb;
    text-underline-offset: 2px;
}
.bb-study-maps-mini__atlas-link:hover {
    color: #1e3a8a;
}
.bb-study-maps-more {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    color: #64748b;
}
.bb-study-maps-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.15rem;
}
.bb-study-maps-cta-primary,
.bb-study-maps-cta-secondary {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
}
.bb-study-maps-cta-primary {
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: #2563eb;
    color: #fff;
}
.bb-study-maps-cta-primary:hover {
    background: #1d4ed8;
    color: #fff;
}
.bb-study-maps-cta-secondary {
    border: 1px solid rgba(148, 163, 184, 0.65);
    background: #fff;
    color: #1e293b;
}
.bb-study-maps-cta-secondary:hover {
    background: #f1f5f9;
}
.bb-study-maps-cta-insert {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.65);
    background: #fff;
    color: #1e293b;
}
.bb-study-maps-cta-insert:hover {
    background: #f1f5f9;
}
.bb-study-maps-footnote {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

/* Study — Insights timeline summary (GET /timeline/by-reference; same payload shape as Passage Insights — not same-chapter expand selection). */
.bb-study-zone--ctx-timeline .bb-study-ctx-lede {
    margin-bottom: 0.65rem;
}
.bb-study-ctx-shell {
    margin-top: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.bb-study-ctx-ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
}
.bb-study-ctx-ref-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: #334155;
}
.bb-study-ctx-ref-select {
    flex: 1 1 12rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.92rem;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: #0f172a;
}
.bb-study-ctx-ref-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.bb-study-ctx-hint {
    margin: 0 0 0.55rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #64748b;
}
.bb-study-ctx-hint--cost {
    margin-bottom: 0.35rem;
}
.bb-study-ctx-load-row {
    margin: 0 0 0.55rem;
}
.bb-study-ctx-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.55rem;
}
.bb-study-ctx-toolbar[hidden] {
    display: none !important;
}
.bb-study-ctx-toolbar .btn-sm {
    min-height: 2.25rem;
}
.bb-study-ctx-passage-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bb-study-ctx-passage-link:hover {
    text-decoration: none;
}
.bb-study-resource-used-pill {
    display: inline-block;
    margin: 0;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #0f766e;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 999px;
    border: 1px solid rgba(5, 150, 105, 0.22);
    line-height: 1.2;
}
.bb-study-resource-used-pill[hidden] {
    display: none !important;
}
.bb-study-resource-used-pill--inline {
    margin: 0 0 0.45rem;
}
.bb-study-ctx-body {
    max-height: 22rem;
    overflow: auto;
    padding-right: 0.15rem;
    min-height: 3rem;
}
.bb-study-ctx-summary {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.bb-study-ctx-block {
    margin: 0;
    padding: 0.55rem 0.62rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.95);
}
.bb-study-ctx-block__title {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}
.bb-study-ctx-block__meta {
    margin: 0 0 0.35rem;
    font-size: 0.86rem;
    color: #64748b;
}
.bb-study-ctx-block__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #1e293b;
}
.bb-study-ctx-block__body .bb-study-ctx-block__text + .bb-study-ctx-block__text {
    margin-top: 0.45rem;
}
.bb-study-ctx-block__era {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #475569;
    font-style: italic;
}
.bb-study-ctx-block__list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    line-height: 1.42;
    color: #334155;
}
.bb-study-ctx-footnote {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}
.bb-study-ctx-state {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.55rem 0.35rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.bb-study-ctx-state__title {
    font-weight: 650;
    color: #0f172a;
}
.bb-study-ctx-state__detail {
    color: #475569;
}
.bb-study-ctx-state--loading .bb-study-ctx-state__title {
    color: #1d4ed8;
}
.bb-study-ctx-state--error .bb-study-ctx-state__title {
    color: #b91c1c;
}
.bb-study-ctx-state--idle .bb-study-ctx-state__title {
    color: #475569;
}

.bb-study-layout__column--resources .bb-study-passage-notes-focus-shell {
    margin-top: 0.35rem;
}

.bb-study-layout__column--resources .bb-study-zone--saved-ask .bb-study-zone__panel--saved-ask {
    border-top: 1px solid rgba(226, 232, 240, 0.65);
    padding-top: 0.5rem;
}

.bb-study-hero {
    margin-bottom: 1.35rem;
}

.bb-study-hero__kicker {
    margin: 0 0 0.28rem;
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-hero__title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.9rem, 5vw, 2.4rem);
    font-weight: 750;
    color: #0f172a;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.bb-study-hero__lead {
    margin: 0;
    max-width: 46rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: #526173;
}

.bb-study-hero__lead a {
    color: #2563eb;
    font-weight: 600;
    text-underline-offset: 3px;
}

.bb-study-hero__from-passage-cue {
    margin: 0.45rem 0 0.2rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}
.bb-study-hero__from-passage-cue[hidden] {
    display: none !important;
}
.bb-study-from-passage-cue__link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 3px;
}
.bb-study-from-passage-cue__link:hover,
.bb-study-from-passage-cue__link:focus-visible {
    text-decoration: underline;
}

.bb-study-hero__how-details {
    margin-top: 0.45rem;
    margin-bottom: 0.2rem;
    max-width: 46rem;
}

.bb-study-hero__how-details[open] > .bb-study-hero__meta-summary {
    color: #475569;
    margin-bottom: 0.35rem;
}

.bb-study-hero__how-body {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #64748b;
}

.bb-study-hero__how-body a {
    color: #2563eb;
    font-weight: 600;
    text-underline-offset: 3px;
}

.bb-study-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.bb-study-hero__meta-details {
    margin-top: 0.7rem;
    max-width: 44rem;
}

.bb-study-hero__meta-summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-hero__meta-summary::-webkit-details-marker {
    display: none;
}

.bb-study-hero__meta-details[open] > .bb-study-hero__meta-summary {
    color: #475569;
    margin-bottom: 0.35rem;
}

.bb-study-hero__meta-details .bb-study-rollout-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* Section intros: one calm line under zone titles (Notes / Saved Q&A). */
.bb-study-zone__lede {
    margin: 0 0 0.55rem;
    max-width: 40rem;
    font-size: 0.92rem;
    line-height: 1.42;
    color: #475569;
}

.bb-study-hero__passage-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.65rem;
    margin-left: 0;
    font-size: 0.98rem;
    font-weight: 650;
    color: #475569;
    text-decoration: underline;
    text-underline-offset: 3px;
    border-radius: 8px;
}

.bb-study-hero__passage-link:hover {
    color: #1e293b;
}

.bb-study-hero__passage-link:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.bb-study-trio {
    list-style: none;
    margin: 0.95rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

@media (min-width: 720px) {
    .bb-study-trio {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.62rem;
    }
}

.bb-study-trio__item {
    margin: 0;
    padding: 0.65rem 0.78rem;
    border-radius: 12px;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.bb-study-trio__item--shelf {
    background: linear-gradient(165deg, rgba(254, 252, 232, 0.95) 0%, rgba(255, 247, 237, 0.9) 100%);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}

.bb-study-trio__name {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.22rem;
}

.bb-study-trio__desc {
    display: block;
    font-size: 0.88rem;
    line-height: 1.38;
    color: #475569;
}

.bb-study-hero__actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
}

/* Long GitHub pre-filled URLs: keep row from forcing horizontal scroll on narrow viewports */
.bb-study-hero__actions .btn.btn-secondary.btn-sm {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

.bb-study-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 650;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.bb-study-hero__cta--primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.bb-study-hero__cta--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.bb-study-hero__cta--quiet {
    background: #fff;
    color: #334155;
    border-color: rgba(203, 213, 225, 0.95);
}

.bb-study-hero__cta--quiet:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.bb-study-hero__cta--quiet[aria-busy='true'],
.bb-study-hero__cta--quiet:disabled {
    cursor: wait;
    opacity: 0.72;
}

/* Hero Refresh: small utility control (same id/handler; demoted vs passage + feedback). */
.bb-study-hero__cta--utility {
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.86rem;
    font-weight: 500;
    border-width: 1px;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.75);
    color: #64748b;
    border-color: rgba(226, 232, 240, 0.95);
}

.bb-study-hero__cta--utility:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: rgba(203, 213, 225, 0.95);
}

.bb-study-hero__cta--utility[aria-busy='true'],
.bb-study-hero__cta--utility:disabled {
    cursor: wait;
    opacity: 0.78;
}

@media (min-width: 521px) {
    .bb-study-hero__actions .bb-study-hero__refresh {
        margin-inline-start: auto;
    }
}

.bb-study-hero__cta:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.bb-study-toast {
    margin: 0 0 1.1rem;
    padding: 0.62rem 0.85rem;
    border-radius: 10px;
    font-size: 0.98rem;
    line-height: 1.45;
    background: #eff6ff;
    color: #1e40af;
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.65);
    position: relative;
    z-index: 1;
    will-change: opacity, transform;
}
.bb-study-toast.bb-study-toast--show:not([hidden]) {
    animation: bb-study-toast-in 0.16s ease-out;
}
@keyframes bb-study-toast-in {
    from {
        opacity: 0.55;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .bb-study-toast.bb-study-toast--show:not([hidden]) {
        animation: none;
    }
}

.bb-study-toast--error {
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.55);
}

.bb-study-zone {
    margin-bottom: 1.65rem;
}

.bb-study-zone:last-of-type {
    margin-bottom: 0;
}

.bb-study-zone__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem 0.65rem;
    margin-bottom: 0.48rem;
    padding-bottom: 0.38rem;
    border-bottom: 2px solid #e2e8f0;
}

.bb-study-zone__title {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.015em;
}

.bb-study-zone__pill {
    display: inline-flex;
    align-items: center;
    min-height: 2.15rem;
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.bb-study-zone__pill--calm {
    color: #334155;
    background: #e2e8f0;
}

.bb-study-zone__pill--temp {
    color: #92400e;
    background: rgba(254, 243, 199, 0.95);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.bb-study-zone__pill--device {
    color: #334155;
    background: rgba(241, 245, 249, 0.98);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.bb-study-zone__pill--warn {
    color: #9a3412;
    background: rgba(255, 237, 213, 0.95);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.35);
}

.bb-study-zone__panel {
    padding: 0.15rem 0 0;
}

.bb-study-zone--bookmarks .bb-study-zone__panel {
    padding: 0.65rem 0.78rem 0.82rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.65) 100%);
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.45);
}

.bb-study-zone--collections .bb-study-zone__panel {
    padding: 0.55rem 0.65rem 0.72rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.55) 0%, rgba(255, 255, 255, 0.4) 100%);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
}

.bb-study-zone--shelf .bb-study-zone__panel {
    padding: 0.65rem 0.78rem 0.82rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.55) 0%, rgba(248, 250, 252, 0.5) 100%);
    box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.35);
}

.bb-study-zone__panel--collections {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Empty & error-style blocks */
.bb-study-empty {
    margin: 0.25rem 0 0;
    padding: 1rem 0.85rem;
    border-radius: 14px;
    text-align: center;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.bb-study-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.12rem;
    font-weight: 750;
    color: #0f172a;
}

.bb-study-empty__text {
    margin: 0 0 0.7rem;
    font-size: 0.98rem;
    line-height: 1.5;
    color: #475569;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
}

.bb-study-empty__foot {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #64748b;
}

.bb-study-empty__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.1rem;
    min-width: 11rem;
    padding: 0.55rem 1.35rem;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 650;
    text-decoration: none;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.bb-study-empty__cta:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.bb-study-empty__cta--btn {
    cursor: pointer;
    font-family: inherit;
}

.bb-study-empty__alt {
    margin: 0.85rem 0 0;
    font-size: 0.95rem;
}

.bb-study-empty__link {
    color: #2563eb;
    font-weight: 600;
    text-underline-offset: 3px;
}

/* Lists & rows */
.bb-study-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bb-study-list--tight {
    gap: 0.55rem;
}

.bb-study-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.78rem 0.85rem;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), inset 0 0 0 1px rgba(226, 232, 240, 0.65);
}

.bb-study-zone--shelf .bb-study-row {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(180, 83, 9, 0.08), inset 0 0 0 1px rgba(254, 215, 170, 0.45);
}

/* Study shelf: inline scripture cards (session + device pins) */
.bb-study-shelf-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
}

.bb-study-shelf-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(180, 83, 9, 0.08), inset 0 0 0 1px rgba(254, 215, 170, 0.45);
    overflow: hidden;
}

.bb-study-shelf-card__head {
    padding: 0.65rem 0.85rem 0.52rem;
    border-bottom: 1px solid rgba(254, 215, 170, 0.35);
}

.bb-study-shelf-card__ref {
    margin: 0;
    font-size: 1.14rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
}

.bb-study-shelf-card__trans {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-shelf-card__trans--muted {
    color: #94a3b8;
    min-height: 1.15em;
}

.bb-study-shelf-card__body {
    padding: 0.82rem 0.9rem 0.95rem;
    background: #fffef9;
}

.bb-study-shelf-card__scripture {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.06rem;
    line-height: 1.62;
    color: #1e293b;
}

.bb-study-shelf-card__verse-line {
    margin: 0 0 0.62rem;
}

.bb-study-shelf-card__verse-line:last-child {
    margin-bottom: 0;
}

.bb-study-shelf-card__vn {
    font-size: 0.72em;
    font-weight: 700;
    color: #64748b;
    margin-right: 0.12em;
}

.bb-study-shelf-card__passage-ref {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: #475569;
}

.bb-study-shelf-card__text-para {
    margin: 0;
}

.bb-study-shelf-card__loading {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
}

.bb-study-shelf-card__load-err {
    margin: 0;
    font-size: 0.95rem;
    color: #92400e;
    line-height: 1.45;
}

.bb-study-shelf-card__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bb-study-shelf-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.58rem 0.85rem;
    background: #fffdfb;
    border-top: 1px solid rgba(254, 215, 170, 0.35);
}

.bb-study-shelf-card__remove {
    min-height: 2.85rem;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    color: #475569;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.bb-study-shelf-card__remove:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #334155;
}

.bb-study-shelf-card__remove:focus-visible {
    outline: 3px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}

.bb-study-shelf-card__open-passage {
    margin-left: auto;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bb-study-shelf-card__open-passage:hover {
    color: #334155;
}

.bb-study-shelf-card__open-passage:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

.bb-study-shelf-card__foot--dual {
    justify-content: flex-start;
    gap: 0.5rem 1.25rem;
}

.bb-study-shelf-card__foot--dual .bb-study-shelf-card__open-passage {
    margin-left: 0;
}

.bb-study-shelf-card__continue-notes {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f766e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bb-study-shelf-card__continue-notes:hover {
    color: #115e59;
}

.bb-study-shelf-card__continue-notes:focus-visible {
    outline: 3px solid rgba(13, 148, 136, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

.bb-study-ref-note-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    line-height: 1.32;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.01em;
}

.bb-study-ref-note-mount__loading-box {
    padding: 0.35rem 0 0.15rem;
}

.bb-study-code-kicker {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.88em;
    font-weight: 600;
    color: #4338ca;
    background: rgba(238, 242, 255, 0.95);
    padding: 0.08em 0.28em;
    border-radius: 4px;
}

.bb-study-passage-notes-focus-shell {
    margin: 0.5rem 0 0;
    padding: 0.65rem 0.78rem 0.78rem;
    border-radius: 10px;
    background: linear-gradient(165deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 55%);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22), 0 6px 18px rgba(15, 23, 42, 0.06);
}

.bb-study-passage-notes-focus-title {
    margin: 0 0 0.28rem;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1e3a8a;
}

.bb-study-ref-note-mount__box--primary {
    box-shadow: 0 1px 0 rgba(37, 99, 235, 0.12), inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

/* Notes composition helper: draft inserts + Passage handoff */
.bb-study-note-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.65rem;
}
.bb-study-note-used-pill {
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0d9488;
    background: rgba(240, 253, 250, 0.95);
    border: 1px solid rgba(45, 212, 191, 0.45);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    white-space: nowrap;
}
.bb-study-note-compose {
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}
.bb-study-note-card--state .bb-study-note-compose {
    margin-top: 0.5rem;
}
.bb-study-note-compose__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.bb-study-note-compose__actions .btn-sm {
    min-height: 2.25rem;
}
.bb-study-note-compose__quiet {
    margin-left: auto;
    font-size: 0.8rem;
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.45);
}
@media (max-width: 520px) {
    .bb-study-note-compose__quiet {
        margin-left: 0;
    }
}
.bb-study-note-compose__passage {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    align-items: center;
    font-size: 0.88rem;
}
.bb-study-passage-note-preview--placeholder {
    font-style: italic;
    color: #64748b;
}

.bb-study-zone__panel--passage-notes-recent {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.bb-study-zone--saved-ask .bb-study-zone__panel--saved-ask {
    margin-top: 0.35rem;
}

.bb-study-saved-ask-intro {
    max-width: 40rem; /* matches .bb-study-zone__lede when both classes apply */
}

.bb-study-saved-ask-meta {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #64748b;
}

.bb-study-saved-ask-question {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #0f172a;
}

.bb-study-saved-ask-preview {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
}

.bb-study-saved-ask-label {
    display: inline-block;
    min-width: 1.25rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    background: #475569;
    border-radius: 4px;
    padding: 0.06rem 0.28rem;
    margin-right: 0.25rem;
    vertical-align: 0.08em;
}

.bb-study-saved-ask-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

/* Saved Q&A cards: mirror “preview” emphasis used on note preview (subtle violet rule). */
.bb-study-saved-ask-card {
    box-shadow: 0 1px 0 rgba(91, 33, 182, 0.1), inset 0 0 0 1px rgba(139, 92, 246, 0.16);
}

.bb-study-shelf-card__continue-ask {
    font-size: 0.84rem;
    font-weight: 600;
    color: #5b21b6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bb-study-shelf-card__continue-ask:hover {
    color: #4c1d95;
}

.bb-study-shelf-card__continue-ask:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Teaching notes from Q&A — toolbar, cards, draft actions */
.bb-study-tnq-toolbar {
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}
.bb-study-tnq-toolbar__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
}
.bb-study-tnq-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: #334155;
}
.bb-study-tnq-select {
    min-height: 2.25rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.88rem;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    color: #0f172a;
}
.bb-study-tnq-unused-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.bb-study-tnq-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #5b21b6;
}
.bb-study-tnq-kicker {
    margin: 0.45rem 0 0;
}
.bb-study-tnq-empty-filter {
    margin-top: 0.35rem;
}
.bb-study-tnq-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.bb-study-tnq-card {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 0 rgba(91, 33, 182, 0.1), inset 0 0 0 1px rgba(139, 92, 246, 0.16);
}
.bb-study-tnq-card--used {
    opacity: 0.92;
    box-shadow: 0 1px 0 rgba(100, 116, 139, 0.12), inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.bb-study-tnq-card--resource-active {
    box-shadow: 0 1px 0 rgba(37, 99, 235, 0.12), inset 0 0 0 2px rgba(37, 99, 235, 0.32);
}

.bb-study-tnq-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.65rem;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}
.bb-study-tnq-card__ref {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 750;
    color: #4c1d95;
    letter-spacing: -0.01em;
}
.bb-study-tnq-used-pill {
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
}
.bb-study-tnq-card__body {
    padding: 0.65rem 0.75rem 0.5rem;
}
.bb-study-tnq-card__question {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #0f172a;
}
.bb-study-tnq-card__question--muted {
    color: #64748b;
    font-style: italic;
}
.bb-study-tnq-card__answer {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.48;
    color: #334155;
}
.bb-study-tnq-card__meta {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}
.bb-study-tnq-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem 0.65rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: #fafafa;
}
.bb-study-tnq-btn {
    text-decoration: none;
    box-sizing: border-box;
}
.bb-study-tnq-btn--quiet {
    margin-left: auto;
    font-size: 0.8rem;
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.45);
}
@media (max-width: 520px) {
    .bb-study-tnq-btn--quiet {
        margin-left: 0;
    }
}

.bb-study-passage-notes-intro strong {
    font-weight: 650;
    color: #334155;
}

.bb-study-passage-notes-recent-heading {
    margin: 0.65rem 0 0.28rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: #64748b;
    letter-spacing: 0.01em;
}

.bb-study-passage-notes-recent-kicker {
    margin: 0 0 0.42rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}

.bb-study-passage-notes-stack--secondary .bb-study-shelf-card__ref {
    font-size: 1rem;
}

.bb-study-passage-note-card--secondary {
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.2);
}

.bb-study-shelf-device-footnote {
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
    color: #64748b;
    max-width: 38rem;
    line-height: 1.45;
}

/* Bookmarks: same card system as shelf, calmer chrome (long-term saved refs) */
.bb-study-passage-card--bookmark {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), inset 0 0 0 1px rgba(203, 213, 225, 0.75);
}

.bb-study-passage-card--bookmark .bb-study-shelf-card__head {
    border-bottom-color: rgba(203, 213, 225, 0.65);
    padding: 0.75rem 0.95rem 0.55rem;
}

.bb-study-passage-card--bookmark .bb-study-shelf-card__ref {
    font-size: 1.08rem;
}

.bb-study-passage-card--bookmark .bb-study-shelf-card__body {
    background: #f8fafc;
}

.bb-study-passage-card--bookmark .bb-study-shelf-card__foot {
    background: #f8fafc;
    border-top-color: rgba(203, 213, 225, 0.55);
}

.bb-study-bm-card__saved {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    font-weight: 650;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

.bb-study-passage-card--bookmark .bb-study-shelf-card__trans {
    margin-top: 0.15rem;
}

.bb-study-bm-card__saved time {
    font-weight: inherit;
}

@media (min-width: 540px) {
    .bb-study-row {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        gap: 0.85rem;
    }

    .bb-study-row__open {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .bb-study-row__soft {
        flex: 0 0 auto;
        align-self: center;
        min-width: 10.5rem;
    }
}

.bb-study-row__open {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.15rem;
    padding: 0.35rem 0.15rem;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    margin: -0.35rem -0.15rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    cursor: pointer;
    transition: background-color 0.14s ease, box-shadow 0.14s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.bb-study-row__open:hover {
    background-color: rgba(239, 246, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.55);
}

.bb-study-row__open:hover .bb-study-row__ref {
    color: #1d4ed8;
}

.bb-study-row__open:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 1px;
}

.bb-study-row__ref {
    font-size: 1.12rem;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.bb-study-row__sub {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.bb-study-row__open-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2563eb;
    margin-top: 0.15rem;
}

.bb-study-row__open--tight {
    min-height: 2.85rem;
}

.bb-study-row__open--tight .bb-study-row__ref {
    font-size: 1.05rem;
}

.bb-study-row__soft {
    min-height: 3rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    color: #475569;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.bb-study-row__soft:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #334155;
}

.bb-study-row__soft:focus-visible {
    outline: 3px solid rgba(100, 116, 139, 0.35);
    outline-offset: 2px;
}

.bb-study-row--in-coll {
    padding: 0.75rem 0.85rem;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.75);
}

.bb-study-row--in-coll .bb-study-row__open-label {
    font-size: 0.78rem;
}

.bb-study-row__open-label--quiet {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #64748b;
}

/* Shelf → collection */
.bb-study-shelf-save {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(251, 191, 36, 0.35);
}

.bb-study-shelf-save__hint {
    margin: 0 0 0.75rem;
    font-size: 0.96rem;
    line-height: 1.5;
    color: #78350f;
    max-width: 36rem;
}

.bb-study-shelf-save__btn {
    width: 100%;
    max-width: 22rem;
    min-height: 3.2rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: #0f172a;
    background: #fff;
    border: 2px solid rgba(245, 158, 11, 0.65);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.bb-study-shelf-save__btn:hover {
    background: #fffbeb;
    border-color: #d97706;
}

.bb-study-shelf-save__btn:focus-visible {
    outline: 3px solid rgba(245, 158, 11, 0.45);
    outline-offset: 2px;
}

/* Collections accordion */
.bb-study-coll {
    border-radius: 14px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
    overflow: hidden;
}

.bb-study-coll__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.65rem;
    padding: 0.85rem 1rem;
    margin: 0;
    border: none;
    background: #f8fafc;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
    transition: background 0.12s ease;
}

.bb-study-coll__header:hover {
    background: #f1f5f9;
}

.bb-study-coll__header:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.bb-study-coll__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bb-study-coll__name {
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.25;
}

.bb-study-coll__count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-coll__expand {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.bb-study-coll__expand-text {
    font-size: 0.88rem;
    font-weight: 750;
    color: #2563eb;
    max-width: 9.5rem;
    line-height: 1.25;
}

@media (min-width: 400px) {
    .bb-study-coll__expand-text {
        max-width: none;
    }
}

.bb-study-coll__chev {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2.5px solid #64748b;
    border-bottom: 2.5px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    margin-top: -0.15rem;
}

.bb-study-coll__header[aria-expanded='true'] .bb-study-coll__chev {
    transform: rotate(-135deg);
    margin-top: 0.1rem;
}

.bb-study-coll__body {
    padding: 0.65rem 0.75rem 1rem;
    background: #fafbfc;
    box-shadow: inset 0 1px 0 rgba(226, 232, 240, 0.75);
}

.bb-study-coll__loading,
.bb-study-coll__empty {
    margin: 0.35rem 0;
    font-size: 0.98rem;
    color: #64748b;
    text-align: center;
    padding: 0.5rem;
}

/* Shelf → collection dialog */
body.bb-study-dialog-open {
    overflow: hidden;
}

.bb-study-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}

.bb-study-dialog {
    position: fixed;
    z-index: 12001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 1.25rem);
    max-width: 26.5rem;
    max-height: min(88dvh, 34rem);
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.2), inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.bb-study-dialog__inner {
    padding: 1.2rem 1.2rem 1.25rem;
}

.bb-study-dialog__title {
    margin: 0 0 0.45rem;
    font-size: 1.28rem;
    font-weight: 750;
    color: #0f172a;
    line-height: 1.2;
}

.bb-study-dialog__lede {
    margin: 0 0 1.1rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #475569;
}

.bb-study-dialog__block {
    margin: 0 0 1rem;
}

.bb-study-dialog__block[hidden] {
    display: none !important;
}

.bb-study-dialog__label {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

.bb-study-dialog__select,
.bb-study-dialog__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 3.15rem;
    padding: 0.55rem 0.75rem;
    font-size: 1.02rem;
    border-radius: 10px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
}

.bb-study-dialog__select:focus-visible,
.bb-study-dialog__input:focus-visible {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.bb-study-dialog__hint {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
}

.bb-study-dialog__actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

@media (min-width: 420px) {
    .bb-study-dialog__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.bb-study-dialog__btn {
    flex: 1 1 auto;
    min-height: 3.1rem;
    min-width: 0;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.bb-study-dialog__btn--secondary {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

.bb-study-dialog__btn--secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.bb-study-dialog__btn--primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.bb-study-dialog__btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.bb-study-dialog__btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

@media (min-width: 420px) {
    .bb-study-dialog__btn {
        min-width: 9.5rem;
    }
}

/* ——— Passage demo-safe (passage.html: opt-in with ?demoSafe=1 → body[data-bb-demo-safe="1"]) ———
   Hides or reduces advanced affordances for demos. Production loads without
   the attribute; the query flag sets it for constrained demos only. */

body[data-bb-demo-safe='1'] #activeSessionBanner {
    display: none !important;
}

/* Optional-rows footer chrome (presets, Mix, lane picker) — dense and easy to mis-tap */
body[data-bb-demo-safe='1'] .bb-sf-deferred-slab {
    display: none !important;
}

/* Ref picker: book overview + per-book history often sparse or API-sensitive */
body[data-bb-demo-safe='1'] #bbBookOverviewDetails {
    display: none !important;
}

/* Nav … menu: duplicate copy link + back/forward + presentation — top bar already has copy */
body[data-bb-demo-safe='1'] .bb-reading-chrome-extras {
    display: none !important;
}

/* Translation compare tips block */
body[data-bb-demo-safe='1'] #translationsCompareHint {
    display: none !important;
}

/* “Go to passage” form: duplicate structured book/chapter/verse (picker dialog is enough) */
body[data-bb-demo-safe='1'] details.passage-structured-details {
    display: none !important;
}

body[data-bb-demo-safe='1'] .translation-pref-help {
    display: none !important;
}

/* Passage places row: hide “full Explore Map” handoff (Explore Map remains in site nav) */
body[data-bb-demo-safe='1'] #bbPlacesModeBrowseBtn {
    display: none !important;
}

/* Original-language surface: visible when the reader turns on Original (action row); demo-safe still hides noisy OL chrome elsewhere */

/* Legacy verse overlay: Context tile opens surrounding/history */
body[data-bb-demo-safe='1'] #bbVerseOverlayToolContextBtn {
    display: none !important;
}


/* Bookmarks sidebar: sessions + JSON import/export */
body[data-bb-demo-safe='1'] .sessions-sidebar-heading,
body[data-bb-demo-safe='1'] .sessions-create,
body[data-bb-demo-safe='1'] #sessionsListWrap,
body[data-bb-demo-safe='1'] #sessionJsonHint,
body[data-bb-demo-safe='1'] .session-export-import {
    display: none !important;
}

/* Maps explorer modal: passage-only tab */
body[data-bb-demo-safe='1'] .bb-maps-explorer-mode-btn[data-bb-maps-mode='browse'],
body[data-bb-demo-safe='1'] .bb-maps-explorer-mode-btn[data-bb-maps-mode='regions'],
body[data-bb-demo-safe='1'] .bb-maps-explorer-mode-btn[data-bb-maps-mode='journeys'] {
    display: none !important;
}

/* Passage shell — calmer chrome when demo-safe (reading first, fewer bands) */
body[data-bb-demo-safe='1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head {
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    padding-bottom: 0.35rem;
    margin-bottom: 0.15rem;
    box-shadow: none;
}

body[data-bb-demo-safe='1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__title-row {
    gap: 0.55rem 0.85rem;
}

body[data-bb-demo-safe='1']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header__passage-lookup--in-title-row
    .bb-reader-passage-lookup-details {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

body[data-bb-demo-safe='1']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-passage-lookup-details__summary {
    font-weight: 700;
    color: #334155;
}

body[data-bb-demo-safe='1'] .bb-sf-reading-utility-rail__row {
    flex-wrap: wrap;
    gap: 0.55rem 0.7rem;
    padding: 0.5rem 0 0.55rem;
    border-top: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: none;
}

body[data-bb-demo-safe='1'] .translations-toolbar--compare {
    border: none;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
}

body[data-bb-demo-safe='1'] .bb-reader-nav-panel__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body[data-bb-demo-safe='1'] .bb-reader-nav-primary {
    padding-bottom: 0.85rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid #e2e8f0;
}

body[data-bb-demo-safe='1'] .bb-reader-nav-panel .bb-reader-nav-section__title {
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

body[data-bb-demo-safe='1'] .bb-reader-nav-secondary__summary {
    font-size: 0.98rem;
    font-weight: 750;
    color: #0f172a;
}

/* Passage top control bar (scripture-first shell) */
.passage-top-control-bar--sf-shell.passage-top-control-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: center;
    padding: 0.65rem 1rem;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 3.5rem;
    z-index: 40;
    row-gap: 0.55rem;
}

/* Shell bar: location chip + typed ref + translation + Load (reader controls live in the nav menu). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell.passage-top-control-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.72rem;
    align-items: center;
    row-gap: 0.36rem;
    padding-top: 0.42rem;
    padding-bottom: 0.4rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    border-bottom: none;
    box-shadow: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell .passage-control-group--loc {
    grid-column: 1;
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell .passage-control-group--ref {
    grid-column: 2;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 0.32rem;
}

.passage-control-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.passage-control-group--loc {
    flex: 0 1 auto;
    padding-right: 0.35rem;
    margin-right: 0.15rem;
    border-right: 1px solid rgba(226, 232, 240, 0.95);
}

.passage-control-group--ref {
    flex: 1 1 280px;
    min-width: min(100%, 240px);
}

.passage-control-group--util {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 0.35rem;
}

.passage-shell-book-select {
    min-width: 10.5rem;
    max-width: 14rem;
    flex: 1 1 10.5rem;
}

.passage-top-control-bar input,
.passage-top-control-bar select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--light-bg);
    color: var(--text-color);
}

.passage-top-control-bar #passageRefInput {
    flex: 1 1 160px;
    min-width: 140px;
}

/* Shell: one chip = current reference + “Change” opens the book/chapter dialog */
.passage-shell-location-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(100%, 16rem);
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.passage-shell-location-chip:hover {
    border-color: rgba(100, 116, 139, 0.55);
    background: #fff;
}

.passage-shell-location-chip__ref {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    font-weight: 650;
}

.passage-shell-location-chip__action {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.passage-shell-util-btn {
    padding: 0.45rem 0.55rem !important;
    font-size: 0.82rem !important;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.92);
    color: rgba(71, 85, 105, 0.78);
    line-height: 1.2;
}

.passage-shell-util-btn:hover {
    border-color: rgba(148, 163, 184, 0.45);
    color: rgba(51, 65, 85, 0.92);
    background: #fff;
}

@media (min-width: 900px) {
    .passage-top-control-bar--sf-shell.passage-top-control-bar {
        flex-wrap: nowrap;
    }
    .passage-control-group--loc {
        flex: 0 0 auto;
    }
    .passage-control-group--ref {
        flex: 1 1 auto;
    }
}

/* Passage action row */
.passage-action-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.bb-passage-action-row-hint {
    margin: 0.1rem 1rem 0.32rem;
    max-width: min(100%, 42rem);
    max-height: 4.25rem;
    opacity: 1;
    overflow: hidden;
    transition: opacity 0.45s ease, max-height 0.5s ease, margin 0.5s ease;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-passage-action-row-hint {
    margin-left: clamp(0.35rem, 2vw, 1rem);
    margin-right: clamp(0.35rem, 2vw, 1rem);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-passage-action-row-hint.bb-passage-action-row-hint--dismissed {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bb-passage-action-row-hint {
        transition: none;
    }
}

@keyframes bb-passage-verse-nudge-kf {
    0%,
    100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(37, 99, 235, 0.07);
    }
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .verse-block.bb-passage-verse-block--nudge-pulse {
    animation: bb-passage-verse-nudge-kf 1.1s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .verse-block.bb-passage-verse-block--nudge-pulse {
        animation: none;
    }
}

.passage-action-row__primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
}

.passage-action-row__secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
    flex: 1 1 100%;
    min-width: 0;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-row__study--on {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.45);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(239, 246, 255, 0.88);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-row__optional {
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 0.25rem 0.35rem;
    margin-left: 0.1rem;
    white-space: nowrap;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-row__optional:hover {
    color: #334155;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-row__optional[aria-current='true'],
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-row__optional.passage-action-row__study--on {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
    color: #1e40af;
    background: rgba(239, 246, 255, 0.92);
    border-radius: 8px;
}

.passage-action-row button {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    cursor: pointer;
}

.passage-action-row button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.passage-action-row__ask.btn-primary {
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__ask.passage-action-row__ask--on {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 0 0 2px rgba(30, 64, 175, 0.35);
}

.passage-action-row[hidden] {
    display: none;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row:not([hidden]) {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem 0.52rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding: 0.42rem 0.65rem 0.48rem;
    margin: 0.1rem 0 0.55rem;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__primary {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.28rem;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__secondary {
    flex: 0 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem 0.48rem;
    min-width: 0;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__core {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.24rem 0.38rem;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-sf-translations-toolbar--reading:not([hidden]) {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .translations-toolbar__show-wrap {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.22rem 0.32rem;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .translation-selector-label .bb-sf-translation-label-visible {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-passage-compare-picker {
    flex: 0 1 auto;
    position: relative;
    max-width: max-content;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-passage-compare-picker__summary {
    min-height: 2.02rem;
    min-width: 5.35rem;
    padding: 0.34rem 0.72rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(203, 213, 225, 0.95);
    color: var(--bbp-control-text, #334155);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-passage-compare-picker[open] {
    flex-basis: auto;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-passage-compare-picker__body {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.32rem);
    right: 0;
    width: min(20rem, calc(100vw - 1.5rem));
    min-width: min(18rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    margin-top: 0;
    padding: 0.45rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

@media (max-width: 480px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .bb-passage-compare-picker__summary {
        min-height: 44px;
    }
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__verse-scoped {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.34rem;
    /* Collapse when every child tool is [hidden] — avoids a “ghost” strip in the action row. */
    min-height: 0;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__verse-scoped:has(> button:not([hidden])) {
    min-height: 2rem;
    padding-left: 0.44rem;
    margin-left: 0.12rem;
    border-left: 1px solid rgba(148, 163, 184, 0.32);
}

/* Verse-gated row tools use the HTML hidden attribute; keep them fully out of layout/focus rings in all engines. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__verse-scoped > button[hidden] {
    display: none !important;
}

/* Maps / passage-core tools (e.g. #passageActionPlacesBtn) also use [hidden] for curated-availability gating. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__core > button[hidden],
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__core > a[hidden] {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-marks {
    margin-left: 0.35rem;
    flex: 0 0 auto;
    gap: 0.36rem;
}

/* Context and Maps stay in the primary passage-tool group. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__core .passage-action-row__study--quiet {
    font-weight: 600;
    font-size: 0.805rem;
    padding: 0.27rem 0.52rem;
    color: rgba(51, 65, 85, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.86);
}

/* Verse-gated row: lighter than Q&A / Notes / Context. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__verse-scoped .passage-action-row__study--quiet {
    font-weight: 500;
    font-size: 0.76rem;
    padding: 0.22rem 0.42rem;
    color: rgba(100, 116, 139, 0.78);
    border-color: rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.58);
    opacity: 0.94;
}

.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-action-row__verse-scoped
    .passage-action-row__study--quiet.passage-action-row__study--on,
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-action-row__verse-scoped
    .passage-action-row__study--quiet[aria-current='true'] {
    opacity: 1;
    color: rgba(51, 65, 85, 0.92);
    border-color: rgba(148, 163, 184, 0.48);
    background: rgba(255, 255, 255, 0.82);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__secondary .passage-action-row__study--core {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.28rem 0.56rem;
    color: rgba(51, 65, 85, 0.95);
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(255, 255, 255, 0.88);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__secondary .passage-action-row__optional {
    margin-left: 0.15rem;
}

/* Scripture-first: passage action row stays slightly quieter than the active unified reader tools. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
    padding: 0.34rem 0.52rem 0.38rem;
    gap: 0.24rem 0.4rem;
    margin: 0.06rem 0 0.42rem;
    background: rgba(248, 250, 252, 0.48);
    border-color: rgba(226, 232, 240, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__primary {
    gap: 0.22rem 0.36rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary {
    gap: 0.26rem 0.4rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__ask.btn-primary {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.48rem 0.95rem;
    opacity: 0.96;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__ask.passage-action-row__ask--on {
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__selection[hidden] {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] {
    align-items: stretch;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] > :not(.passage-action-row__selection) {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .passage-action-row__selection:not([hidden]) {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 0.24rem;
    min-width: 0;
    width: 100%;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] #bbReaderUnifiedToolsScopeSummary {
    margin: 0;
    padding: 0 0.14rem;
    color: rgba(71, 85, 105, 0.9);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.2;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.18rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.16rem;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.86);
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-size: 100% 100%;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs::-webkit-scrollbar {
    display: block;
    height: 5px;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.65);
    border-radius: 999px;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__tab {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.38rem 0.58rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(51, 65, 85, 0.9);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.15;
    white-space: nowrap;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__tab[hidden] {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__label--mobile {
    display: none;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    background: rgba(255, 255, 255, 0.94);
    color: rgba(30, 64, 175, 0.96);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32);
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__tab:hover {
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 767px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__label--desktop {
        display: none;
    }

    .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow[data-bb-toolbar-scope='selection'] .bb-reader-unified-tools-tabs__label--mobile {
        display: inline-block;
    }
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary .passage-action-row__study--core {
    font-weight: 550;
    font-size: 0.8rem;
    color: rgba(51, 65, 85, 0.88);
    opacity: 0.95;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary .passage-action-row__study--core.passage-action-row__study--on {
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__core .passage-action-row__study--quiet {
    font-weight: 550;
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.8);
    opacity: 0.94;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__core .passage-action-row__study--quiet.passage-action-row__study--on,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__core .passage-action-row__study--quiet[aria-current='true'] {
    opacity: 1;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-marks {
    opacity: 0.88;
}

/* Scripture-first: shell replaces title-row lookup and legacy ref picker control */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderRefPickerOpenBtn,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__ref-picker-wrap,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfReadingHeadingHost:not(:has(#bbSfPassageMultiSelectAffordance:not([hidden]))),
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderPassageLookupDetails,
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup--in-title-row {
    display: none !important;
}

/* Scripture-first: heading host is otherwise hidden with legacy title chrome; show it only as a slot for the multi-verse affordance. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfReadingHeadingHost:has(#bbSfPassageMultiSelectAffordance:not([hidden])) {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.42rem;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0.06rem;
}

/* Scripture-first: one location cue in the shell — hide duplicate reference heading row. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsContextStatus,
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsCompareHint {
    display: none !important;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .translation-filter-status {
    font-size: 0.72rem;
    color: rgba(71, 85, 105, 0.82);
    max-width: 14rem;
    line-height: 1.35;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] .translations-toolbar--compare .translation-selector-label .bb-sf-translation-label-visible {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.88);
}

.passage-action-marks {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.passage-action-mark {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-color);
}

.passage-action-mark:hover:not(:disabled) {
    opacity: 1;
}

.passage-action-mark:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.passage-action-mark {
    opacity: 0.72;
}

.passage-action-row .passage-action-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    min-width: 2.2rem;
    height: 2.2rem;
    min-height: 2.2rem;
    padding: 0;
}

@media (max-width: 768px) {
    .passage-top-control-bar--sf-shell.passage-top-control-bar {
        top: 3rem;
    }

    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell.passage-top-control-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell .passage-control-group--loc,
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-top-control-bar--sf-shell .passage-control-group--ref {
        grid-column: 1;
        justify-self: stretch;
    }

    .passage-control-group--ref {
        flex: 1 1 100%;
        order: 2;
    }

    .passage-control-group--loc {
        order: 1;
        flex: 1 1 auto;
        border-right: none;
        margin-right: 0;
        padding-right: 0;
    }
}

/* Scripture-first: duplicate book/chapter opener (shell chip replaces it); keep passage heading visible */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__ref-picker-wrap {
    display: none !important;
}

/* Scripture-first: lower “Type a reference” drawer duplicates top bar ref + translation — keep in DOM for scripts */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__passage-lookup {
    display: none !important;
}

/* Scripture-first: preset “Study panels” card duplicates passage row + tray; keep outer details open for skip-nav only */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayDashboardDetails > .bb-study-tray-dashboard-details__summary {
    display: none !important;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayCard {
    display: none !important;
}

/* Scripture-first: verse-gated Notes/OL quick strip duplicates passage row */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-verse-gated-study-bridge {
    display: none !important;
}

/* SF: reading-area rail — hide Saved & recent (compare toolbar lives visibly under Translations; see .bb-sf-translations-toolbar--reading). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reading-utility-rail__nav-open {
    display: none !important;
}
/* Compare toolbar moved out of sr-only host: keep visible when JS clears [hidden] (2+ translations). */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .reading-area .bb-sf-translations-toolbar--reading:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem 0.45rem;
    margin: 0 auto 0.4rem;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 3;
    pointer-events: auto;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .reading-area .bb-sf-translations-toolbar--reading:not([hidden]) #translationSelector {
    min-height: 2.1rem;
    flex: 1 1 12rem;
    max-width: 100%;
}
.passage-main[data-bb-reading-surface='scripture-first-v1'] .reading-area .bb-sf-translations-toolbar--reading:not([hidden]) .bb-passage-compare-picker {
    flex: 0 1 auto;
    max-width: min(100%, 21rem);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden])
    .translations-toolbar__show-wrap {
    justify-content: flex-end;
    gap: 0.22rem 0.4rem;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden])
    .translation-selector-label {
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.82);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden])
    .bb-passage-compare-picker__summary {
    min-height: 2.15rem;
    padding: 0.32rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(203, 213, 225, 0.95);
    font-size: 0.88rem;
    font-weight: 600;
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden])
    .bb-passage-compare-picker[open] {
    flex: 1 1 min(100%, 24rem);
}
.passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden])
    .bb-passage-compare-picker__body {
    position: static;
    min-width: 0;
    width: min(100%, 24rem);
    max-width: 100%;
    margin-top: 0.35rem;
    box-shadow: none;
}
@media (max-width: 480px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1']
        .reading-area
        .bb-sf-translations-toolbar--reading:not([hidden])
        .bb-passage-compare-picker__summary {
        min-height: 44px;
    }
}

/* Scripture-first: suppress continue-reading / book-mode band under the heading */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-reader-context-band {
    display: none !important;
}

/* SF: collapse the whole reading-area utility rail — dock, Saved & recent, and compare row stay in DOM for programmatic .click() / state sync; shell + action row are the visible control surface. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .bb-sf-reading-utility-rail {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: none !important;
}

/* SF: suppress translation filter context line above the text; shell + columns carry meaning.
   Keep #translationAvailabilityNotice visible when shown — pref-vs-payload mismatch is sighted feedback. */
.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationsContextStatus {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
}

.passage-main[data-bb-reading-surface='scripture-first-v1'] #translationAvailabilityNotice:not([hidden]) {
    position: static;
    width: auto;
    height: auto;
    margin: 0.35rem 0 0.45rem;
    clip: auto;
    clip-path: none;
    overflow: visible;
    max-width: var(--reading-max, 52rem);
}

/* Passage UI redesign v1: visual-only layer. Keep the unified overlay as the only tool surface. */
body[data-bb-ui-redesign='passage-ui-v1'] {
    --bbp-canvas: var(--bb-color-bg-canvas);
    --bbp-reader-bg: var(--bb-color-bg-reader);
    --bbp-reader-text: var(--bb-color-text-reader);
    --bbp-text-secondary: var(--bb-color-text-secondary);
    --bbp-text-muted: var(--bb-color-text-muted);
    --bbp-border-subtle: var(--bb-color-border-subtle);
    --bbp-border: var(--bb-color-border-default);
    --bbp-accent: var(--bb-color-accent-primary);
    --bbp-accent-soft: var(--bb-color-state-active);
    --bbp-reader-selected: var(--bb-color-state-reader-selected);
    --bbp-hover: var(--bb-color-state-hover);
    --bbp-panel-shadow: var(--bb-shadow-panel);
    --bbp-overlay-shadow: var(--bb-shadow-overlay);
    --bbp-nav-bg: color-mix(in srgb, var(--bb-color-bg-surface) 92%, transparent);
    --bbp-control-bg: color-mix(in srgb, var(--bb-color-bg-surface-raised) 88%, transparent);
    --bbp-control-bg-strong: var(--bb-color-bg-surface-raised);
    --bbp-panel-bg: var(--bb-color-bg-overlay);
    --bbp-tab-strip-bg: var(--bb-color-bg-subtle);
    --bbp-tab-bg: color-mix(in srgb, var(--bb-color-bg-surface-raised) 58%, transparent);
    --bbp-tab-hover-bg: color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
    --bbp-tab-selected-bg: var(--bb-color-bg-surface-raised);
    --bbp-sheet-handle: color-mix(in srgb, var(--bb-color-text-muted) 52%, transparent);
    --bbp-reader-max: 45rem;
    --bbp-desktop-panel: clamp(23.5rem, 28vw, 26rem);
    --bbp-desktop-gap: clamp(1.5rem, 2.4vw, 2.25rem);
    --bbp-passage-action-row-sticky-top: calc(56px + 0.12rem);
    --bbp-passage-action-row-anchor-clearance: calc(var(--bbp-passage-action-row-sticky-top) + 3.25rem);
    --bbp-tool-primary: var(--bb-color-accent-primary-strong);
    --bbp-tool-primary-soft: var(--bb-color-state-active);
    --bbp-tool-secondary: var(--bb-color-text-secondary);
    --bbp-tool-utility: var(--bb-color-text-muted);
    --reading-max: var(--bbp-reader-max);
    --bb-reader-shell-max: var(--bbp-reader-max);
    background: var(--bbp-canvas);
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar {
    min-height: 56px;
    border-bottom: 1px solid var(--bbp-border-subtle);
    background: var(--bbp-nav-bg);
    backdrop-filter: saturate(1.1) blur(10px);
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .container.bb-passage-nav {
    max-width: var(--bb-vc-page-max);
    padding: 0.5rem var(--bb-vc-gutter);
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav__band {
    gap: 0.5rem 0.9rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .logo h1 a.logo-link {
    color: var(--bbp-text-secondary);
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links {
    gap: 1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links a {
    color: var(--bbp-text-muted);
    font-size: 0.875rem;
    font-weight: 550;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links a:hover,
body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links a:focus-visible {
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-shell-location-chip.passage-shell-location-chip--nav,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-nav-passage-toolbar__trans select,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-passage-text-search-open-btn {
    min-height: 2.5rem;
    border-radius: 8px;
    border-color: var(--bbp-border-subtle);
    background: var(--bbp-control-bg);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 64%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-shell-location-chip.passage-shell-location-chip--nav:hover,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-shell-location-chip.passage-shell-location-chip--nav:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-passage-text-search-open-btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-passage-text-search-open-btn:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 36%, var(--bbp-border));
    background: color-mix(in srgb, var(--bbp-control-bg-strong) 78%, var(--bbp-accent-soft) 22%);
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar #passageForm.passage-form--nav-toolbar {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-section {
    max-width: none;
    padding: 1.5rem clamp(1rem, 4vw, 3rem) 4rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-section .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
    max-width: min(100%, calc(var(--bbp-reader-max) + 2rem));
    padding: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReadingModeShell {
    max-width: var(--bbp-reader-max);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace {
    padding: 0;
    border: 0;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
    margin-bottom: 0.85rem;
    padding-bottom: 0;
    border-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults.passage-results {
    margin-top: 0.65rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
    max-width: var(--bbp-reader-max);
    padding-left: clamp(0.25rem, 1.4vw, 1rem);
    padding-right: clamp(0.25rem, 1.4vw, 1rem);
    scroll-padding-top: var(--bbp-passage-action-row-anchor-clearance, 5rem);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
    padding: 1rem 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #resultTranslations .translation-block {
    margin: 0 0 2rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #resultTranslations .translation-block + .translation-block {
    padding-top: 1.5rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: Georgia, 'Times New Roman', ui-serif, serif;
    font-size: 1.1875rem;
    line-height: var(--bb-reader-copy-line-height, 1.79);
    letter-spacing: var(--bb-reader-copy-letter-spacing, 0);
    font-weight: var(--bb-reader-copy-font-weight, 400);
    color: var(--bbp-reader-text);
}

html[data-bb-reader-font='classic'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-font='classic'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: Georgia, 'Times New Roman', ui-serif, serif;
}

html[data-bb-reader-font='clean'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-font='clean'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[data-bb-reader-text-size='compact'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-text-size='compact'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-size: 1.0625rem;
    line-height: var(--bb-reader-copy-line-height-compact, 1.76);
}

html[data-bb-reader-text-size='large'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text,
html[data-bb-reader-text-size='large'] body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .translation-text--passage-prose {
    font-size: 1.3125rem;
    line-height: var(--bb-reader-copy-line-height-large, 1.81);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .translation-block-heading {
    margin-bottom: 0.75rem;
    color: var(--bbp-text-muted);
    font-size: 0.75rem;
    font-weight: var(--bb-reader-meta-font-weight, 550);
    letter-spacing: var(--bb-reader-meta-letter-spacing, 0);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-block {
    margin-top: 0.78em;
    scroll-margin-top: var(--bbp-passage-action-row-anchor-clearance, 5rem);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-num {
    color: var(--bbp-text-muted);
    font-size: 0.72em;
    font-weight: var(--bb-reader-verse-font-weight, 600);
    margin-right: 0.2em;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations .verse-block.verse-selected-for-note {
    background: var(--bbp-reader-selected);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--bb-color-accent-reader) 24%, transparent),
        inset 3px 0 0 color-mix(in srgb, var(--bb-color-accent-reader) 52%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
    margin: 0.25rem 0 1.35rem;
    padding: 0.45rem;
    gap: 0.32rem 0.42rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__ask.btn-primary {
    min-height: 2.25rem;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 650;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary :is(.passage-action-row__study--core, .passage-action-row__study--quiet),
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-mark {
    min-height: 2.2rem;
    border-radius: 8px;
    border-color: transparent;
    background: transparent;
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary :is(.passage-action-row__study--core, .passage-action-row__study--quiet):hover,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-mark:hover {
    background: var(--bbp-hover);
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__utility.passage-action-row__study--on,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__utility[aria-current='true'] {
    background: var(--bbp-hover);
    color: var(--bbp-text-secondary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent, #2563eb) 28%, transparent);
    opacity: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-sf-deferred-slab,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbStudyTrayWrap,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageStudyZone,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbBelowPassageCompanionShell,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-verse-gated-study-bridge {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.75rem 0.875rem 0.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
    background: var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 0.16rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.2rem;
    border-radius: 8px;
    background: var(--bbp-tab-strip-bg);
    scrollbar-width: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs::-webkit-scrollbar {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab {
    flex: 1 1 4.1rem;
    min-width: max-content;
    min-height: 2rem;
    padding: 0.38rem 0.66rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--bbp-tool-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
    justify-content: center;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsTabAsk.bb-reader-unified-tools-tabs__tab {
    background: var(--bbp-tab-bg);
    color: var(--bbp-text-secondary);
    font-weight: 720;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsTabAsk.bb-reader-unified-tools-tabs__tab {
    background: var(--bbp-tool-primary-soft);
    color: var(--bbp-tool-primary);
    box-shadow: inset 0 0 0 1px var(--bb-theme-active-border);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] :is(#bbReaderUnifiedToolsTabCross, #bbReaderUnifiedToolsTabLookup, #bbReaderUnifiedToolsTabOriginal, #bbReaderUnifiedToolsTabMaps).bb-reader-unified-tools-tabs__tab {
    color: var(--bbp-tool-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.16rem;
    width: fit-content;
    max-width: 100%;
    margin: 0.04rem 0 0.42rem;
    padding: 0.18rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-tab-strip-bg);
    overflow-x: auto;
    scrollbar-width: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch::-webkit-scrollbar {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch__btn {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 1.9rem;
    padding: 0.32rem 0.58rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--bbp-tool-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch__btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch__btn:focus-visible {
    background: var(--bbp-tab-hover-bg);
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch__btn[aria-pressed='true'],
body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-dictionary-source-switch__btn--active {
    background: var(--bbp-tab-selected-bg);
    color: var(--bbp-accent);
    font-weight: 700;
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bb-theme-active-border);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-cross-surface__chrome {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.08rem 0 0.48rem;
    padding: 0.36rem;
    border-color: var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-tab-strip-bg) 68%, var(--bbp-panel-bg) 32%);
    box-sizing: border-box;
    overflow: hidden;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-cross-surface__chrome .collection-create {
    display: flex;
    flex: 1 1 18rem;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-cross-surface__chrome .collection-create-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 1.95rem;
    padding: 0.35rem 0.54rem;
    border-radius: 6px;
    font-size: 0.84rem;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-cross-surface__chrome .btn {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 1.9rem;
    padding: 0.32rem 0.58rem;
    border-radius: 6px;
    font-size: 0.8125rem;
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsPanelLookup .bb-cross-surface__chrome .btn {
        display: none !important;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsTabMore.bb-reader-unified-tools-tabs__tab {
    padding-inline: 0.56rem;
    color: var(--bbp-tool-utility);
    font-weight: 560;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab:hover {
    background: var(--bbp-tab-hover-bg);
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    background: var(--bbp-tab-selected-bg);
    color: var(--bbp-accent);
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bb-theme-active-border);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsTabAsk.bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    background: var(--bbp-tab-selected-bg);
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bb-theme-active-border);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host__session-close {
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 8px;
    border-color: var(--bbp-border-subtle);
    background: var(--bbp-control-bg-strong);
    color: var(--bbp-text-muted);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__scope {
    max-width: 8.5rem;
    margin: 0;
    padding: 0.24rem 0.55rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__scope:empty {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__send-study-wrap {
    margin: 0;
    padding: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsSurface .bb-reader-unified-tools-panel:not([hidden]) > .bb-reader-unified-overlay-host__view {
    max-width: none;
    width: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__input,
body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .collection-create-input,
body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .note-textarea {
    border-radius: 8px;
    border-color: var(--bbp-border);
    background: var(--bb-input-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-more-menu {
    display: grid;
    gap: 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-more-menu__button {
    width: 100%;
    min-height: 2.5rem;
    justify-content: flex-start;
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-more-menu__button--copied {
    border-color: var(--bb-color-state-success-border, rgba(22, 163, 74, 0.5));
    color: var(--bb-color-state-success-text, rgba(22, 101, 52, 0.95));
}

@media (min-width: 1200px) {
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-section .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
        max-width: min(calc(var(--bbp-reader-max) + var(--bbp-desktop-panel) + var(--bbp-desktop-gap)), calc(100vw - 2rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        display: grid;
        grid-template-columns: minmax(22rem, var(--bbp-reader-max)) minmax(23rem, var(--bbp-desktop-panel));
        gap: var(--bbp-desktop-gap);
        justify-content: center;
        align-items: start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] {
        position: sticky !important;
        top: 5rem;
        align-self: start;
        width: 100%;
        height: min(46rem, calc(100dvh - 6.5rem));
        min-height: min(32rem, calc(100dvh - 6.5rem));
        max-height: calc(100dvh - 6.5rem);
        border-radius: 12px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] .bb-reader-unified-tools-surface {
        overflow: hidden;
        border: 1px solid var(--bbp-border);
        border-radius: 12px;
        background: var(--bbp-panel-bg);
        box-shadow: var(--bbp-panel-shadow);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__head {
        flex-wrap: nowrap;
        align-items: center;
        min-height: 3rem;
        padding-right: 0.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab {
        white-space: nowrap;
        flex-basis: 4.2rem;
        transition:
            background-color 0.16s ease,
            color 0.16s ease,
            box-shadow 0.16s ease;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__panels,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-panel:not([hidden]) {
        min-height: 0;
        overflow: hidden;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-panel:not([hidden]) {
        overflow-y: auto;
        overflow-anchor: none;
        overscroll-behavior: contain;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'] {
        --bbp-mobile-sheet-max: min(91dvh, calc(100dvh - 3rem));
        --bbp-mobile-sheet-pad: max(0.875rem, env(safe-area-inset-bottom, 0px));
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-section {
        padding: 0.85rem clamp(1rem, 4vw, 1.25rem) 2.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        --bbp-reader-max: 100%;
        --reading-max: 100%;
        --bb-reader-shell-max: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReadingModeShell.bb-reading-mode-shell--mobile-sheet-reserve {
        padding-bottom: min(44dvh, 24rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
        padding-left: clamp(0.75rem, 3.8vw, 1rem);
        padding-right: clamp(0.75rem, 3.8vw, 1rem);
        padding-bottom: clamp(4rem, 14dvh, 7rem);
        scroll-padding-bottom: min(44dvh, 24rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] {
        max-height: var(--bbp-mobile-sheet-max);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'] .bb-reader-unified-tools-surface {
        max-height: var(--bbp-mobile-sheet-max);
        border-radius: 18px 18px 0 0;
        background: var(--bbp-panel-bg);
        box-shadow: var(--bbp-overlay-shadow);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__head {
        position: relative;
        padding: 1rem 3.25rem 0.5rem 0.75rem;
        border-bottom: 1px solid var(--bbp-border-subtle);
        box-shadow: 0 1px 0 color-mix(in srgb, var(--bbp-panel-bg) 75%, transparent) inset;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__head::before {
        content: '';
        position: absolute;
        top: 0.42rem;
        left: 50%;
        width: 2.5rem;
        height: 0.25rem;
        border-radius: 999px;
        background: var(--bbp-sheet-handle);
        transform: translateX(-50%);
        pointer-events: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs {
        min-height: 2.5rem;
        padding: 0.18rem 0.2rem 0.22rem;
        gap: 0.18rem;
        scroll-padding-inline: 0.25rem 2.5rem;
        -webkit-mask-image: none;
        mask-image: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab {
        flex-basis: 4rem;
        min-height: 2.2rem;
        padding: 0.42rem 0.5rem;
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host__session-close {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__scope {
        padding: 0.42rem 0.85rem 0.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__send-study-wrap {
        padding: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__panels {
        overscroll-behavior: contain;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedToolsSurface .bb-reader-unified-tools-panel:not([hidden]) > .bb-reader-unified-overlay-host__view {
        padding: 0.6rem 0.75rem calc(1rem + var(--bbp-mobile-sheet-pad));
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReaderUnifiedOverlayViewAsk .bb-verse-overlay-reader-ask__input,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .collection-create-input,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .note-textarea {
        font-size: 1rem;
    }
}

/* Study — sermon/lesson assembly (Build toolbar, refs summary). */
.bb-study-compose-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin: 0.65rem 0 0.45rem;
    padding: 0.45rem 0.5rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.bb-study-compose-toolbar--by-draft {
    margin-top: 0.18rem;
    margin-bottom: 0.35rem;
    padding: 0.4rem 0.45rem;
}

.bb-study-compose-build {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
    max-width: 100%;
}

.bb-study-compose-build-details {
    flex: 1 1 auto;
    min-width: 0;
}

.bb-study-compose-build-details__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.24rem 0.62rem;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.86);
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 720;
    line-height: 1.2;
    list-style: none;
}

.bb-study-compose-build-details__summary::-webkit-details-marker {
    display: none;
}

.bb-study-compose-build-details__summary::marker {
    content: '';
}

.bb-study-compose-build-details[open] .bb-study-compose-build {
    margin-top: 0.35rem;
}

.bb-study-compose-build__label {
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-right: 0.15rem;
}

.bb-study-compose-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    flex-shrink: 0;
}

.bb-study-refs-summary {
    margin: 0 0 0.55rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.bb-study-refs-summary[hidden] {
    display: none !important;
}

.bb-study-refs-summary__title {
    margin: 0 0 0.2rem;
    font-weight: 650;
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bb-study-refs-summary__line {
    margin: 0;
    color: #475569;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}

.bb-study-refs-summary__list {
    margin: 0;
    padding-left: 1.1rem;
    color: #475569;
}

/* ------------------------------------------------------------------
 * Study IA: composition-first hierarchy (2026-04-16).
 * Draft dominates; Sources aside is secondary; Study inbox is tertiary
 * full-width section; Helpers + Library share a muted supporting grid.
 * ------------------------------------------------------------------ */

.bb-study-hero--compact {
    margin-bottom: 0.85rem;
}

.bb-study-hero--compact .bb-study-hero__title {
    font-size: clamp(1.55rem, 3.8vw, 1.95rem);
    margin-bottom: 0.3rem;
}

.bb-study-hero--compact .bb-study-hero__lead {
    font-size: 0.98rem;
    max-width: 42rem;
}

.bb-study-hero--compact .bb-study-hero__actions {
    margin-top: 0.55rem;
}

/* Study workspace — phones / narrow split panes: stack toolbars so controls stay tappable */
@media (max-width: 520px) {
    .bb-study-hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .bb-study-hero__cta,
    .bb-study-hero__actions > .btn.btn-secondary.btn-sm {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .bb-study-hero__passage-link {
        width: 100%;
        margin-left: 0;
        justify-content: center;
        box-sizing: border-box;
        text-align: center;
    }

    .bb-study-composition-primary__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bb-study-composition-primary__status-stack {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .bb-study-compose-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bb-study-compose-toolbar__actions {
        width: 100%;
        justify-content: stretch;
    }

    .bb-study-compose-toolbar__actions .btn-sm {
        flex: 1 1 auto;
        min-width: 0;
    }

    .bb-study-section__head {
        flex-direction: column;
        align-items: stretch;
    }

    .bb-study-section--inbox .bb-study-gather-queue__bulk {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .bb-study-section--inbox .bb-study-gather-queue__bulk .btn-sm {
        width: 100%;
        box-sizing: border-box;
    }

    /* Study mobile density: less vertical chrome, draft + inbox easier to reach (≤520px). */
    .bb-study-page {
        padding-top: 0.62rem;
        padding-bottom: 1.5rem;
    }

    .bb-study-hero--compact {
        margin-bottom: 0.45rem;
    }

    .bb-study-hero--compact .bb-study-hero__kicker {
        margin-bottom: 0.12rem;
        font-size: 0.72rem;
    }

    .bb-study-hero--compact .bb-study-hero__title {
        margin-bottom: 0.22rem;
        font-size: clamp(1.38rem, 5.5vw, 1.72rem);
    }

    .bb-study-hero--compact .bb-study-hero__lead {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .bb-study-hero--compact .bb-study-hero__actions {
        margin-top: 0.42rem;
    }

    .bb-study-workspace {
        margin-top: 0.15rem;
        padding: 0.58rem 0.5rem 0.72rem;
        border-radius: 12px;
    }

    .bb-study-composition-primary {
        margin-bottom: 1.05rem;
        padding: 0.72rem 0.58rem 0.85rem;
        border-radius: 12px;
    }

    .bb-study-composition-primary__head {
        margin-bottom: 0.45rem;
    }

    .bb-study-compose-toolbar--by-draft {
        margin-top: 0.1rem;
        margin-bottom: 0.28rem;
        padding: 0.34rem 0.38rem;
    }

    .bb-study-draft-head {
        margin-top: 0.42rem;
    }

    .bb-study-composition-primary__draft {
        min-height: min(36dvh, 14.5rem);
        padding: 0.62rem 0.58rem;
    }

    .bb-study-composition-gathered--tertiary {
        padding: 0.48rem 0.52rem 0.58rem;
    }

    .bb-study-section--inbox.bb-study-section--inbox-secondary {
        padding: 0.55rem 0.55rem 0.68rem;
    }

    .bb-study-gather-queue__list {
        max-height: min(48dvh, 24rem);
    }

    .bb-study-gather-queue__item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        padding: 0.48rem 0.46rem;
    }

    .bb-study-gather-queue__main {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .bb-study-gather-queue__controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
        width: 100%;
        max-width: 100%;
    }

    .bb-study-gather-queue__controls > .btn-sm {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .bb-study-gather-queue__controls .bb-study-row-more {
        width: 100%;
        max-width: 100%;
    }

    .bb-study-gather-queue__controls .bb-study-row-more__summary {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .bb-study-row-more--queue .bb-study-row-more__menu {
        position: static;
        margin-top: 0.32rem;
        left: 0;
        right: 0;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .bb-study-row-more--gathered .bb-study-row-more__menu {
        position: static;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        margin-top: 0.32rem;
    }

    .bb-study-helpers-details__summary {
        padding: 0.4rem 0.48rem;
    }

    .bb-study-helpers-details__hint {
        font-size: 0.7rem;
        line-height: 1.25;
    }

    .bb-study-helpers-details__body {
        padding: 0.42rem 0.12rem 0.08rem;
    }

    .bb-study-library-details__inner {
        padding-left: 0.28rem;
        padding-right: 0.28rem;
    }

    .bb-study-zone--shelf .bb-study-zone__panel {
        padding: 0.52rem 0.55rem 0.65rem;
    }
}

/* Passage scripture-first — very narrow: let secondary tools wrap on full row; stack selection actions */
@media (max-width: 480px) {
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row:not([hidden]) {
        padding: 0.38rem 0.48rem 0.42rem;
        gap: 0.32rem 0.4rem;
        align-items: stretch;
    }

    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row__secondary {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

    /* Bookmark / shelf / collection marks get their own row so they are not squeezed beside study verbs on phones. */
    .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-action-row .passage-action-marks {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        margin-top: 0.12rem;
        padding-top: 0.32rem;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        box-sizing: border-box;
    }

}

.bb-study-composition-primary__head-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

/* Passage redesign layout fixes v1: usability corrections without changing unified-overlay ownership. */
body[data-bb-ui-redesign='passage-ui-v1'] .passage-section {
    padding-top: 0.9rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
    margin-bottom: 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults.passage-results {
    margin-top: 0.35rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
    padding-top: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageActionRowHint.bb-passage-action-row-hint,
body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbSfVerseToolsSelectHint {
    display: none !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--bbp-reader-max);
    margin: 0 0 0.85rem;
    overflow-x: visible;
}

body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open {
    overflow-x: hidden;
    overflow-y: auto;
}

@media (min-width: 1200px) {
    body[data-bb-ui-redesign='passage-ui-v1'] {
        --bbp-desktop-panel: clamp(24rem, 30vw, 27.5rem);
        --bbp-desktop-gap: clamp(1.25rem, 2vw, 2rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        grid-template-columns: minmax(22rem, var(--bbp-reader-max)) var(--bbp-desktop-panel);
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] {
        top: 4.5rem;
        height: min(48rem, calc(100dvh - 5.75rem));
        min-height: min(34rem, calc(100dvh - 5.75rem));
        max-height: calc(100dvh - 5.75rem);
        justify-self: stretch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 0.18rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab {
        width: 100%;
        min-width: 0;
        flex: none;
        flex-basis: auto;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'] {
        --bbp-mobile-sheet-max: min(91dvh, calc(100dvh - 2.75rem));
        overflow-y: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .container.bb-passage-nav {
        padding-top: 0.38rem;
        padding-bottom: 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-section {
        padding-top: 0.45rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbReadingModeShell.bb-reading-mode-shell--mobile-sheet-reserve {
        padding-bottom: min(34dvh, 18rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
        padding-bottom: clamp(3.25rem, 10dvh, 5.5rem);
        scroll-padding-bottom: min(34dvh, 18rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.24rem 0.32rem;
        padding: 0.32rem 0.42rem;
        margin-bottom: 0.62rem;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__primary,
    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary {
        display: flex !important;
        flex-wrap: nowrap;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__core {
        flex-wrap: nowrap;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-marks {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        justify-content: flex-end;
        margin: 0;
        padding: 0;
        border-top: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-mark {
        width: 2rem;
        min-width: 2rem;
        height: 2rem;
        min-height: 2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'] .bb-reader-unified-overlay-host__frame,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'] .bb-reader-unified-tools-surface {
        min-height: 0;
        overflow: hidden;
        pointer-events: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        gap: 0.16rem;
        overflow: visible;
        scroll-padding-inline: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-tabs__tab {
        width: 100%;
        min-width: 0;
        flex: none;
        flex-basis: auto;
        padding: 0.38rem 0.22rem;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__panels,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-panel,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] [id^='bbReaderUnifiedOverlayView'].bb-reader-unified-overlay-host__view {
        pointer-events: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open .passage-main[data-bb-reading-surface='scripture-first-v1'] .bb-reader-unified-tools-surface__panels {
        overflow-x: hidden;
        overflow-y: auto;
        overflow-anchor: none;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }

    /* Passage mobile bottom sheet stabilization: compact fixed chrome, one active scroll body. */
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host[data-bb-unified-overlay-state='open'] {
        height: var(--bbp-mobile-sheet-max);
        max-height: var(--bbp-mobile-sheet-max);
        overflow: hidden;
        pointer-events: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__frame,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        display: flex !important;
        flex-direction: column;
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
        pointer-events: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        min-height: 0;
        padding: 0.56rem 2.65rem 0.34rem 0.54rem;
        gap: 0;
        border-bottom: 1px solid var(--bbp-border-subtle);
        background: var(--bbp-panel-bg);
        box-shadow: none;
        pointer-events: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head::before {
        top: 0.24rem;
        width: 2.25rem;
        height: 0.2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        flex: 1 1 auto;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
        min-width: 0;
        min-height: 5.28rem;
        padding: 0.18rem 0 0;
        gap: 0.18rem;
        overflow: visible;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__tab {
        width: 100%;
        min-width: 0;
        min-height: 2.65rem;
        padding: 0.36rem 0.12rem;
        border-radius: 9px;
        font-size: 0.68rem;
        line-height: 1.1;
        font-weight: 760;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayCloseSessionBtn {
        top: 0.34rem;
        right: 0.46rem;
        min-width: 2rem;
        min-height: 2rem;
        width: 2rem;
        height: 2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__scope {
        flex: 0 0 auto;
        margin: 0;
        padding: 0.16rem 0.44rem;
        border: 1px solid var(--bbp-border-subtle);
        border-radius: 999px;
        background: var(--bbp-control-bg);
        color: var(--bbp-text-muted);
        font-size: 0.62rem;
        font-weight: 650;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__panels {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        touch-action: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel:not([hidden]) {
        flex: 1 1 auto;
        min-height: 0;
        height: auto !important;
        max-height: none !important;
        overflow-x: hidden;
        overflow-y: auto;
        overflow-anchor: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        padding: 0.5rem 0.6rem calc(0.85rem + var(--bbp-mobile-sheet-pad, 0px));
        box-sizing: border-box;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        [id^='bbReaderUnifiedOverlayView'].bb-reader-unified-overlay-host__view:not([hidden]) {
        width: 100%;
        max-width: none !important;
        max-height: none !important;
        min-height: 0;
        overflow: visible !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
        .bb-reader-unified-overlay-host__frame,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
        .bb-reader-unified-tools-surface,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open'][data-bb-unified-active-tab='ask']
        .bb-reader-unified-tools-surface__panels,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsPanelAsk,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk {
        pointer-events: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskResultMount,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskComposerMount,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbAiStudyContextStrip {
        pointer-events: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskComposerMount
        button,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskComposerMount
        input,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskComposerMount
        textarea,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskComposerMount
        [role='button'] {
        pointer-events: auto;
    }

    /* Mobile Ask answers must be draggable: keep one sheet-level scroll body instead of a nested transcript scroller. */
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsPanelAsk,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk,
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #bbReaderUnifiedOverlayAskResultMount {
        pointer-events: auto !important;
        touch-action: pan-y;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayViewAsk
        #aiStudyTranscript {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

.bb-study-composition-primary__tier {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.bb-study-composition-primary {
    box-shadow:
        0 6px 32px rgba(15, 23, 42, 0.1),
        inset 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.bb-study-composition-primary__draft {
    min-height: 22rem;
}

@media (min-width: 1024px) {
    .bb-study-composition-primary__draft {
        min-height: 26rem;
    }
}

/* Tertiary inbox section: calmer than primary, distinct from helpers. */
.bb-study-section {
    margin: 1.1rem 0 1.25rem;
    padding: 0.92rem 1rem 1.05rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 1) 100%);
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.8);
}

.bb-study-section--inbox {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.bb-study-section--inbox.bb-study-section--inbox-secondary {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.5);
    padding: 0.72rem 0.78rem 0.85rem;
}

.bb-study-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.45rem 0.85rem;
    margin-bottom: 0.4rem;
}

.bb-study-section__head-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.bb-study-section__tier {
    margin: 0;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-section__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* When the inbox is promoted to its own section, the old widget chrome
 * (border + padding on bb-study-gather-queue) is no longer needed. */
.bb-study-section--inbox .bb-study-gather-queue {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.bb-study-section--inbox .bb-study-gather-queue__title {
    font-size: 1rem;
    color: #334155;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.bb-study-section--inbox-secondary .bb-study-gather-queue__title {
    font-size: 0.92rem;
    font-weight: 650;
    color: #64748b;
}

/* Positive cue when the inbox has items (paired with renderGatherDraftList). */
.bb-study-inbox-reward-cue {
    margin: 0.12rem 0 0;
    padding: 0;
    max-width: 22rem;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #3d7a5c;
}

.bb-study-inbox-reward-cue.bb-study-inbox-reward-cue--reviewed {
    color: #64748b;
    font-weight: 500;
}

.bb-study-section--inbox .bb-study-gather-queue__bulk {
    margin: 0;
    gap: 0.35rem;
}

.bb-study-section--inbox .bb-study-inbox-context-details {
    margin: 0 0 0.5rem;
    max-width: none;
}

.bb-study-inbox-context-hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.42;
    color: #64748b;
    max-width: 46rem;
}

/* Utility kicker above Helpers column heading. */
.bb-study-ia-zone-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.bb-study-ia-zone-kicker--muted {
    color: #94a3b8;
    font-weight: 650;
}

.bb-study-toolbar-btn {
    font-weight: 500;
    color: #475569;
    border-color: rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.94);
}

.bb-study-toolbar-btn:hover:not(:disabled) {
    border-color: rgba(148, 163, 184, 0.75);
    background: #fff;
    color: #334155;
}

/* Helpers: collapsible panel (default open only on wide screens via study-page.js). */
.bb-study-helpers-collapsed-cue {
    display: none;
}
@media (max-width: 1023px) {
    body[data-bb-page='study']
        #bbStudyHelpersDetails:not([open])
        > .bb-study-helpers-collapsed-cue {
        display: block;
        margin: 0 0 0.55rem;
    }
}

.bb-study-helpers-details {
    margin: 0;
}

.bb-study-helpers-details__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    padding: 0.48rem 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.65);
}

.bb-study-helpers-details__summary::-webkit-details-marker {
    display: none;
}

.bb-study-helpers-details__summary:hover,
.bb-study-helpers-details__summary:focus-visible {
    background: rgba(241, 245, 249, 0.95);
    outline: none;
}

.bb-study-helpers-details__summary:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.28);
}

.bb-study-helpers-details__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: #64748b;
    letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
    .bb-study-layout--supporting
        .bb-study-layout__column--resources.bb-study-layout__column--helpers
        .bb-study-helpers-details
        .bb-study-helpers-details__title {
        font-size: 1rem;
        font-weight: 700;
        color: #334155;
    }
}

.bb-study-helpers-details__hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.3;
}

/* Merged “More for this draft”: purpose-first summary + calmer interior rhythm. */
.bb-study-more-for-draft .bb-study-helpers-details__summary {
    gap: 0.12rem;
    padding: 0.5rem 0.58rem 0.46rem;
}

.bb-study-more-for-draft .bb-study-helpers-details__hint {
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.38;
    color: #64748b;
    max-width: 38rem;
}

.bb-study-more-for-draft .bb-study-helpers-details__body {
    padding: 0.52rem 0.38rem 0.22rem;
}

.bb-study-more-for-draft .bb-study-zone {
    margin-bottom: 1.05rem;
}

.bb-study-more-for-draft .bb-study-zone:last-child {
    margin-bottom: 0;
}

.bb-study-more-for-draft .bb-study-zone__head {
    gap: 0.38rem 0.55rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.34rem;
}

.bb-study-more-for-draft .bb-study-zone__lede--tight {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.42;
}

.bb-study-more-for-draft .bb-study-passage-notes-focus-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-more-for-draft .bb-study-library-details__banner {
    gap: 0.12rem;
    padding: 0.4rem 0.42rem 0.3rem;
}

.bb-study-more-for-draft .bb-study-library-details__hint {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.32;
}

.bb-study-more-for-draft .bb-study-subzone-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.bb-study-layout--supporting .bb-study-layout__column--resources.bb-study-layout__column--helpers .bb-study-more-for-draft .bb-study-zone__title {
    font-size: 0.88rem;
    font-weight: 650;
    color: #52606e;
    letter-spacing: -0.008em;
}

@media (min-width: 1024px) {
    .bb-study-layout--supporting
        .bb-study-layout__column--resources.bb-study-layout__column--helpers
        .bb-study-more-for-draft
        .bb-study-zone__title {
        font-size: 0.9rem;
        font-weight: 650;
        color: #4b5d6e;
    }
}

.bb-study-helpers-details[open] > .bb-study-helpers-details__summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    margin-bottom: 0;
}

.bb-study-helpers-details__body {
    padding: 0.5rem 0.15rem 0.1rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, 0.55);
}

.bb-study-helpers-details[open] > .bb-study-helpers-details__body {
    border-top: 1px solid rgba(226, 232, 240, 0.55);
}

.bb-study-layout__column--helpers .bb-study-zone:first-of-type {
    margin-top: 0;
}

/* Library column: collapsible, muted. */
.bb-study-library-details {
    margin: 0;
}

/* Merged into Helpers disclosure: static banner + inner stack (no nested <details>). */
@media (max-width: 1023px) {
    .bb-study-library-details--merged {
        margin-top: 0.45rem;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(226, 232, 240, 0.95);
    }
}

.bb-study-library-details__banner {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.48rem 0.45rem 0.35rem;
    border-radius: 10px 10px 0 0;
    margin: 0 -0.05rem;
    background: rgba(255, 255, 255, 0.5);
}

.bb-study-library-details__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.52rem 0.6rem;
    border-radius: 10px;
    background: transparent;
    color: #334155;
}

.bb-study-library-details__summary::-webkit-details-marker {
    display: none;
}

.bb-study-library-details__summary::after {
    content: '▸';
    align-self: flex-end;
    margin-top: -1rem;
    font-size: 0.78rem;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.bb-study-library-details[open] > .bb-study-library-details__summary::after {
    transform: rotate(90deg);
}

.bb-study-library-details__summary:hover,
.bb-study-library-details__summary:focus-visible {
    background: rgba(226, 232, 240, 0.55);
    outline: none;
}

.bb-study-library-details__summary:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.bb-study-library-details__tier {
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.bb-study-library-details__label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}

.bb-study-library-details__hint {
    font-size: 0.78rem;
    color: #64748b;
}

.bb-study-library-details__inner {
    padding: 0.62rem 0.3rem 0.2rem;
}

.bb-study-library-details__inner .bb-study-zone {
    margin-bottom: 0.85rem;
}

.bb-study-library-details__inner .bb-study-zone:last-child {
    margin-bottom: 0;
}

/* When Library is collapsed, suppress the internal h3 visual competition. */
.bb-study-library-details__inner .bb-study-zone__title {
    font-size: 0.9rem;
    color: #475569;
}

/* ------------------------------------------------------------------
 * Study friction polish (2026-04-17).
 * Goal: make the primary next action obvious on every row, reduce
 * visual competition from utility controls, and keep the draft
 * surrounded by calm supporting panels instead of equally loud ones.
 * No structural changes — only targeted weight shifts on existing
 * classes, plus one collapsed <details> around the Section snippets.
 * ------------------------------------------------------------------ */

/* Inbox primary action: paste-into-draft is what a writer most often
 * wants. Filled blue so the eye lands on it first; rest of the row
 * becomes visual punctuation. Uses the site-wide --primary-color. */
.bb-study-gather-queue__controls .bb-study-gather-insert.btn-primary,
.bb-study-composition-gathered .bb-study-draft-gathered-insert.btn-primary {
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.22);
}
.bb-study-gather-queue__controls .bb-study-gather-insert.bb-study-gather-insert--inserted.btn-primary {
    background: rgba(37, 99, 235, 0.86);
    border-color: rgba(37, 99, 235, 0.86);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.16);
}
.bb-study-gather-queue__controls .bb-study-gather-insert.btn-primary:disabled,
.bb-study-composition-gathered .bb-study-draft-gathered-insert.btn-primary:disabled {
    background: rgba(37, 99, 235, 0.35);
    border-color: rgba(37, 99, 235, 0.35);
    color: #fff;
    box-shadow: none;
    cursor: not-allowed;
}

/* Inbox secondary + tertiary actions: flatten into a muted supporting
 * strip so they don't compete with Insert. Keep the hit targets
 * (padding kept wide enough for touch), just drop the card chrome. */
.bb-study-row-more__menu .bb-study-gather-move,
.bb-study-row-more__menu .bb-study-gather-toggle-used,
.bb-study-row-more__menu .bb-study-gather-remove {
    background: transparent;
    border-color: transparent;
    color: #64748b;
    box-shadow: none;
    font-weight: 600;
}
.bb-study-row-more__menu .bb-study-gather-move:hover:not(:disabled),
.bb-study-row-more__menu .bb-study-gather-toggle-used:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.18);
    color: #1e293b;
    border-color: transparent;
}
.bb-study-row-more__menu .bb-study-gather-move {
    color: #64748b;
}
.bb-study-row-more__menu .bb-study-gather-remove {
    color: #b91c1c;
}
.bb-study-row-more__menu .bb-study-gather-remove:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border-color: transparent;
}

/* Sources-for-this-sermon row: Insert is the whole point; toggle-used
 * and Detach are secondary housekeeping. Same muting pattern as the
 * inbox row so the two panels feel like one system. `.btn-sm` has no
 * global definition in this stylesheet, so match the inbox-controls
 * sizing explicitly here. */
.bb-study-draft-gathered__actions .btn-sm {
    min-height: 2rem;
    padding: 0.22rem 0.52rem;
    font-size: 0.78rem;
    flex: 0 1 auto;
}
.bb-study-draft-gathered__actions .bb-study-draft-gathered-insert {
    flex: 0 0 auto;
    margin-right: auto;
}
.bb-study-row-more__menu .bb-study-draft-gathered-toggle-used,
.bb-study-row-more__menu .bb-study-draft-gathered-remove {
    background: transparent;
    border-color: transparent;
    color: #64748b;
    box-shadow: none;
    font-weight: 600;
}
.bb-study-row-more__menu .bb-study-draft-gathered-toggle-used:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.18);
    color: #1e293b;
    border-color: transparent;
}
.bb-study-row-more__menu .bb-study-draft-gathered-remove {
    color: #b91c1c;
}
.bb-study-row-more__menu .bb-study-draft-gathered-remove:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border-color: transparent;
}

/* Visually group Insert + Attach (writing actions) away from the
 * quiet utility cluster by inserting a flexible spacer after Attach.
 * The Reader link becomes part of the utility cluster so it doesn't
 * steal attention from the primary verbs. */
.bb-study-gather-queue__controls .bb-study-gather-attach {
    margin-right: auto;
}
.bb-study-gather-queue__passage {
    align-self: center;
    color: #475569;
}

/* Helpers column calm-down: the zones read as support tools, not
 * primary panels. Smaller headings, less heavy chrome, tighter gap.
 * Only applies inside the supporting grid so the Helpers column on
 * narrow screens (stacked layout) is untouched. */
@media (min-width: 1024px) {
    .bb-study-layout--supporting .bb-study-layout__column--resources {
        box-shadow:
            0 1px 8px rgba(15, 23, 42, 0.03),
            inset 0 0 0 1px rgba(226, 232, 240, 0.85);
        background: #fcfcfd;
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources .bb-study-zone {
        margin-bottom: 0.85rem;
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources .bb-study-zone__title {
        font-size: 0.9rem;
        font-weight: 650;
        color: #475569;
    }

    .bb-study-layout--supporting .bb-study-layout__column--resources .bb-study-zone__head {
        margin-bottom: 0.25rem;
    }
}

/* UI polish: keep the existing Study / Passage layout, but lower the visual
 * temperature with more consistent spacing, quieter chrome, and clearer
 * primary-vs-secondary button weight. */
.bb-study-workspace {
    margin-top: 0.5rem;
    padding: 1.1rem 1rem 1.22rem;
    background: linear-gradient(180deg, rgba(250, 251, 252, 0.96) 0%, rgba(244, 247, 250, 0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(203, 213, 225, 0.55),
        0 10px 28px rgba(15, 23, 42, 0.03);
}

@media (min-width: 1024px) {
    .bb-study-workspace {
        padding: 1.2rem 1.15rem 1.35rem;
    }
}

.bb-study-composition-primary {
    margin-bottom: 1.85rem;
    padding: 1.15rem 1.1rem 1.32rem;
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.05),
        inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

.bb-study-composition-primary__head {
    gap: 0.55rem 1.1rem;
    margin-bottom: 0.9rem;
}

.bb-study-composition-primary__grid {
    gap: 1.15rem;
    margin-top: 0.35rem;
}

.bb-study-composition-primary__input,
.bb-study-composition-primary__draft {
    border-color: rgba(203, 213, 225, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bb-study-composition-primary__draft {
    padding: 0.82rem 0.88rem;
    background: #fcfcfd;
}

.bb-study-compose-toolbar {
    gap: 0.65rem 1rem;
    margin: 0.8rem 0 0.6rem;
    padding: 0.55rem 0.65rem;
    border-color: rgba(226, 232, 240, 0.82);
    background: rgba(248, 250, 252, 0.82);
}

.bb-study-compose-advanced {
    border-color: rgba(226, 232, 240, 0.82);
    background: rgba(248, 250, 252, 0.78);
}

.bb-study-section {
    margin: 1.2rem 0 1.35rem;
    padding: 1rem 1.05rem 1.12rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(244, 247, 250, 0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(226, 232, 240, 0.82),
        0 1px 2px rgba(15, 23, 42, 0.03);
}

.bb-study-zone {
    margin-bottom: 1.45rem;
}

.bb-study-zone__head {
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.58rem;
    padding-bottom: 0.48rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.bb-study-zone__lede,
.bb-study-gather-queue__hint {
    line-height: 1.5;
}

.bb-study-composition-gathered,
.bb-study-layout--supporting .bb-study-library-details--merged,
.bb-study-layout--supporting .bb-study-layout__column--resources,
.bb-study-maps-shell,
.bb-study-ctx-shell {
    background: rgba(248, 250, 252, 0.74);
    border-color: rgba(203, 213, 225, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 1px 2px rgba(15, 23, 42, 0.02);
}

.bb-study-gather-queue__list {
    gap: 0.72rem;
}

.bb-study-gather-queue__item,
.bb-study-draft-gathered__item,
.bb-study-maps-mini__item,
.bb-study-ctx-block,
.bb-study-empty {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.02),
        inset 0 0 0 1px rgba(226, 232, 240, 0.88);
}

.bb-study-gather-queue__item {
    gap: 0.48rem 0.72rem;
    padding: 0.56rem 0.64rem;
}

.bb-study-gather-queue__item:hover {
    background: rgba(248, 250, 252, 0.98);
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.04),
        inset 0 0 0 1px rgba(148, 163, 184, 0.38);
}

.bb-study-gather-queue__item--active-ref:hover {
    background: rgba(239, 246, 255, 0.96);
    box-shadow:
        0 1px 3px rgba(37, 99, 235, 0.08),
        inset 0 0 0 1px rgba(59, 130, 246, 0.48);
}

.bb-study-draft-gathered__item {
    gap: 0.5rem;
    padding: 0.64rem 0.62rem;
}

.bb-study-gather-queue__item--active-ref {
    background: rgba(239, 246, 255, 0.8);
    box-shadow:
        0 1px 2px rgba(37, 99, 235, 0.05),
        inset 0 0 0 1px rgba(96, 165, 250, 0.42);
}

.bb-study-resource-used-pill,
.bb-study-gather-queue__state,
.bb-study-draft-gathered__state,
.bb-study-draft-gathered__used,
.bb-study-gather-queue__used {
    letter-spacing: 0.03em;
}

.bb-study-library-details__summary {
    padding: 0.62rem 0.68rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.46);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.72);
}

.bb-study-library-details__summary:hover,
.bb-study-library-details__summary:focus-visible {
    background: rgba(248, 250, 252, 0.9);
}

.bb-study-compose-toolbar .btn.btn-secondary,
.bb-study-compose__templates .btn.btn-secondary,
.bb-study-gather-queue__bulk .btn.btn-secondary,
#bbStudyCtxToolbar .btn.btn-secondary,
.bb-study-maps-cta-secondary,
.bb-study-ctx-passage-link {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(203, 213, 225, 0.78);
    color: #475569;
    box-shadow: none;
}

.bb-study-compose-toolbar .btn.btn-secondary:hover:not(:disabled),
.bb-study-compose__templates .btn.btn-secondary:hover:not(:disabled),
.bb-study-gather-queue__bulk .btn.btn-secondary:hover:not(:disabled),
#bbStudyCtxToolbar .btn.btn-secondary:hover:not(:disabled),
.bb-study-maps-cta-secondary:hover:not(:disabled),
.bb-study-ctx-passage-link:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(148, 163, 184, 0.62);
    color: #334155;
}

.bb-study-gather-queue__bulk.bb-study-gather-queue__bulk--demoted .btn.btn-secondary.btn-sm {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.28rem 0.55rem;
    background: rgba(248, 250, 252, 0.55);
    border-color: rgba(226, 232, 240, 0.92);
    color: #64748b;
    box-shadow: none;
}

.bb-study-gather-queue__bulk.bb-study-gather-queue__bulk--demoted .btn.btn-secondary.btn-sm:hover:not(:disabled) {
    background: rgba(241, 245, 249, 0.95);
    border-color: rgba(203, 213, 225, 0.88);
    color: #475569;
}

.bb-study-gather-queue__bulk.bb-study-gather-queue__bulk--demoted .bb-study-gather-queue__bulk-btn--caution {
    border-color: rgba(251, 191, 170, 0.75);
    color: #57534e;
}

.bb-study-gather-queue__bulk.bb-study-gather-queue__bulk--demoted .bb-study-gather-queue__bulk-btn--caution:hover:not(:disabled) {
    border-color: rgba(251, 146, 120, 0.65);
    color: #44403c;
}

.bb-study-gather-queue__controls .bb-study-gather-insert.btn-primary,
.bb-study-composition-gathered .bb-study-draft-gathered-insert.btn-primary,
#bbStudyCtxInsertDraftBtn.btn.btn-secondary,
.bb-study-maps-cta-insert {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.bb-study-gather-queue__controls .bb-study-gather-insert.btn-primary:hover:not(:disabled),
.bb-study-composition-gathered .bb-study-draft-gathered-insert.btn-primary:hover:not(:disabled),
#bbStudyCtxInsertDraftBtn.btn.btn-secondary:hover:not(:disabled),
.bb-study-maps-cta-insert:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.bb-study-gather-queue__controls .bb-study-gather-attach.btn.btn-secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(203, 213, 225, 0.78);
    color: #334155;
}

.bb-study-gather-queue__controls .bb-study-gather-attach.btn.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(148, 163, 184, 0.62);
    color: #1e293b;
}


/* Shared theme polish for broader surfaces outside the Passage reader. */
.licenses-section,
.explore-map-list-panel,
.explore-map-map-panel,
.explore-place-detail,
.bb-study-composition-primary,
.bb-study-section {
    background: var(--bb-card-bg);
    border-color: var(--bb-card-border);
}

.bb-study-section,
.bb-study-composition-primary {
    color: var(--text-color);
}

.bb-study-composition-primary__input,
.bb-study-composition-primary__draft {
    background: var(--bb-input-bg);
    border-color: var(--bb-input-border);
    color: var(--text-color);
}

.bb-study-composition-primary__draft {
    background: color-mix(in srgb, var(--bb-input-bg) 88%, var(--bg-color) 12%);
}

.bb-study-compose-advanced,
.explore-map-list-status,
.explore-place-detail__empty,
.explore-place-detail__loading {
    background: color-mix(in srgb, var(--light-bg) 84%, var(--bg-color) 16%);
    border-color: var(--bb-card-border);
    color: var(--text-color);
}

.licenses-section blockquote {
    background: color-mix(in srgb, var(--light-bg) 88%, var(--bg-color) 12%);
    border-left-color: var(--border-color);
}

/* —— Workbench page (tool-first) —— */
.bb-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.bb-skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.35rem 0.6rem;
    background: var(--primary-color, #2563eb);
    color: #fff;
    z-index: 10000;
}

.bb-wb-sr-h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.bb-wb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.bb-wb-hero {
    padding: 1.25rem 0 0.5rem;
    border-bottom: 1px solid var(--bb-card-border, #e2e8f0);
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 90%, var(--bg-color) 10%);
}

.bb-wb-hero__title {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
}

.bb-wb-hero__lead {
    margin: 0;
    max-width: 58rem;
    line-height: 1.5;
    color: var(--text-color);
}

.bb-wb-page {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.bb-wb-surface {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 10px;
    background: var(--bb-card-bg, #fff);
}

.bb-wb-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.5rem;
}

.bb-wb-hint {
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.75rem;
    line-height: 1.52;
}

.bb-wb-tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.bb-wb-primary-stack {
    margin-bottom: 0.85rem;
}

.bb-wb-primary-stack > .bb-wb-tool-control-stack.bb-wb-surface {
    margin-bottom: 0.22rem;
}

.bb-wb-tool-primary-mount {
    margin-bottom: 0.12rem;
}

.bb-wb-grounding-strip {
    margin-top: 0.08rem;
    padding-top: 0.22rem;
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 52%, transparent);
}

.bb-wb-grounding-strip__line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.35rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.12rem;
}

.bb-wb-grounding-strip--empty .bb-wb-grounding-strip__line {
    display: none;
}

.bb-wb-grounding-strip__ref {
    font-weight: 500;
    color: color-mix(in srgb, var(--text-color, #0f172a) 42%, var(--text-muted, #64748b) 58%);
}

.bb-wb-grounding-strip__meta {
    opacity: 0.55;
}

.bb-wb-tools-secondary {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.bb-wb-tools-secondary__label {
    margin: 0 0 0.22rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text-muted, #64748b);
}

.bb-wb-tool-row--workbench {
    gap: 0.4rem;
}

.bb-wb-tool-btn {
    border: 1px solid var(--bb-card-border, #e2e8f0);
    background: var(--light-bg, #f8fafc);
    color: var(--text-color);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.bb-wb-tool-btn:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.bb-wb-tool-btn--active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.bb-wb-grounding-panel {
    padding-top: 0.12rem;
}

.bb-wb-grounding-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    align-items: flex-end;
}

.bb-wb-grounding-field--ref {
    flex: 1 1 12rem;
    min-width: 0;
}

.bb-wb-grounding-field--tr {
    flex: 0 1 9.5rem;
    min-width: 7rem;
}

.bb-wb-grounding-input,
.bb-wb-grounding-select {
    width: 100%;
    max-width: none;
}

.bb-wb-grounding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.bb-wb-grounding-panel--wb {
    padding-top: 0;
}

.bb-wb-grounding-inline--wb {
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.bb-wb-grounding-inline--wb .bb-wb-grounding-field--ref {
    flex: 1 1 9rem;
    min-width: 0;
}

.bb-wb-grounding-inline--wb .bb-wb-grounding-field--tr {
    flex: 0 1 10.25rem;
    min-width: 8.75rem;
}

.bb-wb-grounding-actions--wb {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

@media (max-width: 520px) {
    .bb-wb-grounding-inline--wb .bb-wb-grounding-field--ref,
    .bb-wb-grounding-inline--wb .bb-wb-grounding-field--tr {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .bb-wb-grounding-actions--wb {
        flex: 1 1 100%;
        flex-wrap: wrap;
        width: 100%;
    }

    .bb-wb-grounding-actions--wb > :is(button, a, select) {
        flex: 1 1 auto;
    }
}

.bb-wb-subcontrols-hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.bb-wb-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.bb-wb-label-note {
    font-weight: 500;
    font-size: 0.88em;
    color: var(--text-muted, #64748b);
}

.bb-wb-input,
.bb-wb-select,
.bb-wb-textarea {
    width: 100%;
    max-width: 32rem;
    border: 1px solid var(--bb-input-border, #cbd5e1);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    font-size: 0.95rem;
    background: var(--bb-input-bg, #fff);
    color: var(--text-color);
}

.bb-wb-tool-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
    max-width: 32rem;
}

.bb-wb-tool-search-row .bb-wb-input {
    max-width: none;
}

.bb-wb-tool-submit {
    min-width: 5.75rem;
}

@media (max-width: 420px) {
    .bb-wb-tool-search-row {
        grid-template-columns: 1fr;
    }

    .bb-wb-tool-submit {
        width: 100%;
    }
}

.bb-wb-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.bb-wb-handoffs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

body[data-bb-page="workbench"] .bb-wb-handoffs--below-output {
    margin-top: 0.06rem;
    padding-top: 0.22rem;
    gap: 0.38rem;
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 55%, transparent);
}

body[data-bb-page="workbench"] .bb-wb-handoff-btn.btn.btn-secondary.btn-sm {
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.22;
    padding: 0.16rem 0.38rem;
    border-radius: 6px;
    box-shadow: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    border-color: color-mix(in srgb, var(--bb-card-border, #cbd5e1) 70%, transparent);
}

body[data-bb-page="workbench"] .bb-wb-handoff-btn.btn.btn-secondary.btn-sm:hover {
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 88%, var(--bg-color) 12%);
    color: var(--text-color);
    border-color: var(--bb-card-border, #cbd5e1);
}

.bb-wb-maps-modes,
.bb-wb-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: center;
    font-size: 0.9rem;
}

@media (max-width: 520px) {
    .bb-wb-maps-modes {
        gap: 0.4rem 0.7rem;
    }

    .bb-wb-radio {
        min-height: 2.75rem;
        align-items: center;
    }
}

.bb-wb-handoffs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bb-wb-xref-assist {
    max-width: 36rem;
}

.bb-wb-xref-assist .bb-wb-handoffs-row {
    margin-top: 0.75rem;
    align-items: center;
}

/* Cross-ref assist: Open Passage is a destination handoff, not the primary “Enter verse” action */
body[data-bb-page="workbench"] .bb-wb-xref-assist .bb-wb-handoffs-row .bb-wb-handoff-btn.btn.btn-secondary.btn-sm {
    font-size: 0.72rem;
    font-weight: 400;
    padding: 0.16rem 0.38rem;
    border-radius: 6px;
    box-shadow: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    border-color: color-mix(in srgb, var(--bb-card-border, #cbd5e1) 70%, transparent);
}

body[data-bb-page="workbench"] .bb-wb-xref-assist .bb-wb-handoffs-row .bb-wb-handoff-btn.btn.btn-secondary.btn-sm:hover {
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 88%, var(--bg-color) 12%);
    color: var(--text-color);
    border-color: var(--bb-card-border, #cbd5e1);
}

.bb-wb-xref-search-list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bb-wb-xref-search-item {
    margin: 0;
}

.bb-wb-xref-search-btn {
    width: 100%;
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 10px;
    background: var(--bb-card-bg, #fff);
    text-align: left;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
}

.bb-wb-xref-search-btn:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.bb-wb-xref-search-btn__ref {
    font-weight: 600;
}

.bb-wb-xref-assist__summary {
    margin: 0;
    color: var(--text-muted, #64748b);
    font-size: 0.76rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bb-wb-xref-search-btn__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.bb-wb-xref-search-btn__cue {
    flex: 0 0 auto;
    min-height: 1.35rem;
    padding: 0.16rem 0.42rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 26%, var(--bb-card-border, #e2e8f0));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 68%, var(--bb-card-bg, #fff));
    color: var(--bbp-accent, #2563eb);
    font-size: 0.7rem;
    font-weight: 760;
    line-height: 1;
    text-align: center;
}

.bb-wb-xref-search-btn__snippet {
    color: var(--text-muted, #64748b);
    font-size: 0.92rem;
    line-height: 1.45;
}

.bb-wb-output {
    min-height: 4rem;
    padding: 0.28rem 0.12rem 0.4rem;
}

.bb-wb-output.bb-wb-output--inline {
    margin-top: 0.35rem;
    padding-top: 0.42rem;
    border-top: 1px solid var(--bb-card-border, #e2e8f0);
}

.bb-wb-placeholder {
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.55;
    padding: 0.08rem 0;
}

.bb-wb-output .bb-wb-placeholder.bb-wb-output-tool-tip {
    margin-bottom: 0.42rem;
}

.bb-wb-card-stack {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.bb-wb-card {
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 8px;
    padding: 0.78rem 0.95rem;
    background: var(--light-bg, #f8fafc);
}

.bb-wb-card__head {
    margin: 0 0 0.22rem;
}

.bb-wb-card__title {
    margin: 0;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.28;
    letter-spacing: -0.01em;
    color: color-mix(in srgb, var(--text-color, #0f172a) 94%, var(--text-muted, #64748b) 6%);
}

.bb-wb-card__body {
    min-width: 0;
    padding: 0.08rem 0 0.12rem;
}

.bb-wb-card__body p {
    margin: 0.4rem 0 0;
    line-height: 1.64;
    font-size: 0.93rem;
}

.bb-wb-card__body .bb-ref-prose {
    font-size: 0.93rem;
    line-height: 1.64;
    color: color-mix(in srgb, var(--text-color, #0f172a) 92%, var(--text-muted, #64748b) 8%);
}

.bb-wb-card__body .bb-ref-prose__paragraph {
    margin: 0 0 0.52rem;
}

.bb-wb-card__body .bb-ref-prose__heading {
    margin: 0.42rem 0 0.18rem;
    font-size: 0.74rem;
}

.bb-wb-card__body .bb-ref-prose__list {
    margin: 0.2rem 0 0.36rem;
}

.bb-wb-card__body .bb-ref-prose__item {
    margin: 0.2rem 0;
    gap: 0.34em;
}

.bb-wb-card__body .bb-ref-prose__refs {
    gap: 0.26rem 0.4rem;
    margin: 0.12em 0 0.24em;
}

.bb-wb-card--topics .bb-ref-prose--topics .bb-ref-prose__refs {
    margin: var(--bb-topics-rhythm-2) 0 var(--bb-topics-rhythm-3);
    gap: var(--bb-topics-rhythm-2) 0.42rem;
}

/* Topics cards: structured entry ref list (outside bb-ref-prose, Passage-style links) */
.bb-wb-card--topics .bb-wb-card__refs-wrap {
    margin: var(--bb-topics-rhythm-2) 0 var(--bb-topics-rhythm-3);
}
.bb-wb-card--topics .bb-wb-card__refs-label {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: rgba(15, 23, 42, 0.78);
}
.bb-wb-card--topics .bb-wb-card__refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: center;
}
.bb-wb-card--topics .bb-wb-card__refs .ref-link.bb-wb-card__ref-link {
    cursor: pointer;
    text-decoration: none;
    font-size: 0.88rem;
}

.bb-wb-card.bb-wb-card--topics .bb-wb-card__body {
    padding: var(--bb-topics-rhythm-1) 0 var(--bb-topics-rhythm-2);
}
.bb-wb-card.bb-wb-card--topics .bb-wb-card__body .bb-ref-prose--topics .bb-ref-prose__paragraph {
    margin: 0 0 var(--bb-topics-rhythm-3);
}
.bb-wb-card.bb-wb-card--topics .bb-wb-card__body .bb-ref-prose--topics .bb-ref-prose__paragraph:last-child {
    margin-bottom: 0;
}
.bb-wb-card.bb-wb-card--topics .bb-wb-card__body .bb-ref-prose--topics .bb-ref-prose__list {
    margin: var(--bb-topics-rhythm-2) 0 var(--bb-topics-rhythm-3);
}
.bb-wb-card.bb-wb-card--topics .bb-wb-card__body .bb-ref-prose--topics .bb-ref-prose__item {
    margin: var(--bb-topics-rhythm-1) 0;
}
.bb-wb-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip {
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, rgba(148, 163, 184, 0.45) 100%, transparent);
    padding: 0.12rem 0.38rem;
    border-radius: 0.35rem;
    color: rgba(30, 64, 175, 0.96);
    background: color-mix(in srgb, rgba(241, 245, 249, 0.95) 78%, rgba(224, 231, 255, 0.4) 22%);
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}
.bb-wb-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:hover,
.bb-wb-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:focus-visible {
    color: rgba(23, 37, 84, 1);
    background: color-mix(in srgb, rgba(219, 234, 254, 0.98) 80%, #fff 20%);
    border-color: color-mix(in srgb, rgba(59, 130, 246, 0.6) 55%, rgba(99, 102, 241, 0.3) 45%);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    box-shadow: 0 0 0 1px color-mix(in srgb, rgba(37, 99, 235, 0.2) 100%, transparent);
}
.bb-wb-card--topics .bb-ref-prose--topics .bb-ref-prose__ref-chip:focus-visible {
    outline: 2px solid color-mix(in srgb, rgba(59, 130, 246, 0.6) 100%, transparent);
    outline-offset: 2px;
}

.bb-wb-card--dictionary .bb-ref-prose__paragraph:first-child {
    margin-top: 0;
}

.bb-wb-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.48rem;
    padding-top: 0.42rem;
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 72%, transparent);
}

.bb-wb-card__source-link {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    color: color-mix(in srgb, var(--text-muted, #64748b) 88%, var(--text-color, #0f172a) 12%);
}

.bb-wb-card__source-link:hover,
.bb-wb-card__source-link:focus-visible {
    color: rgba(29, 78, 216, 0.95);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.bb-wb-card__foot {
    margin-top: 0.52rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem 0.5rem;
    align-items: center;
}

.bb-wb-card:has(.bb-wb-card__meta) .bb-wb-card__foot {
    margin-top: 0.36rem;
}

.bb-wb-card--empty-tool {
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 88%, #fff 12%);
}

.bb-wb-context-summary,
.bb-wb-language-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.12rem 0 0.52rem;
}

.bb-wb-context-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.12rem 0.45rem;
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, #fff 76%, var(--light-bg, #f8fafc) 24%);
    color: color-mix(in srgb, var(--text-muted, #64748b) 82%, var(--text-color, #0f172a) 18%);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
}

body[data-bb-page="workbench"] .bb-wb-context-source {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    max-width: 100%;
    margin-left: 0.22rem;
    color: var(--text-muted, #64748b);
    font-size: 0.78rem;
    line-height: 1.25;
    vertical-align: baseline;
}

body[data-bb-page="workbench"] .bb-wb-context-source .bb-wb-source-info {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    font-size: 0.68rem;
}

body[data-bb-page="workbench"] .bb-wb-context-source__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bb-wb-context-section {
    margin: 0.62rem 0 0;
    padding-top: 0.55rem;
    border-top: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 72%, transparent);
}

.bb-wb-context-section:first-child,
.bb-wb-context-summary + .bb-wb-context-section {
    border-top: 0;
    padding-top: 0;
}

.bb-wb-context-section h4 {
    margin: 0 0 0.32rem;
    color: color-mix(in srgb, var(--text-muted, #64748b) 72%, var(--text-color, #0f172a) 28%);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bb-wb-context-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.32rem;
}

.bb-wb-context-list li {
    position: relative;
    padding-left: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.48;
}

.bb-wb-context-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.64em;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted, #64748b) 48%, transparent);
}

.bb-wb-language-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bb-wb-language-table {
    min-width: 760px;
}

.bb-wb-language-token__surface {
    font-weight: 650;
    color: var(--primary-color, #2f5f8f);
}

.bb-wb-language-strong {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 0;
    margin: -0.25rem 0;
    padding: 0 0.26rem;
    border-radius: 5px;
    background: transparent;
    color: var(--primary-color, #2f5f8f);
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    cursor: pointer;
}

.bb-wb-language-strong:hover,
.bb-wb-language-strong:focus-visible {
    color: color-mix(in srgb, var(--primary-color, #2f5f8f) 78%, #111827 22%);
    outline: 2px solid var(--primary-color, #2f5f8f);
    outline-offset: 2px;
}

.bb-wb-place-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.42rem;
}

.bb-wb-place-item {
    min-width: 0;
    padding: 0.56rem 0.62rem;
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 86%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-color, #fff) 88%, var(--light-bg, #f8fafc) 12%);
}

.bb-wb-place-item:last-child {
    border-bottom: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 86%, transparent);
}

.bb-wb-place-item__name {
    font-weight: 600;
}

.bb-wb-place-item__sum {
    margin: 0.2rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.bb-wb-place-item__source {
    margin: -0.2rem 0 0.55rem;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    line-height: 1.35;
}

.bb-wb-place-item__source--confidence {
    max-width: 68ch;
}

.bb-wb-place-item__source-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
}

.bb-wb-place-item__source-link:hover,
.bb-wb-place-item__source-link:focus-visible {
    color: rgba(29, 78, 216, 0.95);
}

.bb-wb-managed-media-preview {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0.48rem 0 0.58rem;
    padding: 0.38rem;
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 86%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 82%, #fff 18%);
    cursor: zoom-in;
    appearance: none;
    color: inherit;
}

.bb-wb-managed-media-preview img {
    display: block;
    width: min(100%, 34rem);
    max-height: 18rem;
    object-fit: contain;
}

.bb-wb-managed-media-preview:focus-visible {
    outline: 2px solid var(--primary-color, #2f5f8f);
    outline-offset: 2px;
}

.bb-wb-managed-media-item--expanded .bb-wb-managed-media-preview {
    cursor: zoom-out;
}

.bb-wb-managed-media-item--expanded .bb-wb-managed-media-preview img {
    width: min(100%, 72rem);
    max-height: min(76vh, 48rem);
}

.bb-wb-managed-media-related {
    margin: -0.12rem 0 0.46rem;
    color: var(--text-muted, #64748b);
    font-size: 0.84rem;
    line-height: 1.35;
}

.bb-wb-managed-media-toggle {
    justify-self: start;
    width: auto;
    min-width: 7rem;
}

.bb-wb-managed-media-status {
    margin: -0.06rem 0 0.28rem;
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
    line-height: 1.35;
}

body[data-bb-page="workbench"] .bb-wb-managed-media-source {
    margin-top: 0.18rem;
}

body[data-bb-page="workbench"] .bb-wb-managed-media-source > .bb-disclosure__panel p {
    margin: 0 0 0.34rem;
    color: var(--text-muted, #64748b);
    font-size: 0.82rem;
    line-height: 1.35;
}

body[data-bb-page="workbench"] .bb-wb-managed-media-source > .bb-disclosure__panel p:last-child {
    margin-bottom: 0;
}

.bb-wb-xref-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.16rem;
}

.bb-wb-xref-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.22rem 0.55rem;
    margin: 0 0 0.34rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-color, #fff) 84%, var(--light-bg, #f8fafc));
    font-size: 0.84rem;
    line-height: 1.32;
}

.bb-wb-xref-summary__ref {
    font-weight: 650;
    color: var(--text-color);
}

.bb-wb-xref-summary__count {
    color: var(--text-muted, #64748b);
}

.bb-wb-xref-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.12rem 0.5rem;
    padding: 0.32rem 0.4rem;
    border-radius: 8px;
    line-height: 1.42;
    font-size: 0.92rem;
}

.bb-wb-xref-item:hover,
.bb-wb-xref-item:focus-within {
    background: color-mix(in srgb, var(--light-bg, #f8fafc) 82%, transparent);
}

.bb-xref-row-main {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    gap: 0.1rem 0.26rem;
}

.bb-xref-row-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    min-width: max-content;
}

.bb-xref-row-note {
    grid-column: 1 / -1;
    min-width: 0;
}

.bb-wb-xref-item a.ref-link {
    font-weight: 500;
}

.bb-wb-xref-item .cross-ref-why {
    display: block;
    margin-top: -0.04rem;
    padding-left: 0.62rem;
    border-left: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 72%, transparent);
    max-width: 72ch;
    font-size: 0.8rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--text-color) 72%, var(--text-muted, #64748b));
}

.bb-wb-xref-item .bb-send-to-study-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    width: 1.45rem;
    min-height: 1.45rem;
    height: 1.45rem;
    padding: 0;
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 700;
}

body[data-bb-page="workbench"] .bb-wb-xref-item .bb-send-to-study-btn {
    width: auto;
    min-width: 2.7rem;
    padding: 0 0.46rem;
    border-radius: 7px;
    font-size: 0.76rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-wb-xref-item
        .bb-send-to-study-btn {
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 0.12rem 0.36rem;
        border: 0;
        border-radius: 6px;
        background: transparent;
        box-shadow: none;
        color: #1d4ed8;
        font-size: 0.74rem;
        line-height: 1.08;
        text-align: center;
        white-space: nowrap;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-wb-xref-item
        .bb-send-to-study-btn:hover,
    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-wb-xref-item
        .bb-send-to-study-btn:focus-visible {
        background: rgba(37, 99, 235, 0.08);
        color: #1d4ed8;
    }
}

.bb-wb-xref-type {
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
}

/* Shared cross-reference row type span (Passage + Workbench via bb-tool-renderers.js). */
.bb-xref-type {
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
}

.bb-wb-xref-item .bb-xref-type {
    display: inline-flex;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--border-color) 78%, transparent);
    border-radius: 999px;
    padding: 0.02rem 0.4rem;
    background: color-mix(in srgb, var(--surface-color) 88%, var(--accent-color, #2563eb));
    line-height: 1.45;
}

.bb-xref-source-disclosure {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    color: var(--accent-color, #2563eb);
    vertical-align: middle;
    outline: none;
}

.bb-xref-source-disclosure:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color, #2563eb) 22%, transparent);
}

.bb-xref-source-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, var(--accent-color, #2563eb));
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color, #fff) 92%, var(--accent-color, #2563eb));
    color: var(--bbp-accent, var(--accent-color, #2563eb));
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
}

.bb-xref-source-popover {
    position: absolute;
    z-index: 20;
    left: 50%;
    top: calc(100% + 0.38rem);
    display: none;
    grid-template-columns: max-content minmax(4.5rem, 10rem);
    gap: 0.14rem 0.38rem;
    width: max-content;
    max-width: min(13.5rem, 68vw);
    padding: 0.32rem 0.44rem;
    border: 1px solid var(--bb-card-border, #e2e8f0);
    border-radius: 8px;
    background: var(--surface-color, #fff);
    color: var(--text-color, #1f2937);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transform: translateX(-50%);
    font-size: 0.72rem;
    line-height: 1.3;
}

.bb-xref-source-popover__label {
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.bb-xref-source-disclosure:hover .bb-xref-source-popover,
.bb-xref-source-disclosure:focus .bb-xref-source-popover,
.bb-xref-source-disclosure:focus-within .bb-xref-source-popover {
    display: grid;
}

@media (max-width: 767px) {
    body[data-bb-page="workbench"] .bb-wb-xref-list {
        gap: 0.18rem;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.18rem 0.36rem;
        padding: 0.36rem 0.28rem;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-row-main {
        display: flex;
        flex-wrap: nowrap;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item a.ref-link {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-type,
    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-source-disclosure,
    body[data-bb-page="workbench"] .bb-wb-xref-item .cross-ref-trust-dot {
        flex: 0 0 auto;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-type {
        max-width: 5.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-row-actions {
        grid-column: 2;
        justify-self: end;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-row-note {
        grid-column: 1 / -1;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-send-to-study-btn {
        width: auto;
        min-width: 2.55rem;
        max-width: 3.5rem;
        height: 1.9rem;
        min-height: 1.9rem;
        padding: 0 0.42rem;
        overflow: hidden;
        color: #1d4ed8 !important;
        font-size: 0.72rem !important;
        line-height: 1 !important;
        border-radius: 7px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-send-to-study-btn::before {
        content: none;
    }

    body[data-bb-page="workbench"] .bb-wb-xref-item .bb-xref-source-popover {
        grid-template-columns: max-content minmax(0, 1fr);
        top: auto;
        bottom: calc(100% + 0.38rem);
        right: auto;
        left: 50%;
        width: max-content;
        max-width: min(12rem, calc(100vw - 2rem));
        transform: translateX(-50%);
        overflow-wrap: anywhere;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-wb-xref-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.2rem 0.35rem;
        padding: 0.36rem 0;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-xref-row-main {
        grid-column: 1;
        min-width: 0;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-xref-row-actions {
        grid-column: 2;
        justify-self: end;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-xref-row-note {
        grid-column: 1 / -1;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-send-to-study-btn {
        width: auto;
        min-width: 2.55rem;
        height: 1.95rem;
        min-height: 1.95rem;
        padding: 0 0.42rem;
        overflow: hidden;
        border-radius: 7px;
        color: #1d4ed8;
        font-size: 0.72rem;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewReferences:not([hidden])
        .bb-send-to-study-btn::before {
        content: none;
    }
}

@media (max-width: 767px) {
    .bb-xref-source-popover {
        right: 0;
        left: auto;
        max-width: calc(100vw - 2rem);
        transform: none;
    }
}

.bb-xref-group-head--compact {
    margin: 0 0 0.02rem;
    padding: 0;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.bb-xref-group-head__label {
    font-weight: 600;
}

.cross-ref-grouped .cross-ref-group--deemphasize .bb-xref-group-head--compact {
    margin-bottom: 0.04rem;
}

.cross-ref-grouped .cross-ref-group--deemphasize .bb-xref-group-head__label {
    color: color-mix(in srgb, var(--text-color) 55%, var(--light-text));
}

.bb-wb-ask-primary-block {
    width: 100%;
}

.bb-wb-ask-ground-slot:empty {
    display: none;
}

.bb-wb-ask-ground-slot:not(:empty) {
    margin-bottom: 0.65rem;
}

.bb-wb-ask-primary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
}

.bb-wb-ask-primary__textarea {
    flex: 1 1 100%;
    min-width: 0;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.bb-wb-ask-primary__submit {
    flex-shrink: 0;
}

.bb-wb-ask-primary__hint {
    margin: 0.28rem 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-muted, #64748b);
    max-width: 36rem;
}

body[data-bb-page="workbench"] .bb-wb-subcontrols-hint,
body[data-bb-page="workbench"] .bb-wb-dictionary-source-hint {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.16rem;
    width: auto;
    max-width: 100%;
    min-height: 1.62rem;
    margin: 0.1rem 0 0.42rem;
    padding: 0.16rem 0.48rem;
    border: 1px solid color-mix(in srgb, var(--bb-card-border, #e2e8f0) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-color, #fff) 76%, var(--light-bg, #f8fafc) 24%);
    color: var(--text-muted, #64748b);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.25;
}

@media (min-width: 36rem) {
    .bb-wb-ask-primary-row {
        flex-wrap: nowrap;
        align-items: flex-end;
    }

    .bb-wb-ask-primary__textarea {
        flex: 1 1 auto;
    }
}

.bb-wb-ask-result {
    margin-top: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--bb-card-border, #e2e8f0);
}

.bb-wb-ask-result.bb-wb-ask-result--inline {
    margin-top: 0.38rem;
    padding-top: 0.5rem;
}

body[data-bb-page="workbench"] .bb-wb-primary-stack .bb-wb-tool-row--workbench .bb-wb-tool-btn--active {
    border-color: var(--bb-theme-active-border, #2563eb);
    background: var(--bbp-tab-selected-bg, #eff6ff);
    color: var(--bbp-accent, #1e3a8a);
    font-weight: 720;
    box-shadow:
        var(--bb-shadow-raised, 0 1px 2px rgba(15, 23, 42, 0.08)),
        inset 0 0 0 1px var(--bb-theme-active-border, #2563eb),
        inset 0 -2px 0 var(--bbp-accent, #2563eb);
}

.bb-wb-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 20000;
    padding: 0.55rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--bb-color-text-inverse) 18%, transparent);
    border-radius: var(--bb-vc-radius-card, 8px);
    background: var(--bb-color-bg-inverse);
    color: var(--bb-color-text-inverse);
    font-size: 0.9rem;
    box-shadow: var(--bb-shadow-overlay);
    max-width: min(90vw, 32rem);
    text-align: center;
}

.bb-wb-toast--error {
    border-color: color-mix(in srgb, var(--bb-color-danger) 42%, transparent);
    background: color-mix(in srgb, var(--bb-color-danger) 26%, var(--bb-color-bg-inverse));
}

/* Workbench page: tighter vertical rhythm (laptop above-the-fold friendly) */
body[data-bb-page="workbench"] .bb-wb-hero {
    padding: 0.35rem 0 0.18rem;
}

body[data-bb-page="workbench"] .bb-wb-hero__title {
    margin: 0 0 0.1rem;
    font-size: 1.22rem;
}

body[data-bb-page="workbench"] .bb-wb-hero__lead {
    margin: 0;
    max-width: 40rem;
    font-size: 0.84rem;
    line-height: 1.36;
}

body[data-bb-page="workbench"] .bb-wb-page {
    padding-top: 0.22rem;
    padding-bottom: 1.1rem;
}

body[data-bb-page="workbench"] .bb-wb-surface {
    margin-bottom: 0.38rem;
    padding: 0.38rem 0.58rem;
}

body[data-bb-page="workbench"] .bb-wb-primary-stack {
    margin-bottom: 0.18rem;
}

body[data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-tool-control-stack.bb-wb-surface {
    margin-bottom: 0.04rem;
}

body[data-bb-page="workbench"] .bb-wb-tools-secondary {
    margin-top: 0;
    margin-bottom: 0;
}

body[data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-tools-secondary {
    margin-bottom: 0.26rem;
}

body[data-bb-page="workbench"] .bb-wb-ask-ground-slot:not(:empty) {
    margin-bottom: 0.38rem;
}

body[data-bb-page="workbench"] .bb-wb-tool-control-stack .bb-wb-grounding-inline--wb .bb-wb-grounding-input,
body[data-bb-page="workbench"] .bb-wb-tool-control-stack .bb-wb-grounding-inline--wb .bb-wb-grounding-select {
    padding: 0.34rem 0.45rem;
    font-size: 0.86rem;
}

body[data-bb-page="workbench"] .bb-wb-output {
    min-height: 1.75rem;
    padding: 0.04rem 0 0.1rem;
}

body[data-bb-page="workbench"] .bb-wb-card {
    padding: 0.46rem 0.56rem;
}

body[data-bb-page="workbench"] .bb-wb-card-stack {
    gap: 0.32rem;
}

body[data-bb-page="workbench"] .bb-wb-card__head {
    margin: 0 0 0.2rem;
}

body[data-bb-page="workbench"] .bb-wb-card__foot .bb-wb-send-study {
    flex-shrink: 0;
}

body[data-bb-page="workbench"] .bb-wb-ask-primary__textarea {
    min-height: 72px;
    padding: 0.48rem 0.62rem;
    border-color: color-mix(in srgb, var(--bb-input-border, #cbd5e1) 58%, var(--text-color, #0f172a) 42%);
    border-width: 1px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body[data-bb-page="workbench"] #bb-wb-ask-input {
    scroll-margin-top: 4rem;
}

body[data-bb-page="workbench"] .bb-wb-ask-primary__hint--ai {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    margin-top: 0.14rem;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.42;
    color: color-mix(in srgb, var(--text-color, #0f172a) 42%, var(--text-muted, #64748b) 58%);
}

body[data-bb-page="workbench"] .bb-wb-ask-primary__hint-icon {
    flex-shrink: 0;
    margin-top: 0.04rem;
    opacity: 0.62;
}

body[data-bb-page="workbench"] .bb-wb-ask-primary-row {
    gap: 0.5rem;
}

body[data-bb-page="workbench"] .bb-wb-ask-result {
    margin-top: 0.22rem;
    padding: 0.28rem 0 0.32rem;
}

body[data-bb-page="workbench"] .bb-wb-ask-result.bb-wb-ask-result--inline {
    margin-top: 0.1rem;
    padding-top: 0.22rem;
}

body[data-bb-page="workbench"] .bb-wb-output.bb-wb-output--inline {
    margin-top: 0.08rem;
    padding-top: 0.16rem;
}

body[data-bb-page="workbench"] .bb-wb-tools-secondary__label {
    margin: 0 0 0.14rem;
}

body[data-bb-page="workbench"] .bb-wb-grounding-strip {
    border-top-color: color-mix(in srgb, var(--bb-card-border, #e2e8f0) 40%, transparent);
    padding-top: 0.18rem;
}

body[data-bb-page="workbench"] .bb-wb-grounding-strip__line {
    font-size: 0.74rem;
    opacity: 0.96;
}

body[data-bb-page="workbench"] .bb-wb-grounding-strip__ref {
    font-weight: 400;
    font-size: 0.74rem;
}

@media (max-width: 28rem) {
    body[data-bb-page="workbench"] .bb-wb-tool-row--workbench {
        gap: 0.28rem;
    }

    body[data-bb-page="workbench"] .bb-wb-tool-row--workbench .bb-wb-tool-btn {
        font-size: 0.78rem;
        padding: 0.32rem 0.52rem;
    }

    body[data-bb-page="workbench"] .bb-wb-handoffs-row {
        flex-direction: column;
        align-items: stretch;
    }

    body[data-bb-page="workbench"] .bb-wb-handoffs-row .btn {
        width: 100%;
        justify-content: center;
    }
}

body[data-bb-ui-theme="slate"] .bb-wb-hero,
body[data-bb-ui-theme="sepia"] .bb-wb-hero {
    background: color-mix(in srgb, var(--bb-card-bg) 70%, var(--bg-color) 30%);
}

/* Passage mobile header spacing fix: keep app chrome to brand, picker, and menu. */
@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'] .navbar {
        min-height: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .container.bb-passage-nav {
        padding-top: 0.28rem;
        padding-bottom: 0.28rem;
        gap: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav__band {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .logo,
    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-ref-input-wrap--passage-sf,
    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links {
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .logo h1 a.logo-link {
        font-size: 0.98rem;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-ref-input-wrap--passage-sf {
        width: auto;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-nav-passage-toolbar {
        width: 100%;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-text-search-open-btn {
        display: none !important;
    }

    /* Narrow Passage: keep Find reachable after the compact mobile header hides toolbar overflow. */
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .navbar .bb-passage-text-search-open-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar #passageForm.passage-form--nav-toolbar {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-nav-passage-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-nav-passage-toolbar__fields.passage-lookup-primary {
        display: flex;
        width: auto;
        min-width: 0;
        flex: 0 0 auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .passage-translation-field.bb-nav-passage-toolbar__trans {
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .passage-shell-location-chip--nav {
        width: auto;
        max-width: 100%;
        min-width: 0;
        min-height: 2.25rem;
        padding: 0.38rem 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-nav-passage-toolbar__trans select {
        width: 5.75rem;
        max-width: 5.75rem;
        min-height: 2.25rem;
        padding: 0.38rem 0.42rem;
        font-size: 0.82rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .passage-shell-location-chip__ref {
        max-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .passage-shell-location-chip__action {
        flex: 0 0 auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links {
        justify-content: flex-end;
        margin-left: 0;
        width: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__details {
        position: relative;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__hamburger {
        width: 2.25rem;
        height: 2.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__panel {
        right: 0;
        left: auto;
        top: calc(100% + 0.35rem);
        max-width: calc(100vw - 1rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__theme {
        display: grid;
        gap: 0.35rem;
        margin-top: 0.28rem;
        padding-top: 0.42rem;
        border-top: 1px solid var(--bbp-border-subtle, rgba(148, 163, 184, 0.22));
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__section-label {
        font-size: 0.68rem;
        font-weight: 750;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--bbp-text-muted, #64748b);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__theme-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__theme-btn {
        min-height: 2rem;
        padding: 0.32rem 0.36rem;
        border-radius: 7px;
        border: 1px solid var(--bbp-border-subtle, rgba(148, 163, 184, 0.26));
        background: var(--bbp-control-bg, #ffffff);
        color: var(--bbp-text-secondary, #334155);
        font: inherit;
        font-size: 0.74rem;
        font-weight: 650;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav-more__theme-btn[aria-pressed='true'] {
        border-color: var(--bbp-accent, #2563eb);
        background: var(--bbp-accent-soft, rgba(37, 99, 235, 0.1));
        color: var(--bbp-accent-strong, #1d4ed8);
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-section {
        padding-top: 0.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace {
        padding-bottom: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header__actions--scripture-first {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults.passage-results {
        margin-top: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
        margin-bottom: 0.08rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area .section-divider.passage-scripture-block-start {
        margin: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .reading-area .bb-sf-translations-toolbar--reading:not([hidden]) {
        margin: 0.02rem 0 0.22rem;
        padding: 0.22rem 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
        padding-top: 0.25rem;
    }
}

@media (max-width: 360px) {
    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .bb-passage-nav__band {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .navbar .logo {
        display: none;
    }
}

/* Workbench + Composer alignment v1: visual-only reuse of Passage redesign tokens. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"],
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] {
    --bbp-page-max: min(80rem, calc(100vw - 2rem));
    background: var(--bbp-canvas);
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] {
    --bbp-page-max: min(84rem, calc(100vw - 2rem));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .navbar,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .navbar {
    min-height: 56px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .navbar .logo,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .navbar .logo {
    display: block;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .navbar > .container,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .navbar > .container {
    max-width: var(--bbp-page-max);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero {
    padding: 0.52rem 0 0.48rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero > .container,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-page.container {
    max-width: min(84rem, calc(100vw - 2rem));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem);
    gap: 0.65rem;
    align-items: start;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__copy {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__kicker {
    margin: 0 0 0.12rem;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__kicker {
    margin-bottom: 0.08rem;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__title {
    margin-bottom: 0.18rem;
    color: var(--bb-color-text-primary);
    font-size: 1.38rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.18;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__title {
    font-size: 1.22rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__lead,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__lead {
    max-width: 50rem;
    color: var(--bbp-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-rail {
    display: grid;
    justify-self: end;
    align-self: start;
    width: min(100%, 17rem);
    gap: 0.34rem;
    min-width: 0;
    padding: 0.14rem 0.18rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-details[open] {
    padding: 0.46rem 0.56rem;
    border-color: var(--bbp-border);
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-summary {
    display: flex;
    gap: 0.42rem;
    align-items: center;
    justify-content: flex-end;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-details[open] .bb-wb-hero__source-summary {
    justify-content: space-between;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-summary:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-summary:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary:focus-visible {
    border-radius: 6px;
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-summary-cue {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.12rem 0.48rem 0.12rem 0.22rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-source-info {
    display: inline-grid;
    place-items: center;
    width: 1.08rem;
    height: 1.08rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 999px;
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-details[open] .bb-wb-hero__source-summary-cue {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list {
    display: grid;
    gap: 0.34rem;
    margin: 0.1rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list div {
    display: grid;
    grid-template-columns: minmax(4.4rem, max-content) minmax(0, 1fr);
    gap: 0.48rem;
    align-items: baseline;
    padding-top: 0.38rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list div:first-child {
    padding-top: 0;
    border-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list dt {
    color: var(--bb-color-text-primary);
    font-size: 0.78rem;
    font-weight: 780;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list dd {
    min-width: 0;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
    line-height: 1.32;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-page {
    padding-top: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tools-secondary {
    padding: 0.66rem 0.72rem 0.62rem;
    border: 1px solid var(--bbp-border);
    border-radius: 10px;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bbp-panel-bg) 92%, var(--bbp-control-bg) 8%),
            var(--bbp-panel-bg)
        );
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tools-secondary__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-row--workbench {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-tab-strip-bg) 86%, var(--bbp-panel-bg) 14%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn {
    width: 100%;
    min-width: 0;
    min-height: 1.95rem;
    padding: 0.3rem 0.38rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 48%, transparent);
    color: var(--bbp-tool-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: keep-all;
    box-shadow: none;
    transition:
        background 0.12s ease,
        box-shadow 0.12s ease,
        color 0.12s ease;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn:focus-visible {
    border-color: var(--bbp-border-subtle);
    background: var(--bbp-tab-hover-bg);
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent) 54%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn--active,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack .bb-wb-tool-row--workbench .bb-wb-tool-btn--active {
    background: var(--bbp-tab-selected-bg);
    border-color: var(--bb-theme-active-border);
    color: var(--bbp-accent);
    font-weight: 700;
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bb-theme-active-border),
        inset 0 -2px 0 var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn--reserved {
    color: var(--bbp-tool-utility);
    cursor: default;
    opacity: 0.72;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, var(--bbp-tool-utility) 56%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn--reserved:hover {
    background: transparent;
    color: var(--bbp-tool-utility);
}

@media (pointer: coarse), (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-lookup-mode .bb-dictionary-source-switch__btn,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-language-strong {
        min-height: 2.75rem;
    }
}

body[data-bb-page="workbench"] .bb-wb-lookup-mode .bb-dictionary-source-switch__btn[aria-pressed='true'],
body[data-bb-page="workbench"] .bb-wb-lookup-mode .bb-dictionary-source-switch__btn--active,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-lookup-mode .bb-dictionary-source-switch__btn[aria-pressed='true'],
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-lookup-mode .bb-dictionary-source-switch__btn--active {
    background: var(--bbp-tab-selected-bg, #eff6ff);
    border-color: var(--bb-theme-active-border, #2563eb);
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bb-theme-active-border, #2563eb);
    color: var(--bbp-accent, #1d4ed8);
    font-weight: 700;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-surface {
    border-color: var(--bbp-border);
    border-radius: 10px;
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-tool-control-stack.bb-wb-surface {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 4.35rem);
    margin-bottom: 0;
    padding: 0.9rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-input,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-select,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-textarea {
    border-radius: 8px;
    border-color: var(--bbp-border);
    background: var(--bb-input-bg);
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-strip {
    margin-top: 0.76rem;
    padding: 0.68rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 26%, var(--bbp-border-subtle));
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--bbp-accent) 12%, transparent), transparent 36%),
        color-mix(in srgb, var(--bbp-control-bg) 70%, var(--bbp-panel-bg) 30%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 68%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-strip--empty {
    background: color-mix(in srgb, var(--bbp-control-bg) 50%, var(--bbp-panel-bg) 50%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-strip__line,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hint,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-placeholder {
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-strip__line {
    margin-bottom: 0.42rem;
    font-size: 0.8rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-strip__ref {
    color: var(--bbp-text-secondary);
    font-weight: 700;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-inline--wb {
    gap: 0.45rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-grounding-actions--wb {
    gap: 0.4rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-output.bb-wb-output--inline {
    min-height: 0;
    margin-top: 0;
    padding: 0.96rem;
    border: 1px solid var(--bbp-border);
    border-radius: 10px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg) 92%, transparent), transparent 8rem),
        var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-search-btn {
    border-color: var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bb-color-bg-surface-raised);
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card-stack,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-place-list {
    gap: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card {
    padding: 0.86rem 0.98rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card > .bb-result-badge-row {
    justify-content: flex-start;
    margin-bottom: 0.34rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card__title {
    color: var(--bb-color-text-primary);
    font-size: 0.98rem;
    font-weight: 730;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card__body .bb-ref-prose,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card__body p {
    font-size: 0.91rem;
    line-height: 1.56;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-card__foot,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .ai-study-action-row {
    gap: 0.34rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] :is(
    .bb-wb-card__foot,
    .ai-study-action-row
) .bb-send-to-study-btn,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-handoff-btn.btn.btn-secondary.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.34rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 26%, var(--bbp-border-subtle));
    border-radius: 7px;
    background: color-mix(in srgb, var(--bbp-accent-soft) 42%, var(--bbp-panel-bg));
    color: var(--bbp-accent);
    box-shadow: none;
    font-size: 0.82rem;
    font-weight: 740;
    line-height: 1.14;
    text-align: center;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] :is(
    .bb-wb-card__foot,
    .ai-study-action-row
) .bb-send-to-study-btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] :is(
    .bb-wb-card__foot,
    .ai-study-action-row
) .bb-send-to-study-btn:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-handoff-btn.btn.btn-secondary.btn-sm:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-handoff-btn.btn.btn-secondary.btn-sm:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 44%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-accent-soft) 68%, var(--bbp-panel-bg));
    color: color-mix(in srgb, var(--bbp-accent) 78%, var(--bb-color-text-primary));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-output > :is(
    .bb-wb-placeholder,
    .empty-placeholder
) {
    display: flex;
    align-items: center;
    min-height: 3rem;
    margin: 0;
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg) 74%, var(--bbp-panel-bg));
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-search-btn {
    gap: 0.24rem;
    padding: 0.68rem 0.78rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-assist__summary {
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-search-btn__ref {
    min-width: 0;
    overflow: hidden;
    color: var(--bbp-accent);
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-search-btn__cue {
    border-color: color-mix(in srgb, var(--bbp-accent) 28%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-accent-soft) 72%, var(--bbp-panel-bg));
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-search-btn:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 48%, var(--bbp-border-subtle));
    outline: 2px solid color-mix(in srgb, var(--bbp-accent) 34%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-item {
    box-sizing: border-box;
    border: 1px solid transparent;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-item:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-item:focus-within {
    border-color: color-mix(in srgb, var(--bbp-accent) 22%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, var(--bbp-panel-bg));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-xref-item .bb-send-to-study-btn {
    border-color: color-mix(in srgb, var(--bbp-accent) 30%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-accent-soft) 52%, var(--bbp-panel-bg));
    color: var(--bbp-accent);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack {
    display: grid;
    grid-template-columns: minmax(18.5rem, 0.34fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-content: start;
    align-items: start;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-workbench-controls {
    grid-column: 1;
    display: grid;
    gap: 0.26rem;
    align-content: start;
    align-self: start;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-workbench-controls > .bb-wb-tools-secondary {
    margin-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-workbench-controls > .bb-wb-tool-control-stack.bb-wb-surface {
    margin-bottom: 0.04rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-output {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

@media (max-width: 900px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero > .container,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-workbench-controls,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack > .bb-wb-output {
        grid-column: 1;
        grid-row: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-workbench-controls > .bb-wb-tool-control-stack.bb-wb-surface {
        position: static;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-output.bb-wb-output--inline {
        min-height: 16rem;
    }
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.14rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-dictionary-source .bb-dictionary-source-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem 0.42rem;
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-dictionary-source .bb-dictionary-source-switch__btn {
        width: 100%;
        min-width: 0;
        padding-inline: 0.38rem;
        white-space: normal;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-dictionary-source .bb-dictionary-source-switch__availability {
        font-size: 0.55rem;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-page.bb-study-page--workspace.container {
    max-width: var(--bbp-page-max);
    padding-top: 0.85rem;
    padding-bottom: 2rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem);
    gap: 0.65rem;
    align-items: start;
    margin-bottom: 0.62rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__copy {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__actions {
    margin-top: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-rail {
    display: grid;
    justify-self: end;
    align-self: start;
    width: min(100%, 17rem);
    gap: 0.34rem;
    min-width: 0;
    padding: 0.14rem 0.18rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-details[open] {
    padding: 0.46rem 0.56rem;
    border-color: var(--bbp-border);
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-summary {
    display: flex;
    gap: 0.42rem;
    align-items: center;
    justify-content: flex-end;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-details[open] .bb-study-hero__source-summary {
    justify-content: space-between;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-summary-cue {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.12rem 0.48rem 0.12rem 0.22rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-info {
    display: inline-grid;
    place-items: center;
    width: 1.08rem;
    height: 1.08rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 34%, var(--bbp-border-subtle));
    border-radius: 999px;
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-details[open] .bb-study-hero__source-summary-cue {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list {
    display: grid;
    gap: 0.34rem;
    margin: 0.1rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list div {
    display: grid;
    grid-template-columns: minmax(4.6rem, max-content) minmax(0, 1fr);
    gap: 0.48rem;
    align-items: baseline;
    padding-top: 0.38rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list div:first-child {
    padding-top: 0;
    border-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list dt {
    color: var(--bb-color-text-primary);
    font-size: 0.78rem;
    font-weight: 780;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list dd {
    min-width: 0;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
    line-height: 1.32;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-workspace {
    margin-top: 0.45rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-layout--supporting .bb-study-layout__column--resources,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__body {
    border-color: var(--bbp-border);
    background: var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--bbp-border);
    border-radius: 12px;
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail {
    display: grid;
    min-width: 0;
    gap: 0.82rem;
    align-content: start;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail > .bb-study-section,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail > .bb-study-layout {
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail .bb-study-layout--supporting {
    gap: 0.82rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail .bb-study-layout--supporting .bb-study-layout__column--resources {
    padding: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__head {
    margin-bottom: 0.72rem;
    padding-bottom: 0.62rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__status-stack {
    min-height: 1.45rem;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__saved {
    display: block;
    min-height: 1rem;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-zone__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-library-details__label {
    color: var(--bbp-text-secondary);
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__title {
    font-size: 1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-zone__lede,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-zone__lede--tight,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-inbox-context-hint,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__hint,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-library-details__hint,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-ctx-hint,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-maps-hint {
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__input,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__draft,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose__field,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-ctx-ref-select,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-maps-ref-select {
    border-radius: 8px;
    border-color: var(--bbp-border);
    background: var(--bb-input-bg);
    color: var(--bb-color-text-primary);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-surface {
    border-radius: 10px;
    background: var(--bb-color-bg-surface-raised);
    box-shadow:
        inset 0 0 0 1px var(--bbp-border-subtle),
        0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__draft {
    min-height: 22rem;
    line-height: 1.62;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-toolbar,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-advanced,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-maps-shell,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-ctx-shell,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-library-details--merged {
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-toolbar {
    align-items: center;
    padding: 0.5rem;
    background: color-mix(in srgb, var(--bbp-control-bg) 76%, var(--bbp-panel-bg) 24%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build-details__summary {
    min-height: 2.15rem;
    border-color: var(--bbp-border-subtle);
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-secondary);
    font-weight: 720;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build-details__summary:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build-details__summary:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 28%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-panel-bg) 86%, var(--bbp-accent-soft) 14%);
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build-details__summary:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bbp-accent) 28%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-refs-summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-row,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-zone--shelf .bb-study-row,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-passage-card--bookmark,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-tnq-card {
    border: 1px solid var(--bbp-border-subtle);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__head,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-tnq-card__head {
    border-bottom: 1px solid var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, var(--bbp-panel-bg) 28%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__body,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-passage-card--bookmark .bb-study-shelf-card__body,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-tnq-card__body {
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__foot,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-passage-card--bookmark .bb-study-shelf-card__foot,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-tnq-card__actions {
    border-top: 1px solid var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-control-bg) 70%, var(--bbp-panel-bg) 30%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] :is(
    .bb-study-shelf-card__ref,
    .bb-study-shelf-card__scripture,
    .bb-study-saved-ask-question,
    .bb-study-tnq-card__question,
    .bb-study-passage-notes-intro strong
) {
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] :is(
    .bb-study-shelf-card__trans,
    .bb-study-shelf-card__passage-ref,
    .bb-study-shelf-card__loading,
    .bb-study-ref-note-kicker,
    .bb-study-saved-ask-preview,
    .bb-study-tnq-label,
    .bb-study-tnq-card__answer,
    .bb-study-refs-summary__line,
    .bb-study-refs-summary__list
) {
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] :is(
    .bb-study-shelf-card__trans--muted,
    .bb-study-shelf-card__vn,
    .bb-study-shelf-card__open-passage,
    .bb-study-shelf-device-footnote,
    .bb-study-bm-card__saved,
    .bb-study-saved-ask-meta,
    .bb-study-note-compose__quiet,
    .bb-study-passage-note-preview--placeholder,
    .bb-study-passage-notes-recent-heading,
    .bb-study-passage-notes-recent-kicker,
    .bb-study-tnq-unused-label,
    .bb-study-tnq-card__question--muted,
    .bb-study-tnq-card__meta,
    .bb-study-tnq-btn--quiet,
    .bb-study-refs-summary__title
) {
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__remove,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-tnq-select {
    border-color: var(--bbp-border);
    background: var(--bb-input-bg);
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__open-passage:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-shelf-card__open-passage:focus-visible {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build {
    gap: 0.34rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build__label {
    color: var(--bbp-text-muted);
    letter-spacing: 0.05em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-advanced {
    margin-top: 0.65rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-advanced__summary {
    border-radius: 8px;
    color: var(--bbp-text-secondary);
    font-weight: 700;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-advanced__inner {
    border-top: 1px solid var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-panel-bg) 74%, var(--bbp-control-bg) 26%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered--working-set {
    background: color-mix(in srgb, var(--bbp-control-bg) 68%, var(--bbp-panel-bg) 32%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section {
    margin: 0.85rem 0 1rem;
    padding: 0.85rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 12px;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail .bb-study-section {
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section__head,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-zone__head {
    border-bottom-color: var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-queue-contract {
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem;
    margin-top: 0.3rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-queue-contract__pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.38rem;
    padding: 0.16rem 0.38rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, var(--bbp-panel-bg) 28%);
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 720;
    line-height: 1.15;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-inbox-context-details {
    margin: 0.42rem 0 0.58rem;
    border-color: var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, var(--bbp-panel-bg) 28%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-inbox-context-details:not([open]) {
    display: inline-block;
    width: auto;
    padding-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-inbox-context-details .bb-disclosure__summary {
    min-height: 2.25rem;
    padding: 0.22rem 0.12rem 0.18rem 0;
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-inbox-context-details:not([open]) .bb-disclosure__summary {
    padding-right: 0.28rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__bulk {
    justify-content: flex-end;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] :is(
    #bbStudyCopyDraftBtn,
    .bb-study-compose-toolbar__actions .btn-sm,
    .bb-study-gather-queue__controls .btn-sm,
    .bb-study-draft-gathered__actions .btn-sm,
    .bb-study-row-more__summary
) {
    min-height: 2.15rem;
    border-radius: 8px;
    font-weight: 720;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__summary {
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details[open] > .bb-study-helpers-details__summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-helpers-details__body {
    border-radius: 0 0 12px 12px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-library-details__banner {
    border-bottom-color: var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-control-bg) 74%, var(--bbp-panel-bg) 26%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__item,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-gathered__item,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-maps-mini__item,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-ctx-block,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-empty {
    border-radius: 8px;
    background: var(--bb-color-bg-surface-raised);
    box-shadow:
        var(--bb-shadow-raised),
        inset 0 0 0 1px var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary {
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 22%, var(--bbp-border));
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bbp-panel-bg) 94%, var(--bbp-accent-soft) 6%) 0%,
        var(--bbp-panel-bg) 100%
    );
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.06),
        inset 0 0 0 1px color-mix(in srgb, var(--bbp-panel-bg) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__head {
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__title {
    color: var(--bb-color-text-primary);
    font-weight: 760;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-surface {
    padding: 0.22rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border) 82%, transparent);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-surface:focus-within {
    border-color: color-mix(in srgb, var(--bbp-accent) 45%, var(--bbp-border));
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--bbp-accent) 16%, transparent),
        inset 0 0 0 1px var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary__draft {
    border-color: transparent;
    background: var(--bb-input-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] #bbStudyCopyDraftBtn {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent);
    color: #fff;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] #bbStudyCopyDraftBtn:hover:not(:disabled),
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] #bbStudyCopyDraftBtn:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 78%, #000);
    background: color-mix(in srgb, var(--bbp-accent) 86%, #000);
    color: #fff;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-compose-build-details[open] .bb-study-compose-build-details__summary {
    border-color: color-mix(in srgb, var(--bbp-accent) 34%, var(--bbp-border));
    background: color-mix(in srgb, var(--bbp-accent-soft) 44%, var(--bbp-panel-bg));
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered--working-set {
    border-left: 3px solid color-mix(in srgb, var(--bbp-accent) 35%, var(--bbp-border));
    background: color-mix(in srgb, var(--bbp-control-bg) 78%, var(--bbp-panel-bg) 22%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered__kicker {
    margin-bottom: 0.12rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-gathered__state {
    align-self: flex-start;
    margin-left: 0;
    text-transform: none;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__item,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-gathered__item {
    border-left: 3px solid transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__item--active-ref {
    border-left-color: color-mix(in srgb, var(--bbp-accent) 62%, var(--bbp-border));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__item[data-usage-state="attached"],
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-gathered__item[data-usage-state="attached"] {
    border-left-color: color-mix(in srgb, var(--bbp-border) 78%, var(--bbp-accent));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__item[data-usage-state="inserted"],
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-draft-gathered__item[data-usage-state="inserted"] {
    border-left-color: color-mix(in srgb, var(--bbp-accent) 70%, var(--bbp-border));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__empty,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered__empty {
    color: var(--bbp-text-muted);
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-section__head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-section__head-text {
        align-items: flex-start;
        text-align: left;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-gather-queue__bulk {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-section--inbox .bb-study-gather-queue__bulk .btn-sm {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-gathered__list {
        max-height: min(38vh, 16rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-row-more[open] .bb-study-row-more__menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 0.35rem;
        border-radius: 8px;
        box-shadow: inset 0 0 0 1px var(--bbp-border-subtle);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-row-more__menu .btn-sm,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-row-more__menu .bb-study-row-more__passage {
        min-height: 2.5rem;
        justify-content: center;
        text-align: center;
    }
}

@media (min-width: 1100px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.34fr);
        gap: 0.9rem;
        align-items: start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-composition-primary {
        margin-bottom: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-support-rail {
        position: sticky;
        top: calc(env(safe-area-inset-top, 0px) + 4.35rem);
        max-height: calc(100vh - 5.25rem);
        overflow: auto;
        padding-right: 0.08rem;
        scrollbar-width: thin;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-gather-queue__list {
        max-height: min(34vh, 22rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero {
        padding: 0.62rem 0 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero > .container {
        gap: 0.55rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__lead {
        font-size: 0.84rem;
        line-height: 1.35;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-rail {
        justify-self: start;
        width: auto;
        max-width: 100%;
        gap: 0.32rem;
        padding: 0.08rem 0.12rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-details[open] {
        width: 100%;
        padding: 0.4rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-summary {
        min-height: 2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list div {
        display: block;
        padding-top: 0;
        border-top: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-hero__source-list dd {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-page {
        padding-top: 0.58rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-primary-stack {
        gap: 0.62rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tools-secondary {
        padding: 0.58rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero--compact {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-rail {
        justify-self: start;
        width: auto;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-details[open] {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-hero__source-list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.14rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-row--workbench {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.24rem;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.55rem;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="study"] .bb-study-page.bb-study-page--workspace.container {
        max-width: 100%;
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

@media (max-width: 380px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-row--workbench {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="workbench"] .bb-wb-tool-btn {
        font-size: 0.68rem;
        padding-right: 0.3rem;
        padding-left: 0.3rem;
    }
}

/* Visual consistency pass v1: shared page rhythm for non-Passage surfaces. */
body[data-bb-ui-redesign='passage-ui-v1'] {
    --bb-vc-page-max: min(80rem, calc(100vw - 2rem));
    --bb-vc-content-max: min(72rem, calc(100vw - 2rem));
    --bb-vc-copy-max: 48rem;
    --bb-vc-gutter: clamp(1rem, 3vw, 1.25rem);
    --bb-vc-section-y: clamp(2.25rem, 5vw, 3rem);
    --bb-vc-panel-pad: clamp(0.95rem, 2.4vw, 1.25rem);
    --bb-vc-gap-xs: 0.35rem;
    --bb-vc-gap-sm: 0.55rem;
    --bb-vc-gap-md: 0.85rem;
    --bb-vc-gap-lg: 1.25rem;
    --bb-vc-radius-control: 8px;
    --bb-vc-radius-panel: 12px;
    --bb-vc-radius-card: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) {
    background: var(--bbp-canvas);
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .container {
    max-width: var(--bb-vc-page-max);
    padding-right: var(--bb-vc-gutter);
    padding-left: var(--bb-vc-gutter);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar > .container:not(.bb-passage-nav) {
    min-height: 56px;
    gap: var(--bb-vc-gap-md) var(--bb-vc-gap-lg);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar {
    border-bottom: 1px solid color-mix(in srgb, var(--bbp-border-subtle) 82%, transparent);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bb-color-bg-surface-raised) 86%, transparent),
            color-mix(in srgb, var(--bb-color-bg-surface) 94%, transparent)
        );
    box-shadow: 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 76%, transparent) inset;
    backdrop-filter: blur(14px);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .logo {
    display: block;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .logo h1,
body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .logo h1 a.logo-link {
    color: var(--bb-color-text-primary);
    font-size: 1.08rem;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.2;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem 0.7rem;
    margin-left: 0;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.34rem 0.54rem;
    border-radius: 999px;
    color: var(--bbp-text-secondary);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links a:hover,
body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links a[aria-current='page'] {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links a:hover {
    background: color-mix(in srgb, var(--bbp-hover) 76%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links a[aria-current='page'] {
    background: var(--bbp-accent-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent) 22%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--bb-vc-radius-control);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn-sm {
    min-height: 2rem;
    padding: 0.32rem 0.62rem;
    border-radius: 7px;
    font-size: 0.78rem;
    line-height: 1.18;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn-primary {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent);
    color: var(--bb-color-text-inverse);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn-primary:hover:not(:disabled) {
    border-color: var(--bb-color-accent-primary-strong);
    background: var(--bb-color-accent-primary-strong);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn-secondary {
    border-color: var(--bbp-border);
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .btn-secondary:hover:not(:disabled) {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) :is(input, select, textarea) {
    border-color: var(--bbp-border);
    border-radius: var(--bb-vc-radius-control);
    background: var(--bb-input-bg);
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .footer {
    margin-top: var(--bb-vc-section-y);
    padding: 1.45rem var(--bb-vc-gutter);
    background: var(--bb-color-bg-inverse);
    color: var(--bb-color-text-inverse);
}

/* Studies shell v1: static guided-study page, no embedded tool UI. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] {
    --bb-studies-page-max: min(84rem, calc(100vw - 2rem));
    --bb-studies-content-max: min(80rem, calc(100vw - 2rem));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-page.container {
    max-width: var(--bb-studies-page-max);
    padding-top: 1.05rem;
    padding-bottom: 2.25rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.55fr);
    gap: 0.9rem;
    align-items: end;
    max-width: var(--bb-studies-content-max);
    margin-bottom: 0.9rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__copy {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__kicker,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-panel-kicker,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__meta {
    margin: 0 0 0.08rem;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__title {
    margin: 0 0 0.18rem;
    color: var(--bb-color-text-primary);
    font-size: 1.38rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.18;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__lead {
    max-width: 49rem;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-rail {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    padding: 0.56rem 0.66rem;
    border: 1px solid var(--bbp-border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 86%, var(--bbp-control-bg) 14%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary-cue {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    min-height: 2rem;
    padding: 0.16rem 0.56rem 0.16rem 0.24rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-info {
    display: inline-grid;
    place-items: center;
    width: 1.08rem;
    height: 1.08rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 34%, var(--bbp-border-subtle));
    border-radius: 999px;
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-details[open] .bb-studies-hero__source-summary-cue {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list {
    display: grid;
    gap: 0.34rem;
    margin: 0.1rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list div {
    display: grid;
    grid-template-columns: minmax(5.4rem, max-content) minmax(0, 1fr);
    gap: 0.48rem;
    align-items: baseline;
    padding-top: 0.38rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list div:first-child {
    padding-top: 0;
    border-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list dt {
    color: var(--bb-color-text-primary);
    font-size: 0.78rem;
    font-weight: 780;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list dd {
    min-width: 0;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
    line-height: 1.32;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-shell {
    display: grid;
    grid-template-columns: minmax(17.5rem, 0.36fr) minmax(0, 1fr);
    gap: 1rem;
    max-width: var(--bb-studies-content-max);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner {
    border: 1px solid var(--bbp-border);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog {
    align-self: start;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 4.25rem);
    max-height: calc(100vh - 5.25rem);
    overflow: auto;
    padding: 0.9rem;
    scrollbar-width: thin;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner {
    min-width: 0;
    padding: 1.05rem;
    scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 4.75rem);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump-wrap {
    display: none;
    margin: 0 0 0.55rem;
    text-align: center;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--bbp-border-subtle);
    background: var(--bbp-control-bg);
    color: var(--bbp-accent);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump:focus-visible {
    border-color: var(--bbp-accent);
    outline: none;
    text-decoration: underline;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump:focus-visible {
    outline: 2px solid var(--bbp-accent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter {
    display: grid;
    gap: 0.3rem;
    margin: 0 0 0.65rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.6rem, 0.42fr);
    gap: 0.45rem;
    align-items: end;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__field {
    display: grid;
    min-width: 0;
    gap: 0.24rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__label {
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__input,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__select {
    width: 100%;
    min-height: 2.25rem;
    padding: 0.44rem 0.62rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bb-color-text-primary);
    font: inherit;
    font-size: 0.88rem;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__select {
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__input:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__select:focus-visible {
    border-color: var(--bbp-accent);
    outline: 2px solid var(--bbp-accent-soft);
    outline-offset: 1px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__status {
    min-height: 1rem;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.74rem;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore {
    display: grid;
    gap: 0.48rem;
    margin-top: 0.18rem;
    padding: 0.58rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg) 70%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore:empty {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__group-label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__clear {
    min-height: 1.65rem;
    padding: 0.18rem 0.46rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-accent);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__group {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    max-width: 100%;
    min-height: 1.82rem;
    padding: 0.24rem 0.52rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle) 78%, var(--bbp-accent));
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-secondary);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 680;
    letter-spacing: 0;
    line-height: 1.15;
    cursor: pointer;
    text-align: left;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__clear:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__clear:focus-visible {
    border-color: var(--bbp-accent);
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__clear:focus-visible {
    outline: 2px solid var(--bbp-accent-soft);
    outline-offset: 1px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip[aria-pressed='true'] {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent) 32%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.28rem;
    min-height: 1.18rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-accent-soft) 66%, var(--bbp-control-bg));
    color: var(--bbp-text-muted);
    font-size: 0.66rem;
    font-weight: 760;
    line-height: 1;
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-filter__controls {
        grid-template-columns: 1fr;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-wrap {
    display: none;
    margin: 0.35rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-link {
    display: inline-block;
    color: var(--bbp-accent);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-link:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-link:focus-visible {
    outline: none;
    text-decoration: underline;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-link:focus-visible {
    outline: 2px solid var(--bbp-accent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-panel-head {
    margin-bottom: 0.72rem;
    padding-bottom: 0.58rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-panel-title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__title,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__title {
    margin: 0;
    color: var(--bbp-text-secondary);
    letter-spacing: 0;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-panel-title {
    font-size: 1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-list {
    display: grid;
    gap: 0.42rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-list__section {
    margin: 0.52rem 0 0.02rem;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-list__section:first-child {
    margin-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.18rem;
    padding: 0.62rem 0.68rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bb-color-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 140ms ease,
        background-color 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card[data-bb-study-kind='reading_companion'] {
    background: color-mix(in srgb, var(--bbp-control-bg) 88%, var(--bbp-panel-bg));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card[aria-current='true'] {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    box-shadow:
        inset 3px 0 0 var(--bbp-accent),
        var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card:focus-visible {
    border-color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card:focus-visible {
    outline: 2px solid var(--bbp-accent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card:hover {
    outline: none;
    transform: translateY(-1px);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__type {
    grid-column: 1;
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.62rem;
    padding: 0.12rem 0.48rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card[aria-current='true'] .bb-studies-catalog-card__action {
    border-color: color-mix(in srgb, var(--bbp-accent) 40%, var(--bbp-border-subtle));
    background: var(--bbp-panel-bg);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__title {
    grid-column: 1;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.35rem;
    padding: 0.12rem 0.42rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle) 80%, var(--bbp-accent));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-accent-soft) 64%, transparent);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__desc,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__anchor,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-status,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count {
    color: var(--bbp-text-muted);
    font-size: 0.84rem;
    line-height: 1.42;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-card__desc {
    grid-column: 1 / -1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0.1rem 0 0;
    max-width: min(42rem, 100%);
    padding: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-help__summary {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.1rem 0.48rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, transparent);
    color: var(--bbp-text-muted);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-help__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-help__body {
    margin: 0.38rem 0 0;
    max-width: 38rem;
    padding: 0.42rem 0.58rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg) 60%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.72rem 0.9rem;
    align-items: start;
    padding: 0 0 0.85rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top > :first-child {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__title {
    font-size: 1.12rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem 0.5rem;
    max-width: 100%;
    margin-top: 0.55rem;
    padding: 0.48rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 30%, var(--bbp-border-subtle));
    border-radius: 8px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--bbp-accent) 16%, transparent), transparent 34%),
        color-mix(in srgb, var(--bbp-accent-soft) 34%, var(--bbp-panel-bg));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary[hidden] {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary__label {
    align-self: center;
    color: var(--bbp-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary__chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.3rem;
    padding: 0.1rem 0.42rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 28%, var(--bbp-border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 78%, var(--bbp-accent-soft) 22%);
    color: var(--bb-color-text-primary);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.48rem;
    flex-wrap: wrap;
    margin-left: auto;
    padding: 0.32rem 0.36rem 0.32rem 0.48rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 72%, var(--bbp-control-bg) 28%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control[hidden],
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper[hidden] {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__label {
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__buttons {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--bbp-border);
    border-radius: 7px;
    background: var(--bbp-panel-bg);
    overflow: hidden;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button {
    min-height: 1.95rem;
    padding: 0.32rem 0.62rem;
    border: 0;
    border-left: 1px solid var(--bbp-border-subtle);
    background: transparent;
    color: var(--bbp-text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:first-child {
    border-left: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button[aria-pressed='true'] {
    background: var(--bbp-accent);
    color: var(--bb-color-text-inverse);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:focus-visible {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:focus-visible {
    outline: 2px solid var(--bbp-accent);
    outline-offset: -2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:hover {
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button[aria-pressed='true']:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button[aria-pressed='true']:focus-visible {
    color: var(--bb-color-text-inverse);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count {
    justify-self: end;
    flex: 0 0 auto;
    margin: 0;
    padding: 0.22rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step {
    margin-top: 0.82rem;
    padding: 0.95rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bb-color-bg-surface-raised);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-border-subtle) 44%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__section {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.65rem;
    margin: 0 0 0.5rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__title {
    font-size: 1.35rem;
    color: var(--bb-color-text-primary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__anchor {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0.55rem 0 0;
    padding: 0.22rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-control-bg);
    overflow-wrap: anywhere;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__prompt {
    display: grid;
    gap: 0.56rem;
    max-width: 58rem;
    margin: 0.7rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bb-color-text-primary);
    font-size: 1rem;
    line-height: 1.58;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.72rem;
    padding: 0.74rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 22%, var(--bbp-border-subtle));
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-accent-soft) 34%, var(--bbp-panel-bg) 66%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge[hidden] {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__copy {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__label {
    margin: 0 0 0.22rem;
    color: var(--bbp-accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__summary {
    margin: 0;
    color: var(--bb-color-text-primary);
    font-size: 0.88rem;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources {
    position: relative;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources[open] {
    z-index: 35;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-accent);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-panel {
    position: absolute;
    top: calc(100% + 0.28rem);
    right: 0;
    width: max-content;
    min-width: 13rem;
    max-width: min(22rem, calc(100vw - 1.25rem));
    padding: 0.42rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-shadow-popover, 0 18px 38px rgba(15, 23, 42, 0.14));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-dl {
    display: grid;
    grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr);
    gap: 0.18rem 0.5rem;
    margin: 0;
    color: var(--bb-color-text-primary);
    font-size: 0.72rem;
    line-height: 1.32;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-dl dt {
    color: var(--bbp-text-muted);
    font-weight: 700;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-dl dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__actions {
        justify-content: space-between;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenContextLens {
        flex: 1 1 auto;
        justify-content: center;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source {
    display: grid;
    gap: 0.56rem;
    margin-top: 0.82rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__block {
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__block--scripture {
    padding: 0.84rem;
    background: var(--bbp-panel-bg);
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__block--refs {
    padding: 0.78rem 0.82rem;
    background: var(--bbp-control-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__title {
    margin: 0 0 0.48rem;
    color: var(--bbp-text-secondary);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0 0 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__title-row .bb-studies-source__title {
    margin-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__red-letter {
    margin-left: auto;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__scripture + .bb-studies-source__scripture {
    margin-top: 0.72rem;
    padding-top: 0.72rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__label {
    margin: 0 0 0.28rem;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__text {
    max-width: 58rem;
    margin: 0;
    color: var(--bb-color-text-primary);
    font-size: 1.02rem;
    line-height: 1.66;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__verses {
    display: grid;
    gap: 0.42rem;
    max-width: 58rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__verse {
    display: grid;
    grid-template-columns: 3.1rem minmax(0, 1fr);
    gap: 0.58rem;
    align-items: start;
    color: var(--bb-color-text-primary);
    font-size: 1.02rem;
    line-height: 1.62;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__verse-num {
    color: var(--bbp-text-muted);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    line-height: 1.7;
    text-align: right;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__verse-text {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__status {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__status--error {
    color: var(--danger-color);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__compare-exit {
    margin: 0.35rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__compare-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--bbp-accent);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__compare-link:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__compare-link:focus-visible {
    color: var(--bbp-accent);
    text-decoration-thickness: 0.08em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-tool-affordances {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.36rem 0.44rem;
    padding: 0.42rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg) 62%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-tool-affordances__heading {
    flex: 0 0 auto;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs a {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    min-height: 1.72rem;
    padding: 0.24rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-tool-affordances__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-accent) 12%, var(--bbp-panel-bg));
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs a:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs a:focus-visible {
    border-color: var(--bbp-accent);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs a:focus-visible {
    outline: 2px solid var(--bbp-accent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source__refs a:hover {
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__section {
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 82%, var(--bbp-control-bg) 18%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__section--observe {
    border-color: color-mix(in srgb, var(--bbp-accent) 26%, var(--bbp-border-subtle));
    border-left: 3px solid var(--bbp-accent);
    background: var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__section--compare,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__section--language {
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, var(--bbp-panel-bg) 28%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__title {
    margin: 0 0 0.46rem;
    color: var(--bbp-text-muted);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-scaffold__section--observe .bb-studies-scaffold__title {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-observe-list,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list {
    display: grid;
    gap: 0.34rem;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-observe-list {
    padding-left: 1.1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list {
    gap: 0.48rem;
    padding-left: 0;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list {
    padding-left: 0;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-observe-list li,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li {
    padding-left: 0.12rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li {
    display: flex;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.34rem;
    padding: 0.4rem 0.48rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li.bb-studies-has-sources {
    padding-right: 2.16rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item {
    --bb-studies-context-accent: #64748b;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.28rem 0.55rem;
    padding: 0.5rem 0.62rem 0.56rem;
    border: 1px solid color-mix(in srgb, var(--bb-studies-context-accent) 20%, var(--bbp-border-subtle));
    border-left: 3px solid var(--bb-studies-context-accent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bb-studies-context-accent) 4%, var(--bbp-panel-bg));
    color: var(--bb-color-text-primary);
    line-height: 1.5;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item::before {
    content: attr(data-context-label);
    justify-self: start;
    align-self: start;
    padding: 0.08rem 0.36rem;
    border: 1px solid color-mix(in srgb, var(--bb-studies-context-accent) 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bb-studies-context-accent) 7%, var(--bbp-panel-bg));
    color: var(--bb-studies-context-accent);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__body {
    grid-column: 1 / -1;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__support {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.24rem;
    margin-top: 0.08rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__support-label {
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__support-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.28rem;
    padding: 0.08rem 0.4rem;
    border: 1px solid color-mix(in srgb, var(--bb-studies-context-accent) 24%, var(--bbp-border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bb-studies-context-accent) 8%, var(--bbp-panel-bg));
    color: var(--bbp-text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__title {
    grid-column: 1 / -1;
    min-width: 0;
    color: var(--bb-color-text-primary);
    font-size: 0.94rem;
    font-weight: 760;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__source {
    justify-self: end;
    align-self: start;
    max-width: 16rem;
    padding: 0.1rem 0.38rem;
    border: 1px solid color-mix(in srgb, var(--bb-studies-context-accent) 18%, var(--bbp-border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bb-studies-context-accent) 5%, var(--bbp-panel-bg));
    color: var(--bbp-text-secondary);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-align: right;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--book {
    --bb-studies-context-accent: #2563eb;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--scope {
    --bb-studies-context-accent: #0f766e;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--immediate-setting {
    --bb-studies-context-accent: #0f766e;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--big-picture,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--literature {
    --bb-studies-context-accent: #4f46e5;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--historical,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--historical-cultural,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--canon {
    --bb-studies-context-accent: #b45309;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--literary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--literary-flow,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--scripture-echo {
    --bb-studies-context-accent: #be123c;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--reading-note,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--key-points,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--key-insight,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--study-brief {
    --bb-studies-context-accent: #0369a1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item--reference {
    --bb-studies-context-accent: #475569;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list__link {
    color: var(--bbp-accent);
    font-weight: 700;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list__link:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list__link:focus-visible {
    text-decoration: underline;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list__type {
    display: inline-flex;
    padding: 0.12rem 0.36rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-map-link {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.12rem 0.48rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 42%, var(--bbp-border-subtle));
    border-radius: 999px;
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-map-link:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-map-link:focus-visible {
    background: var(--bbp-accent-soft);
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list__preview {
    flex-basis: 100%;
    margin: 0.08rem 0 0;
    color: var(--bbp-text-secondary);
    font-size: 0.83rem;
    line-height: 1.45;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview {
    position: absolute;
    top: calc(100% + 0.34rem);
    left: 0.58rem;
    z-index: 28;
    display: none;
    grid-template-columns: 6.25rem minmax(0, 1fr);
    gap: 0.65rem;
    width: min(24rem, calc(100vw - 2rem));
    padding: 0.52rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-places-list__link:hover ~ .bb-studies-place-preview,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-places-list__link:focus ~ .bb-studies-place-preview {
    display: grid;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview__map {
    position: relative;
    min-height: 5.25rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 24%, var(--bbp-border-subtle));
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(45, 91, 132, 0.12) 0 28%, transparent 28% 100%),
        radial-gradient(circle at 34% 54%, rgba(126, 161, 120, 0.28), transparent 24%),
        radial-gradient(circle at 66% 44%, rgba(216, 153, 34, 0.22), transparent 22%),
        color-mix(in srgb, var(--bbp-accent-soft) 68%, var(--bbp-panel-bg));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview__pin {
    position: absolute;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid var(--bbp-panel-bg);
    border-radius: 999px;
    background: var(--bbp-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbp-accent) 24%, transparent);
    transform: translate(-50%, -50%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview__body {
    display: grid;
    align-content: start;
    gap: 0.22rem;
    min-width: 0;
    color: var(--bbp-text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview__title {
    color: var(--bbp-accent);
    font-size: 0.88rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview__refs {
    display: block;
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-place-preview {
        grid-template-columns: 1fr;
        left: 0;
        width: min(18rem, calc(100vw - 1.6rem));
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice {
    margin: 0.12rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 2rem;
    padding: 0.2rem 0.54rem 0.2rem 0.32rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 76%, var(--bbp-control-bg) 24%);
    color: var(--bbp-text-muted);
    font-size: 0.76rem;
    font-weight: 740;
    line-height: 1.15;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary::before {
    content: "?";
    display: inline-grid;
    place-items: center;
    width: 1.12rem;
    height: 1.12rem;
    border: 1px solid color-mix(in srgb, var(--bbp-text-muted) 28%, var(--bbp-border-subtle));
    border-radius: 999px;
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 820;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 44%, var(--bbp-border-subtle));
    color: var(--bbp-accent);
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent) 62%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-enrichment-notice__body {
    max-width: 46rem;
    margin: 0.38rem 0 0;
    padding: 0.46rem 0.56rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 78%, var(--bbp-control-bg) 22%);
    color: var(--bb-color-text-secondary);
    font-size: 0.82rem;
    line-height: 1.38;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list {
    display: grid;
    grid-template-columns: minmax(5rem, max-content) minmax(0, 1fr);
    gap: 0.34rem 0.72rem;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list {
    display: grid;
    grid-template-columns: minmax(5rem, max-content) minmax(0, 1fr);
    gap: 0.34rem 0.72rem;
    margin: 0.48rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list dt {
    color: var(--bb-color-text-primary);
    font-weight: 750;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list dt {
    color: var(--bb-color-text-primary);
    font-weight: 750;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list dd,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list dd {
    position: relative;
    margin: 0;
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list dd.bb-studies-has-sources,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list dd.bb-studies-has-sources {
    padding-right: 1.7rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list__meta {
    display: block;
    margin-top: 0.12rem;
    color: var(--bb-color-text-muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list__preview {
    margin: 0.22rem 0 0;
    color: var(--bbp-text-secondary);
    font-size: 0.82rem;
    line-height: 1.42;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 0 0 0.08rem;
    z-index: auto;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list dd > .bb-studies-lang-sources,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list dd > .bb-studies-lang-sources,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li > .bb-studies-lang-sources {
    position: absolute;
    top: 0.02rem;
    right: 0;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li > .bb-studies-lang-sources {
    top: 50%;
    right: 0.48rem;
    transform: translateY(-50%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources[open] {
    z-index: 40;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.36rem;
    height: 1.36rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 38%, var(--bbp-border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 70%, var(--bbp-accent-soft) 30%);
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 58%, var(--bbp-border-subtle));
    background: var(--bbp-accent-soft);
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item__sources-summary:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-context-study-sources__summary:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__panel {
    position: absolute;
    top: calc(100% + 0.26rem);
    right: 0;
    display: none;
    width: max-content;
    min-width: 13rem;
    max-width: min(22rem, calc(100vw - 2rem));
    margin-top: 0;
    padding: 0.5rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 22%, var(--bbp-border-subtle));
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: 0 18px 38px color-mix(in srgb, var(--bb-color-text-primary) 16%, transparent);
    z-index: 30;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources[open] .bb-studies-lang-sources__panel {
    display: block;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-show-more {
    margin-top: 0.54rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-show-more__list {
    margin-top: 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-show-more > summary {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 78%, var(--bbp-control-bg) 22%);
    color: var(--bbp-accent);
    font-size: 0.8rem;
    font-weight: 720;
    line-height: 1.2;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-show-more > summary:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-show-more > summary:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 52%, var(--bbp-border-subtle));
    background: var(--bbp-accent-soft);
    outline: none;
}

@media (max-width: 640px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list .bb-studies-lang-sources__panel,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list .bb-studies-lang-sources__panel {
        right: 0;
        left: auto;
        width: min(13rem, calc(100vw - 2rem));
        min-width: 0;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__dl {
    display: grid;
    grid-template-columns: minmax(4.8rem, max-content) minmax(0, 1fr);
    gap: 0.22rem 0.65rem;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__dl dt {
    margin: 0;
    color: var(--bb-color-text-muted);
    font-weight: 600;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__dl dd {
    margin: 0;
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item {
    position: relative;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item.bb-studies-has-sources {
    padding-right: 2.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item > .bb-studies-lang-sources {
    position: absolute;
    top: 0.52rem;
    right: 0.62rem;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions {
    margin-top: 0.78rem;
    padding: 0.66rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg) 78%, var(--bbp-panel-bg) 22%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions__helper {
    flex: 1 0 100%;
    order: 10;
    margin: 0.35rem 0 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions__title {
    flex: 1 0 100%;
    order: 0;
    margin: 0;
    color: var(--bbp-accent);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesSendComposer {
    order: 1;
    border-color: color-mix(in srgb, var(--bbp-accent) 55%, var(--bbp-border));
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesSendComposer:hover:not(:disabled),
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesSendComposer:focus-visible:not(:disabled) {
    border-color: var(--bbp-accent);
    background: color-mix(in srgb, var(--bbp-accent-soft) 72%, var(--bbp-panel-bg));
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenPassage {
    order: 2;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenComposer {
    order: 3;
    border-color: transparent;
    background: transparent;
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesFeedbackLink {
    order: 4;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenComposer:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenComposer:focus-visible {
    border-color: var(--bbp-border-subtle);
    background: var(--bbp-panel-bg);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-nav {
    justify-content: space-between;
    margin-top: 0.78rem;
    padding-top: 0.68rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-nav .btn {
    min-width: 7.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-status {
    margin: 0.65rem 0 0;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .navbar > .container:not(.bb-passage-nav) {
        min-height: 48px;
        padding-top: 0.32rem;
        padding-bottom: 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-page.container {
        max-width: 100%;
        padding-top: 0.5rem;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 0.38rem;
        margin-bottom: 0.52rem;
        padding-bottom: 0.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__lead {
        font-size: 0.86rem;
        line-height: 1.36;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-rail {
        justify-self: start;
        gap: 0.26rem;
        padding: 0.18rem 0;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary {
        min-height: 2.75rem;
        gap: 0.38rem;
        padding: 0.08rem 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-summary-cue {
        min-height: 2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list {
        gap: 0.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list div {
        grid-template-columns: minmax(5rem, max-content) minmax(0, 1fr);
        gap: 0.34rem;
        padding-top: 0.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list dt,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list dd {
        font-size: 0.74rem;
        line-height: 1.22;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-panel-head {
        margin-bottom: 0.52rem;
        padding-bottom: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-list {
        max-height: min(28vh, 13rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 0.08rem;
        scrollbar-width: thin;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore {
        display: flex;
        align-items: center;
        gap: 0.36rem;
        padding: 0.36rem 0.4rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__head,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__group,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chips {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__group-label {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip {
        min-height: 2.05rem;
        padding: 0.24rem 0.54rem;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog-explore__chip-count {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-catalog__jump-wrap {
        display: block;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-wrap {
        display: block;
        margin-top: 0.22rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner {
        padding: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__meta {
        margin-bottom: 0.04rem;
        font-size: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.36rem;
        position: static;
        margin-top: 0;
        padding: 0 0 0.48rem;
        background: var(--bbp-panel-bg);
        box-shadow: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__title {
        font-size: 1.04rem;
        line-height: 1.2;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__catalog-link {
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary {
        flex-wrap: nowrap;
        gap: 0.28rem 0.34rem;
        margin-top: 0.32rem;
        padding: 0.28rem 0.34rem;
        border-radius: 7px;
        background: color-mix(in srgb, var(--bbp-accent-soft) 24%, var(--bbp-panel-bg));
        overflow-x: auto;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary__label {
        flex: 0 0 auto;
        font-size: 0.64rem;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-source-summary__chip {
        flex: 0 0 auto;
        min-height: 1.16rem;
        padding: 0.06rem 0.34rem;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control {
        width: 100%;
        justify-content: flex-start;
        justify-self: start;
        gap: 0.28rem;
        margin-left: 0;
        padding: 0.18rem 0.22rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__buttons {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button {
        flex: 1 1 0;
        min-height: 2.12rem;
        padding: 0.3rem 0.34rem;
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count {
        justify-self: start;
        padding: 0.2rem 0.48rem;
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step {
        margin-top: 0.46rem;
        padding: 0.62rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__title {
        font-size: 1.12rem;
        line-height: 1.24;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step__prompt {
        margin-top: 0.5rem;
        font-size: 0.94rem;
        line-height: 1.5;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions {
        gap: 0.4rem;
        margin-top: 0.62rem;
        padding: 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-nav .btn {
        flex: 1 1 9rem;
        min-height: 2.65rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions__helper {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesFeedbackLink {
        flex: 0 1 100%;
        justify-content: flex-start;
        min-height: 1.9rem;
        padding: 0.12rem 0.05rem;
        border-color: transparent;
        background: transparent;
        color: var(--bbp-text-muted);
        font-size: 0.8rem;
        font-weight: 650;
        text-decoration: underline;
        text-underline-offset: 3px;
        box-shadow: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesFeedbackLink:hover,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesFeedbackLink:focus-visible {
        border-color: transparent;
        background: transparent;
        color: var(--bbp-accent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary {
        width: 1.82rem;
        height: 1.82rem;
        min-width: 1.82rem;
        min-height: 1.82rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list dd.bb-studies-has-sources,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list dd.bb-studies-has-sources {
        padding-right: 2.2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li.bb-studies-has-sources {
        padding-right: 2.7rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-compare-list li > .bb-studies-lang-sources {
        transform: none;
        margin-top: -0.91rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-list__item.bb-studies-has-sources {
        padding-right: 3rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__panel,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-panel {
        position: fixed;
        right: 0.75rem;
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px) + 0.55rem);
        left: 0.75rem;
        top: auto;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: min(46vh, 22rem);
        overflow: auto;
        overscroll-behavior: contain;
        z-index: 320;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-list .bb-studies-lang-sources__panel,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-language-more-list .bb-studies-lang-sources__panel {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__dl,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-dl {
        grid-template-columns: minmax(4.25rem, max-content) minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top {
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 0.44rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top > :first-child {
        grid-column: 1 / -1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control {
        width: auto;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__label {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button {
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count {
        align-self: center;
        justify-self: end;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.4rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control {
        justify-self: stretch;
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__buttons {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count {
        justify-self: start;
    }
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-hero__source-list div {
        grid-template-columns: minmax(4.65rem, max-content) minmax(0, 1fr);
        gap: 0.3rem;
    }
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .footer p {
    color: color-mix(in srgb, var(--bb-color-text-inverse) 78%, transparent);
    line-height: 1.45;
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .footer a {
    color: var(--bb-color-text-inverse);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero {
    padding: clamp(2.6rem, 6vw, 3.7rem) var(--bb-vc-gutter) clamp(2.2rem, 5vw, 3rem);
    border-bottom: 1px solid var(--bbp-border-subtle);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bb-color-bg-surface-raised) 88%, transparent),
            var(--bbp-canvas)
        );
    color: var(--bb-color-text-primary);
    text-align: left;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero > .container {
    max-width: min(72rem, calc(100vw - 2rem));
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero h2 {
    max-width: 48rem;
    margin-bottom: var(--bb-vc-gap-sm);
    font-size: clamp(1.75rem, 4.6vw, 2.35rem);
    letter-spacing: 0;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero p {
    max-width: 46rem;
    margin-bottom: var(--bb-vc-gap-lg);
    color: var(--bbp-text-muted);
    opacity: 1;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero .bb-inline-help--hero {
    max-width: 38rem;
    color: var(--bbp-text-secondary);
    font-size: 1rem;
    font-weight: 650;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero-support {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.08rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .cta-buttons {
    justify-content: flex-start;
    gap: var(--bb-vc-gap-sm);
    margin-bottom: var(--bb-vc-gap-md);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero .btn-primary {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent);
    color: var(--bb-color-text-inverse);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero .btn-primary:hover {
    border-color: var(--bbp-accent-strong);
    background: var(--bbp-accent-strong);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero .btn-secondary {
    border-color: var(--bbp-border);
    background: var(--bb-color-bg-surface-raised);
    color: var(--bbp-text-secondary);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero .btn-secondary:hover {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero-links {
    max-width: 46rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero-links a {
    color: var(--bbp-accent);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .hero-links a:hover {
    color: var(--bbp-accent-strong);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.about, .features, .principles, .technology, .source-code) {
    padding: var(--bb-vc-section-y) var(--bb-vc-gutter);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.about, .principles) {
    background: var(--bb-color-bg-surface);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.features-grid, .principles-content, .about ul.feature-list) {
    gap: var(--bb-vc-gap-lg);
    margin-top: var(--bb-vc-gap-lg);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.feature-card, .about li) {
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
    background: var(--bb-color-bg-surface-raised);
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .about li {
    padding: 0.95rem 1rem;
    border-left: 3px solid var(--bbp-accent);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .feature-card {
    padding: 1.25rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .source-code {
    background: linear-gradient(135deg, var(--bb-hero-start) 0%, var(--bb-hero-end) 100%);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.bb-home-console, .bb-home-model, .bb-home-surfaces, .bb-home-sources) {
    color: var(--bb-color-text-primary);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console {
    padding: clamp(1rem, 3vw, 1.4rem) 0 clamp(1.3rem, 4vw, 2rem);
    border-bottom: 1px solid var(--bbp-border-subtle);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bb-color-bg-surface-raised) 88%, transparent), var(--bbp-canvas));
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
    gap: clamp(1rem, 3vw, 1.7rem);
    align-items: stretch;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console__intro,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-panel {
    border: 1px solid var(--bbp-border);
    border-radius: 12px;
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console__intro {
    display: grid;
    align-content: center;
    min-height: clamp(24rem, 50vh, 32rem);
    padding: clamp(1rem, 4vw, 2rem);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-kicker {
    margin: 0 0 0.42rem;
    color: var(--bbp-text-muted);
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console h2 {
    max-width: 52rem;
    margin: 0;
    color: var(--bb-color-text-primary);
    font-size: clamp(2rem, 5vw, 3.45rem);
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.03;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lede {
    max-width: 47rem;
    margin: 1rem 0 1.1rem;
    color: var(--bbp-text-secondary);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.52;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup {
    display: grid;
    gap: 0.45rem;
    max-width: 43rem;
    margin: 0;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup label {
    color: var(--bbp-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup input {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--bbp-border);
    border-radius: 8px;
    background: var(--bb-input-bg);
    color: var(--bb-color-text-primary);
    font: inherit;
    font-size: 1rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup input:focus {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent) 46%, transparent);
    outline-offset: 2px;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup .btn {
    min-height: 2.65rem;
    padding-inline: 1rem;
    border-radius: 8px;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery {
    display: grid;
    gap: 0.52rem;
    max-width: 47rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
    align-items: flex-start;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__group {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    max-width: 100%;
    padding: 0.22rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg) 90%, transparent);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__group-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.82rem;
    padding: 0.28rem 0.42rem;
    border-radius: 999px;
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.82rem;
    padding: 0.28rem 0.52rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery a:hover,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery a:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent) 44%, var(--bbp-border));
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
    outline: none;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery a:focus-visible {
    box-shadow: var(--bb-shadow-focus);
}

@media (pointer: coarse), (max-width: 767px) {
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__group-label,
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery a {
        min-height: 2.75rem;
        padding-right: 0.72rem;
        padding-left: 0.72rem;
    }
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-panel {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    padding: clamp(0.95rem, 2.4vw, 1.25rem);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-panel h3,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-head h3,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-grid h3 {
    margin: 0;
    color: var(--bb-color-text-primary);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 740;
    letter-spacing: 0;
    line-height: 1.16;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-list > div,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps article,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns article {
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-list > div {
    padding: 0.7rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-list dt {
    margin-bottom: 0.15rem;
    color: var(--bbp-text-secondary);
    font-size: 0.86rem;
    font-weight: 760;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-list dd {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.8rem;
    line-height: 1.36;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.46rem 0.72rem;
    border: 1px solid var(--bbp-border);
    border-radius: 8px;
    color: var(--bbp-accent);
    font-weight: 720;
    text-decoration: none;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-link:hover {
    background: var(--bbp-accent-soft);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.bb-home-model, .bb-home-surfaces, .bb-home-sources) {
    padding: var(--bb-vc-section-y) 0;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-sources {
    background: var(--bb-color-bg-surface);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-grid {
    display: grid;
    grid-template-columns: minmax(14rem, 0.42fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 1.55rem);
    align-items: start;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-grid > div > p:not(.bb-home-kicker) {
    margin-top: 0.7rem;
    color: var(--bbp-text-muted);
    line-height: 1.55;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bb-vc-gap-md);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps article,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns article {
    padding: 1rem;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
    font-size: 0.82rem;
    font-weight: 760;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps h4,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns h4 {
    margin: 0 0 0.42rem;
    color: var(--bbp-text-secondary);
    font-size: 0.98rem;
    line-height: 1.22;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps p,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns p {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-head {
    max-width: 42rem;
    margin-bottom: var(--bb-vc-gap-lg);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bb-vc-gap-md);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card {
    display: grid;
    gap: 0.32rem;
    min-height: 10.25rem;
    padding: 1rem;
    border: 1px solid var(--bbp-border);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card:hover,
body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card:focus-visible {
    border-color: var(--bbp-accent);
    background: color-mix(in srgb, var(--bbp-panel-bg) 78%, var(--bbp-accent-soft) 22%);
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card span {
    color: var(--bbp-text-muted);
    font-size: 0.73rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card strong {
    color: var(--bb-color-text-primary);
    font-size: 1.08rem;
    line-height: 1.2;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card em {
    color: var(--bbp-text-muted);
    font-size: 0.84rem;
    font-style: normal;
    line-height: 1.42;
}

body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-card--primary {
    border-color: color-mix(in srgb, var(--bbp-accent) 45%, var(--bbp-border));
    background: color-mix(in srgb, var(--bbp-panel-bg) 82%, var(--bbp-accent-soft) 18%);
}

@media (max-width: 900px) {
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console__grid,
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-section-grid {
        grid-template-columns: 1fr;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-console__intro {
        min-height: auto;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-model-steps,
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-source-columns,
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-route-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup__row {
        grid-template-columns: 1fr;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-lookup .btn {
        width: 100%;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery {
        margin-right: -1rem;
        margin-left: -1rem;
        padding-inline: 1rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__groups {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        max-width: none;
        padding-bottom: 0.12rem;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-discovery__group {
        scroll-snap-align: start;
    }
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page {
    max-width: min(72rem, calc(100vw - 2rem));
    padding-top: var(--bb-vc-section-y);
    padding-bottom: var(--bb-vc-section-y);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.82fr);
    gap: var(--bb-vc-gap-lg);
    align-items: start;
    margin-bottom: var(--bb-vc-gap-lg);
    padding-bottom: var(--bb-vc-gap-lg);
    border-bottom: 1px solid var(--bbp-border);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .bb-home-kicker {
    margin-bottom: 0.55rem;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page-title {
    margin-bottom: var(--bb-vc-gap-sm);
    color: var(--bb-color-text-primary);
    font-size: 1.72rem;
    font-weight: 720;
    letter-spacing: 0;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page-lead {
    max-width: var(--bb-vc-copy-max);
    margin-bottom: 0;
    color: var(--bbp-text-muted);
    line-height: 1.55;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-grid {
    display: grid;
    gap: 0.65rem;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card {
    display: grid;
    gap: 0.18rem;
    padding: 0.82rem 0.9rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
    background: color-mix(in srgb, var(--bbp-panel-bg) 84%, var(--bbp-control-bg) 16%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card span {
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card strong {
    color: var(--bb-color-text-primary);
    font-size: 0.95rem;
    line-height: 1.25;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card p {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    align-items: center;
    margin-bottom: var(--bb-vc-gap-lg);
    padding: 0.42rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    scrollbar-width: thin;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump a {
    min-height: 2.2rem;
    padding: 0.48rem 0.72rem;
    border: 1px solid transparent;
    border-radius: var(--bb-vc-radius-control);
    color: var(--bbp-text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump a:hover,
body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump a:focus-visible {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page .licenses-section {
    margin: 0;
    padding: 0;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page .licenses-section + .licenses-section {
    margin-top: var(--bb-vc-gap-lg);
    padding-top: var(--bb-vc-gap-lg);
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-section h2 {
    margin: 0 0 var(--bb-vc-gap-sm);
    color: var(--bbp-text-secondary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-section h2[id],
body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-section h3[id] {
    scroll-margin-top: 5rem;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-section h3 {
    margin: var(--bb-vc-gap-md) 0 0.45rem;
    color: var(--bb-color-text-primary);
    font-size: 0.98rem;
    font-weight: 720;
    letter-spacing: 0;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-section blockquote {
    margin: var(--bb-vc-gap-sm) 0;
    padding: 0.72rem 0.9rem;
    border-left-color: var(--bbp-accent);
    border-radius: var(--bb-vc-radius-card);
    background: var(--bbp-control-bg);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-context-note {
    margin: 0 0 var(--bb-vc-gap-sm);
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, transparent);
    color: var(--bbp-text-muted);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-context-note summary {
    min-height: 2.75rem;
    padding: 0.58rem 0.72rem;
    color: var(--bbp-text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 740;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-context-note p {
    margin: 0;
    padding: 0 0.72rem 0.72rem;
    color: var(--bbp-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem 0.72rem;
    margin: var(--bb-vc-gap-md) 0 var(--bb-vc-gap-sm);
    padding: 0.64rem 0.7rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
    background: color-mix(in srgb, var(--bbp-control-bg) 72%, transparent);
    color: var(--bbp-text-muted);
    font-size: 0.84rem;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status-legend > span {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    margin: 0 0.34rem 0.24rem 0;
    padding: 0.14rem 0.44rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status--active {
    border-color: color-mix(in srgb, var(--bbp-accent) 44%, var(--bbp-border-subtle));
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status--staged {
    border-color: color-mix(in srgb, var(--bb-color-warning) 44%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bb-color-warning) 13%, var(--bbp-control-bg));
    color: color-mix(in srgb, var(--bb-color-warning) 70%, var(--bb-color-text-primary));
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status--internal {
    border-color: color-mix(in srgb, var(--bbp-text-muted) 42%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-text-muted) 12%, var(--bbp-control-bg));
    color: var(--bbp-text-secondary);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status--candidate {
    border-color: color-mix(in srgb, var(--bb-color-accent-secondary) 44%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bb-color-accent-secondary) 13%, var(--bbp-control-bg));
    color: color-mix(in srgb, var(--bb-color-accent-secondary) 76%, var(--bb-color-text-primary));
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table-wrap {
    overflow-x: auto;
    margin-top: var(--bb-vc-gap-sm);
    border: 1px solid var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table {
    width: 100%;
    min-width: 54rem;
    border-collapse: collapse;
    background: var(--bbp-surface);
    font-size: 0.88rem;
    line-height: 1.45;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table caption {
    caption-side: top;
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
    color: var(--bb-color-text-primary);
    font-weight: 740;
    text-align: left;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table th,
body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table td {
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
    vertical-align: top;
    text-align: left;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--bbp-text-secondary);
    background: var(--bbp-control-bg);
    font-weight: 700;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody th {
    width: 20%;
    color: var(--bb-color-text-primary);
    font-weight: 700;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--bbp-panel-bg) 52%, transparent);
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:last-child th,
body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:last-child td {
    border-bottom: 0;
}

body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-secondary,
body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-secondary code {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page__header {
        grid-template-columns: 1fr;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page {
        max-width: min(100%, calc(100vw - 1rem));
        padding-top: 1rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page__header {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.8rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page-title {
        font-size: 1.42rem;
        line-height: 1.22;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page-lead {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-grid {
        grid-template-columns: 1fr;
        gap: 0.42rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card {
        gap: 0.08rem;
        padding: 0.58rem 0.7rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-boundary-card p {
        display: none;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump {
        flex-wrap: wrap;
        gap: 0.34rem;
        margin-bottom: 1rem;
        overflow-x: visible;
        overscroll-behavior-inline: auto;
        scroll-snap-type: none;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-jump a {
        flex: 0 0 auto;
        min-height: 2.35rem;
        scroll-snap-align: none;
        text-align: center;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status-legend {
        display: grid;
        gap: 0.36rem;
        padding: 0.56rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status-legend > span {
        align-items: flex-start;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table {
        display: block;
        min-width: 0;
        background: transparent;
        font-size: 0.86rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table caption {
        display: block;
        margin-bottom: 0.58rem;
        border: 1px solid var(--bbp-border-subtle);
        border-radius: var(--bb-vc-radius-card);
        background: var(--bbp-panel-bg);
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody {
        display: grid;
        gap: 0.62rem;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr {
        display: grid;
        gap: 0.52rem;
        padding: 0.74rem;
        border: 1px solid var(--bbp-border-subtle);
        border-radius: var(--bb-vc-radius-card);
        background: var(--bbp-panel-bg);
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:nth-child(even) {
        background: color-mix(in srgb, var(--bbp-panel-bg) 68%, var(--bbp-control-bg) 32%);
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table th,
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table td,
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:last-child th,
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody tr:last-child td {
        display: block;
        padding: 0;
        border: 0;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table tbody th {
        width: auto;
        color: var(--bb-color-text-primary);
        font-size: 0.98rem;
        line-height: 1.25;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table td {
        color: var(--bbp-text-secondary);
        overflow-wrap: anywhere;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-source-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.16rem;
        color: var(--bbp-text-muted);
        font-size: 0.68rem;
        font-weight: 780;
        letter-spacing: 0.06em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-status {
        margin-bottom: 0.18rem;
    }
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-section {
    padding: var(--bb-vc-section-y) 0 calc(var(--bb-vc-section-y) + 0.5rem);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-inner {
    max-width: var(--bb-vc-page-max);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: end;
    margin-bottom: 0.85rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__copy {
    min-width: 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__kicker {
    margin: 0 0 0.08rem;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-title {
    margin: 0 0 0.18rem;
    color: var(--bb-color-text-primary);
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-intro,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-lead,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-help {
    max-width: var(--bb-vc-copy-max);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-lead {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-help {
    display: inline-block;
    width: auto;
    margin: 0.5rem 0 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-help > .bb-disclosure__summary,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-filter-help > .bb-disclosure__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-rail {
    display: grid;
    gap: 0.42rem;
    justify-self: end;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    padding: 0.08rem 0.12rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-details[open] {
    width: min(22rem, 100%);
    padding: 0.56rem 0.66rem;
    border-color: var(--bbp-border);
    background: color-mix(in srgb, var(--bbp-panel-bg) 86%, var(--bbp-control-bg) 14%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 72%, transparent);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-summary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-summary::-webkit-details-marker {
    display: none;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-summary:focus-visible {
    border-radius: 6px;
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-label {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-summary-cue {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.12rem 0.48rem 0.12rem 0.22rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-source-info {
    display: inline-grid;
    place-items: center;
    width: 1.08rem;
    height: 1.08rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 999px;
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-details[open] .explore-map-hero__source-summary-cue {
    color: var(--bbp-accent);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list {
    display: grid;
    gap: 0.34rem;
    margin: 0.1rem 0 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list div {
    display: grid;
    grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr);
    gap: 0.48rem;
    align-items: baseline;
    padding-top: 0.38rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list div:first-child {
    padding-top: 0;
    border-top: 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list dt {
    color: var(--bb-color-text-primary);
    font-size: 0.78rem;
    font-weight: 780;
    line-height: 1.25;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list dd {
    min-width: 0;
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
    line-height: 1.32;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-toolbar,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-toolbar {
    box-sizing: border-box;
    gap: 0.26rem 0.48rem;
    margin-bottom: var(--bb-vc-gap-md);
    padding: 0.38rem 0.44rem;
    border: 1px solid var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bb-color-bg-surface-raised) 70%, transparent);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    align-items: center;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.16rem 0.52rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__details {
    margin-top: 0.36rem;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__details summary {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.14rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-panel-bg);
    color: var(--bbp-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 720;
    line-height: 1.2;
    list-style: none;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__details summary::-webkit-details-marker {
    display: none;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__details summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__panel {
    margin-top: 0.34rem;
    display: grid;
    gap: 0.24rem;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta__panel p {
    margin: 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-mode-row {
    gap: 0.22rem;
    padding: 0.22rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-filter-label {
    color: var(--bbp-text-secondary);
    font-size: 0.82rem;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-layout {
    display: grid;
    grid-template-columns: minmax(17.5rem, 0.36fr) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: stretch;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] :is(.explore-map-mode-btn, .explore-map-chip, .explore-map-filter-clear-btn, .explore-map-layer-view__btn) {
    border-color: var(--bbp-border);
    border-radius: var(--bb-vc-radius-control);
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-weight: 650;
    letter-spacing: 0;
}

@media (pointer: coarse), (max-width: 768px) {
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] :is(.explore-map-chip, .explore-map-layer-view__btn, .explore-map-profile-filters__summary) {
        min-height: 2.75rem;
    }
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] :is(.explore-map-mode-btn--active, .explore-map-chip--active, .explore-map-filter-clear-btn--all, .explore-map-layer-view__btn--active) {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] :is(.explore-map-filter-input, .explore-map-canvas, .explore-place-list, .explore-place-detail, .explore-map-list-status, .explore-map-active-filters, .explore-place-profile) {
    border-color: var(--bbp-border-subtle);
    border-radius: var(--bb-vc-radius-card);
    background: var(--bb-color-bg-surface-raised);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-panel,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-map-panel {
    min-width: 0;
    padding: 0.75rem;
    border-color: var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-panel {
    align-self: start;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-heading {
    margin-bottom: 0.38rem;
    color: var(--bbp-text-secondary);
    font-size: 0.92rem;
    font-weight: 760;
    letter-spacing: 0;
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-status {
    color: var(--bbp-text-muted);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-detail {
    box-shadow: var(--bb-shadow-raised);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list {
    max-height: min(58vh, 34rem);
    border-color: var(--bbp-border-subtle);
    background: color-mix(in srgb, var(--bbp-panel-bg) 92%, var(--bbp-control-bg) 8%);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list li {
    border-color: var(--bbp-border-subtle);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list li:hover,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list li:focus-within,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list li.explore-place-active,
body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list li.explore-place-item-active {
    background: var(--bbp-accent-soft);
    box-shadow: inset 3px 0 0 var(--bbp-accent);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-canvas {
    min-height: min(62vh, 34rem);
    box-shadow: inset 0 0 0 1px var(--bbp-border-subtle);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-detail {
    margin-top: var(--bb-vc-gap-lg);
    padding: var(--bb-vc-panel-pad);
}

body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-detail__actions {
    gap: var(--bb-vc-gap-sm);
    margin-top: var(--bb-vc-gap-md);
    padding-top: var(--bb-vc-gap-md);
    border-top-color: var(--bbp-border-subtle);
}

@media (max-width: 900px) {
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-layout {
        grid-template-columns: 1fr;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero {
        align-items: start;
        gap: 0.58rem;
        margin-bottom: 0.62rem;
        padding-bottom: 0.62rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-rail {
        justify-self: start;
        width: auto;
        max-width: 100%;
        padding: 0.08rem 0.12rem;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-details[open] {
        width: 100%;
        padding: 0.44rem 0.52rem;
        border-color: var(--bbp-border);
        background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
        box-shadow: var(--bbp-panel-shadow);
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-summary {
        min-height: 2rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 0.32rem;
        padding: 0.42rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-toolbar > :is(
        .explore-map-mode-row,
        .explore-map-filter-input,
        .explore-map-quick-searches,
        .explore-map-browse-pool-hint,
        .explore-map-layer-summary,
        .explore-map-layer-view
    ) {
        grid-column: 1 / -1;
        min-width: 0;
        max-width: 100%;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-mode-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.24rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-mode-btn {
        min-height: 2.4rem;
        padding: 0.34rem 0.56rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-toolbar > .explore-map-filter-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-filter-help {
        grid-column: auto;
        justify-self: start;
        max-width: 100%;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-layer-toggle {
        justify-content: center;
        min-width: 0;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-browse-pool-hint,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-layer-summary {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-toolbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 0.34rem;
        padding: 0.42rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-toolbar .explore-map-filter-input {
        min-width: 0;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-meta {
        grid-column: 1 / -1;
        padding: 0.3rem 0.44rem;
        font-size: 0.76rem;
        line-height: 1.34;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-panel,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-map-panel {
        padding: 0.62rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-list {
        max-height: min(38vh, 21rem);
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-canvas {
        min-height: min(42vh, 21rem);
    }
}

@media (max-width: 520px) {
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero {
        gap: 0.36rem;
        margin-bottom: 0.42rem;
        padding-bottom: 0.42rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-lead {
        display: none;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-help {
        margin-top: 0.24rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-rail {
        gap: 0.24rem;
        padding: 0.08rem 0.12rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-details[open] {
        padding: 0.4rem 0.48rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list {
        gap: 0.24rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list div {
        grid-template-columns: minmax(4.4rem, max-content) minmax(0, 1fr);
        gap: 0.3rem;
        padding-top: 0.24rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list dt,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-hero__source-list dd {
        font-size: 0.74rem;
        line-height: 1.22;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-toolbar,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-journey-toolbar {
        padding: 0.36rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-mode-row {
        width: 100%;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-mode-btn {
        flex: 1 1 0;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-list-panel,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-map-panel,
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-place-detail {
        padding: 0.52rem;
    }
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-main,
body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .app-callback-main {
    max-width: 30rem;
    margin-top: var(--bb-vc-section-y);
    margin-bottom: var(--bb-vc-section-y);
    padding: var(--bb-vc-panel-pad);
    border: 1px solid var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-title {
    margin-bottom: var(--bb-vc-gap-sm);
    font-size: 1.35rem;
    letter-spacing: 0;
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .app-callback-main {
    display: grid;
    gap: var(--bb-vc-gap-sm);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] #bb-callback-status {
    color: var(--bbp-text-secondary);
    font-weight: 650;
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] #bb-callback-status[role='alert'] {
    color: var(--bb-color-danger);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] #bb-callback-detail {
    overflow-wrap: anywhere;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-lead,
body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .app-auth-muted,
body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .app-auth-muted {
    color: var(--bbp-text-muted);
    line-height: 1.5;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-form {
    margin-bottom: var(--bb-vc-gap-lg);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-label {
    margin: var(--bb-vc-gap-md) 0 var(--bb-vc-gap-xs);
    color: var(--bbp-text-secondary);
    font-size: 0.86rem;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-input {
    min-height: 2.5rem;
    padding: 0.55rem 0.72rem;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] :is(.bb-account-status, .bb-forgot-password-alert) {
    border-radius: var(--bb-vc-radius-card);
}

body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .app-auth-card,
body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .bb-auth-overlay-card {
    border-color: var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--bb-vc-gutter);
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-shell {
    width: min(100%, 32rem);
    margin: 0;
    padding: var(--bb-vc-panel-pad);
    border: 1px solid var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bb-shadow-raised);
    text-align: center;
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-eyebrow {
    margin: 0 0 var(--bb-vc-gap-xs);
    color: var(--bbp-accent-strong);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-shell h1 {
    margin: 0;
    color: var(--bbp-text);
    font-size: clamp(1.35rem, 5vw, 2rem);
    line-height: 1.1;
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-shell p:not(.bb-redirect-eyebrow) {
    margin: var(--bb-vc-gap-sm) 0 0;
    color: var(--bbp-text-secondary);
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    margin-top: var(--bb-vc-gap-md);
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--bbp-accent);
    border-radius: var(--bb-vc-radius-card);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent-strong);
    font-weight: 800;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-link:hover,
body[data-bb-ui-redesign='passage-ui-v1']:is([data-bb-page="account-redirect"], [data-bb-page="map-redirect"]) .bb-redirect-link:focus-visible {
    border-color: var(--bbp-accent-strong);
    background: var(--bbp-surface-strong);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-main {
    max-width: min(70rem, calc(100vw - 2rem));
    padding: var(--bb-vc-section-y) var(--bb-vc-gutter);
    border: 0;
    background: transparent;
    box-shadow: none;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(20rem, 1fr);
    grid-template-areas:
        "intro panel"
        "notes panel";
    gap: clamp(1rem, 3vw, 1.5rem);
    align-items: start;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-intro,
body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-panel,
body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-notes,
body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-shell {
    border: 1px solid var(--bbp-border);
    border-radius: var(--bb-vc-radius-panel);
    background: var(--bbp-panel-bg);
    box-shadow: var(--bbp-panel-shadow);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-intro,
body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-panel,
body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-notes {
    padding: clamp(1rem, 3vw, 1.35rem);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-intro {
    grid-area: intro;
    display: grid;
    align-content: start;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-panel {
    grid-area: panel;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-notes {
    grid-area: notes;
    display: grid;
    gap: 0.72rem;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-title,
body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-title {
    color: var(--bb-color-text-primary);
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.12;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-title {
    margin: 0 0 0.7rem;
    font-size: clamp(1.75rem, 4vw, 2.45rem);
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-lead {
    max-width: 34rem;
    margin-bottom: 0;
    color: var(--bbp-text-secondary);
    font-size: 1rem;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-notes__title {
    margin: 0;
    color: var(--bbp-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-rules {
    display: grid;
    gap: 0.42rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-rules li {
    min-height: 2.2rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.88rem;
    font-weight: 680;
    line-height: 1.3;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-footnote {
    margin: 0;
    padding-top: 0.72rem;
    border-top: 1px solid var(--bbp-border-subtle);
    color: var(--bbp-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-panel {
    display: grid;
    align-content: start;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-account-section-title {
    color: var(--bbp-text-secondary);
    font-size: 1.05rem;
    letter-spacing: 0;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-submit {
    width: 100%;
    min-height: 2.55rem;
    border-radius: 8px;
}

body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-footer {
    margin: var(--bb-vc-gap-md) 0 0;
    padding-top: var(--bb-vc-gap-md);
    border-top: 1px solid var(--bbp-border-subtle);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-shell {
    max-width: min(32rem, calc(100vw - 2rem));
    padding: clamp(1.2rem, 4vw, 1.55rem);
    text-align: left;
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-title {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-meter {
    overflow: hidden;
    height: 0.45rem;
    margin: 0.35rem 0;
    border-radius: 999px;
    background: var(--bbp-control-bg);
    box-shadow: inset 0 0 0 1px var(--bbp-border-subtle);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .bb-callback-meter span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: var(--bbp-accent);
}

body[data-bb-page="cognito-callback"][data-bb-ui-redesign='passage-ui-v1'] .app-callback-links {
    margin-bottom: 0;
    padding-top: var(--bb-vc-gap-sm);
    border-top: 1px solid var(--bbp-border-subtle);
}

@media (max-width: 760px) {
    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "intro"
            "panel"
            "notes";
        gap: 0.8rem;
    }

    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-main {
        padding-top: 0.9rem;
    }

    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-intro,
    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-panel,
    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-auth-help-notes {
        padding: 0.9rem;
    }

    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-title {
        font-size: 1.55rem;
    }

    body[data-bb-page="account"][data-bb-ui-redesign='passage-ui-v1'] .bb-forgot-password-lead {
        font-size: 0.9rem;
        line-height: 1.42;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar > .container:not(.bb-passage-nav) {
        gap: var(--bb-vc-gap-sm);
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 0.18rem 0.62rem;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] :is(.about, .features, .principles, .technology, .source-code),
    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-section,
    body[data-bb-page="licenses"][data-bb-ui-redesign='passage-ui-v1'] .licenses-page {
        padding-top: 1.65rem;
        padding-bottom: 1.85rem;
    }

    body[data-bb-page="home"][data-bb-ui-redesign='passage-ui-v1'] .feature-card {
        padding: 1rem;
    }

    body[data-bb-page="explore-map"][data-bb-ui-redesign='passage-ui-v1'] .explore-map-layout {
        gap: var(--bb-vc-gap-md);
    }
}

@media (max-width: 360px) {
    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .logo {
        display: block;
    }
}

/* Global header cleanup v1: one desktop nav, one mobile menu, shared theme access. */
.bb-global-nav-menu {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.bb-global-nav-menu__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    cursor: pointer;
    padding: 0;
    user-select: none;
}

.bb-global-nav-menu__summary::-webkit-details-marker {
    display: none;
}

.bb-global-nav-menu__hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1;
}

.bb-global-nav-menu[open] .bb-global-nav-menu__hamburger,
.bb-global-nav-menu__summary:hover .bb-global-nav-menu__hamburger,
.bb-global-nav-menu__summary:focus-visible .bb-global-nav-menu__hamburger {
    border-color: color-mix(in srgb, var(--bbp-accent) 38%, var(--bbp-border-subtle));
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

.bb-global-nav-menu__summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent) 42%, transparent);
    outline-offset: 2px;
}

.bb-global-nav-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 240;
    min-width: 13.25rem;
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 4.5rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.38rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.bb-global-nav-menu__link {
    display: flex;
    align-items: center;
    min-height: 2.05rem;
    padding: 0.42rem 0.62rem;
    border-radius: 7px;
    color: var(--bbp-text-secondary);
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
}

.bb-global-nav-menu__link:hover,
.bb-global-nav-menu__link[aria-current='page'] {
    color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
}

.bb-global-nav-menu__theme {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.28rem;
    padding: 0.42rem 0.24rem 0.06rem;
    border-top: 1px solid var(--bbp-border-subtle);
}

.bb-global-nav-menu__section-label {
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.bb-global-nav-menu__theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
}

.bb-global-nav-menu__theme-btn {
    min-height: 2rem;
    padding: 0.32rem 0.36rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.15;
}

.bb-global-nav-menu__theme-btn[aria-pressed='true'] {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'] .navbar .nav-links a[aria-current='page'] {
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .logo h1,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .logo h1 a.logo-link {
    color: var(--bb-color-text-primary);
    font-weight: 750;
}

@media (max-width: 1100px) and (min-width: 768px) {
    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar > .container:not(.bb-passage-nav) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        min-height: 52px;
        gap: 0.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .nav-links {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .bb-global-nav-menu {
        position: relative;
        display: block;
        justify-self: end;
        margin-left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .bb-global-nav-menu__panel {
        right: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-item--inline {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links {
        gap: 0.38rem;
        margin-left: 0.28rem;
    }
}

/* Desktop refinement v2: tune the existing docked panel balance without changing the tool model. */
@media (min-width: 1200px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
        --bbp-reader-max: 46rem;
        --bbp-desktop-panel: clamp(22.75rem, 27vw, 25.75rem);
        --bbp-desktop-gap: clamp(1rem, 1.6vw, 1.55rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-section {
        padding-inline: clamp(1rem, 3vw, 2.5rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-section
        .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
        max-width: min(calc(var(--bbp-reader-max) + var(--bbp-desktop-panel) + var(--bbp-desktop-gap)), calc(100vw - 2rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        grid-template-columns: minmax(24rem, var(--bbp-reader-max)) minmax(22.75rem, var(--bbp-desktop-panel));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
        margin-bottom: 1rem;
        padding: 0.36rem 0.42rem;
        border-color: color-mix(in srgb, var(--bbp-border-subtle) 72%, transparent);
        background: color-mix(in srgb, var(--bbp-control-bg) 62%, transparent);
        box-shadow: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] {
        top: 4.25rem;
        height: min(47rem, calc(100dvh - 5.5rem));
        min-height: min(33rem, calc(100dvh - 5.5rem));
        max-height: calc(100dvh - 5.5rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        box-shadow: 0 14px 34px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 9%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__head {
        min-height: 2.8rem;
        padding: 0.62rem 0.72rem 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.14rem;
        padding: 0.16rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab {
        min-height: 1.85rem;
        padding: 0.32rem 0.34rem;
        font-size: 0.75rem;
        font-weight: 580;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        :is(#bbReaderUnifiedToolsTabAsk, #bbReaderUnifiedToolsTabContext).bb-reader-unified-tools-tabs__tab {
        font-weight: 650;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope {
        padding: 0.22rem 0.5rem;
        font-size: 0.68rem;
        line-height: 1.15;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        padding: 0.85rem 0.9rem 1rem;
    }
}

/* Mobile refinement v2: roomier overlay taps, same unified bottom-sheet system. */
@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__head {
        padding: 0.5rem 3.25rem 0.24rem 0.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        grid-template-columns: none;
        gap: 0.32rem;
        min-height: 0;
        padding: 0.18rem 0.08rem 0.22rem;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__tab {
        flex: 0 0 auto;
        width: auto;
        min-width: 4.9rem;
        min-height: 2.75rem;
        padding: 0.5rem 0.72rem;
        border-radius: 12px;
        font-size: 0.78rem;
        font-weight: 650;
        line-height: 1.15;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsTabCross.bb-reader-unified-tools-tabs__tab {
        min-width: 6.45rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__label--desktop {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__label--mobile {
        display: inline-block;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedOverlayCloseSessionBtn {
        top: 0.34rem;
        right: 0.5rem;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__scope {
        padding: 0.18rem 0.6rem 0.14rem;
        font-size: 0.72rem;
        line-height: 1.2;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel:not([hidden]) {
        padding: 0.32rem 0.62rem calc(0.95rem + var(--bbp-mobile-sheet-pad, 0px));
        scroll-padding: 0.38rem 0 calc(1rem + var(--bbp-mobile-sheet-pad, 0px));
        touch-action: pan-y;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        :is(#bbVerseOverlayAskInput, #passageEastonSearchInput, .collection-create-input) {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        :is(.bb-verse-overlay-reader-ask__send, .bb-reader-unified-more-menu__button) {
        min-height: 2.75rem;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav__band {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .logo {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar > .container:not(.bb-passage-nav) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        min-height: 52px;
        gap: 0.5rem;
        padding-top: 0.42rem;
        padding-bottom: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .logo {
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .logo h1,
    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .logo h1 a.logo-link {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .nav-links {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .bb-global-nav-menu {
        position: relative;
        display: block;
        justify-self: end;
        margin-left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page="passage"]) .navbar .bb-global-nav-menu__panel {
        right: 0;
    }
}

/* Passage desktop header + toolbar fix: one utility menu, tighter reader-first chrome. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more--utility-menu {
    position: relative;
    display: list-item !important;
    flex: 0 0 auto;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__details {
    position: relative;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__details[open] .bb-passage-nav-more__hamburger,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__summary:hover .bb-passage-nav-more__hamburger {
    border-color: var(--bbp-border);
    background: var(--bbp-control-bg-strong);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links .bb-passage-nav-more--sf-mobile-only {
    display: list-item !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__panel {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 0.3rem);
    z-index: 260;
    min-width: 13rem;
    max-width: calc(100vw - 1rem);
    max-height: min(34rem, calc(100vh - 4.5rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.32rem 0;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 14%, transparent);
    box-sizing: border-box;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__link {
    display: block;
    padding: 0.42rem 0.78rem;
    color: var(--bbp-text-secondary);
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__link:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__link[aria-current='page'] {
    color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__link--mobile-primary {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__theme,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__reader {
    display: grid;
    gap: 0.35rem;
    margin: 0.28rem 0;
    padding: 0.42rem 0.78rem;
    border-top: 1px solid var(--bbp-border-subtle);
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__section-label {
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__reader {
    gap: 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__reader-group {
    display: grid;
    gap: 0.26rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__subsection-label {
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__theme-btn {
    min-height: 2rem;
    padding: 0.32rem 0.36rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__theme-btn[aria-pressed='true'] {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access {
    position: relative;
    display: list-item;
    flex: 0 0 auto;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__details {
    position: relative;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.85rem;
    height: 2.2rem;
    padding: 0 0.56rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    list-style: none;
    cursor: pointer;
    user-select: none;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__label {
    font-size: 0.79rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__details[open] .bb-passage-theme-access__summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__summary:hover {
    border-color: var(--bbp-border);
    background: var(--bbp-control-bg-strong);
    color: var(--bbp-accent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__panel {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 0.3rem);
    z-index: 270;
    min-width: 13rem;
    max-width: calc(100vw - 1rem);
    padding: 0.32rem 0;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 8px;
    background: var(--bbp-panel-bg);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 14%, transparent);
    box-sizing: border-box;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__theme {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0.42rem 0.78rem;
    border: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__section-label {
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__theme-btn {
    min-height: 2rem;
    padding: 0.32rem 0.36rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.15;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__theme-btn[aria-pressed='true'] {
    border-color: var(--bbp-accent);
    background: var(--bbp-accent-soft);
    color: var(--bbp-accent);
}

@media (min-width: 768px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar {
        min-height: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .container.bb-passage-nav {
        max-width: var(--bb-vc-page-max);
        padding: 0.22rem var(--bb-vc-gutter);
        gap: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav__band {
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.34rem 0.48rem;
        min-height: 2.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .logo {
        flex: 0 0 auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .logo h1 a.logo-link {
        font-size: 1rem;
        font-weight: 750;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-ref-input-wrap--passage-sf {
        flex: 0 0 auto;
        width: auto;
        max-width: min(35rem, 100%);
        margin-top: 0;
        align-self: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-nav-passage-toolbar {
        width: 100%;
        max-width: 100%;
        gap: 0.22rem 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .passage-shell-location-chip--nav {
        max-width: min(14rem, 20vw);
        min-height: 2.06rem;
        padding: 0.28rem 0.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-nav-passage-toolbar__trans select {
        min-height: 2.06rem;
        max-width: 10rem;
        padding-top: 0.28rem;
        padding-bottom: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-text-search-open-btn {
        min-height: 2.06rem;
        padding: 0.28rem 0.62rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links {
        align-items: center;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-left: 0.45rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links a {
        display: inline-flex;
        align-items: center;
        min-height: 2rem;
        padding: 0.22rem 0.44rem;
        border-radius: 999px;
        color: var(--bbp-text-secondary);
        font-size: 0.84rem;
        font-weight: 650;
        line-height: 1.2;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links a[aria-current='page'] {
        background: var(--bbp-accent-soft);
        color: var(--bbp-accent);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent) 22%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links .bb-passage-nav-more__panel .bb-passage-nav-more__link {
        display: block;
        min-height: 0;
        padding: 0.42rem 0.78rem;
        font-size: 0.875rem;
        line-height: 1.25;
        white-space: normal;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links .bb-passage-nav-more__panel a.bb-passage-nav-more__link--mobile-primary {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-section {
        padding-top: 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-workspace__status,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-reader-header--reading-head {
        margin-bottom: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
        width: min(100%, max(var(--bbp-reader-max, 52rem), 48rem));
        max-width: none;
        margin: 0 auto 1rem;
        padding: 0.52rem 0.72rem;
        border-radius: 10px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__ask.btn-primary {
        min-height: 2.35rem;
        padding: 0.44rem 0.92rem;
        font-size: 0.9rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-row__secondary :is(.passage-action-row__study--core, .passage-action-row__study--quiet),
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] #bbPassageStudyActionRow .passage-action-mark {
        min-height: 2.32rem;
        font-size: 0.86rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] #passageResults.passage-results {
        margin-top: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .reading-area {
        padding-right: clamp(0.25rem, 1.4vw, 0.85rem);
        padding-left: clamp(0.25rem, 1.4vw, 0.85rem);
        scroll-padding-top: var(--bbp-passage-action-row-anchor-clearance, 3.5rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] .reading-area .bb-sf-translations-toolbar--reading:not([hidden]) {
        margin: 0 0 0.16rem;
        padding: 0.22rem 0.34rem;
        border-radius: 8px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-main[data-bb-reading-surface='scripture-first-v1'] .passage-results .result-translations.study-panel {
        padding-top: 0.16rem;
    }
}

/* Passage sticky action row: pinned under the global nav, below menus and overlay surfaces. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
    --bbp-passage-action-row-anchor-clearance: calc(var(--bbp-passage-action-row-sticky-top) + 4.25rem);
    --bbp-selected-tools-dock-top: calc(var(--bbp-passage-action-row-anchor-clearance, 6rem) + 1.25rem);
    --bbp-selected-tools-dock-bottom-gap: 0.85rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .passage-section {
    padding-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-workspace,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-workspace__status,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header--reading-head {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header--reading-head:not(:has(#bbContinueReadingBar:not([hidden]), #bbReaderLocationLine:not([hidden]), #bbBookReadingProgressStrip:not([hidden]), #bbSfPassageMultiSelectAffordance:not([hidden])))
    > :is(.bb-sf-page-chrome-title-row, .bb-passage-action-row-hint, .passage-reader-header__actions--scripture-first, .bb-sf-reader-context-band) {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-workspace__status:not(:has(#bbContinueReadingBar:not([hidden]), #bbReaderLocationLine:not([hidden]), #bbBookReadingProgressStrip:not([hidden]), #bbSfPassageMultiSelectAffordance:not([hidden]))) {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-sf-reader-context-band {
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
        --bbp-passage-action-row-sticky-top: calc(2.42rem + 0.42rem);
        --bbp-passage-action-row-anchor-clearance: calc(var(--bbp-passage-action-row-sticky-top) + 3rem);
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row:not([hidden]) {
    position: sticky;
    top: var(--bbp-passage-action-row-sticky-top, calc(56px + 0.35rem));
    z-index: 4;
    margin-top: 0;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 94%, transparent);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 74%, transparent),
        0 1px 0 color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 72%, transparent),
        0 12px 28px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 10%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-passage-reader-tool-dock {
    display: none !important;
    justify-content: flex-end;
    width: min(100%, var(--bbp-reader-max, 52rem));
    max-width: calc(100% - clamp(1rem, 4vw, 2.5rem));
    margin: 0.1rem auto -0.1rem;
    padding: 0;
    pointer-events: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-passage-reader-tool-dock
    .bb-passage-tools-reader-toggle {
    pointer-events: auto;
    width: 2.12rem;
    height: 2.12rem;
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #d8d2c7) 84%, transparent);
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 88%, transparent);
    color: color-mix(in srgb, var(--bbp-text-secondary, #475569) 84%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-passage-reader-tool-dock
    .bb-passage-tools-reader-toggle.is-open {
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 76%, var(--bbp-control-bg-strong, #ffffff));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]:not(.bb-passage-tools-collapsed)
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-passage-reader-tool-dock {
    visibility: hidden;
    pointer-events: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-passage-reader-tool-dock {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .bb-passage-tools-close-btn {
    display: none !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin-left: 0.08rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #d8d2c7) 86%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 90%, transparent);
    color: color-mix(in srgb, var(--bbp-text-secondary, #475569) 82%, transparent);
    font: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .bb-passage-tools-close-btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .bb-passage-tools-close-btn:focus-visible {
    border-color: color-mix(in srgb, var(--primary-color, #2f5f8f) 42%, var(--bbp-border-subtle, #d8d2c7));
    color: var(--primary-color, #2f5f8f);
    outline: 2px solid color-mix(in srgb, var(--primary-color, #2f5f8f) 22%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle-wrap {
    flex: 0 0 auto;
    margin-left: 0.05rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-row__toggle-wrap {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle {
    min-height: 2.35rem;
    padding: 0.42rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 78%, transparent);
    color: color-mix(in srgb, var(--bbp-text-secondary, #475569) 78%, transparent);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 720;
    line-height: 1.1;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle::before {
    content: 'Hide ';
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle::after {
    content: '▴';
    margin-left: 0.28rem;
    color: color-mix(in srgb, var(--bbp-text-muted, #64748b) 74%, transparent);
    font-size: 0.68rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    > :not(.passage-action-row__toggle-wrap) {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle {
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 86%, transparent);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 7%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle::before {
    content: 'Show ';
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow
    .passage-action-row__toggle::after {
    content: '▾';
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
    width: min(100%, max(var(--bbp-reader-max, 52rem), 48rem));
    max-width: calc(100% - clamp(1rem, 4vw, 2.5rem));
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
    scrollbar-width: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
    width: min(100%, var(--bbp-reader-max, 52rem));
    max-width: calc(100% - clamp(1rem, 4vw, 2.5rem));
    margin-right: auto;
    margin-left: auto;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']::-webkit-scrollbar {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    > :is(.passage-action-row__primary, .passage-action-row__secondary, .passage-action-row__compare, .passage-action-marks),
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-row__core {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    min-width: max-content;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-row__compare {
    min-width: max-content;
    margin-left: 0.18rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-row__core
    .passage-action-row__study--quiet {
    flex: 0 0 auto;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .bb-passage-compare-picker__summary {
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-marks {
    margin-left: 0.1rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]) {
    width: min(100%, var(--bbp-reader-max));
    max-width: calc(100% - clamp(0.5rem, 2.8vw, 1.7rem));
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
    overflow-x: visible;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    .passage-action-row__selection:not([hidden]) {
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    .bb-reader-unified-tools-tabs {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-size: 100% 100%;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    .bb-reader-unified-tools-tabs::-webkit-scrollbar {
    display: block;
    height: 5px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    .bb-reader-unified-tools-tabs::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.65);
    border-radius: 999px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    .bb-reader-unified-tools-tabs__tab {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #resultTranslations
    .translation-block {
    scroll-margin-top: var(--bbp-passage-action-row-anchor-clearance, 7rem);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #passageResults.passage-results {
    margin-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .reading-area
    .bb-sf-translations-toolbar--reading:not([hidden]) {
    margin-top: 0;
    margin-bottom: 0.08rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations.study-panel {
    padding-top: 0.05rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='selection']
    > :is(.passage-action-row__primary, .passage-action-row__secondary, .passage-action-marks, .passage-action-row__compare) {
    display: none !important;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
        --bbp-passage-action-row-sticky-top: calc(48px + 0.1rem);
        --bbp-passage-action-row-anchor-clearance: calc(var(--bbp-passage-action-row-sticky-top) + 3.75rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        width: 100%;
        max-width: calc(100% - 0.5rem);
        margin-right: auto;
        margin-left: auto;
        justify-content: stretch;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open:not(.bb-passage-tools-collapsed)
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        display: grid !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']
        .passage-action-row__compare {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]) {
        max-width: calc(100% - 0.5rem);
    }
}

@media (max-width: 1199px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
        --bbp-mobile-sheet-max: min(91dvh, calc(100dvh - var(--bbp-passage-action-row-anchor-clearance, 7rem) - 0.5rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]) {
        z-index: 10073;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] {
        --bbp-mobile-sheet-max: min(58dvh, calc(100dvh - var(--bbp-passage-action-row-anchor-clearance, 7rem) - 0.5rem));
    }
}

@media (min-width: 1200px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav__band {
        justify-content: flex-start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost[data-bb-unified-overlay-state='open'] {
        position: fixed !important;
        top: var(--bbp-selected-tools-dock-top) !important;
        right: max(1rem, calc((100vw - (var(--bbp-reader-max) + var(--bbp-desktop-panel) + var(--bbp-desktop-gap))) / 2)) !important;
        bottom: auto !important;
        left: auto !important;
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        justify-self: stretch;
        display: flex !important;
        width: var(--bbp-desktop-panel);
        max-width: none;
        height: min(47rem, calc(100dvh - var(--bbp-selected-tools-dock-top) - var(--bbp-selected-tools-dock-bottom-gap)));
        min-height: min(32rem, calc(100dvh - var(--bbp-selected-tools-dock-top) - var(--bbp-selected-tools-dock-bottom-gap)));
        max-height: calc(100dvh - var(--bbp-selected-tools-dock-top) - var(--bbp-selected-tools-dock-bottom-gap));
        overflow: hidden;
        box-sizing: border-box;
        z-index: 5;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        z-index: auto !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        [id^='bbReaderUnifiedOverlayView'].bb-reader-unified-overlay-host__view:not([hidden]),
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
        z-index: auto !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__head {
        min-height: 2.55rem;
        padding: 0.5rem 0.62rem 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope {
        padding: 0.28rem 0.78rem 0.18rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope:empty {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab {
        min-height: 1.78rem;
        padding-block: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]:has(#bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden])) {
        --bbp-selected-tools-panel-width: var(--bbp-desktop-panel, clamp(22.75rem, 27vw, 25.75rem));
        --bbp-selected-tools-panel-right: max(
            1rem,
            calc(
                (100vw - (var(--bbp-reader-max, 52rem) + var(--bbp-selected-tools-panel-width) + var(--bbp-desktop-gap, 1.5rem))) / 2
            )
        );
        --bbp-selected-tools-panel-top: calc(var(--bbp-passage-action-row-anchor-clearance, 6rem) + 2rem);
        --bbp-selected-tools-panel-height: min(36rem, calc(100dvh - var(--bbp-selected-tools-panel-top) - var(--bbp-selected-tools-dock-bottom-gap)));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open:has(#bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]))
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open'] {
        top: var(--bbp-selected-tools-panel-top) !important;
        right: var(--bbp-selected-tools-panel-right) !important;
        left: auto !important;
        width: var(--bbp-selected-tools-panel-width);
        max-width: calc(100vw - 2rem);
        height: var(--bbp-selected-tools-panel-height);
        min-height: min(18rem, var(--bbp-selected-tools-panel-height));
        max-height: var(--bbp-selected-tools-panel-height);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open:has(#bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]))
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        overflow: hidden;
        border: 1px solid var(--bbp-border-subtle, #e2e8f0);
        border-radius: 10px;
        background: var(--bbp-panel-bg, #ffffff);
        box-shadow:
            0 16px 38px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 14%, transparent),
            0 2px 10px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 8%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        display: block;
        width: 100%;
        max-width: var(--bbp-reader-max, 46rem);
        margin-right: auto;
        margin-left: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReadingModeShell {
        display: block;
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open'] {
        position: sticky !important;
        top: calc(var(--bbp-passage-action-row-sticky-top, 3rem) + 0.45rem) !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: flex !important;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        margin: 0 auto 0.7rem;
        overflow: visible;
        pointer-events: auto;
        z-index: 5;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        .bb-reader-unified-overlay-host__frame {
        display: flex !important;
        width: 100%;
        min-height: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface {
        width: 100%;
        height: auto;
        max-height: min(72dvh, calc(100dvh - var(--bbp-passage-action-row-sticky-top, 3rem) - 1.25rem));
        overflow: hidden;
        border: 1px solid var(--bbp-border-subtle, #e2e8f0);
        border-radius: 12px;
        background: linear-gradient(180deg, var(--bbp-panel-bg, #ffffff) 0%, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 94%, var(--bbp-control-bg, #f8fafc)) 100%);
        box-shadow:
            0 18px 42px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 13%, transparent),
            0 1px 0 color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 78%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel {
        max-height: min(58dvh, calc(100dvh - var(--bbp-passage-action-row-sticky-top, 3rem) - 6rem)) !important;
        overflow: auto !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-verse-study-overlay-open
        .passage-section
        .passage-layout:has(.passage-main[data-bb-reading-surface='scripture-first-v1']) {
        max-width: min(100%, calc(var(--bbp-reader-max, 46rem) + 2rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row:not([hidden]),
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"].bb-passage-tools-collapsed
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]),
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='selection']:not([hidden]) {
        width: 100%;
        max-width: var(--bbp-reader-max, 46rem);
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__link--mobile-primary {
        display: block;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .nav-links {
        gap: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-theme-access__summary {
        min-width: 3.65rem;
        height: 2.25rem;
        padding-inline: 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-text-search-open-btn {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__hamburger {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"] .navbar .bb-passage-nav-more__summary {
        align-self: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .navbar
        .bb-nav-passage-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.32rem 0.36rem;
        align-items: center;
        padding: 0.42rem 0.46rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__primary {
        grid-column: 1;
        grid-row: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__secondary {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core {
        display: flex;
        gap: 0.2rem;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core
        .passage-action-row__study--quiet {
        min-height: 2.12rem;
        padding: 0.36rem 0.5rem;
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-tools-close-btn {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: 2.05rem;
        height: 2.05rem;
        margin: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__compare {
        grid-column: 1 / 2;
        grid-row: 2;
        width: auto;
        min-width: 0;
        margin: 0;
        justify-self: start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__compare
        .translations-toolbar__show-wrap {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        width: 100%;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__compare
        .translation-selector-label {
        font-size: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-compare-picker {
        min-width: 0;
        width: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-compare-picker__summary {
        width: auto;
        padding-inline: 0.52rem;
        font-size: 0.82rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-compare-picker__body {
        right: auto;
        left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="passage"]
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-marks {
        grid-column: 3;
        grid-row: 2;
        display: flex;
        justify-content: flex-end;
        gap: 0.12rem;
        margin: 0;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.tokens-wrap, .interlinear-wrap) {
        overflow-x: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table) {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        thead {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tbody,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr {
        margin: 0 0 0.62rem;
        padding: 0.44rem 0.52rem;
        border: 1px solid var(--bbp-border-subtle, #e2e8f0);
        border-radius: 10px;
        background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 96%, var(--bbp-hover, #f1f5f9));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        td {
        display: grid;
        grid-template-columns: 5.6rem minmax(0, 1fr);
        gap: 0.35rem;
        align-items: start;
        padding: 0.18rem 0;
        border: 0;
        text-align: left;
        word-break: break-word;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        td::before {
        color: var(--bbp-text-muted, #64748b);
        font-size: 0.72rem;
        font-weight: 720;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(1)::before {
        content: 'Verse';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(2)::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .interlinear-table td:nth-child(1)::before {
        content: 'Surface';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(3)::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .interlinear-table td:nth-child(2)::before {
        content: 'Lemma';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(4)::before {
        content: 'Morph';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(5)::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .interlinear-table td:nth-child(4)::before {
        content: 'Gloss';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(6)::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .interlinear-table td:nth-child(3)::before {
        content: 'Strong';
    }
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .token-table td:nth-child(7)::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open #bbReaderUnifiedOverlayViewOl .interlinear-table td:nth-child(5)::before {
        content: 'Copy';
    }
}

/* Passage redesign final polish: visible reader header, top-sheet study surface, and narrow-phone tab grid. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header--reading-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: min(100%, var(--bbp-reader-max, 46rem));
    max-width: calc(100% - clamp(1rem, 4vw, 2.5rem));
    margin: 0 auto 0.55rem;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--bbp-border-subtle, #e2e8f0);
    border-radius: 12px;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 96%, var(--bbp-accent-soft, #dbeafe) 4%),
            color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-control-bg, #f8fafc) 12%)
        );
    box-shadow:
        0 10px 28px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 8%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 70%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header--reading-head
    > .bb-sf-page-chrome-title-row {
    display: flex !important;
    align-items: center;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-reader-header--reading-head
    > .passage-reader-header__actions--scripture-first {
    display: flex !important;
    justify-content: flex-end;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #resultReference.bb-sf-page-chrome-result-ref {
    margin: 0;
    color: var(--bbp-reader-text, var(--text-color));
    font-size: 1.34rem;
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-top-pill {
    min-width: 2.25rem;
    min-height: 2.25rem;
    border-color: var(--bbp-border-subtle, #e2e8f0);
    border-radius: 999px;
    background: var(--bbp-control-bg-strong, #ffffff);
    color: var(--bbp-text-secondary, #475569);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 66%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-row__ask.btn-primary {
    box-shadow:
        0 8px 18px color-mix(in srgb, var(--bbp-accent, #2563eb) 14%, transparent),
        inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent);
}

@media (min-width: 1200px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1'] {
        display: block;
        width: 100%;
        max-width: var(--bbp-reader-max, 46rem);
        margin-right: auto;
        margin-left: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        > #bbReaderUnifiedOverlayHost.bb-reader-unified-overlay-host--desktop-dock[data-bb-unified-overlay-state='open'] {
        position: sticky !important;
        top: calc(var(--bbp-passage-action-row-sticky-top, 3rem) + 0.45rem) !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100%;
        max-width: 100%;
        margin: 0 auto 0.75rem;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] {
        --bbp-mobile-sheet-max: min(91dvh, calc(100dvh - 0.75rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-reader-header--reading-head {
        grid-template-columns: minmax(0, 1fr) auto;
        max-width: calc(100% - 0.75rem);
        margin-bottom: 0.42rem;
        padding: 0.62rem 0.68rem;
        border-radius: 10px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #resultReference.bb-sf-page-chrome-result-ref {
        font-size: 1.08rem;
        line-height: 1.16;
    }
}

@media (max-width: 360px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.38rem;
        padding: 0.92rem 0.62rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope {
        display: none !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.16rem;
        width: 100%;
        min-height: 0 !important;
        overflow: visible !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__tab {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 2.625rem;
        padding: 0.34rem 0.22rem;
        overflow: hidden;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        #bbReaderUnifiedToolsTabCross.bb-reader-unified-tools-tabs__tab {
        min-width: 0 !important;
    }
}

/* Passage verse study dock: tool choice is the primary control surface. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.42rem 0.5rem;
    min-height: 0;
    padding: 0.58rem 0.62rem 0.54rem;
    border-bottom: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 84%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 98%, transparent) 0%, color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 72%, var(--bbp-panel-bg, #ffffff)) 100%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-overlay-host__session-chrome {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__identity {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 1.72rem;
    padding: 0.16rem 0.48rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 88%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__scope {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    max-width: min(38vw, 15rem);
    min-height: 1.72rem;
    margin: 0;
    padding: 0.18rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 86%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__scope:empty {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
    overflow: visible;
    mask-image: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.38rem 0.46rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 84%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 74%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 46%, transparent);
    font-size: 0.74rem;
    line-height: 1.12;
    text-align: left;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 44%, var(--bbp-border-subtle, #e2e8f0));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 66%, #ffffff) 0%, color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 84%, var(--bbp-accent-soft, #dbeafe)) 100%);
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 78%, var(--bbp-text-primary, #111827));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, #ffffff 54%, transparent),
        0 7px 16px color-mix(in srgb, var(--bbp-accent, #2563eb) 12%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    :is(
        #bbReaderUnifiedToolsTabAsk,
        #bbReaderUnifiedToolsTabContext,
        #bbReaderUnifiedToolsTabCross,
        #bbReaderUnifiedToolsTabCompare,
        #bbReaderUnifiedToolsTabLookup,
        #bbReaderUnifiedToolsTabOriginal,
        #bbReaderUnifiedToolsTabMaps,
        #bbReaderUnifiedToolsTabMore
    ).bb-reader-unified-tools-tabs__tab:not([aria-selected='true']) {
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 84%, transparent);
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 74%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 46%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    :is(
        #bbReaderUnifiedToolsTabAsk,
        #bbReaderUnifiedToolsTabContext,
        #bbReaderUnifiedToolsTabCross,
        #bbReaderUnifiedToolsTabCompare,
        #bbReaderUnifiedToolsTabLookup,
        #bbReaderUnifiedToolsTabOriginal,
        #bbReaderUnifiedToolsTabMaps,
        #bbReaderUnifiedToolsTabMore
    ).bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 44%, var(--bbp-border-subtle, #e2e8f0));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 66%, #ffffff) 0%, color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 84%, var(--bbp-accent-soft, #dbeafe)) 100%);
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 78%, var(--bbp-text-primary, #111827));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, #ffffff 54%, transparent),
        0 7px 16px color-mix(in srgb, var(--bbp-accent, #2563eb) 12%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 780;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__label--mobile {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__meta {
    display: block;
    max-width: 100%;
    margin-top: 0.1rem;
    overflow: hidden;
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab[aria-selected='true']
    .bb-reader-unified-tools-tabs__meta {
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 58%, var(--bbp-text-muted, #64748b));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu
    .bb-reader-unified-tools-surface__send-study-wrap {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__button,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu
    .bb-send-to-study-btn.bb-reader-unified-more-menu__button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: 100%;
    min-height: 3.15rem;
    padding: 0.62rem 0.68rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 82%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-primary, #111827);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 48%, transparent);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.16;
    text-align: left;
    white-space: normal;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__button:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__button:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu
    .bb-send-to-study-btn.bb-reader-unified-more-menu__button:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu
    .bb-send-to-study-btn.bb-reader-unified-more-menu__button:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 44%, var(--bbp-control-bg-strong, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.42rem;
    height: 1.42rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 82%, transparent);
    border-radius: 999px;
    background: var(--bbp-panel-bg, #ffffff);
    color: var(--bbp-text-secondary, #475569);
    font-size: 0.82rem;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__label {
    min-width: 0;
    overflow-wrap: anywhere;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-dictionary-source-switch {
    flex: 0 0 auto;
    align-self: flex-start;
    gap: 0.34rem;
    width: max-content;
    max-width: 100%;
    min-height: 2.9rem;
    margin: 0.16rem 0 0.62rem;
    padding: 0.28rem;
    overflow-x: auto;
    overflow-y: visible;
    box-sizing: border-box;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-dictionary-source-switch__btn {
    min-height: 2.28rem;
    padding: 0.42rem 0.78rem;
    font-size: 0.84rem;
    line-height: 1.18;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedLookupModeSwitch {
    margin-bottom: 0.42rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome {
    align-items: stretch;
    gap: 0.5rem;
    margin: 0.1rem 0 0.64rem;
    padding: 0.58rem 0.68rem;
    overflow: visible;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create {
    display: grid;
    flex: 1 1 100%;
    grid-template-columns: minmax(14rem, 1fr) auto;
    gap: 0.5rem;
    align-items: stretch;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create-input {
    min-height: 2.34rem;
    padding: 0.5rem 0.68rem;
    font-size: 0.9rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .btn {
    min-width: 5.5rem;
    min-height: 2.34rem;
    padding: 0.5rem 0.82rem;
    font-size: 0.84rem;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        display: grid !important;
        flex: 0 0 auto;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab {
        align-items: center;
        width: 100%;
        min-width: 0 !important;
        min-height: 2.75rem;
        padding: 0.32rem 0.34rem;
        overflow: hidden;
        text-align: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__label {
        font-size: 0.74rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__meta {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__label--desktop {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__label--mobile {
        display: block;
    }
}

@media (max-width: 640px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        max-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs {
        grid-row: 3;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-more-menu {
        grid-template-columns: 1fr;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsPanelLookup
        .bb-cross-surface__chrome
        .collection-create {
        grid-template-columns: 1fr;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsPanelLookup
        .bb-cross-surface__chrome
        .btn:not([hidden]) {
        display: inline-flex !important;
        justify-content: center;
        width: max-content;
    }
}

@media (max-width: 430px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__scope {
        display: block !important;
    }
}

/* Passage scoped study dock: calmer launcher row and unified tool tabs. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: min(100%, var(--bbp-reader-max, 46rem));
    max-width: calc(100% - clamp(1rem, 4vw, 2.5rem));
    margin: 0.08rem auto 0.72rem;
    padding: 0.34rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    border-radius: 10px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 82%, var(--bbp-control-bg, #f8fafc)) 0%, color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 88%, var(--bbp-panel-bg, #ffffff)) 100%);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 58%, transparent),
        0 8px 18px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 5%, transparent);
    overflow: visible;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']::before {
    content: "Study";
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 2.02rem;
    padding: 0 0.42rem 0 0.28rem;
    border-right: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__primary, .passage-action-row__secondary, .passage-action-row__core, .passage-action-row__compare, .passage-action-marks) {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.22rem;
    min-width: 0;
    margin: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    min-height: 2.08rem;
    padding: 0.36rem 0.62rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 86%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.1;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    #passageActionAskBtn.passage-action-row__ask.btn-primary {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-accent-soft, #dbeafe)) 0%, color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 88%, var(--bbp-accent-soft, #dbeafe)) 100%);
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary)::before {
    display: inline-grid;
    place-items: center;
    width: 1.16rem;
    height: 1.16rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 84%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 90%, transparent);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.62rem;
    font-weight: 820;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    #passageActionAskBtn::before {
    content: "Q";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    #passageActionHistoryBtn::before {
    content: "C";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    #passageActionPlacesBtn::before {
    content: "@";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    #bbPassageStartStudyLink::before {
    content: "S";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .bb-passage-compare-picker__summary::before {
    content: "=";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary):hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary):focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 34%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 70%, var(--bbp-text-primary, #111827));
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    :is(.passage-action-row__study--on, [aria-current='true'], .passage-action-row__ask--on) {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 44%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 74%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-marks {
    margin-left: 0.08rem;
    padding-left: 0.16rem;
    border-left: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 78%, transparent);
    opacity: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.08rem;
    min-width: 2.08rem;
    height: 2.08rem;
    min-height: 2.08rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 82%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 86%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: none;
    font-size: 0.9rem;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-mark:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-mark:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 30%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 30%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 70%, var(--bbp-text-primary, #111827));
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
    .passage-action-mark:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-surface__head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.46rem 0.58rem;
    padding: 0.56rem 0.62rem 0.62rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 98%, transparent) 0%, color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 76%, var(--bbp-panel-bg, #ffffff)) 100%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.22rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 72%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bbp-tab-strip-bg, #f1f5f9) 78%, var(--bbp-panel-bg, #ffffff));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab {
    position: relative;
    align-items: flex-start;
    min-height: 2.72rem;
    padding: 0.42rem 0.42rem 0.38rem 2.08rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    text-align: left;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab::before {
    position: absolute;
    top: 50%;
    left: 0.42rem;
    display: inline-grid;
    place-items: center;
    width: 1.28rem;
    height: 1.28rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 92%, transparent);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.62rem;
    font-weight: 820;
    line-height: 1;
    transform: translateY(-50%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabAsk::before {
    content: "Q";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabContext::before {
    content: "C";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabCross::before {
    content: "#";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabCompare::before {
    content: "=";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabLookup::before {
    content: "?";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabOriginal::before {
    content: "Aa";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabMaps::before {
    content: "@";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabMore::before {
    content: "M";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 92%, var(--bbp-accent, #2563eb));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 84%, var(--bbp-accent-soft, #dbeafe));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 70%, var(--bbp-text-primary, #111827));
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab[aria-selected='true'] {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 76%, var(--bbp-accent-soft, #dbeafe));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 74%, var(--bbp-text-primary, #111827));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, #ffffff 60%, transparent),
        0 6px 14px color-mix(in srgb, var(--bbp-accent, #2563eb) 10%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab[aria-selected='true']::before {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 74%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabMore.bb-reader-unified-tools-tabs__tab {
    color: var(--bbp-text-secondary, #475569);
    font-weight: 700;
    padding: 0.42rem 0.42rem 0.38rem 2.08rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab::before {
    content: none !important;
    display: none !important;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-tools-tabs__tab,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsTabMore.bb-reader-unified-tools-tabs__tab {
    padding: 0.42rem 0.5rem 0.38rem;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        display: grid !important;
        grid-template-columns: minmax(5.15rem, 0.78fr) minmax(0, 1.4fr) auto;
        grid-template-areas:
            "ask tools marks"
            "compare compare compare";
        justify-content: stretch;
        align-items: stretch;
        gap: 0.22rem;
        width: min(100%, calc(100vw - 0.5rem));
        max-width: calc(100vw - 0.5rem);
        margin-top: 0.12rem;
        margin-bottom: 0.52rem;
        padding: 0.3rem;
        overflow: visible;
        overscroll-behavior-inline: auto;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']::before {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']
        .passage-action-row__primary {
        grid-area: ask;
        grid-column: ask;
        grid-row: ask;
        width: 100%;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']
        .passage-action-row__secondary {
        grid-area: tools;
        grid-column: tools;
        grid-row: tools;
        width: 100%;
        min-width: 0;
        max-width: none;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(4.55rem, 1fr));
        width: 100%;
        gap: 0.18rem;
        max-width: 100%;
        min-width: 0;
        overflow: visible;
        overscroll-behavior-inline: auto;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']
        .passage-action-row__compare {
        grid-area: compare;
        grid-column: compare;
        grid-row: compare;
        width: 100%;
        min-width: 0;
        margin-left: 0;
        justify-content: stretch;
        justify-self: stretch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']
        .passage-action-marks {
        grid-area: marks;
        grid-column: marks;
        grid-row: marks;
        align-self: stretch;
        justify-content: flex-end;
        margin-left: 0;
        padding-top: 0;
        padding-left: 0.12rem;
        border-top: 0;
        border-left: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 74%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-marks
        > .passage-action-mark:not(#passageActionNotesBtn) {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary) {
        width: 100%;
        min-width: 0;
        min-height: 2.18rem;
        gap: 0.2rem;
        padding: 0.36rem 0.58rem;
        font-size: 0.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary)::before {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-mark {
        width: 2.18rem;
        min-width: 2.18rem;
        height: 2.18rem;
        min-height: 2.18rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-compare-picker,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .translations-toolbar__show-wrap {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .bb-passage-compare-picker__body {
        max-width: min(21rem, calc(100vw - 1.25rem));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-surface__head {
        padding: 0.5rem 0.5rem 0.56rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.18rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab {
        align-items: center;
        min-height: 2.72rem;
        padding: 0.38rem 0.28rem 0.34rem;
        text-align: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab::before {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsTabMore.bb-reader-unified-tools-tabs__tab {
        padding: 0.38rem 0.28rem 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-surface__panels {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel:not([hidden]) {
        flex: 1 1 auto;
        min-height: 0;
        height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overflow-anchor: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

@media (min-width: 390px) and (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        grid-template-columns: minmax(4.8rem, 0.68fr) minmax(9.4rem, 1.45fr) minmax(5.3rem, 0.78fr) auto;
        grid-template-areas: "ask tools compare marks";
        align-items: stretch;
    }
}

@media (max-width: 430px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        :is(.passage-action-row__ask, .passage-action-row__study--quiet, .bb-passage-compare-picker__summary) {
        min-height: 2.12rem;
        padding: 0.34rem 0.5rem;
        font-size: 0.78rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-mark {
        width: 2.12rem;
        min-width: 2.12rem;
        height: 2.12rem;
        min-height: 2.12rem;
    }
}

/* Cross-page handoffs: predictable action rows for Passage, Studies, Composer, Workbench, and Map exits. */
body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-actions--inline {
    margin-top: 0.42rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn,
body[data-bb-ui-redesign='passage-ui-v1'] a.bb-cross-page-action.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: 0.34rem 0.58rem;
    border-radius: 7px;
    box-shadow: none;
    font-size: 0.82rem;
    font-weight: 740;
    letter-spacing: 0;
    line-height: 1.14;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn-secondary {
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 86%, var(--bbp-accent, #2563eb) 14%);
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 86%, var(--bbp-control-bg, #f8fafc) 14%);
    color: var(--bbp-text-secondary, #475569);
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn-primary {
    font-weight: 780;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 38%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 28%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, var(--bbp-text-primary, #111827));
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 44%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'] [data-bb-send-state='queued'].btn {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 58%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 78%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'] [data-bb-send-state='queued'].bb-send-to-study-btn {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 64%, var(--bbp-panel-bg, #ffffff));
    color: var(--bbp-accent, #2563eb);
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action--quiet.btn {
    min-height: 2rem;
    border-color: transparent;
    background: transparent;
    color: var(--bbp-text-muted, #64748b);
    font-weight: 680;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action--quiet.btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action--quiet.btn:focus-visible {
    border-color: transparent;
    background: transparent;
    color: var(--bbp-accent, #2563eb);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__passage-link.bb-cross-page-action {
    margin-left: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-place-item__actions {
    margin-top: 0.5rem;
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-actions {
        gap: 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-actions--mobile-stack > .bb-cross-page-action,
    body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-actions--mobile-stack > .explore-place-detail__primary-wrap {
        flex: 1 1 9rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] .bb-cross-page-action.btn {
        min-height: 2.44rem;
        padding: 0.4rem 0.56rem;
        white-space: normal;
        text-wrap: balance;
    }
}

/* Passage + Studies: shared control language for toolbars, segmented controls, actions, and source bubbles. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions {
    gap: 0.32rem;
    padding: 0.34rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    border-radius: 10px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 82%, var(--bbp-control-bg, #f8fafc)) 0%, color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 88%, var(--bbp-panel-bg, #ffffff)) 100%);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 58%, transparent),
        0 8px 18px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 5%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__label,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions__title {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 2.02rem;
    margin: 0;
    padding: 0 0.42rem 0 0.28rem;
    border-right: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__buttons {
    gap: 0.22rem;
    border: 0;
    background: transparent;
    overflow: visible;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    min-height: 2.08rem;
    padding: 0.36rem 0.62rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 86%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button + .bb-studies-depth-control__button {
    border-left: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 86%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn::before {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 1.16rem;
    height: 1.16rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 84%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 90%, transparent);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.62rem;
    font-weight: 820;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenPassage::before {
    content: "P";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesSendComposer::before {
    content: "C";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenComposer::before {
    content: "D";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesFeedbackLink::before {
    content: "?";
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenPassage,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesSendComposer {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-accent-soft, #dbeafe)) 0%, color-mix(in srgb, var(--bbp-control-bg-strong, #ffffff) 88%, var(--bbp-accent-soft, #dbeafe)) 100%);
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, var(--bbp-text-primary, #111827));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] #bbStudiesOpenComposer {
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 92%, var(--bbp-text-muted, #64748b));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 90%, var(--bbp-control-bg, #f8fafc));
    color: var(--bbp-text-secondary, #475569);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn[aria-disabled='true'] {
    pointer-events: none;
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 86%, transparent);
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 88%, var(--bbp-panel-bg, #ffffff));
    color: var(--bbp-text-muted, #64748b);
    opacity: 0.62;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn[aria-disabled='true']::before {
    opacity: 0.72;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button:focus-visible,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn:focus-visible {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 34%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 70%, var(--bbp-text-primary, #111827));
    outline: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button[aria-pressed='true'] {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 44%, var(--bbp-panel-bg, #ffffff));
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 74%, var(--bbp-text-primary, #111827));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 60%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-help__summary {
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 88%, var(--bbp-control-bg, #f8fafc));
    box-shadow: none;
}

@media (min-width: 768px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper {
        grid-column: 2;
        justify-self: end;
        margin-top: -0.42rem;
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-runner__top {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-step-count,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper {
        grid-column: 1;
        justify-self: start;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control {
        margin-left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__helper {
        margin-top: -0.14rem;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item__sources-summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-study-context-bucket .bb-passage-context-study-sources__summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary {
    width: 1.34rem;
    height: 1.34rem;
    min-width: 1.34rem;
    min-height: 1.34rem;
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 38%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 70%, var(--bbp-accent-soft, #dbeafe) 30%);
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 820;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions {
        gap: 0.24rem;
        padding: 0.3rem;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control::-webkit-scrollbar,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions__title {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__label {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__buttons {
        flex: 1 1 auto;
        min-width: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-depth-control__button,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn {
        min-height: 2.18rem;
        padding: 0.36rem 0.58rem;
        font-size: 0.8rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn {
        flex: 1 0 auto;
        min-width: max-content;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-actions .btn::before {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary {
        width: 1.72rem;
        height: 1.72rem;
        min-width: 1.72rem;
        min-height: 1.72rem;
    }
}

@media (pointer: coarse), (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item {
        grid-template-columns: minmax(0, 1fr) 2.75rem;
        column-gap: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__header {
        gap: 0.36rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__heading {
        flex-basis: calc(100% - 3.1rem);
        padding-right: 0.2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item__sources-summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-context-study-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-study-context-bucket .bb-passage-context-study-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__sources .bb-passage-context-study-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        border-color: transparent;
        background: transparent;
        color: transparent;
        font-size: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item__sources,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__sources {
        justify-self: end;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-context-lens-item__sources-summary::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-context-study-sources__summary::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-study-context-bucket .bb-passage-context-study-sources__summary::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__sources .bb-passage-context-study-sources__summary::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-lang-sources__summary::before,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page="studies"] .bb-studies-context-bridge__sources-summary::before {
        content: "i";
        display: inline-grid;
        place-items: center;
        width: 1.42rem;
        height: 1.42rem;
        border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 38%, var(--bbp-border-subtle, #e2e8f0));
        border-radius: 999px;
        background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 70%, var(--bbp-accent-soft, #dbeafe) 30%);
        color: var(--bbp-accent, #2563eb);
        font-size: 0.74rem;
        font-weight: 820;
        line-height: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-section {
        padding-right: 3rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-study-context-bucket .bb-passage-context-study-sources.bb-disclosure,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__sources.bb-disclosure {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .timeline-ctx-sections__sources.bb-disclosure[open] {
        display: grid;
        align-items: start;
        justify-content: stretch;
        width: 100%;
        height: auto;
        min-width: 0;
        min-height: 0;
    }
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-text-search-retry[hidden] {
    display: none !important;
}

/* Passage unified-overlay content density: one calm rhythm across all tool tabs. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    .bb-reader-unified-tools-panel:not([hidden])
    > .bb-reader-unified-overlay-host__view {
    padding: 0.86rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    :is(
        .bb-study-workspace__chrome,
        .bb-cross-surface__head,
        .bb-timeline-surface__head,
        .bb-notes-surface__chrome,
        .bb-places-map-chrome
    ) {
    margin-bottom: 0.3rem;
    padding-bottom: 0.26rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    :is(p.loading-placeholder, p.empty-placeholder, .timeline-state, .places-state) {
    padding: 0.48rem 0.58rem;
    font-size: 0.82rem;
    line-height: 1.36;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewAsk
    .bb-verse-overlay-reader-ask__presets {
    margin-top: 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens {
    margin-bottom: 0.52rem;
    padding: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__header {
    gap: 0.1rem;
    margin-bottom: 0.42rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__intro {
    font-size: 0.74rem;
    line-height: 1.32;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__summary {
    gap: 0.24rem;
    margin-bottom: 0.46rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__summary-total,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__summary-chip {
    min-height: 1.42rem;
    padding: 0.12rem 0.36rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens__grid {
    gap: 0.42rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens-group__title {
    margin-bottom: 0.24rem;
    font-size: 0.68rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens-group__list {
    gap: 0.26rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-context-lens-item {
    gap: 0.34rem;
    padding: 0.36rem 0.42rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .timeline-ctx-sections {
    margin: 0.48rem 0 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .timeline-ctx-section {
    margin-bottom: 0.42rem;
    padding: 0.42rem 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-dictionary-source-switch {
    min-height: 2.4rem;
    margin: 0.08rem 0 0.4rem;
    padding: 0.18rem;
    gap: 0.22rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-dictionary-source-switch__btn {
    min-height: 2.05rem;
    padding: 0.34rem 0.62rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome {
    gap: 0.38rem;
    margin: 0.04rem 0 0.42rem;
    padding: 0.42rem 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create {
    gap: 0.38rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create-input,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .btn {
    min-height: 2.16rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item {
    padding: 0.26rem 0.34rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item
    .cross-ref-why {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0;
    font-size: 0.76rem;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu {
    gap: 0.38rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu__button,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-more-menu
    .bb-send-to-study-btn.bb-reader-unified-more-menu__button {
    min-height: 2.62rem;
    padding: 0.48rem 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewNotes
    .note-actions {
    gap: 0.34rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewNotes
    .bb-note-actions__send-cue {
    margin: 0;
    font-size: 0.73rem;
    line-height: 1.28;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewMaps
    #placesList
    .place-item {
    padding: 0.42rem 0.5rem;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsSurface
        .bb-reader-unified-tools-panel:not([hidden])
        > .bb-reader-unified-overlay-host__view {
        padding: 0.6rem 0.7rem calc(0.84rem + var(--bbp-mobile-sheet-pad));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-context-lens {
        padding: 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-more-menu__button,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-more-menu
        .bb-send-to-study-btn.bb-reader-unified-more-menu__button {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr {
        margin-bottom: 0.46rem;
        padding: 0.36rem 0.44rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr.token-row--word-study-anchor {
        background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 52%, var(--bbp-panel-bg, #ffffff));
        box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bbp-accent, #2563eb) 72%, transparent);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr.token-row--word-study-anchor
        td {
        background: transparent;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        td {
        inline-size: 100% !important;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        #bbReaderUnifiedOverlayViewOl
        :is(.token-table, .interlinear-table)
        tr.token-row--word-study-anchor
        td:first-child {
        box-shadow: none;
    }
}

@media (max-width: 430px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__tab {
        overflow: hidden;
        padding-inline: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-tools-tabs__label {
        width: 100%;
        font-size: 0.7rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsTabCross
        .bb-reader-unified-tools-tabs__label {
        font-size: 0.66rem;
    }
}

/* Passage unified-overlay content polish: consistent states, rows, handoffs, and source affordances. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    :is(.empty-placeholder, .loading-placeholder, .timeline-state, .places-state) {
    box-sizing: border-box;
    margin: 0.24rem 0;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 78%, transparent);
    border-left: 3px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 42%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 72%, var(--bbp-panel-bg, #ffffff));
    color: var(--bbp-text-secondary, #475569);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    :is(.empty-placeholder[role='alert'], .timeline-state--error, .places-state--error) {
    border-color: color-mix(in srgb, #b91c1c 30%, var(--bbp-border-subtle, #e2e8f0));
    border-left-color: #b91c1c;
    background: color-mix(in srgb, #fee2e2 36%, var(--bbp-panel-bg, #ffffff));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    .loading-placeholder {
    border-left-color: color-mix(in srgb, var(--bbp-text-muted, #64748b) 55%, var(--bbp-border-subtle, #e2e8f0));
    font-style: normal;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsSurface
    .bb-study-workspace__title {
    color: var(--bbp-text-primary, #111827);
    font-size: 0.88rem;
    font-weight: 780;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-result-badge-row {
    margin: 0 0 -0.12rem;
    min-height: 1.36rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-result-badge--sourced {
    justify-content: center;
    width: 1.34rem;
    height: 1.34rem;
    min-width: 1.34rem;
    min-height: 1.34rem;
    padding: 0;
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 38%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 70%, var(--bbp-accent-soft, #dbeafe) 30%);
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card {
    padding: 0.62rem 0.72rem;
    border-radius: 8px;
    border-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 88%, transparent);
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 86%, var(--bbp-control-bg, #f8fafc));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--bb-color-shadow, #0f172a) 4%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card + .bb-reference-entry-card {
    margin-top: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__body {
    gap: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__header {
    align-items: center;
    gap: 0.55rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__title {
    font-size: 0.96rem;
    line-height: 1.26;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__send {
    min-height: 2rem;
    padding: 0.34rem 0.56rem;
    border-radius: 7px;
    font-size: 0.78rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__section {
    gap: 0.24rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__copy,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-ref-prose {
    font-size: 0.9rem;
    line-height: 1.5;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__footer {
    align-items: center;
    gap: 0.28rem 0.52rem;
    margin-top: 0.02rem;
    padding-top: 0.42rem;
    font-size: 0.74rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reference-entry-card__footer-item {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item {
    border: 1px solid transparent;
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item:hover,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item:focus-within {
    border-color: color-mix(in srgb, var(--bbp-accent, #2563eb) 18%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 26%, var(--bbp-panel-bg, #ffffff));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewReferences:not([hidden])
    .bb-wb-xref-item
    .bb-send-to-study-btn {
    width: auto;
    max-width: 2.5rem;
    min-width: 0;
    min-height: 1.85rem;
    padding-inline: 0.34rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 28%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 82%, var(--bbp-accent-soft, #dbeafe));
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedToolsPanelLookup
    .bb-cross-surface__chrome
    .collection-create-input {
    width: 100%;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-compare-picker {
    margin-bottom: 0.56rem;
    padding: 0.5rem 0.58rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 72%, var(--bbp-panel-bg, #ffffff));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .bb-reader-unified-compare__list
    .translation-block {
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewNotes
    .note-actions
    :is(.btn-note, .bb-send-to-study-btn) {
    min-height: 2.18rem;
    border-radius: 7px;
    font-size: 0.84rem;
    font-weight: 720;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewNotes
    .bb-note-actions__send-cue {
    flex: 0 1 auto;
    align-self: center;
    max-width: min(100%, 22rem);
    padding: 0.18rem 0.44rem;
    border: 1px solid color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-control-bg, #f8fafc) 78%, transparent);
    font-size: 0.72rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewMaps
    :is(.places-panel-intro, .places-map-banner) {
    margin: 0 0 0.42rem;
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewMaps
    .place-item--sf
    .place-item-head__actions {
    gap: 0.32rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewMaps
    .place-item--sf
    :is(.place-focus-map-btn, .place-explore-map-handoff--secondary) {
    min-height: 2rem;
    padding: 0.3rem 0.54rem;
    border-radius: 7px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    #bbReaderUnifiedOverlayViewOl
    :is(.original-language-pair-hint, .source-tokens-toolbar__status, #sourceTokenNote) {
    font-size: 0.74rem;
    line-height: 1.32;
}

@media (max-width: 640px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reference-entry-card__header {
        align-items: stretch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsPanelLookup
        .bb-cross-surface__chrome
        .collection-create {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedToolsPanelLookup
        .bb-cross-surface__chrome
        .collection-create
        .btn {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbReaderUnifiedOverlayViewNotes
        .bb-note-actions__send-cue {
        width: 100%;
        border-radius: 8px;
    }
}

/* Mobile first-viewport polish: reduce chrome before the primary workflow without moving tool ownership. */
@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-nav .bb-passage-ref-first-run-hint {
        position: absolute;
        width: 1px;
        max-width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow.passage-action-row[data-bb-toolbar-scope='passage']:not([hidden]) {
        max-width: calc(100vw - 0.75rem);
        margin-bottom: 0.42rem;
        padding-inline: 0.32rem;
        scroll-padding-inline: 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__secondary {
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        #bbPassageStudyActionRow[data-bb-toolbar-scope='passage']
        .passage-action-row__core {
        padding-inline-end: 0.28rem;
        scroll-padding-inline: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-nav-chapter-wrap__viewport {
        max-width: 100%;
        contain: inline-size;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-nav-chapter-strip {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-nav-chapter-strip::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.16rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs__tab {
        min-height: 2.65rem;
        padding: 0.28rem 0.14rem;
        font-size: 0.67rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-panel:not([hidden]) {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-page.bb-study-page--workspace.container {
        padding-top: 0.55rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero--compact {
        gap: 0.42rem;
        margin-bottom: 0.48rem;
        padding-bottom: 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__lead {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
        margin-top: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__passage-link,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__actions .btn {
        min-height: 2.25rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__source-rail {
        justify-self: start;
        width: auto;
        max-width: 100%;
        padding: 0.08rem 0.12rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__source-details[open] {
        width: 100%;
        padding: 0.4rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-hero__source-summary {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-composition-primary {
        padding: 0.72rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-compose-toolbar {
        gap: 0.42rem;
        margin-top: 0.54rem;
        padding: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-compose-toolbar__actions {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-compose-build-details {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-compose-build-details__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] #bbStudyCopyDraftBtn {
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-composition-primary__head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem;
        margin-bottom: 0.52rem;
        padding-bottom: 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-composition-primary__status-stack {
        align-items: flex-end;
        width: auto;
        min-height: 1.35rem;
        padding: 0;
        text-align: right;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-queue-contract {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.08rem;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-queue-contract::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-gather-queue__controls,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-draft-gathered__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
        width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-gather-queue__controls .bb-study-gather-attach,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-draft-gathered__actions .bb-study-draft-gathered-insert {
        margin-right: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-gather-queue__controls > .btn-sm,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-draft-gathered__actions > .btn-sm {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-gather-queue__controls .bb-study-row-more,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-draft-gathered__actions .bb-study-row-more {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-draft-gathered__actions .bb-study-draft-gathered-insert {
        grid-column: 1 / -1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-row-more__summary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] :is(
        #bbStudyCopyDraftBtn,
        .bb-study-compose-toolbar__actions .btn-sm,
        .bb-study-gather-queue__controls .btn-sm,
        .bb-study-draft-gathered__actions .btn-sm,
        .bb-study-row-more__summary
    ) {
        min-height: 2.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-hero {
        padding: 0.45rem 0 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-hero > .container {
        gap: 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-hero__source-rail {
        justify-self: start;
        width: auto;
        max-width: 100%;
        padding: 0.08rem 0.12rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-hero__source-details[open] {
        width: 100%;
        padding: 0.4rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-hero__source-summary {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-tools-secondary {
        padding: 0.44rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-tool-row--workbench {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-tool-row--workbench .bb-wb-tool-btn {
        min-height: 2.75rem;
        padding: 0.32rem 0.25rem;
        font-size: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-page.container {
        padding-top: 0.36rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-hero {
        gap: 0.26rem;
        margin-bottom: 0.38rem;
        padding-bottom: 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-hero__source-summary {
        min-height: 2.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog {
        padding: 0.54rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-panel-head {
        margin-bottom: 0.38rem;
        padding-bottom: 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog__jump-wrap {
        margin-bottom: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-filter {
        gap: 0.22rem;
        margin-bottom: 0.46rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-filter__status {
        min-height: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-explore {
        margin-top: 0.08rem;
        padding: 0.28rem 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-list {
        max-height: min(25vh, 11rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-section {
        padding-top: 0.7rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero {
        gap: 0.32rem;
        margin-bottom: 0.42rem;
        padding-bottom: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help {
        margin-top: 0.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help > .bb-disclosure__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help > .bb-disclosure__summary {
        min-height: 2.25rem;
        padding: 0.34rem 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero__source-rail {
        padding: 0.08rem 0.12rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero__source-details[open] {
        padding: 0.4rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero__source-summary {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 0.28rem;
        margin-bottom: 0.4rem;
        padding: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-mode-row,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-input,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-browse-pool-hint,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-view {
        grid-column: 1 / -1;
        min-width: 0;
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-toggle {
        min-height: 2.35rem;
        padding: 0.32rem 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-browse-pool-hint {
        font-size: 0.78rem;
        line-height: 1.32;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help {
        justify-self: start;
        width: auto;
        margin: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-quick-searches {
        max-width: 100%;
        min-width: 0;
        contain: paint;
    }
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-title {
        font-size: 1.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help > .bb-disclosure__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help > .bb-disclosure__summary {
        min-height: 2.1rem;
        padding: 0.26rem 0.42rem;
        font-size: 0.74rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-toolbar {
        gap: 0.24rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-mode-btn {
        min-height: 2.32rem;
        padding: 0.3rem 0.42rem;
        font-size: 0.8rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-input {
        min-height: 2.4rem;
        padding-block: 0.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-browse-pool-hint,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-summary {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-view {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-view::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-journey-toolbar {
        grid-template-columns: 1fr;
        gap: 0.26rem;
        margin-bottom: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-journey-toolbar .explore-map-filter-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-journey-meta {
        max-height: 3rem;
        overflow-y: auto;
        font-size: 0.72rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-profile-filters {
        margin-bottom: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-profile-filters__subtitle,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-detail__subheading {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-list-status {
        margin-bottom: 0.34rem;
        padding: 0.32rem 0.42rem;
        font-size: 0.78rem;
        line-height: 1.32;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-list {
        max-height: min(34vh, 15rem);
        min-height: 8rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-list:empty {
        min-height: 4.25rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-canvas {
        min-height: min(36vh, 16rem);
        overflow: hidden;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-canvas--pending {
        min-height: min(26vh, 11.5rem);
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-detail {
        margin-top: 0.72rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-detail__header {
        gap: 0.36rem;
        margin-bottom: 0.48rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-detail__close {
        min-height: 2.35rem;
        padding: 0.3rem 0.58rem;
    }
}

@media (max-width: 900px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-toolbar > .explore-map-filter-input {
        grid-column: 1 / 2;
        grid-row: 2;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help {
        grid-column: 2 / 3;
        grid-row: 2;
        justify-self: end;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-quick-searches {
        grid-row: 3;
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 0.06rem;
        contain: none;
        scrollbar-width: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-quick-searches::-webkit-scrollbar {
        display: initial;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-quick-searches > * {
        flex: 0 1 auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] #exploreMapExtendedCatalogLayer {
        grid-column: 1 / 2;
        grid-row: 4;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] #exploreMapCurrentViewLayer {
        grid-column: 2 / 3;
        grid-row: 4;
    }
}

@media (max-width: 520px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero__source-rail {
        align-self: end;
        justify-self: end;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-hero__source-details[open] {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help {
        display: inline-block;
        width: auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help.bb-disclosure {
        max-width: max-content;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help-summary-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help > .bb-disclosure__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help > .bb-disclosure__summary {
        justify-content: center;
        width: 2.35rem;
        min-width: 2.35rem;
        padding-inline: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-chip--quick {
        min-height: 2.28rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-layer-toggle {
        padding-inline: 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-journey-meta {
        max-height: none;
        overflow: visible;
        font-size: 0.74rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-journey-meta__details summary {
        min-height: 2.1rem;
    }
}

@media (max-width: 380px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-quick-searches__label {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-chip--quick {
        padding-inline: 0.48rem;
        font-size: 0.76rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='workbench'] .bb-wb-tool-row--workbench {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 390px) and (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'].bb-verse-study-overlay-open
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .bb-reader-unified-overlay-host.bb-reader-unified-overlay-host--mobile-bottom-sheet[data-bb-unified-overlay-state='open']
        .bb-reader-unified-tools-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .navbar .bb-nav-passage-toolbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .navbar .bb-passage-text-search-open-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        min-width: 2.25rem;
        height: 2.25rem;
        min-height: 2.25rem;
        padding: 0;
    }
}

/* Studies readability: keep provenance present while moving secondary detail behind compact controls. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary {
    display: inline-flex;
    max-width: 100%;
    margin-top: 0.36rem;
    padding: 0;
    border: 0;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details {
    max-width: min(24rem, 100%);
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 24%, var(--bbp-border-subtle));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-accent-soft) 12%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem;
    min-height: 2.75rem;
    padding: 0.22rem 0.38rem 0.22rem 0.48rem;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__label {
    color: var(--bbp-text-secondary);
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__cue {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    min-height: 1.38rem;
    padding: 0.08rem 0.36rem 0.08rem 0.16rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: var(--bbp-control-bg);
    color: var(--bbp-text-secondary);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.15;
    white-space: nowrap;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__cue::before {
    content: "i";
    display: inline-grid;
    place-items: center;
    width: 1.05rem;
    height: 1.05rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent) 34%, var(--bbp-border-subtle));
    border-radius: 999px;
    color: var(--bbp-accent);
    font-size: 0.68rem;
    font-weight: 820;
    line-height: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details[open] .bb-studies-source-summary__summary {
    border-bottom: 1px solid var(--bbp-border-subtle);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details[open] {
    border-radius: 8px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.45rem 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-section-help {
    margin: 0 0 0.5rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-section-help__summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.18rem 0.5rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 80%, var(--bbp-control-bg));
    color: var(--bbp-text-muted);
    font-size: 0.76rem;
    font-weight: 740;
    line-height: 1.15;
    cursor: pointer;
    list-style: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-section-help__summary::-webkit-details-marker {
    display: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-section-help__body {
    margin-top: 0.38rem;
    padding: 0.48rem 0.58rem;
    border: 1px solid var(--bbp-border-subtle);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bbp-panel-bg) 72%, var(--bbp-control-bg));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-help__summary {
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control {
    background: color-mix(in srgb, var(--bbp-panel-bg) 86%, var(--bbp-control-bg) 14%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__label {
    color: var(--bbp-text-muted);
    font-size: 0.68rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step-count {
    border-color: transparent;
    background: transparent;
    color: var(--bbp-text-muted);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-context-bridge {
    padding: 0.54rem 0.6rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-context-bridge__summary {
    color: var(--bbp-text-secondary);
    font-size: 0.82rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-card__desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step {
    position: relative;
    padding: clamp(0.9rem, 2vw, 1.08rem);
    border-left: 4px solid color-mix(in srgb, var(--bbp-accent) 64%, var(--bbp-border-subtle));
    background: var(--bbp-panel-bg);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__title {
    max-width: 58rem;
    color: var(--bb-color-text-primary);
    font-size: clamp(1.22rem, 2.2vw, 1.42rem);
    line-height: 1.22;
    text-align: left;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__section {
    min-height: 0;
    margin-bottom: 0.3rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bbp-accent);
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__anchor {
    margin-top: 0.42rem;
    padding: 0.12rem 0.44rem;
    border-radius: 999px;
    color: var(--bbp-text-muted);
    font-size: 0.78rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt {
    max-width: 58rem;
    margin-top: 0.66rem;
    color: var(--bb-color-text-primary);
    font-size: 1.04rem;
    line-height: 1.6;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt > :first-child {
    margin-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt > :last-child {
    margin-bottom: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source {
    gap: 0.44rem;
    margin-top: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block {
    border-color: color-mix(in srgb, var(--bbp-border-subtle) 82%, var(--bbp-text-muted) 18%);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
    padding: 0.62rem 0.68rem;
    background: color-mix(in srgb, var(--bbp-panel-bg) 88%, var(--bbp-control-bg) 12%);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__title {
    margin-bottom: 0.34rem;
    color: var(--bbp-text-secondary);
    font-size: 0.74rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__label {
    margin-bottom: 0.22rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse {
    grid-template-columns: 2.45rem minmax(0, 1fr);
    gap: 0.44rem;
    font-size: 1rem;
    line-height: 1.56;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse-num {
    line-height: 1.56;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances {
    margin-top: 0.12rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__section {
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__section + .bb-studies-scaffold__section {
    margin-top: 0.58rem;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-hero__lead {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-hero__source-label {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-hero__source-summary {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-shell {
        display: flex;
        flex-direction: column;
        gap: 0.72rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner {
        order: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog {
        order: 2;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'][data-bb-studies-mobile-target='catalog'] .bb-studies-catalog,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies']:has(#bb-studies-catalog:target) .bb-studies-catalog {
        order: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'][data-bb-studies-mobile-target='catalog'] .bb-studies-runner,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies']:has(#bb-studies-catalog:target) .bb-studies-runner {
        order: 2;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary {
        flex-wrap: initial;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details {
        max-width: 100%;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__panel {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__panel::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__chip {
        flex: 0 0 auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog-card__desc {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-context-bridge {
        gap: 0.42rem;
        padding: 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control {
        gap: 0.22rem;
        padding: 0.12rem;
        border-radius: 8px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__button {
        min-height: 2.42rem;
        padding: 0.32rem 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step {
        margin-top: 0.54rem;
        padding: 0.72rem 0.68rem;
        border-left-width: 3px;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__section {
        margin-bottom: 0.24rem;
        font-size: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__title {
        font-size: 1.15rem;
        line-height: 1.24;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__anchor {
        margin-top: 0.34rem;
        font-size: 0.76rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt {
        margin-top: 0.56rem;
        font-size: 0.99rem;
        line-height: 1.56;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source {
        gap: 0.36rem;
        margin-top: 0.5rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
        padding: 0.52rem 0.56rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__title {
        margin-bottom: 0.3rem;
        font-size: 0.7rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verses {
        gap: 0.32rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse {
        grid-template-columns: 2.55rem minmax(0, 1fr);
        gap: 0.42rem;
        font-size: 0.96rem;
        line-height: 1.5;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances {
        display: grid;
        gap: 0.28rem;
        padding: 0.38rem 0.42rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances__heading {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances .bb-studies-source__refs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances .bb-studies-source__refs::-webkit-scrollbar {
        display: none;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__refs a {
        flex: 0 0 auto;
        min-height: 2.4rem;
        white-space: nowrap;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__section {
        padding: 0.62rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__title {
        margin-bottom: 0.36rem;
        font-size: 0.68rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-context-list__item {
        padding: 0.48rem 0.56rem 0.52rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-enrichment-notice__summary {
        min-height: 2.75rem;
    }
}

/* Studies active-step flow: scripture and task content lead; source/depth chrome stays secondary. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner__top {
    gap: 0.46rem 0.72rem;
    padding-bottom: 0.58rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary {
    margin-top: 0.28rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details {
    border-color: color-mix(in srgb, var(--bbp-border-subtle) 88%, var(--bbp-accent));
    background: color-mix(in srgb, var(--bbp-panel-bg) 92%, var(--bbp-control-bg) 8%);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__summary {
    min-height: 2.42rem;
    padding: 0.18rem 0.3rem 0.18rem 0.4rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__label {
    color: var(--bbp-text-muted);
    font-size: 0.7rem;
    font-weight: 740;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__cue {
    min-height: 1.26rem;
    padding-right: 0.28rem;
    font-size: 0.68rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__cue::before {
    width: 0.98rem;
    height: 0.98rem;
    font-size: 0.62rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control {
    gap: 0.3rem;
    padding: 0.22rem 0.26rem;
    border-color: color-mix(in srgb, var(--bbp-border-subtle) 88%, var(--bbp-text-muted));
    background: color-mix(in srgb, var(--bbp-panel-bg) 92%, var(--bbp-control-bg) 8%);
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__label {
    font-size: 0.64rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__button {
    min-height: 2.08rem;
    padding: 0.28rem 0.56rem;
    font-size: 0.8rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-help__summary {
    width: 2.36rem;
    min-width: 2.36rem;
    height: 2.36rem;
    min-height: 2.36rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step-count {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.76rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step {
    margin-top: 0.64rem;
    border-left-width: 3px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__section {
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__anchor {
    margin-top: 0.34rem;
    border-color: transparent;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
    border-left: 3px solid color-mix(in srgb, var(--bbp-accent) 42%, var(--bbp-border-subtle));
    background: color-mix(in srgb, var(--bbp-panel-bg) 92%, var(--bbp-control-bg) 8%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances {
    margin-top: 0.46rem;
    padding: 0.16rem 0 0;
    border: 0;
    background: transparent;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances__heading {
    color: var(--bbp-text-muted);
    font-size: 0.64rem;
    letter-spacing: 0.04em;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances .bb-studies-source__refs a {
    min-height: 1.9rem;
    background: color-mix(in srgb, var(--bbp-panel-bg) 90%, var(--bbp-control-bg) 10%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__section--observe {
    border-left-width: 3px;
    background: var(--bbp-panel-bg);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-scaffold__section:not(.bb-studies-scaffold__section--observe) {
    background: color-mix(in srgb, var(--bbp-panel-bg) 82%, var(--bbp-control-bg) 18%);
}

@media (min-width: 768px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner__top {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control {
        grid-column: 2;
        grid-row: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__helper {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
        justify-self: end;
        margin-top: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step-count {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        margin-top: -0.18rem;
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-shell {
        display: flex;
        flex-direction: column;
        gap: 0.82rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner {
        order: 1;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-catalog {
        position: static;
        order: 2;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner {
        padding: 0.58rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner__top {
        gap: 0.28rem;
        padding-bottom: 0.34rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-runner__catalog-wrap {
        margin-top: 0.14rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary {
        margin-top: 0.18rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__summary {
        min-height: 2.2rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control {
        width: 100%;
        gap: 0.16rem;
        padding: 0.16rem;
        overflow: visible;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control__button {
        min-height: 2.22rem;
        padding: 0.3rem 0.34rem;
        font-size: 0.76rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step-count {
        font-size: 0.72rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step {
        margin-top: 0.38rem;
        padding: 0.64rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__anchor {
        padding-left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
        padding: 0.52rem 0.56rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-tool-affordances {
        margin-top: 0.34rem;
        padding-top: 0;
    }
}

/* Passage + Studies reading surface typography: keep scripture primary and controls secondary. */
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations.study-panel {
    padding-top: 0.16rem;
    border-top-color: color-mix(in srgb, var(--bbp-border-subtle, #e2e8f0) 56%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .translation-block {
    margin-bottom: 0.72rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    max-width: 64ch;
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
    font-size: 1.08rem;
    line-height: 1.7;
    letter-spacing: 0;
}

html[data-bb-reader-font='clean']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[data-bb-reader-font='classic']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
}

html[data-bb-reader-font='literary']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-family: Baskerville, 'Baskerville Old Face', Garamond, 'Times New Roman', serif;
}

html[data-bb-reader-text-size='compact']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-size: 0.98rem;
    line-height: 1.62;
}

html[data-bb-reader-text-size='comfortable']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-size: 1.08rem;
    line-height: 1.7;
}

html[data-bb-reader-text-size='large']
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    :is(.translation-text, .translation-text--passage-prose) {
    font-size: 1.2rem;
    line-height: 1.74;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .verse-block {
    margin-top: 0.16em;
    padding: 0.03rem 0.16rem 0.03rem 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .verse-block:first-child {
    margin-top: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .verse-num {
    position: relative;
    top: -0.06em;
    display: inline-block;
    min-width: 2.12rem;
    margin-right: 0.44rem;
    color: color-mix(in srgb, var(--bbp-text-muted, #64748b) 76%, transparent);
    font-family: var(--font-sans, Inter, 'Segoe UI', system-ui, -apple-system, sans-serif);
    font-size: 0.64em;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    line-height: 1;
    text-align: right;
    vertical-align: baseline;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .translation-text
    .verse-block--active-passage {
    margin-left: 0;
    padding-left: 0;
    background-color: transparent;
    border-radius: 0.22rem;
    box-shadow: none;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .verse-block.verse-selected-for-note {
    margin-left: -0.5rem;
    margin-right: -0.12rem;
    padding: 0.2rem 0.34rem 0.22rem 0.5rem;
    background: color-mix(in srgb, var(--bbp-accent-soft, #dbeafe) 34%, var(--bbp-panel-bg, #ffffff) 66%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent, #2563eb) 14%, transparent),
        inset 3px 0 0 0 color-mix(in srgb, var(--bbp-accent, #2563eb) 54%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
    .passage-main[data-bb-reading-surface='scripture-first-v1']
    .passage-results
    .result-translations
    .verse-block.verse-selected-for-note
    .verse-num {
    color: color-mix(in srgb, var(--bbp-accent, #2563eb) 68%, var(--bbp-text-secondary, #475569));
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step {
    border-left-width: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__title {
    max-width: 56rem;
    font-size: 1.3rem;
    line-height: 1.24;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt {
    max-width: 56rem;
    font-size: 1.03rem;
    line-height: 1.62;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-control,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source-summary__details {
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 96%, var(--bbp-control-bg, #f8fafc) 4%);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
    padding: 0.82rem 0.9rem;
    border-left-width: 2px;
    background: var(--bbp-panel-bg, #ffffff);
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__title-row {
    margin-bottom: 0.38rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__title {
    margin-bottom: 0.28rem;
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.7rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__label {
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.74rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__text,
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse-text {
    font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
    font-size: 1.08rem;
    line-height: 1.72;
    letter-spacing: 0;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verses {
    gap: 0.46rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse {
    grid-template-columns: 2.58rem minmax(0, 1fr);
    gap: 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse-num {
    color: color-mix(in srgb, var(--bbp-text-muted, #64748b) 78%, transparent);
    font-size: 0.78rem;
    line-height: 1.8;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__red-letter .bb-red-letter-toggle {
    min-height: 2.16rem;
    padding: 0.28rem 0.62rem;
    color: var(--bbp-text-secondary, #475569);
    font-size: 0.78rem;
    box-shadow: none;
}

@media (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        :is(.translation-text, .translation-text--passage-prose) {
        font-size: 1.04rem;
        line-height: 1.66;
    }

    html[data-bb-reader-text-size='compact']
        body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        :is(.translation-text, .translation-text--passage-prose) {
        font-size: 0.98rem;
        line-height: 1.58;
    }

    html[data-bb-reader-text-size='comfortable']
        body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        :is(.translation-text, .translation-text--passage-prose) {
        font-size: 1.04rem;
        line-height: 1.66;
    }

    html[data-bb-reader-text-size='large']
        body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        :is(.translation-text, .translation-text--passage-prose) {
        font-size: 1.14rem;
        line-height: 1.72;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-block {
        margin-top: 0.14em;
        padding-block: 0.03rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-num {
        min-width: 1.72rem;
        margin-right: 0.34rem;
        font-size: 0.62em;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .translation-text
        .verse-block--active-passage {
        margin-left: 0;
        padding-left: 0;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage']
        .passage-main[data-bb-reading-surface='scripture-first-v1']
        .passage-results
        .result-translations
        .verse-block.verse-selected-for-note {
        margin-left: -0.36rem;
        padding-left: 0.36rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__title {
        font-size: 1.16rem;
        line-height: 1.26;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-step__prompt {
        font-size: 0.98rem;
        line-height: 1.58;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__block--scripture {
        padding: 0.64rem 0.66rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__text,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse-text {
        font-size: 1.04rem;
        line-height: 1.68;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse {
        grid-template-columns: 2.34rem minmax(0, 1fr);
        gap: 0.38rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__verse-num {
        font-size: 0.74rem;
        line-height: 1.78;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-source__red-letter .bb-red-letter-toggle {
        min-height: 2.3rem;
    }
}

/* Shared controls consistency: interactive chips, help affordances, source bubbles, and disabled states. */
body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .bb-passage-text-search-chip,
    .bb-studies-catalog-explore__chip,
    .explore-map-chip
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    padding: 0.26rem 0.58rem;
    border-radius: 999px;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .bb-passage-text-search-chip[aria-pressed='true'],
    .bb-passage-text-search-chip--active,
    .bb-studies-catalog-explore__chip[aria-pressed='true'],
    .explore-map-chip--active
) {
    border-color: var(--bbp-accent, var(--primary-color));
    background: var(--bbp-accent-soft, rgba(59, 130, 246, 0.14));
    color: var(--bbp-accent, var(--primary-color));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbp-accent, #2563eb) 28%, transparent);
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .bb-passage-text-search-chip,
    .bb-studies-catalog-explore__chip,
    .explore-map-chip,
    .bb-studies-depth-control__button,
    .bb-wb-tool-btn,
    .bb-dictionary-source-switch__btn,
    .bb-disclosure--help > .bb-disclosure__summary
):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bbp-accent, var(--primary-color)) 58%, transparent);
    outline-offset: 2px;
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .btn:disabled,
    .btn[aria-disabled='true'],
    .bb-studies-depth-control__button:disabled,
    .bb-studies-depth-control__button[aria-disabled='true'],
    .bb-dictionary-source-switch__btn:disabled,
    .bb-dictionary-source-switch__btn[aria-disabled='true'],
    .explore-map-chip:disabled,
    .explore-map-chip[aria-disabled='true']
) {
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.58;
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .bb-wb-source-info,
    .bb-study-hero__source-info,
    .bb-studies-hero__source-info,
    .explore-map-source-info
) {
    display: inline-grid;
    place-items: center;
    width: 1.12rem;
    height: 1.12rem;
    min-width: 1.12rem;
    min-height: 1.12rem;
    border: 1px solid color-mix(in srgb, var(--bbp-accent, #2563eb) 34%, var(--bbp-border-subtle, #e2e8f0));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 76%, var(--bbp-accent-soft, #dbeafe) 24%);
    color: var(--bbp-accent, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

@media (pointer: coarse), (max-width: 767px) {
    body[data-bb-ui-redesign='passage-ui-v1']:not([data-bb-page='passage']) .btn-sm {
        min-height: 2.44rem;
        padding: 0.38rem 0.64rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'] :is(
        .bb-passage-text-search-chip,
        .bb-studies-catalog-explore__chip,
        .explore-map-chip,
        .bb-studies-depth-control__button,
        .bb-wb-tool-btn,
        .bb-dictionary-source-switch__btn,
        .bb-disclosure--help > .bb-disclosure__summary
    ) {
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='studies'] .bb-studies-depth-help__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-help > .bb-disclosure__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-filter-help > .bb-disclosure__summary,
    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-place-detail-help > .bb-disclosure__summary {
        width: 2.75rem;
        min-width: 2.75rem;
        height: 2.75rem;
        min-height: 2.75rem;
    }

    body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='study'] .bb-study-section--inbox .bb-study-inbox-context-details .bb-disclosure__summary {
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 2.75rem;
    }
}

/* Shared state polish: concise loading, empty, unavailable, and error messages across primary surfaces. */
body[data-bb-ui-redesign='passage-ui-v1'] :is(
    p.loading-placeholder,
    p.empty-placeholder,
    .timeline-state,
    .bb-wb-placeholder,
    .bb-study-maps-state,
    .bb-study-ctx-state,
    .bb-study-coll__empty,
    .bb-study-coll__loading,
    .bb-study-gather-queue__empty,
    .bb-study-shelf-card__loading,
    .bb-study-shelf-card__load-err,
    .bb-studies-catalog-list__item--empty,
    .bb-studies-status:not([hidden]),
    .explore-place-detail__inline-status
) {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0.58rem 0.66rem;
    border: 1px solid var(--bbp-border-subtle, #e2e8f0);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 76%, var(--bbp-control-bg, #f8fafc) 24%);
    color: var(--bbp-text-secondary, #475569);
    font-size: 0.88rem;
    line-height: 1.42;
    text-align: left;
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    p.loading-placeholder,
    .timeline-state--loading,
    .bb-wb-placeholder--loading,
    .bb-study-coll__loading,
    .bb-study-shelf-card__loading,
    .bb-study-maps-state--loading,
    .bb-study-ctx-state--loading,
    .bb-studies-catalog-list[data-state='loading'] .bb-studies-catalog-list__item--empty
) {
    border-style: dashed;
    color: var(--bbp-text-muted, #64748b);
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .bb-study-maps-state--unavailable,
    .bb-study-ctx-state--unavailable,
    .bb-studies-catalog-list[data-state='unavailable'] .bb-studies-catalog-list__item--empty
) {
    border-color: color-mix(in srgb, var(--bbp-warn, #b45309) 32%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 82%, #fef3c7 18%);
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    p.empty-placeholder[role='alert'],
    .timeline-state--error,
    .bb-study-shelf-card__load-err,
    .bb-study-maps-state--error,
    .bb-study-ctx-state--error,
    .explore-map-error:not([hidden]),
    .explore-place-detail__inline-status--error
) {
    border-color: color-mix(in srgb, var(--danger-color, #b91c1c) 34%, var(--bbp-border-subtle, #e2e8f0));
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 82%, #fee2e2 18%);
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .timeline-state-title,
    .bb-study-maps-state__title,
    .bb-study-ctx-state__title
) {
    margin: 0;
    color: var(--bbp-text-primary, #0f172a);
    font-weight: 760;
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .timeline-state-detail,
    .bb-study-maps-state__detail,
    .bb-study-ctx-state__detail
) {
    margin-top: 0.16rem;
    color: var(--bbp-text-muted, #64748b);
}

body[data-bb-ui-redesign='passage-ui-v1'] :is(
    .timeline-state--error .timeline-state-title,
    .bb-study-maps-state--error .bb-study-maps-state__title,
    .bb-study-ctx-state--error .bb-study-ctx-state__title
) {
    color: var(--danger-color, #b91c1c);
}

body[data-bb-ui-redesign='passage-ui-v1'] .timeline-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    margin-top: 0.48rem;
    padding: 0.24rem 0.62rem;
    border: 1px solid var(--bbp-border, #cbd5e1);
    border-radius: 999px;
    background: var(--bbp-control-bg, #f8fafc);
    color: var(--bbp-accent, #2563eb);
    font: inherit;
    font-weight: 760;
    cursor: pointer;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty {
    margin: 0.2rem 0 0;
    padding: 0.68rem 0.74rem;
    border-radius: 8px;
    text-align: left;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__title {
    margin-bottom: 0.22rem;
    font-size: 0.95rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__text,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__foot,
body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__alt {
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    font-size: 0.86rem;
    line-height: 1.42;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__text {
    margin-bottom: 0.48rem;
}

body[data-bb-ui-redesign='passage-ui-v1'] .bb-study-empty__cta {
    min-height: 2.5rem;
    min-width: 0;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='passage'] .bb-passage-text-search-status:not([hidden]),
body[data-bb-ui-redesign='passage-ui-v1'][data-bb-page='explore-map'] .explore-map-list-status:not(:empty) {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.56rem;
    border: 1px solid var(--bbp-border-subtle, #e2e8f0);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bbp-panel-bg, #ffffff) 80%, var(--bbp-control-bg, #f8fafc) 20%);
    color: var(--bbp-text-muted, #64748b);
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Draft Studies review queue: protected, unlinked, review-only generated drafts. */
body[data-bb-page='draft-studies'] {
    background: var(--bbp-canvas, var(--bb-color-bg-canvas));
}

.bb-draft-studies-page {
    --bb-draft-border: var(--bbp-border-subtle, var(--bb-color-border-subtle));
    --bb-draft-border-strong: var(--bbp-border, var(--bb-color-border-default));
    --bb-draft-muted: var(--bbp-text-muted, var(--bb-color-text-muted));
    --bb-draft-secondary: var(--bbp-text-secondary, var(--bb-color-text-secondary));
    --bb-draft-ink: var(--bb-color-text-primary);
    --bb-draft-panel: var(--bbp-panel-bg, var(--bb-color-bg-surface-raised));
    --bb-draft-control: var(--bbp-control-bg, var(--bb-color-bg-surface-raised));
    --bb-draft-soft: var(--bb-color-bg-subtle);
    --bb-draft-accent: var(--bbp-accent, var(--bb-color-accent-primary));
    --bb-draft-accent-soft: var(--bbp-accent-soft, var(--bb-color-state-active));
    display: grid;
    gap: 0.9rem;
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.bb-draft-studies-hero,
.bb-draft-studies-controls,
.bb-draft-studies-detail,
.bb-draft-studies-list-wrap {
    border: 1px solid var(--bb-draft-border);
    border-radius: var(--bb-vc-radius-panel, 8px);
    background: var(--bb-draft-panel);
    box-shadow: var(--bbp-panel-shadow, var(--bb-shadow-panel));
}

.bb-draft-studies-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.78fr);
    gap: 1rem;
    align-items: stretch;
    padding: 1rem;
}

.bb-draft-studies-hero__copy {
    display: grid;
    align-content: center;
    gap: 0.35rem;
}

.bb-draft-studies-hero__kicker,
.bb-draft-studies-section-title,
.bb-draft-studies-field span {
    margin: 0;
    color: var(--bb-draft-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bb-draft-studies-hero__title {
    margin: 0;
    color: var(--bb-draft-ink);
    font-size: 2rem;
    line-height: 1.08;
}

.bb-draft-studies-hero__lead,
.bb-draft-studies-muted,
.bb-draft-studies-empty {
    margin: 0;
    color: var(--bb-draft-muted);
    line-height: 1.45;
}

.bb-draft-studies-hero__source-rail {
    display: grid;
    gap: 0.5rem;
    align-content: start;
}

.bb-draft-studies-hero__source-label {
    margin: 0;
    color: var(--bb-draft-secondary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bb-draft-studies-hero__source-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
}

.bb-draft-studies-hero__source-list div {
    min-width: 0;
    border: 1px solid var(--bb-draft-border);
    border-radius: var(--bb-vc-radius-card, 8px);
    background: color-mix(in srgb, var(--bb-draft-control) 82%, var(--bb-draft-accent-soft) 18%);
    padding: 0.65rem;
}

.bb-draft-studies-hero__source-list dt {
    margin: 0 0 0.22rem;
    color: var(--bb-draft-ink);
    font-size: 0.82rem;
    font-weight: 850;
}

.bb-draft-studies-hero__source-list dd {
    margin: 0;
    color: var(--bb-draft-muted);
    font-size: 0.83rem;
    line-height: 1.38;
}

.bb-draft-studies-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) minmax(10rem, 14rem) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.85rem;
}

.bb-draft-studies-field {
    display: grid;
    gap: 0.35rem;
}

.bb-draft-studies-field input,
.bb-draft-studies-field select {
    min-height: 2.75rem;
    width: 100%;
    border: 1px solid var(--bb-draft-border-strong);
    border-radius: var(--bb-vc-radius-control, 8px);
    background: var(--bb-draft-control);
    color: var(--bb-draft-ink);
    font: inherit;
    padding: 0.55rem 0.7rem;
}

.bb-draft-studies-count {
    align-self: center;
    justify-self: end;
    margin: 0;
    color: var(--bb-draft-secondary);
    font-weight: 750;
}

.bb-draft-studies-error {
    border: 1px solid color-mix(in srgb, var(--bb-color-danger, #b91c1c) 34%, var(--bb-draft-border));
    border-radius: var(--bb-vc-radius-card, 8px);
    background: color-mix(in srgb, var(--bb-color-danger, #b91c1c) 10%, var(--bb-draft-panel));
    color: var(--bb-color-danger, #b91c1c);
    padding: 0.8rem 1rem;
    font-weight: 700;
}

.bb-draft-studies-shell {
    display: grid;
    grid-template-columns: minmax(17rem, 0.38fr) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.bb-draft-studies-list-wrap {
    overflow: clip;
}

.bb-draft-studies-list {
    display: grid;
    max-height: calc(100dvh - 14rem);
    overflow: auto;
    padding: 0.45rem;
}

.bb-draft-studies-list-item {
    display: grid;
    gap: 0.22rem;
    width: 100%;
    border: 1px solid transparent;
    border-bottom-color: var(--bb-draft-border);
    border-radius: var(--bb-vc-radius-card, 8px);
    background: transparent;
    color: inherit;
    padding: 0.72rem;
    text-align: left;
    cursor: pointer;
}

.bb-draft-studies-list-item:hover,
.bb-draft-studies-list-item[aria-selected='true'] {
    background: var(--bb-draft-accent-soft);
}

.bb-draft-studies-list-item[aria-selected='true'] {
    border-color: color-mix(in srgb, var(--bb-draft-accent) 38%, var(--bb-draft-border));
    box-shadow: inset 3px 0 0 var(--bb-draft-accent);
}

.bb-draft-studies-list-item__title {
    color: var(--bb-draft-ink);
    font-weight: 800;
    line-height: 1.25;
}

.bb-draft-studies-list-item__ref,
.bb-draft-studies-list-item__meta {
    color: var(--bb-draft-muted);
    font-size: 0.88rem;
}

.bb-draft-studies-list-item__meta,
.bb-draft-studies-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.bb-draft-studies-detail {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
}

.bb-draft-studies-detail-head {
    display: grid;
    gap: 0.45rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--bb-draft-border);
}

.bb-draft-studies-detail-head__ref,
.bb-draft-studies-detail-head__candidate {
    margin: 0;
    color: var(--bb-draft-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.bb-draft-studies-detail-head__title {
    margin: 0;
    color: var(--bb-draft-ink);
    font-size: 1.45rem;
    line-height: 1.12;
}

.bb-draft-studies-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    border: 1px solid var(--bb-draft-border-strong);
    border-radius: 999px;
    background: var(--bb-draft-control);
    color: var(--bb-draft-secondary);
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.18rem 0.55rem;
}

.bb-draft-studies-chip--status {
    border-color: color-mix(in srgb, var(--bb-draft-accent) 36%, var(--bb-draft-border));
    background: var(--bb-draft-accent-soft);
    color: var(--bb-draft-accent);
}

.bb-draft-studies-draft-section,
.bb-draft-studies-review-section {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.bb-draft-studies-draft-section {
    border: 1px solid var(--bb-draft-border);
    border-radius: var(--bb-vc-radius-card, 8px);
    background: color-mix(in srgb, var(--bb-draft-panel) 84%, var(--bb-draft-soft) 16%);
    padding: 0.9rem;
}

.bb-draft-studies-draft-section__heading {
    margin: 0;
    color: var(--bb-draft-ink);
    font-size: 1.02rem;
    line-height: 1.25;
}

.bb-draft-studies-draft-section__body {
    margin: 0;
    color: var(--bb-draft-ink);
    line-height: 1.55;
    white-space: pre-wrap;
}

.bb-draft-studies-support {
    border: 1px solid var(--bb-draft-border);
    border-radius: var(--bb-vc-radius-card, 8px);
    background: var(--bb-draft-panel);
    padding: 0.48rem 0.65rem;
}

.bb-draft-studies-support summary {
    color: var(--bb-draft-accent);
    font-weight: 800;
    cursor: pointer;
}

.bb-draft-studies-support ul,
.bb-draft-studies-bullet-list {
    margin: 0.45rem 0 0;
    padding-left: 1.15rem;
    color: var(--bb-draft-secondary);
    line-height: 1.45;
}

.bb-draft-studies-quality-card,
.bb-draft-studies-source-card {
    border-left: 3px solid var(--bb-draft-accent);
    background: color-mix(in srgb, var(--bb-draft-panel) 86%, var(--bb-draft-accent-soft) 14%);
    padding: 0.55rem 0.75rem;
}

.bb-draft-studies-quality-card__code,
.bb-draft-studies-source-card__label {
    margin: 0;
    color: var(--bb-draft-ink);
    font-weight: 850;
}

.bb-draft-studies-quality-card__message,
.bb-draft-studies-source-card__note {
    margin: 0.2rem 0 0;
    color: var(--bb-draft-secondary);
    line-height: 1.45;
}

@media (max-width: 820px) {
    .bb-draft-studies-page {
        padding-top: 0.75rem;
    }

    .bb-draft-studies-hero {
        grid-template-columns: 1fr;
    }

    .bb-draft-studies-hero__source-list {
        grid-template-columns: 1fr;
    }

    .bb-draft-studies-controls,
    .bb-draft-studies-shell {
        grid-template-columns: 1fr;
    }

    .bb-draft-studies-count {
        justify-self: start;
    }

    .bb-draft-studies-list {
        max-height: 16rem;
    }
}

/* Passage print / Save-as-PDF: readable serif columns, minimal chrome (no export feature). */
@media print {
    body[data-bb-page='passage'] {
        background: #fff !important;
        color: #111 !important;
    }

    body[data-bb-page='passage'] nav.navbar,
    body[data-bb-page='passage'] #bb-auth-overlay,
    body[data-bb-page='passage'] #bbReaderUnifiedOverlayHost,
    body[data-bb-page='passage'] #bbPassageStudyActionRow,
    body[data-bb-page='passage'] .passage-reader-header__actions,
    body[data-bb-page='passage'] .bb-sf-reader-context-band,
    body[data-bb-page='passage'] #translationsToolbar,
    body[data-bb-page='passage'] .reading-area__chrome-nav,
    body[data-bb-page='passage'] .bb-sf-deferred-slab,
    body[data-bb-page='passage'] #pinnedVersePanel,
    body[data-bb-page='passage'] #studyTrailContext,
    body[data-bb-page='passage'] #backToRefWrap,
    body[data-bb-page='passage'] #bbSfVerseToolsSelectHint,
    body[data-bb-page='passage'] #bbReadingSelectionHint,
    body[data-bb-page='passage'] #bbPassageActionRowHint,
    body[data-bb-page='passage'] #activeSessionBanner,
    body[data-bb-page='passage'] #passageLoading,
    body[data-bb-page='passage'] dialog {
        display: none !important;
    }

    body[data-bb-page='passage'] #passageResults[hidden] {
        display: block !important;
    }

    body[data-bb-page='passage'] #resultReference,
    body[data-bb-page='passage'] .result-reference {
        font-family: Georgia, 'Times New Roman', Times, serif !important;
        font-size: 11pt !important;
        line-height: 1.25 !important;
        color: #111 !important;
    }

    body[data-bb-page='passage'] #resultTranslations,
    body[data-bb-page='passage'] #resultTranslations .verse-block {
        font-family: Georgia, 'Times New Roman', Times, serif !important;
        font-size: 10pt !important;
        line-height: 1.45 !important;
        color: #111 !important;
    }

    body[data-bb-page='passage'] #translationsHeading {
        font-family: Georgia, 'Times New Roman', Times, serif !important;
        font-size: 10pt !important;
    }

    body[data-bb-page='passage'] .translations-heading .section-icon,
    body[data-bb-page='passage'] #translationsHeading .section-icon {
        display: none;
    }

    body[data-bb-page='passage'] #passageResults,
    body[data-bb-page='passage'] .reading-area,
    body[data-bb-page='passage'] #bbReadingModeShell {
        box-shadow: none !important;
        background: transparent !important;
    }

    body[data-bb-page='passage'] .section-divider {
        border-color: #ccc !important;
    }
}
