/*
 * Schueler Bible web companion.
 *
 * The desktop app's theme (FrontEndApp/src/assets/scss/styles.scss): parchment pages,
 * near-black chrome, the red primary, gilt for notes. Its --color-* tokens are copied
 * here under their own names so the two can be compared and kept in step; the short
 * names below them are what this stylesheet uses.
 */
:root {
    --color-chrome: #1b1917;
    --color-chrome-raised: #262220;
    --color-chrome-light: #37312d;
    --color-chrome-edge: #423a35;
    --color-text-inverse: #f2ede4;
    --color-page: #f4efe5;
    --color-surface: #fbf8f2;
    --color-surface-raised: #fffdf9;
    --color-surface-sunken: #efe9dd;
    --color-border: #ddd5c5;
    --color-text: #221f1c;
    --color-text-muted: #5c554c;
    --color-text-subtle: #8a8175;
    --color-primary: #b3342c;
    --color-primary-hover: #c9463c;
    --color-primary-soft: #f7eae8;
    --color-on-primary: #fdf8f4;
    --color-gilt: #a8842f;
    --color-gilt-soft: #f6ecd4;
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(40, 30, 20, 0.10);
    --shadow-md: 0 2px 8px rgba(40, 30, 20, 0.14);

    --bg: var(--color-page);
    --surface: var(--color-surface-raised);
    --surface-2: var(--color-surface-sunken);
    --text: var(--color-text);
    --muted: var(--color-text-muted);
    --line: var(--color-border);
    --accent: var(--color-primary);
    --accent-hover: var(--color-primary-hover);
    --accent-ink: var(--color-on-primary);
    --accent-soft: var(--color-primary-soft);
    --link: var(--color-primary);
    --red-letter: var(--color-primary);
    --gold: var(--color-gilt);
    --gold-soft: var(--color-gilt-soft);
    --focus: var(--color-primary-hover);
    --chrome: var(--color-chrome);
    --chrome-light: var(--color-chrome-light);
    --chrome-edge: var(--color-chrome-edge);
    --chrome-ink: var(--color-text-inverse);
    --chrome-muted: #b5ab9e;
    --shadow: var(--shadow-sm), var(--shadow-md);
    --reading-font: Georgia, "Crimson Pro", "Times New Roman", serif;
    --ui-font: "Segoe UI", system-ui, -apple-system, "Open Sans", sans-serif;
    --reading-size: 18px;
    --topbar-h: 52px;
    --tabbar-h: 60px;
    --highlight-mix: 40%;
    color-scheme: light;
}
/*
 * The desktop has no dark theme. This one is built from its chrome colours: the page
 * takes the dark of the desktop's frame, with the same red (lifted a little so it
 * reads on black) and gilt.
 */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #141211; --surface: var(--color-chrome-raised); --surface-2: var(--color-chrome-light);
        --text: var(--color-text-inverse); --muted: #b5ab9e; --line: var(--color-chrome-edge);
        --accent: #d4574c; --accent-hover: #e06a5f; --accent-ink: #fdf8f4; --accent-soft: #3b2422;
        --link: #e8857b; --red-letter: #ef8a80; --gold: #d0ab55; --gold-soft: #3a3020; --focus: #e06a5f;
        --chrome: #0e0d0c; --chrome-light: #2a2522; --chrome-edge: #37312d;
        --shadow: 0 1px 3px rgba(0,0,0,.45); --highlight-mix: 24%; color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #141211; --surface: var(--color-chrome-raised); --surface-2: var(--color-chrome-light);
    --text: var(--color-text-inverse); --muted: #b5ab9e; --line: var(--color-chrome-edge);
    --accent: #d4574c; --accent-hover: #e06a5f; --accent-ink: #fdf8f4; --accent-soft: #3b2422;
    --link: #e8857b; --red-letter: #ef8a80; --gold: #d0ab55; --gold-soft: #3a3020; --focus: #e06a5f;
    --chrome: #0e0d0c; --chrome-light: #2a2522; --chrome-edge: #37312d;
    --shadow: 0 1px 3px rgba(0,0,0,.45); --highlight-mix: 24%; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--ui-font); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--link); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 20px 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 6px; }
.boot { padding: 40px; text-align: center; color: #888; }

/* ---------------------------------------------------------------- shell -- */
.shell { min-height: 100%; display: grid; grid-template-rows: var(--topbar-h) 1fr; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
    padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top));
    background: var(--chrome); color: var(--chrome-ink); border-bottom: 1px solid var(--chrome-edge);
}
.topbar .brand { font-weight: 600; text-decoration: none; color: inherit; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .status { font-size: 12px; opacity: .85; white-space: nowrap; }
.body { display: grid; grid-template-columns: 1fr; min-height: 0; }
main { min-width: 0; padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); max-width: 980px; width: 100%; margin: 0 auto; }
main.wide { max-width: 1400px; }

.sidenav { display: none; }
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--chrome); border-top: 1px solid var(--chrome-edge);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--chrome-muted); text-decoration: none; border-top: 2px solid transparent; }
.tabbar a.on { color: var(--chrome-ink); font-weight: 600; border-top-color: var(--accent); }
.tabbar .icon, .sidenav .icon { font-size: 20px; line-height: 1; }

@media (min-width: 900px) {
    .body { grid-template-columns: 210px 1fr; }
    .tabbar { display: none; }
    main { padding-bottom: 40px; }
    .sidenav {
        display: block; position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h));
        overflow-y: auto; padding: 12px 8px; border-right: 1px solid var(--chrome-edge); background: var(--chrome);
    }
    .sidenav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-md); color: var(--chrome-ink); text-decoration: none; border-left: 3px solid transparent; }
    .sidenav a:hover { background: var(--chrome-light); }
    .sidenav a.on { background: var(--chrome-light); border-left-color: var(--accent); font-weight: 600; }
    .sidenav .group { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--chrome-muted); }
}

/* ------------------------------------------------------------- controls -- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px;
    border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.icon-only { min-width: 38px; padding: 6px; }
.btn:disabled { opacity: .5; cursor: default; }
.topbar .btn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.input { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent); padding: 10px 12px; border-radius: var(--radius-md); }
.notice { background: var(--accent-soft); border-radius: var(--radius-lg); padding: 12px 14px; margin-bottom: 14px; }
.notice.stale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 14px; }
.notice.stale > span { flex: 1 1 120px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
details > summary { cursor: pointer; }
mark { background: #ffe98a; color: inherit; border-radius: 2px; }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }

/* --------------------------------------------------------------- reader -- */
.reader { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1200px) { .reader.has-panel { grid-template-columns: minmax(0, 1fr) 420px; } }
.reader-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; position: sticky; top: var(--topbar-h); background: var(--bg); padding: 8px 0; z-index: 5; }
.reader-head .ref { font-size: 1.15rem; font-weight: 600; background: none; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.goto { flex: 0 1 180px; min-width: 70px; margin-left: auto; }
.goto .input { min-width: 0; }
.scripture { font-family: var(--reading-font); font-size: var(--reading-size); line-height: 1.7; }
.scripture .v { display: block; padding: 3px 6px; margin: 0 -6px; border-radius: var(--radius-sm); cursor: pointer; scroll-margin-top: 120px; }
.scripture.inline .v { display: inline; padding: 2px 0; margin: 0; }
.scripture .v:hover { background: var(--surface-2); }
.scripture .v.sel { outline: 2px solid var(--focus); background: var(--accent-soft); }
.scripture .vn { font-family: var(--ui-font); font-size: .62em; font-weight: 700; color: var(--muted); vertical-align: .45em; margin-right: 4px; }
.scripture .red { color: var(--red-letter); }
.scripture i { color: var(--muted); }
.scripture .w.tap { border-bottom: 1px dotted var(--muted); }
.scripture .w.tap:hover { color: var(--accent); }
.scripture .w.has-note { border-bottom: 2px solid var(--gold); }
.scripture .tn { font-family: var(--ui-font); font-size: .7em; color: var(--accent); cursor: pointer; vertical-align: .4em; padding: 0 2px; }
.scripture .tn-text { display: block; font-family: var(--ui-font); font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 4px 8px; border-radius: var(--radius-sm); margin: 2px 0; }
.scripture .icons { font-family: var(--ui-font); font-size: .7em; margin-left: 4px; white-space: nowrap; }
.scripture .note-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; vertical-align: .2em; }
.scripture .inline-note { display: block; font-family: var(--ui-font); font-size: 14px; border-left: 3px solid var(--accent); padding: 2px 10px; margin: 4px 0 8px; color: var(--muted); }
.chapter-nav { display: flex; justify-content: space-between; margin: 24px 0 8px; }
.read-badge { font-size: 12px; color: var(--muted); }

/* the verse panel: beside the text on wide screens, a sheet from the bottom on narrow ones */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0 16px; }
.panel-head h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.panel-body { padding: 4px 16px 16px; }
.panel .tabs { padding: 0 8px; scrollbar-width: none; }
.panel .tabs::-webkit-scrollbar { display: none; }
.panel .tabs button { padding: 8px 8px; font-size: 14px; }
@media (min-width: 1200px) { .panel { position: sticky; top: calc(var(--topbar-h) + 64px); max-height: calc(100vh - var(--topbar-h) - 80px); overflow-y: auto; } }
@media (max-width: 1199px) {
    .panel {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 72vh; overflow-y: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: env(safe-area-inset-bottom);
    }
    @media (min-width: 900px) { .panel { left: 210px; } }
}
.sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 25; }
@media (min-width: 1200px) { .sheet-scrim { display: none; } }

.verse-quote { font-family: var(--reading-font); font-size: 15px; background: var(--surface-2); border-radius: var(--radius-md); padding: 8px 10px; margin: 4px 0 8px; }

/* notes as written */
.note-html { overflow-wrap: anywhere; }
.note-html img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.note-html h1 { font-size: 1.25rem; } .note-html h2 { font-size: 1.12rem; } .note-html h3 { font-size: 1rem; }
.note-html p { margin: 0 0 8px; }
.note-html table { border-collapse: collapse; } .note-html td, .note-html th { border: 1px solid var(--line); padding: 4px 8px; }
.note-html blockquote { border-left: 3px solid var(--line); margin: 6px 0; padding-left: 12px; color: var(--muted); }
.note-html .vref { background: var(--accent-soft); padding: 0 6px; border-radius: var(--radius-sm); text-decoration: none; white-space: nowrap; }
.note-html .vquote { display: block; font-family: var(--reading-font); font-style: italic; border-left: 3px solid var(--accent); padding: 2px 10px; margin: 4px 0; }
.note-html .missing-image { color: var(--muted); font-size: 13px; }
.note-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* picker */
.overlay { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); padding-top: calc(12px + env(safe-area-inset-top)); }
.overlay .inner { max-width: 900px; margin: 0 auto; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.book-grid button, .chapter-grid button, .chapter-grid a {
    padding: 9px 8px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); text-decoration: none;
}
.book-grid button.on { border-color: var(--accent); background: var(--accent-soft); }
.book-grid button .has { color: var(--accent); font-size: 10px; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.chapter-grid button, .chapter-grid a { text-align: center; }
.chapter-grid .read { background: var(--accent-soft); border-color: var(--accent); }
.chapter-grid .noted { box-shadow: inset 0 -3px 0 var(--gold); }
.chapter-grid .on { outline: 2px solid var(--focus); outline-offset: 1px; font-weight: 700; }

/* lists of results */
.hit { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hit:last-child { border-bottom: 0; }
.hit .ref { font-weight: 600; text-decoration: none; }
.hit .text { font-family: var(--reading-font); font-size: 16px; }
.hit .excerpt { color: var(--text); margin-top: 2px; overflow-wrap: anywhere; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.commentary p { margin: 0 0 10px; font-family: var(--reading-font); font-size: 16px; line-height: 1.6; }
.commentary h3 { font-family: var(--ui-font); }
.commentary .footnotes { font-size: 13px; color: var(--muted); }
.commentary .lemma { font-style: italic; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-lg); z-index: 50; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }
.toast .btn { min-height: 30px; }

/* =================================================== shell polish and icons -- */
svg.icon { flex: none; vertical-align: -0.2em; }
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { border-radius: 6px; background: var(--color-page); padding: 2px; }
.topbar .page-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.topbar .page-title:not(:empty)::before { content: ""; display: inline-block; width: 1px; height: 18px; background: var(--chrome-edge); margin: 0 12px; vertical-align: -3px; }
@media (max-width: 899px) {
    .topbar .brand-name { display: none; }
    .topbar .page-title:not(:empty)::before { margin-left: 2px; }
}
.topbar .btn.small { gap: 6px; }
.sidenav a svg.icon { opacity: .85; }
.sidenav a.on svg.icon { opacity: 1; color: var(--accent); }
.tabbar a svg.icon { margin-bottom: 1px; }
.tabs a { display: inline-block; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.toast .toast-close { color: inherit; min-height: 26px; padding: 2px; }

/* More page: the whole menu as tiles */
.menu-group h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 2px 8px; }
.menu-group:first-of-type h2 { margin-top: 4px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--accent); }
.tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--chrome); color: var(--chrome-ink); flex: none; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-text strong { font-weight: 600; }

/* ================================================================ reader -- */
.psalm-letter { display: block; font-family: var(--ui-font); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin: 14px 0 2px; }
.psalm-letter span { font-size: 20px; margin-right: 4px; font-weight: 400; }
.scripture .v.speaking { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.scripture .mark-icon { color: var(--accent); }
.reading-bar {
    position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 6;
    display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px 8px 14px;
    background: var(--chrome); color: var(--chrome-ink); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.reading-bar .btn { background: var(--chrome-light); border-color: var(--chrome-edge); color: var(--chrome-ink); }
@media (min-width: 900px) { .reading-bar { bottom: 16px; } }
.place-map { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; z-index: 0; }

/* ============================================================== memorize -- */
.memorize-options { margin-bottom: 8px; }
.memorize-text { font-family: Consolas, "Courier New", monospace; font-size: calc(var(--reading-size) - 1px); line-height: 1.9; display: flex; flex-wrap: wrap; gap: 0 .6em; }
.memorize-text .blank { color: var(--muted); letter-spacing: .04em; }
.book-drill { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; font-family: Consolas, "Courier New", monospace; }
.book-drill h2 { grid-column: 1 / -1; font-family: var(--ui-font); }
.book-drill-item.blank { color: var(--muted); }

/* ================================================================ export -- */
table.counts { width: 100%; border-collapse: collapse; }
table.counts td { padding: 5px 2px; border-bottom: 1px solid var(--line); }
table.counts td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.counts tr.empty td { color: var(--muted); }
table.counts tr.total td { font-weight: 700; border-bottom: 0; }
label.option { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
label.option:last-child { border-bottom: 0; }
label.option input { margin-top: 4px; }
.export-bar { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 900px) { .export-bar { bottom: 16px; } }

/* ======================================================== info and about -- */
.prose p, .prose li { line-height: 1.6; }
.prose h2 { margin-top: 18px; }
.welcome section { margin-bottom: 8px; }
.welcome-sign { margin-top: 20px; font-style: italic; }
.welcome-sign p { margin: 4px 0; }
.welcome-name { font-family: var(--reading-font); font-size: 1.2rem; font-style: normal; }
.thesis { font-family: var(--reading-font); font-size: 1.15rem; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.scripture-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.scripture-quote p { font-family: var(--reading-font); font-size: 1.05rem; margin: 0 0 4px; }
.scripture-quote cite { font-style: normal; font-size: 13px; color: var(--muted); }
button.gloss { font: inherit; color: inherit; background: none; border: 0; padding: 0; border-bottom: 1px dotted var(--muted); cursor: help; }
dl.glossary dt { font-weight: 700; margin-top: 10px; }
dl.glossary dd { margin: 2px 0 0; color: var(--muted); }
.evidence { margin-top: 10px; }
.evidence-group { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 4px; }
.evidence-item { border-left: 3px solid var(--line); padding: 2px 12px; margin: 8px 0; }
.evidence-item.is-against { border-left-color: var(--accent); }
.evidence-item.is-quote { border-left-color: var(--gold); }
.evidence-label { font-weight: 700; margin-bottom: 2px; }
.about-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 18px; }
.about-name { font-size: 1.3rem; font-weight: 600; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ======================================================= reading stats -- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--muted); }
.weekday { padding: 4px 0; }
.weekday-name { width: 90px; }
.weekday-count { width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* ================================================================ search -- */
.search-options { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.search-options label { font-size: 13px; color: var(--muted); }
.search-options select { margin-top: 2px; color: var(--text); }

/* =========================================================== screen saver -- */
.screensaver {
    position: fixed; inset: 0; z-index: 100; background: #111 center / cover no-repeat; color: #fff;
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px;
}
.screensaver.plain { background: #2b211b url("../splash/leather.svg") center / cover; }
.screensaver::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }
.screensaver > * { position: relative; }
.ss-time { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 24px; font-size: 2.2rem; font-weight: 300; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.ss-verse { max-width: 900px; margin: 0; text-align: center; cursor: pointer; font-size: calc(clamp(20px, 3.2vw, 38px) * var(--ss-scale, 1)); }
.ss-verse blockquote { margin: 0; font-family: var(--reading-font); line-height: 1.45; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.ss-verse figcaption { margin-top: 16px; font-size: .6em; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.ss-buttons { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); right: 20px; display: flex; gap: 8px; }
.ss-buttons .btn { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.3); color: #fff; }
