:root {
  --navy: #182d49;
  --navy-soft: #263d5a;
  --gold: #b9914b;
  --gold-light: #eadfc9;
  --ink: #26313c;
  --muted: #74808a;
  --line: #e8e4dc;
  --paper: #f7f5f0;
  --white: #fffefa;
  --green: #2f7957;
  --shadow: 0 12px 35px rgba(27, 38, 49, .08);
  --verse-size: 1.17rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(185,145,75,.4); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar { height: 78px; display: grid; grid-template-columns: 260px minmax(240px, 560px) 1fr; align-items: center; gap: 34px; padding: 0 max(28px, calc((100vw - 1500px) / 2)); background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; min-width: 0; }
.brand-mark { width: 50px; height: 50px; border: 0; border-radius: 0; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-copy { text-shadow: 0 1px 5px rgba(0,0,0,.12); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; letter-spacing: .11em; }
.brand-copy strong { font-size: .73rem; font-weight: 750; white-space: nowrap; }
.brand-copy small { color: #d7b66e; font-size: .61rem; letter-spacing: .22em; }
.top-search { height: 43px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.17); border-radius: 9px; display: flex; align-items: center; padding: 0 9px 0 13px; gap: 9px; color: #dce4ec; }
.top-search > svg { width: 18px; height: 18px; opacity: .8; flex: 0 0 auto; }
.top-search input { background: transparent; color: #fff; border: 0; outline: 0; width: 100%; min-width: 0; font-size: .9rem; }
.top-search input::placeholder { color: #c1ccd7; }
.top-search kbd { border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 2px 6px; color: #c8d0d9; font-size: .67rem; white-space: nowrap; }
.search-submit { display: none; background: transparent; color: white; border: 0; padding: 3px; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.connection-pill { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 100px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); color: #e0e8ef; font-size: .74rem; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9b866; box-shadow: 0 0 0 3px rgba(217,184,102,.14); }
.connection-pill.live .status-dot { background: #68c28f; box-shadow: 0 0 0 3px rgba(104,194,143,.16); }
.connection-pill.demo .status-dot { background: #d9b866; }
.icon-button { border: 0; background: transparent; color: inherit; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; }
.icon-button:hover { background: rgba(255,255,255,.1); }
.mobile-menu-button { display: none; border: 0; background: transparent; color: white; width: 38px; height: 38px; border-radius: 8px; place-items: center; }
.release-strip { min-height: 36px; display: flex; justify-content: center; align-items: center; gap: 9px; padding: 7px 18px; background: #f0eadc; color: #655b4b; font-size: .74rem; text-align: center; border-bottom: 1px solid #e8deca; }
.release-strip strong { color: #4b463d; font-weight: 700; }
.release-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #d9c79e; color: #51462e; font-family: Georgia,serif; font-weight: bold; font-size: .7rem; flex: 0 0 auto; }
.app-layout { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: 265px minmax(0, 1fr); min-height: calc(100vh - 150px); }
.sidebar { padding: 27px 19px 28px 25px; border-right: 1px solid var(--line); background: #f4f1ea; }
.sidebar-topline { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 21px; }
.eyebrow { color: var(--gold); font-weight: 750; font-size: .64rem; letter-spacing: .16em; }
.sidebar h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.42rem; color: var(--navy); margin: 5px 0 0; }
.sidebar-close { display: none; color: var(--muted); }
.testament-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #e9e4da; padding: 4px; border-radius: 8px; margin-bottom: 21px; }
.testament-button { border: 0; border-radius: 6px; background: transparent; color: #77766f; padding: 8px 4px; font-size: .68rem; font-weight: 650; }
.testament-button.active { color: var(--navy); background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.field-label { display: block; color: #77808a; font-size: .69rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 8px; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; appearance: none; background: var(--white); border: 1px solid #e1ddd5; color: var(--navy); border-radius: 8px; height: 42px; padding: 0 36px 0 11px; font-weight: 650; font-size: .84rem; }
.select-wrap svg { position: absolute; right: 10px; top: 11px; width: 18px; pointer-events: none; color: #838b91; }
.chapter-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 23px; }
.chapter-heading .field-label { margin-bottom: 9px; }
.chapter-count { font-size: .68rem; color: #9a9d9d; margin-bottom: 8px; }
.chapter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chapter-button { border: 1px solid #e6e1d8; background: #fffefa; color: #626c75; height: 34px; border-radius: 7px; font-size: .77rem; transition: .15s ease; }
.chapter-button:hover { border-color: #c7ad7c; color: var(--navy); }
.chapter-button.active { color: white; background: var(--navy); border-color: var(--navy); box-shadow: 0 3px 7px rgba(24,45,73,.18); }
.sidebar-note { margin-top: 31px; border-top: 1px solid #e4ded4; padding: 20px 4px 0; color: #8b8578; }
.sidebar-logo { display: block; width: 76px; height: 76px; object-fit: contain; margin: 0 0 8px -5px; }
.sidebar-note p { font-family: Georgia,serif; font-size: .84rem; line-height: 1.6; margin: 8px 0 6px; font-style: italic; color: #777367; }
.sidebar-note small { font-size: .66rem; color: #a49b88; letter-spacing: .08em; }
.main-content { min-width: 0; padding: 24px clamp(22px, 5vw, 78px) 55px; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 38px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; font-size: .64rem; letter-spacing: .12em; color: #9a9c9b; font-weight: 700; }
.breadcrumbs strong { color: #68727a; }
.crumb-sep { color: #c5bca9; }
.reader-tools { display: flex; align-items: center; gap: 5px; }
.text-tool { display: inline-flex; gap: 6px; align-items: center; justify-content: center; color: #77818a; border: 1px solid transparent; background: transparent; border-radius: 7px; min-width: 32px; height: 31px; padding: 0 7px; font-weight: 650; font-size: .76rem; }
.text-tool:hover { border-color: var(--line); color: var(--navy); background: #fffefa; }
.text-tool svg { width: 16px; height: 16px; }
.text-tool span { font-size: .69rem; font-weight: 600; }
.chapter-heading-main { margin: 0 auto 28px; max-width: 790px; }
.chapter-overline { color: var(--gold); font-size: .66rem; font-weight: 750; letter-spacing: .17em; margin-bottom: 10px; }
.chapter-heading-main h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.15rem, 4vw, 3.2rem); line-height: 1.1; color: var(--navy); font-weight: 500; letter-spacing: -.025em; margin: 0; }
.chapter-heading-main h1 span { color: var(--gold); font-size: .82em; margin-left: 7px; }
.chapter-topic { color: #7d858b; font-family: Georgia,serif; font-style: italic; font-size: 1rem; margin: 13px 0 0; }
.chapter-meta { color: #a3a29b; font-size: .67rem; margin-top: 11px; }
.chapter-switcher { display: flex; align-items: center; justify-content: space-between; max-width: 790px; margin: 0 auto 27px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chapter-arrow { display: inline-flex; align-items: center; gap: 6px; color: #7d8790; border: 0; background: transparent; padding: 6px 1px; font-size: .73rem; }
.chapter-arrow:hover:not(:disabled) { color: var(--navy); }
.chapter-arrow:disabled { opacity: .35; cursor: default; }
.chapter-arrow svg { width: 16px; height: 16px; }
.chapter-switcher-label { color: #a69c89; font-size: .68rem; letter-spacing: .06em; }
.chapter-text { max-width: 790px; margin: 0 auto; color: #343c43; font-family: Georgia, "Times New Roman", serif; font-size: var(--verse-size); line-height: 1.9; }
.verse-row { position: relative; padding: 4px 0 17px 0; margin-bottom: 4px; scroll-margin-top: 110px; border-radius: 8px; transition: background .3s ease; }
.verse-row.highlight { background: #f2ead8; box-shadow: 0 0 0 8px #f2ead8; }
.verse-line { display: block; }
.verse-number { display: inline-block; vertical-align: super; margin: 0 8px 0 0; color: var(--gold); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .65rem; line-height: 1; font-weight: 800; text-decoration: none; }
.verse-copy { border: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: left; padding: 0; }
.verse-copy:hover { color: #182d49; }
.verse-tools { display: inline-flex; align-items: center; gap: 6px; margin: 5px 0 0 24px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; vertical-align: middle; }
.note-chip, .bookmark-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e7e0d2; border-radius: 100px; background: #fbf8f1; color: #88744f; padding: 3px 8px; font-size: .64rem; line-height: 1.3; font-weight: 650; }
.note-chip:hover, .bookmark-chip:hover { background: #f2ead8; border-color: #d7c49c; color: var(--navy); }
.note-chip svg, .bookmark-chip svg { width: 12px; height: 12px; }
.bookmark-chip { padding: 3px 6px; color: #a3a09a; background: transparent; border-color: transparent; }
.bookmark-chip.saved { color: var(--gold); background: #f5eedf; border-color: #e8dcc1; }
.chapter-heading-item { padding: 26px 0 10px 24px; margin: 0 0 2px; border-left: 2px solid #d5bd8a; scroll-margin-top: 110px; }
.chapter-heading-item h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.28rem; line-height: 1.42; color: var(--navy); margin: 0; }
.chapter-heading-item .heading-kicker { color: #b08a4d; font-family: Inter, sans-serif; font-size: .59rem; letter-spacing: .14em; font-weight: 750; text-transform: uppercase; margin-bottom: 5px; }
.bottom-switcher { margin-top: 24px; }
.chapter-alert { max-width: 790px; margin: -7px auto 21px; padding: 12px 14px; background: #f6f0e2; color: #756548; border: 1px solid #e9dcc0; border-radius: 9px; font-size: .79rem; line-height: 1.5; }
.hidden { display: none !important; }
.loading-state, .empty-state { min-height: 240px; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; color: #989b98; font-family: Inter,sans-serif; font-size: .84rem; text-align: center; }
.loader { width: 24px; height: 24px; border: 2px solid #e3dccf; border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-view { max-width: 790px; margin: 0 auto; }
.search-page-heading { padding: 18px 0 23px; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.search-page-heading h1 { font-family: Georgia,serif; font-weight: 500; color: var(--navy); font-size: 2.35rem; margin: 7px 0 5px; }
.search-page-heading p { font-size: .84rem; color: var(--muted); margin: 0; }
.search-result { width: 100%; display: block; border: 1px solid var(--line); background: var(--white); border-radius: 10px; margin-bottom: 9px; padding: 15px 17px; text-align: left; transition: .15s ease; }
.search-result:hover { border-color: #d0bb92; box-shadow: var(--shadow); transform: translateY(-1px); }
.result-meta { display: flex; justify-content: space-between; gap: 12px; color: #9a8b6e; font-family: Inter,sans-serif; font-size: .65rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; }
.result-text { color: #434a50; font-family: Georgia,serif; font-size: 1rem; line-height: 1.6; }
.result-type { color: #9a9d9b; font-weight: 600; }
.quiet-button { margin-top: 14px; border: 1px solid #ded8cb; background: transparent; color: #6f7880; border-radius: 8px; padding: 9px 13px; font-size: .78rem; }
.quiet-button:hover { border-color: var(--gold); color: var(--navy); }
.drawer-scrim, .modal-scrim { position: fixed; inset: 0; background: rgba(18,30,45,.38); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.drawer-scrim.open, .modal-scrim.open { opacity: 1; pointer-events: auto; }
.detail-drawer { position: fixed; z-index: 41; right: 0; top: 0; bottom: 0; width: min(430px, 94vw); background: var(--white); box-shadow: -15px 0 45px rgba(20,33,49,.16); transform: translateX(103%); transition: transform .24s ease; display: flex; flex-direction: column; }
.detail-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 25px 24px 18px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 5px 0 0; font-family: Georgia,serif; font-weight: 500; font-size: 1.45rem; color: var(--navy); }
.drawer-header .icon-button { color: #7c858b; }
.drawer-content { padding: 21px 24px 35px; overflow-y: auto; }
.note-category { display: inline-block; background: #f4eee1; color: #927544; padding: 5px 9px; border-radius: 100px; font-size: .65rem; font-weight: 750; margin-bottom: 15px; }
.note-content { font-family: Georgia,serif; color: #343e45; font-size: 1.1rem; line-height: 1.7; white-space: pre-wrap; }
.note-context { color: #8f9698; font-size: .72rem; line-height: 1.5; margin-top: 15px; }
.drawer-divider { height: 1px; background: var(--line); margin: 22px 0; }
.drawer-subtitle { color: #8f8c82; font-size: .64rem; letter-spacing: .12em; font-weight: 750; margin-bottom: 10px; }
.reference-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 11px; margin-bottom: 7px; width: 100%; text-align: left; color: var(--navy); font-size: .78rem; }
.reference-item:hover { border-color: #d3bd90; background: #fcfaf4; }
.reference-item span:last-child { color: var(--gold); font-size: .75rem; }
.reference-preview { background: #f7f5f0; border-radius: 9px; padding: 14px; margin-top: 12px; }
.reference-preview strong { display: block; color: var(--navy); font-size: .8rem; margin-bottom: 7px; }
.reference-preview p { font-family: Georgia,serif; line-height: 1.6; color: #505960; font-size: .94rem; margin: 0; }
.reference-go { display: inline-block; margin-top: 11px; color: #8e6e38; font-size: .73rem; font-weight: 700; border: 0; background: transparent; padding: 0; }
.settings-modal { width: min(470px, calc(100vw - 28px)); margin: min(15vh, 110px) auto 0; padding-bottom: 22px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow); transform: translateY(10px); transition: transform .2s ease; }
.modal-scrim.open .settings-modal { transform: translateY(0); }
.settings-copy, .settings-footnote { color: #727d84; font-size: .8rem; line-height: 1.6; margin: 18px 24px; }
.settings-modal .field-label, .settings-input, .settings-help, .settings-actions, .settings-status { margin-left: 24px; margin-right: 24px; }
.settings-modal .field-label { margin-top: 20px; }
.settings-input { width: calc(100% - 48px); border: 1px solid #ddd7ca; border-radius: 8px; padding: 11px 12px; color: var(--navy); background: white; font-size: .82rem; }
.settings-help { margin-top: 8px; color: #9a9b96; font-size: .69rem; line-height: 1.5; }
.settings-help code { color: #7b6540; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.primary-button, .secondary-button { border-radius: 8px; padding: 10px 13px; font-size: .75rem; font-weight: 700; }
.primary-button { background: var(--navy); color: white; border: 1px solid var(--navy); }
.primary-button:hover { background: var(--navy-soft); }
.secondary-button { background: transparent; border: 1px solid #ddd7ca; color: #78818a; }
.settings-status { min-height: 18px; color: var(--green); font-size: .7rem; margin-top: 10px; }
.settings-divider { height: 1px; background: var(--line); margin-top: 14px; }
.settings-footnote { font-size: .69rem; margin-top: 14px; margin-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 15px); opacity: 0; z-index: 70; background: var(--navy); color: white; box-shadow: var(--shadow); padding: 11px 15px; border-radius: 8px; font-size: .76rem; max-width: calc(100vw - 32px); text-align: center; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.site-footer { display: flex; justify-content: space-between; gap: 14px; padding: 17px max(25px, calc((100vw - 1500px) / 2)); border-top: 1px solid var(--line); color: #a3a098; font-size: .64rem; letter-spacing: .06em; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #8c836e; letter-spacing: .15em; font-weight: 750; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.site-footer a { color: #8f7445; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }


/* AaG master branding: calm marine-blue with original gold/red logo. */
.brand-splash { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 28px; background: radial-gradient(circle at 50% 40%, #223d60 0%, #182d49 58%, #101e32 100%); opacity: 1; visibility: visible; transition: opacity .32s ease, visibility .32s ease; }
.brand-splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.brand-splash > img { display: block; width: min(230px, 42vw); max-height: 42vh; object-fit: contain; }
.splash-caption { color: #E8C66D; font-size: .72rem; font-weight: 800; letter-spacing: .28em; margin-top: 2px; }
.splash-subcaption { color: rgba(245,239,223,.68); font-size: .57rem; letter-spacing: .2em; }
@media (max-width: 720px) {
  .brand-splash > img { width: min(190px, 52vw); max-height: 38vh; }
  .sidebar-logo { width: 68px; height: 68px; }
  .footer-brand img { width: 24px; height: 24px; }
}

@media (min-width: 1501px) { .main-content { padding-left: 85px; padding-right: 85px; } }
@media (max-width: 1000px) {
  .topbar { grid-template-columns: 220px minmax(200px, 1fr) auto; gap: 18px; padding: 0 20px; }
  .app-layout { grid-template-columns: 235px minmax(0,1fr); }
  .sidebar { padding-left: 18px; padding-right: 15px; }
  .main-content { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 720px) {
  .topbar { height: 66px; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; padding: 0 13px; }
  .brand { gap: 8px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 0; }
  .brand-copy strong { font-size: .63rem; }
  .brand-copy small { font-size: .55rem; }
  .top-search { height: 39px; padding-left: 10px; }
  .top-search input { font-size: .78rem; }
  .top-search kbd { display: none; }
  .search-submit { display: inline-grid; place-items: center; }
  .search-submit svg { width: 17px; height: 17px; }
  .top-actions { gap: 5px; }
  .connection-pill { padding: 7px; border: 0; background: transparent; }
  #connectionText { display: none; }
  .top-actions > #settingsOpen { display: inline-grid; width: 32px; height: 34px; }
  .top-actions > #settingsOpen svg { width: 18px; height: 18px; }
  .mobile-menu-button { display: grid; }
  .release-strip { justify-content: flex-start; text-align: left; font-size: .66rem; line-height: 1.35; padding: 7px 12px; }
  .app-layout { display: block; min-height: calc(100vh - 145px); }
  .sidebar { position: fixed; z-index: 35; left: 0; top: 0; bottom: 0; width: min(320px, 88vw); overflow-y: auto; transform: translateX(-105%); transition: transform .23s ease; box-shadow: 12px 0 35px rgba(20,30,40,.12); padding-top: 23px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .main-content { padding: 18px 16px 38px; }
  .reader-toolbar { margin-bottom: 25px; }
  .breadcrumbs { gap: 6px; font-size: .56rem; }
  .reader-tools { gap: 0; }
  .text-tool { min-width: 28px; padding: 0 4px; }
  .text-tool span { display: none; }
  .chapter-heading-main { margin-bottom: 23px; }
  .chapter-heading-main h1 { font-size: 2.45rem; }
  .chapter-topic { font-size: .92rem; }
  .chapter-switcher { margin-bottom: 19px; }
  .chapter-arrow { font-size: 0; gap: 0; padding: 6px; }
  .chapter-arrow svg { width: 19px; height: 19px; }
  .chapter-switcher-label { font-size: .65rem; }
  .chapter-text { font-size: calc(var(--verse-size) - .03rem); line-height: 1.82; }
  .verse-row { padding-bottom: 16px; }
  .chapter-heading-item { padding-top: 23px; padding-left: 16px; }
  .chapter-heading-item h2 { font-size: 1.16rem; }
  .verse-tools { margin-left: 22px; }
  .bottom-switcher { margin-top: 22px; }
  .site-footer { padding: 14px 16px; flex-wrap: wrap; font-size: .58rem; }
  .site-footer span:nth-child(2) { display: none; }
}
@media (max-width: 380px) {
  .brand-copy strong { font-size: .57rem; }
  .topbar { gap: 7px; }
  .top-search { min-width: 0; }
  .top-search input::placeholder { color: #d0d8df; }
  .chapter-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}

/* v3 reader modes, personal study notes and testament book chooser */
.reader-toolbar-context { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.toolbar-book-button { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #e6dfd1; background: rgba(255,254,250,.72); color: var(--navy); border-radius: 999px; padding: 7px 12px; font-size: .68rem; font-weight: 700; }
.toolbar-book-button span { color: var(--gold); font-size: 1rem; line-height: .8; }
.toolbar-book-button:hover { border-color: var(--gold); background: white; }
.mode-toggle { border-color: #d7c49c; background: #f7f0e2; color: var(--navy); padding: 0 12px; }
.mode-toggle:hover { border-color: var(--gold); background: #efe3ca; }
.mode-toggle[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.mode-toggle-symbol { font-size: .88rem !important; color: var(--gold); }
.personal-note-chip { display: inline-flex; align-items: center; border: 1px solid #e5dfd3; border-radius: 100px; background: #fffefa; color: #766b58; padding: 3px 8px; font-size: .64rem; line-height: 1.3; font-weight: 650; }
.personal-note-chip:hover, .personal-note-chip.has-note { background: #f2ead8; border-color: #d4bc8b; color: var(--navy); }
/* Reading mode removes navigation and per-verse controls but keeps essential navigation. */
body.reading-mode .release-strip { display: none; }
body.reading-mode .sidebar { display: none; }
body.reading-mode .app-layout { grid-template-columns: minmax(0, 1fr); }
body.reading-mode .main-content { max-width: 1120px; width: 100%; margin: 0 auto; padding-top: 30px; }
body.reading-mode .verse-tools { display: none !important; }
body.reading-mode .chapter-text { max-width: 820px; line-height: 2.04; }
body.reading-mode .reader-toolbar { max-width: 920px; margin: 0 auto 46px; }
body.reading-mode .reader-tools .personal-tool { display: none; }
body.reading-mode .chapter-switcher { max-width: 820px; }
body.study-mode .chapter-text { max-width: 850px; }
body.study-mode .verse-row { padding-bottom: 12px; }
body.study-mode .verse-tools { display: flex; flex-wrap: wrap; }
body.study-mode .reader-mode-hint { display: block; }
.book-chooser-launch { width: 100%; display: flex; gap: 10px; align-items: center; border: 1px solid #e2d9c7; background: linear-gradient(135deg,#fffefa,#f6f0e5); color: var(--navy); border-radius: 10px; padding: 11px 10px; text-align: left; margin: -7px 0 18px; }
.book-chooser-launch:hover { border-color: var(--gold); box-shadow: 0 5px 16px rgba(24,45,73,.06); }
.book-chooser-launch-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; color: #8e6e37; background: #f0e5cd; border-radius: 9px; font-size: 1.15rem; }
.book-chooser-launch strong, .book-chooser-launch small { display: block; }
.book-chooser-launch strong { font-size: .72rem; }
.book-chooser-launch small { margin-top: 3px; color: #999080; font-size: .61rem; }
.book-chooser-chevron { margin-left: auto; font-size: 1.3rem; color: #b69a64; }
.book-chooser-scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: rgba(16,28,43,.54); opacity: 0; visibility: hidden; pointer-events: none; transition: .2s ease; }
.book-chooser-scrim.open { opacity: 1; visibility: visible; pointer-events: auto; }
.book-chooser { display: flex; flex-direction: column; width: min(940px,100%); max-height: min(86vh,900px); background: #fffefa; border: 1px solid rgba(255,255,255,.55); border-radius: 17px; box-shadow: 0 25px 80px rgba(10,20,34,.28); overflow: hidden; transform: translateY(12px); transition: transform .2s ease; }
.book-chooser-scrim.open .book-chooser { transform: translateY(0); }
.book-chooser-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 25px 28px 18px; background: linear-gradient(135deg,#f9f5eb,#fffefa); border-bottom: 1px solid var(--line); }
.book-chooser-header h2 { margin: 6px 0 5px; font: 500 1.7rem Georgia,serif; color: var(--navy); }
.book-chooser-header p { margin: 0; color: var(--muted); font-size: .78rem; }
.chooser-close { color: var(--muted); }
.chooser-testaments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 28px 12px; }
.chooser-testament { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #e8e1d4; background: #fff; border-radius: 10px; padding: 12px 14px; color: var(--navy); text-align: left; }
.chooser-testament strong { font: 500 1.04rem Georgia,serif; }
.chooser-testament small { color: #958d7e; font-size: .65rem; margin-top: 4px; }
.chooser-testament.active { border-color: #c5a66c; background: #f6f0e3; box-shadow: inset 0 0 0 1px rgba(197,166,108,.2); }
.chooser-search { display: flex; align-items: center; gap: 10px; margin: 0 28px 13px; padding: 0 12px; height: 42px; border: 1px solid #e5dfd4; border-radius: 9px; background: white; color: #8c8d87; }
.chooser-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.chooser-search input { width: 100%; border: 0; outline: 0; color: var(--navy); font-size: .81rem; background: transparent; }
.book-groups { padding: 0 28px 22px; overflow-y: auto; overscroll-behavior: contain; }
.book-group { margin: 9px 0 19px; }
.book-group-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #9a7a43; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.book-group-heading::after { content: ""; height: 1px; background: #ebe4d8; flex: 1; }
.book-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.book-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; border: 1px solid #ebe6dc; background: #fff; color: var(--navy); border-radius: 9px; padding: 11px 12px; text-align: left; transition: .15s ease; }
.book-card strong { font: 500 .94rem Georgia,serif; overflow-wrap: anywhere; }
.book-card span { font-size: .62rem; color: #a19a8c; }
.book-card:hover, .book-card.selected { border-color: #c7a86f; background: #f8f2e7; box-shadow: 0 3px 11px rgba(24,45,73,.05); }
.book-chooser-footer { padding: 12px 28px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: #fbf9f4; color: #9a958a; font-size: .64rem; }
.personal-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.personal-tab { display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #777f84; padding: 10px 12px 11px; font-size: .76rem; font-weight: 700; margin-bottom: -1px; }
.personal-tab span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 100px; padding: 0 5px; background: #eee9df; color: #887a61; font-size: .62rem; }
.personal-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.personal-tab.active span { background: #f2e8d4; color: #7d6130; }
.personal-result-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 8px; margin-bottom: 9px; }
.personal-result-card .search-result { margin: 0; min-width: 0; }
.personal-edit-button { border: 1px solid #e5ded2; border-radius: 8px; background: #fffefa; color: #806b47; padding: 0 13px; font-size: .68rem; font-weight: 700; }
.personal-edit-button:hover { border-color: var(--gold); background: #f7f1e5; }
.personal-data-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; color: #9a988f; font-size: .67rem; }
.quiet-button.small { padding: 7px 10px; font-size: .66rem; }
.personal-note-location { margin: -4px 0 10px; color: #927441; font: 500 1.1rem Georgia,serif; }
.personal-note-guidance { color: #848b8c; font-size: .75rem; line-height: 1.55; margin: 0 0 19px; }
.personal-note-editor { display: block; width: 100%; min-height: 190px; resize: vertical; border: 1px solid #ddd6c9; border-radius: 10px; background: #fffefa; padding: 12px 13px; color: var(--ink); font: 1rem/1.65 Georgia,serif; }
.personal-note-editor:focus { outline: 3px solid rgba(185,145,75,.18); border-color: #c4a66f; }
.note-character-count { text-align: right; color: #aaa295; font-size: .64rem; margin-top: 5px; }
.personal-note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.danger-button { color: #8c3d39; border-color: #e6cbc8; }
.danger-button:hover { background: #fbefed; border-color: #cf9a95; }
.personal-backup-block { padding: 14px 24px 4px; }
.personal-backup-block > strong { color: var(--navy); font: 500 1.03rem Georgia,serif; }
.personal-backup-block p { color: #828a8d; font-size: .71rem; line-height: 1.5; margin: 7px 0 10px; }
.backup-actions { margin-left: 0 !important; margin-right: 0 !important; }
.import-label { display: inline-flex; align-items: center; cursor: pointer; }
@media (max-width: 900px) {
  .book-card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .reader-toolbar-context { gap: 8px; }
  .reader-tools { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 720px) {
  body.reading-mode .main-content { padding: 18px 16px 38px; }
  .reader-toolbar-context { gap: 6px; }
  .toolbar-book-button { padding: 6px 9px; font-size: .62rem; }
  .mode-toggle { min-width: 33px; width: 34px; height: 32px; padding: 0; }
  .mode-toggle #readerModeLabel { display: none; }
  .mode-toggle-symbol { display: inline !important; }
  .book-chooser-scrim { padding: 8px; align-items: end; }
  .book-chooser { max-height: 92vh; border-radius: 16px 16px 8px 8px; }
  .book-chooser-header { padding: 18px 17px 13px; }
  .book-chooser-header h2 { font-size: 1.4rem; }
  .book-chooser-header p { font-size: .69rem; }
  .chooser-testaments { padding: 12px 16px 10px; }
  .chooser-testament { padding: 10px 11px; }
  .chooser-testament strong { font-size: .9rem; }
  .chooser-search { margin: 0 16px 10px; }
  .book-groups { padding: 0 16px 17px; }
  .book-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .book-card { padding: 10px; }
  .book-card strong { font-size: .88rem; }
  .book-chooser-footer { padding: 10px 16px; flex-wrap: wrap; }
  .personal-tabs { gap: 2px; }
  .personal-tab { padding-left: 8px; padding-right: 8px; font-size: .69rem; }
  .personal-data-actions { align-items: flex-start; flex-direction: column; }
  .personal-result-card { grid-template-columns: minmax(0,1fr); }
  .personal-edit-button { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-chooser, .book-chooser-scrim { transition: none; }
}
