.bible-page main#bible-reading{display:block;min-height:0;padding:32px 24px 180px;overflow:auto;max-height:calc(100dvh - 68px)}
#bible-search{position:fixed;z-index:10;bottom:var(--bible-keyboard-bottom,0px);left:0;right:0;padding:12px max(16px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-bottom));background:var(--bg)}
.bible-search-bar{display:flex;align-items:center;gap:8px;max-width:960px;margin:auto;border:1px solid var(--line);border-radius:10px;padding:8px 12px;box-shadow:0 6px 24px #0005;background:var(--bg)}
.bible-search-bar:focus-within{outline:3px solid var(--accent);outline-offset:2px}
.bible-reference{flex:1;min-width:0;margin:0}.bible-reference .custom-select{position:static}.bible-search-bar{position:relative}
#scripture-reference{width:100%;border:0;background:transparent;outline:none;padding:10px 0;font-size:18px;color:var(--text)}
#scripture-reference::placeholder{color:#fff;opacity:.75}#scripture-reference:focus::placeholder{opacity:.5}
.bible-search-bar button{flex:none;color:var(--accent);border:0;padding:6px;min-width:36px;background:transparent}.bible-search-bar button svg{width:25px;height:25px;display:block}
.bible-search-bar .bible-book::after{display:none}
#bible-search .scripture-books{position:absolute;top:auto;bottom:calc(100% + 12px);left:0;right:0;max-height:min(280px,40dvh);overflow:auto;background:var(--bg);box-shadow:0 -6px 24px #0007;border:1px solid var(--line);border-radius:10px;padding:8px}
#bible-search .scripture-books>div{padding:12px;cursor:pointer}#bible-search .scripture-books>[aria-selected=true]{background:var(--surface);color:var(--accent)}
#bible-search .hint{max-width:960px;margin:6px auto 0;font-size:12px}
.bible-settings{position:absolute;bottom:calc(100% + 12px);right:16px;width:min(360px,calc(100vw - 32px));background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:16px;box-shadow:0 -6px 24px #0007}.bible-settings .select-options{top:auto;bottom:100%;box-shadow:0 -6px 24px #0007}
.bible-passage{max-width:960px;margin:auto;white-space:pre-line;font:20px/1.6 Georgia,serif}.bible-passage>*{display:block}.bible-passage .eyebrow{font:12px system-ui;margin-top:16px}
#bible-status:empty{display:none}
.bible-search-bar .bible-book{width:36px}.bible-reference{display:block}.bible-reference .custom-select{width:100%}

.bible-verse-text.is-collapsed{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
.bible-card-actions{display:flex;gap:20px;margin-top:12px}.bible-card-actions button{border:0;min-height:32px;padding:0;color:var(--accent);font:14px system-ui;background:transparent}
.bible-attribution{font:12px/1.5 system-ui;color:var(--muted);margin-top:12px}
.bible-history{max-width:960px;margin:28px auto}.bible-history h2{font-size:20px}.bible-history-item{border-bottom:1px solid var(--line);padding:16px 0}.bible-history-item>button{text-align:left;color:var(--accent)}
.bible-page *{scrollbar-width:thin;scrollbar-color:var(--line) var(--bg)}.bible-page ::-webkit-scrollbar{width:6px;height:6px}.bible-page ::-webkit-scrollbar-track{background:var(--bg)}.bible-page ::-webkit-scrollbar-thumb{background:var(--line);border-radius:10px}.bible-page ::-webkit-scrollbar-thumb:hover{background:var(--accent)}
#bible-status:not(:empty){position:fixed;bottom:150px;left:16px;right:16px;background:var(--surface);padding:12px;border-radius:8px;z-index:15}

.bible-settings fieldset{border:0;padding:0;margin:20px 0 0}.bible-settings legend{margin-bottom:10px;font-weight:600}.bible-settings fieldset label{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:14px}.bible-settings input[type=radio]{accent-color:var(--accent);width:18px;height:18px;flex:none}.bible-settings{max-height:60dvh;overflow-y:auto}

.bible-card-actions{align-items:baseline;flex-wrap:wrap}.bible-passage .bible-card-translation{margin:0 0 0 auto;text-align:right;font:12px/1.4 system-ui}.bible-passage+.bible-attribution{max-width:960px;margin:10px auto 0;padding:0;background:none;border:0}.bible-card-actions button{border-radius:0;box-shadow:none}

.bible-passage{cursor:pointer}.bible-passage:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.bible-settings:not([hidden]){animation:bible-settings-in 160ms ease-out}.bible-settings.is-closing:not([hidden]){animation:bible-settings-out 160ms ease-in forwards;pointer-events:none}@keyframes bible-settings-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes bible-settings-out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(6px)}}@media(prefers-reduced-motion:reduce){.bible-settings:not([hidden]){animation:none}}

.bible-history{width:100%;margin:0 auto 24px}.bible-history-item{border:0;padding:0;margin:0 0 24px}.bible-page main#bible-reading{width:100%;height:calc(100dvh - 68px);max-height:calc(100dvh - 68px);padding-bottom:160px;overflow-y:auto;overflow-anchor:none}

#bible-search .scripture-books>.bible-suggestion-heading{position:sticky;top:-8px;background:var(--bg);color:var(--accent);font-weight:600;border-bottom:1px solid var(--line);cursor:default;z-index:1}

.bible-page main#bible-reading{display:flex;flex-direction:column;justify-content:flex-start}.bible-history{flex:none;margin-top:auto}.bible-history-item:last-child{margin-bottom:0}.bible-page #scripture-preview{flex:none;width:100%}

.bible-page main#bible-reading{height:var(--bible-reading-height,calc(100dvh - 180px));max-height:var(--bible-reading-height,calc(100dvh - 180px));padding-bottom:12px}.bible-history{margin-bottom:0}.bible-history-item:last-child>.bible-attribution{margin-bottom:0}

.bible-entry-meta{display:flex;align-items:baseline;gap:16px;max-width:960px;margin:10px auto 0}.bible-entry-meta button{border:0;padding:0;min-height:32px;color:var(--accent);background:transparent;border-radius:0;font:14px system-ui}.bible-entry-meta .bible-attribution{margin:0 0 0 auto;text-align:right;min-width:0}.bible-entry-meta button{flex:none}

.bible-layout-setting{display:block;margin-top:20px}.bible-layout-setting .custom-select{margin-top:8px}

.bible-clear-history{margin-top:20px;width:100%;color:var(--red);border-color:var(--line)}

#bible-status:not(:empty){top:calc(68px + env(safe-area-inset-top) + 12px);bottom:auto;margin:0;pointer-events:none;box-shadow:0 6px 24px #0005}@media(max-width:700px){#bible-status:not(:empty){top:calc(64px + env(safe-area-inset-top) + 12px)}}

.bible-history-confirm[open]{animation:bible-confirm-in 180ms ease-out}.bible-history-confirm.is-closing{animation:bible-confirm-out 180ms ease-in forwards}.bible-history-confirm h2{margin-top:0;color:var(--accent);font-size:22px}@keyframes bible-confirm-in{from{opacity:0;transform:translateY(-30px)}to{opacity:1;transform:translateY(0)}}@keyframes bible-confirm-out{to{opacity:0;transform:translateY(-30px)}}@media(prefers-reduced-motion:reduce){.bible-history-confirm[open]{animation:none}}
.bible-entry-meta .bible-attribution{margin:0 auto 0 0;text-align:left}

.bible-passage .bible-verse-text{font-size:var(--bible-text-size,22px)}
.bible-chapter-navigation{display:flex;justify-content:space-between;gap:16px;margin-top:16px}.bible-chapter-navigation button{background:none;border:0;padding:0;color:var(--accent);font:14px system-ui;min-height:32px}
.bible-entry-meta{container-type:inline-size;flex-wrap:wrap}.bible-entry-meta .bible-attribution button{font:inherit;min-height:0;color:inherit;text-decoration:underline}.bible-entry-meta .bible-attribution button:disabled{opacity:1;text-decoration:none}
@media(max-width:620px){.bible-shared-prefix{display:none}.bible-entry-meta{gap:12px}.bible-entry-meta .bible-attribution{font-size:11px}.bible-settings{max-height:65dvh;overflow-y:auto}}
.bible-undo{position:fixed;top:calc(80px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:1000;display:flex;align-items:center;gap:24px;padding:12px 20px;background:#422e54;border:1px solid var(--accent);border-radius:12px;box-shadow:0 8px 24px #0006}.bible-undo button{border:0;background:none;color:var(--accent);padding:8px}

.bible-verse-number{font:600 .58em/0 system-ui;vertical-align:super;color:var(--muted);margin-right:.12em}.bible-passage>strong[role=button]{cursor:pointer}.bible-passage>strong[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.bible-chapter-reader{position:fixed;left:0;right:0;z-index:100;background:var(--bg);display:flex;flex-direction:column;padding:20px max(20px,calc((100vw - 960px)/2));box-shadow:0 -8px 30px #0004;animation:bible-reader-in 180ms ease-out}.bible-reader-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}.bible-reader-heading h2{font:600 26px Georgia,serif}.bible-reader-body{flex:1;min-height:0;overflow:auto;padding:24px 0;scrollbar-width:thin;scrollbar-color:#765987 transparent}.bible-reader-body .bible-verse-text{font:var(--bible-text-size,22px)/1.65 Georgia,serif;white-space:pre-wrap}.bible-reader-translation{color:var(--muted);font:12px system-ui;margin-top:24px}.bible-chapter-reader .bible-chapter-navigation{padding-top:12px;padding-bottom:env(safe-area-inset-bottom);border-top:1px solid var(--line);margin:0}.bible-chapter-navigation button:disabled{opacity:.4;cursor:default}@keyframes bible-reader-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.bible-chapter-reader{animation:none}}

.bible-entry-meta .bible-entry-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px}.bible-entry-action svg{width:19px;height:19px;flex:none}.bible-entry-action[aria-pressed=true] svg{fill:currentColor}.bible-entry-meta .bible-entry-action:focus-visible{outline:2px solid var(--accent);outline-offset:3px}@media(max-width:620px){.bible-entry-action .bible-action-label{display:none}.bible-entry-meta .bible-entry-action{min-width:36px;min-height:40px}.bible-entry-meta{gap:8px}}

.bible-search-bar button[data-searching=true]:disabled{opacity:1;color:var(--accent)}

.bible-settings-controls{display:flex;justify-content:center;gap:12px;margin-top:20px}.bible-settings-controls button{width:96px;min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:14px 8px;font:14px system-ui;background:transparent}.bible-settings-controls svg{width:25px;height:25px;color:var(--accent)}
.bible-search-bar>button{transition:color 180ms ease}.bible-search-bar>button:hover,.bible-search-bar>button[data-searching=true]:disabled:hover{color:#fff}@media(prefers-reduced-motion:reduce){.bible-search-bar>button{transition:none}}

.bible-search-bar>button,.bible-search-bar>button.primary,.bible-search-bar>button.primary:hover,.bible-search-bar>button:hover,.bible-search-bar>button:active{background:transparent;box-shadow:none}.bible-search-bar>button{transition:color 180ms ease}.bible-search-bar>button:hover,.bible-search-bar>button:active{color:#fff}.bible-entry-meta .bible-entry-action{transition:color 180ms ease}.bible-entry-meta .bible-entry-action:hover,.bible-entry-meta .bible-entry-action:active{color:#fff;background:transparent}@media(prefers-reduced-motion:reduce){.bible-search-bar>button,.bible-entry-meta .bible-entry-action{transition:none}}
.bible-card-actions button{transition:color 180ms ease}.bible-card-actions button:hover,.bible-card-actions button:active{color:#fff;background:transparent}@media(prefers-reduced-motion:reduce){.bible-card-actions button{transition:none}}
.bible-passage>strong[role=button]{text-decoration:none;transition:color 180ms ease}.bible-passage>strong[role=button]:hover,.bible-passage>strong[role=button]:active{color:var(--accent);text-decoration:none}@media(prefers-reduced-motion:reduce){.bible-passage>strong[role=button]{transition:none}}
.bible-passage:hover>.bible-card-actions>button,.bible-passage:active>.bible-card-actions>button{color:#fff}
.bible-passage:has(>strong[role=button]:hover)>.bible-card-actions>button,.bible-passage:has(>strong[role=button]:active)>.bible-card-actions>button{color:var(--accent)}
.bible-passage>strong[role=button]{display:block;width:fit-content;max-width:100%;align-self:flex-start}

.bible-chapter-navigation button,.bible-reader-heading button{transition:color 180ms ease;text-decoration:none}.bible-chapter-navigation button:not(:disabled):hover,.bible-chapter-navigation button:not(:disabled):active{color:#fff;background:transparent}.bible-reader-heading button:hover,.bible-reader-heading button:active{color:var(--accent);background:transparent;text-decoration:none}@media(prefers-reduced-motion:reduce){.bible-chapter-navigation button,.bible-reader-heading button{transition:none}}
.bible-settings .custom-select:has(#scripture-translation-options) .select-options,.bible-settings .custom-select:has(#bible-verse-layout-options) .select-options{top:calc(100% + 6px);bottom:auto;box-shadow:0 8px 24px #0007}


.bible-entry-meta{flex-wrap:nowrap}.bible-entry-meta .bible-attribution{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bible-entry-meta .bible-shared-prefix{display:inline}.bible-attribution .bible-sharer-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}

/* Keep scripture actions together while retaining their tap targets. */
.bible-entry-meta{gap:8px}
@media(max-width:620px){.bible-entry-meta{gap:0}}

.bible-chapter-reader{z-index:10000;padding-top:calc(20px + env(safe-area-inset-top))}

.bible-entry-title{display:block;width:fit-content;max-width:100%;margin:0 0 12px;font:600 var(--bible-text-size,22px)/1.4 Georgia,serif;cursor:pointer;text-decoration:none;transition:color 180ms ease}
.bible-entry-title:hover,.bible-entry-title:active{color:var(--accent);text-decoration:none}
.bible-entry-title:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.bible-entry-meta{align-items:center}
@media(prefers-reduced-motion:reduce){.bible-entry-title{transition:none}}

.bible-search-bar.is-pulsing{animation:bible-search-pulse 1.25s ease-in-out 4}
@keyframes bible-search-pulse{0%,100%{border-color:var(--line);box-shadow:0 6px 24px #0005}50%{border-color:var(--accent);box-shadow:0 0 0 3px #f2a54355,0 0 22px #f2a54344,0 6px 24px #0005}}
@media(prefers-reduced-motion:reduce){.bible-search-bar.is-pulsing{animation:none}}
