:root { color-scheme: light dark; font-family: system-ui, sans-serif; background: #f7f4ee; color: #231f1b; --panel: #fffcf6; --line: #d8cdbd; --accent: #315b52; --button-ink: #fff; --muted: #5c584f; }
* { box-sizing: border-box; }
@media (prefers-color-scheme: dark) {
  :root { background: #181d1b; color: #f6efde; --panel: #202825; --line: #46534c; --accent: #b6d9c9; --button-ink: #17221d; --muted: #c2c9c1; }
}
body { margin: 0; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; max-width: 780px; padding: 21px clamp(16px, 5vw, 38px); margin: auto; border-bottom: 1px solid var(--line); }
header a { color: inherit; text-decoration: none; font: 650 1.5rem Georgia, serif; }
header span, #edition, #search-status, #meaning-option span { color: var(--muted); font-size: .88rem; }
main { max-width: 780px; padding: 24px clamp(16px, 5vw, 38px) 55px; margin: auto; }
.search-row, .reading-controls, nav { display: flex; gap: 8px; }
button, select, input { font: inherit; min-height: 44px; }
button, select, input[type=search] { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: inherit; background: var(--panel); }
input[type=search] { min-width: 0; flex: 1; }
.search-row button { background: var(--accent); color: var(--button-ink); border-color: var(--accent); font-weight: 650; }
#meaning-option { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; font-size: .92rem; }
#meaning-option[hidden] { display: none; }
#search-section { margin-bottom: 24px; }
#results { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; }
h1 { margin: 17px 0 4px; font: 600 clamp(2.25rem, 8vw, 3.9rem) Georgia, serif; letter-spacing: -.045em; }
h2 { margin: 14px 0 5px; font: 650 1.25rem Georgia, serif; }
#edition { margin: 0 0 21px; }
#verses { font: 400 clamp(1.15rem, 4.7vw, 1.42rem)/1.62 Georgia, serif; }
#verses p { margin: 0 0 .7rem; border-radius: 6px; }
#verses sup { color: var(--accent); margin-right: .46rem; font: 700 12px system-ui, sans-serif; }
#verses [data-destination] { background: color-mix(in srgb, var(--accent) 19%, transparent); }
nav { margin-top: 24px; justify-content: space-between; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[disabled] { opacity: .5; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.account-gate { max-width: 520px; padding: 24px clamp(16px, 5vw, 38px); margin: auto; }
.account-gate form, #account form, #record-form { display: grid; gap: 12px; margin: 16px 0; }
.account-gate [hidden] { display: none; }
#join p { margin: -6px 0 0; font-size: .875rem; }
.account-gate label, #account label, #record-form label { display: grid; gap: 5px; }
.account-gate input, .account-gate textarea, #account input, #record-form textarea {
  width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; font: inherit;
}
summary { padding: 10px 0; cursor: pointer; }
#account { margin-top: 28px; border-top: 1px solid var(--line); }
#saved { margin-top: 28px; border-top: 1px solid var(--line); }
#saved-query { display: block; width: 100%; margin-top: 6px; }
#all-records button { white-space: normal; overflow-wrap: anywhere; text-align: start; }
#passage-actions { margin-bottom: 12px; }
#verses mark { color: inherit; background: color-mix(in srgb, var(--accent) 38%, transparent); }
.verse-save { margin-left: 8px; padding: 0 7px; min-height: 34px; font: 600 .72rem system-ui, sans-serif; }
#chapter-records { list-style: none; padding-left: 0; }
#chapter-records li { padding: 10px 0; border-bottom: 1px solid var(--line); }
#chapter-records p { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog { width: min(440px, calc(100vw - 28px)); background: var(--panel); border: 1px solid var(--line); color: inherit; border-radius: 12px; padding: 18px; }
dialog::backdrop { background: #15191499; }
