/* Scripture Study: reader, About page, offline pill */
#views { flex: 1 0 auto; }
footer.app-footer a { color: var(--accent); }
.offline-pill { margin-left: auto; font: 600 .78rem var(--sans); border: 1px solid var(--line); background: #fffdf8; color: var(--ink-soft); border-radius: 999px; padding: 4px 10px; min-height: 30px; cursor: pointer; }
.offline-pill.ready { background: #e6f2ea; border-color: #8fbf9c; color: #1f5a33; }
.offline-pill.off:not(.ready) { background: #fbe9e4; border-color: #d99c8d; color: #8a2b17; }
.rd-view, .ab-about { max-width: 760px; margin: 0 auto; padding: .6rem 1rem 3rem; box-sizing: border-box; font-family: var(--sans); }
.rd-view[hidden], .ab-about[hidden] { display: none; }
.rd-tools { position: sticky; top: 0; z-index: 4; background: rgba(250, 243, 227, .96); border-bottom: 1px solid var(--line); padding: .5rem 0 .35rem; display: flex; flex-direction: column; gap: .4rem; }
.rd-row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.rd-row select, .rd-row input { font: inherit; font-size: 16px; min-height: 40px; padding: .25rem .45rem; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: var(--ink); }
#rd-book { flex: 1 1 9rem; min-width: 0; } #rd-ch { flex: 0 0 4.6rem; } #rd-tr { flex: 1 1 10rem; min-width: 0; }
.rd-go input { flex: 1 1 10rem; min-width: 0; }
.rd-btn { font: 600 .92rem var(--sans); min-height: 40px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: var(--accent); cursor: pointer; }
.rd-btn:hover { background: var(--parchment-dark); }
.rd-btn[aria-pressed="true"] { background: var(--accent); color: #fff8ee; border-color: var(--accent); }
.rd-nav { font-size: 1.3rem; padding: 0 .75rem; }
.rd-msg { margin: 0; font-size: .85rem; color: #8a2b17; min-height: 0; }
.rd-msg:empty { display: none; }
.rd-text { font-family: var(--serif); font-size: 1.12rem; line-height: 1.65; color: var(--ink); }
.rd-h { font: 600 1.5rem var(--serif); color: var(--year); margin: .8rem 0 .4rem; }
.rd-h small { font: .85rem var(--sans); color: var(--ink-soft); }
.rd-v { margin: .2rem 0; padding: .1rem .35rem; border-radius: 5px; scroll-margin-top: 170px; }
.rd-vn { font: 700 .68rem var(--sans); color: var(--accent-soft); margin-right: .3rem; }
.rd-hl, tr.rd-hl td, tr.rd-hl th { background: rgba(214, 178, 92, .25); }
.rd-now { background: rgba(31, 95, 107, .14); }
.rd-miss { color: #8a7a66; font-style: italic; }
.rd-src { font: .78rem var(--sans); color: var(--ink-soft); margin-top: 1.2rem; }
.rd-cmp { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; table-layout: fixed; }
.rd-cmp th, .rd-cmp td { border-bottom: 1px solid #eadfc6; padding: .35rem .4rem; vertical-align: top; text-align: left; }
.rd-cmp thead th { font: 700 .8rem var(--sans); color: var(--accent); }
.rd-cmp tbody th { width: 2.2rem; font: 700 .72rem var(--sans); color: var(--accent-soft); }
.rd-cmp thead th:first-child { width: 2.2rem; }
.rd-foot { display: flex; justify-content: space-between; margin-top: 1.2rem; }
.ab-wrap h2 { font: 600 1.5rem var(--serif); color: var(--year); margin: .6rem 0; }
.ab-wrap h3 { font: 600 1.1rem var(--serif); color: var(--year); margin: 1.3rem 0 .4rem; }
.ab-wrap p { line-height: 1.5; }
.ab-wrap a { color: var(--accent); }
.ab-scroll { overflow-x: auto; }
.ab-tbl { border-collapse: collapse; width: 100%; font-size: .88rem; }
.ab-tbl th, .ab-tbl td { border-bottom: 1px solid #e3d6b8; padding: .35rem .4rem; text-align: left; vertical-align: top; }
.of-status { font-weight: 600; margin: .3rem 0; }
.of-bar { width: 100%; height: 14px; }
.of-err { color: #8a2b17; }
.of-btn { font: 600 .95rem var(--sans); min-height: 42px; padding: .4rem 1rem; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff8ee; cursor: pointer; }
.of-note { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 640px) { header.app-header { padding: .6rem .7rem .4rem; } header h1 { font-size: 1.2rem; } .app-nav a { padding: 3px 9px; } }
body { background-attachment: fixed; }
.rd-v::highlight(rd-word) { background: rgba(214, 160, 40, .45); }
::highlight(rd-word) { background: rgba(214, 160, 40, .45); color: inherit; }
/* header tools + settings dialog (restored from the retired tts.css, which also held these) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-tools { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; float: right; margin: 0 0 4px 8px; }
.tool-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 10px; border: 1px solid #c9bfae; border-radius: 18px; background: #fffdf8; color: #3b2f22; font: inherit; font-family: var(--sans); font-size: 14px; cursor: pointer; }
.tool-btn:hover { background: #f4ecdd; }
.tool-btn:focus-visible { outline: 2px solid #7a5b2e; outline-offset: 2px; }
@media (max-width: 640px) { .tool-label { display: none; } .tool-btn { min-width: 44px; min-height: 44px; justify-content: center; } }
.set-backdrop { position: fixed; inset: 0; z-index: 1500; background: rgba(30, 22, 12, .45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow: auto; }
.set-backdrop[hidden] { display: none; }
.set-panel { width: min(560px, 100%); background: #fffdf8; color: #2f2619; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.3); padding: 0 18px 14px; font-family: var(--sans); }
.set-panel header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5dccb; padding: 12px 0 8px; position: sticky; top: 0; background: #fffdf8; z-index: 1; }
.set-panel h2 { margin: 0; font-size: 20px; }
.set-panel h3 { margin: 14px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: #7a5b2e; }
.set-close { font: inherit; min-height: 40px; padding: 6px 16px; border-radius: 8px; border: 1px solid #7a5b2e; background: #7a5b2e; color: #fff; cursor: pointer; }
.set-row { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-weight: 600; border: 0; padding: 0; }
.set-row legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.set-inline { display: flex; gap: 8px; align-items: center; font-weight: normal; }
.set-inline select { flex: 1; min-width: 0; }
.set-panel select, .set-panel button { font: inherit; min-height: 40px; }
.set-panel select { border: 1px solid #c9bfae; border-radius: 8px; background: #fffdf8; color: #2f2619; padding: 0 8px; }
.set-panel button:not(.set-close) { border: 1px solid #c9bfae; border-radius: 8px; background: #fffdf8; color: #7a4a2a; padding: 0 12px; cursor: pointer; }
.set-panel input[type=range] { flex: 1; accent-color: #7a4a2a; }
.set-chk { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-weight: normal; min-height: 36px; }
.set-cmp { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: normal; }
.set-cmp .set-chk { margin: 2px 0; }
.set-hint { margin: 0; font-size: 13px; color: #6b5939; font-weight: normal; }
.set-hint summary { cursor: pointer; min-height: 32px; }
.set-foot { font-size: 12px; color: #8a7a62; margin: 12px 0 0; }
.set-theme { display: flex; gap: 8px; flex-wrap: wrap; }
.set-theme label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid #c9bfae; border-radius: 999px; cursor: pointer; font-weight: normal; }
.set-theme input { accent-color: #7a4a2a; }
