/* The Whole Life's Bible Study Book (studybook.js). Light (parchment) uses the base variables; dark (cinematic) overrides below. */
.sb-head { margin: .4rem 0 .6rem; }
.sb-kicker { margin: 0; font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); }
.sb-title { margin: .1rem 0 .2rem; }
.sb-by { margin: 0; font: .86rem var(--sans); color: var(--ink-soft); }
.sb-tip { display: block; font: .9rem var(--sans); color: var(--ink-soft); margin: .4rem 0 .8rem; }
.sb-note { font: .95rem var(--sans); color: var(--ink-soft); padding: 1rem; border: 1px dashed var(--line); border-radius: 12px; }
.sb-crumbs { margin: .2rem 0; font: .85rem var(--sans); }
.sb-crumbs a { color: var(--accent); display: inline-flex; align-items: center; min-height: 44px; }
.sb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; box-sizing: border-box; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--accent); font: 600 .9rem var(--sans); text-decoration: none; cursor: pointer; }
.sb-btn:hover { border-color: var(--accent-soft); }
.sb-btn:focus-visible, .sb-blank:focus-visible, .sb-w:focus-visible, .sb-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sb-cont { background: var(--accent); color: #fff8ee; border-color: var(--accent); }
.sb-toc { list-style: none; margin: .6rem 0 1rem; padding: 0; display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.sb-toc a { display: flex; gap: .7rem; align-items: center; min-height: 56px; box-sizing: border-box; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.sb-n { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff8ee; font: 700 .9rem var(--sans); }
.sb-tt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 auto; }
.sb-tn { font: 600 1.02rem var(--serif); }
.sb-tt small { font: .78rem var(--sans); color: var(--ink-soft); }
.sb-bar { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sb-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.sb-copy { margin: 1.4rem 0 .5rem; font: .76rem var(--sans); color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: .6rem; }
.sb-copy p { margin: .15rem 0; }
.sb-prog { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: .4rem 0; font: .88rem var(--sans); color: var(--ink-soft); }
.sb-prog .sb-bar { flex: 1 1 8rem; }
.sb-small { padding: .35rem .75rem; font-size: .82rem; }
.sb-demo { display: inline-block; width: 2.4em; border-bottom: 2px solid var(--accent); vertical-align: baseline; }
.sb-text { font: 1.08rem/1.75 var(--serif); color: var(--ink); max-width: 44rem; overflow-wrap: anywhere; }
.sb-text p, .sb-text blockquote { margin: 0 0 .8rem; }
.sb-ind { text-indent: 1.6em; }
.sb-star { color: var(--accent); font-weight: 700; margin-right: .3em; }
.sb-q { margin: 0 0 .9rem; padding: .55rem .9rem; border-left: 3px solid var(--accent-soft); background: rgba(255, 253, 248, .55); border-radius: 0 10px 10px 0; }
.sb-h { margin: 1.1rem 0 .5rem; font: 700 1.05rem var(--serif); text-align: center; color: var(--accent); }
.sb-c { text-align: center; margin: .2rem 0 !important; font-weight: 600; }
.sb-arrow { text-align: center; margin: 0 !important; color: var(--accent); font-size: 1.2rem; line-height: 1.2; }
.sb-li { padding-left: 1.2em; }
.sb-num { font-weight: 700; }
.sb-pg { margin: .4rem 0 !important; text-align: right; font: .7rem var(--sans); color: var(--ink-soft); opacity: .75; }
.sb-pg span { border-top: 1px dotted var(--line); padding: .1rem .3rem; }
.sb-fig { margin: .6rem auto 1rem; text-align: center; }
.sb-fig img { max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.sb-epi { margin: 1.4rem 0; padding: .8rem 1rem; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sb-epi cite { display: block; margin-top: .3rem; font: .85rem var(--sans); font-style: normal; color: var(--ink-soft); }
.sb-pn { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin: 1.4rem 0 2rem; }
.sb-notes { width: 100%; box-sizing: border-box; min-height: 16rem; padding: .8rem; font: 1rem/1.6 var(--serif); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sb-saved { font: .8rem var(--sans); color: var(--ink-soft); min-height: 1.2em; }

/* a blank: inline in the text; 44px tap target without stretching the line (negative margins) */
.sb-blank { display: inline-block; vertical-align: baseline; min-height: 44px; min-width: 44px; margin: -11px .1em; padding: 0 .1em; border: 0; background: none; color: inherit; font: inherit; line-height: 44px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sb-line { display: inline-block; min-height: 1.3em; line-height: 1.3; padding: 0 .2em; border-bottom: 2px solid var(--accent); border-radius: 3px 3px 0 0; background: transparent; text-align: center; vertical-align: baseline; }
.sb-blank:hover .sb-line { background: rgba(166, 124, 82, .22); }
.sb-open .sb-line { border-bottom-style: dashed; }
.sb-done .sb-line { min-width: 0 !important; font-weight: 700; color: var(--accent); background: rgba(70, 140, 80, .12); border-bottom-color: #3f8a4c; }
.sb-done.sb-tap .sb-line::after { content: " ✓"; font-size: .75em; color: #3f8a4c; }
.sb-done.sb-shown .sb-line { border-bottom-style: dotted; background: rgba(166, 124, 82, .12); border-bottom-color: var(--accent-soft); }
.sb-done.sb-typed .sb-line, .sb-done.sb-own .sb-line { border-bottom-color: var(--accent-soft); background: rgba(166, 124, 82, .12); }
.sb-active .sb-line { box-shadow: 0 0 0 2px var(--accent); background: rgba(166, 124, 82, .28); }
.sb-hl .sb-line { box-shadow: 0 0 0 3px #e0b04a; background: rgba(224, 176, 74, .3); }
.sb-cur { background: rgba(224, 176, 74, .12); border-radius: 8px; }

/* the verse panel (bottom sheet) */
.sb-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); color: var(--ink); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px var(--shadow); border-radius: 16px 16px 0 0; padding: .4rem 1rem calc(.8rem + env(safe-area-inset-bottom)); animation: sbUp .22s var(--ease, ease-out); }
.sb-sheet[hidden] { display: none; }
@keyframes sbUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
body.sb-sheet-on .sb-view { padding-bottom: 55vh; }
.sb-sh-in { max-width: 44rem; margin: 0 auto; }
.sb-sh-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sb-ref { margin: .2rem 0; font: 700 1rem var(--sans); color: var(--accent); }
.sb-ref small { font-weight: 500; color: var(--ink-soft); }
.sb-ref2 { font-size: .85rem; margin-top: .5rem; }
.sb-x { min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 1.6rem; color: var(--ink-soft); cursor: pointer; }
.sb-ask { margin: .1rem 0 .3rem; font: .88rem var(--sans); color: var(--ink-soft); }
.sb-verse { margin: 0 0 .3rem; font: 1.08rem/1.6 var(--serif); }
.sb-w { display: inline-block; min-height: 44px; min-width: 44px; margin: -2px 0; padding: 0 .22em; border: 1px solid transparent; border-radius: 8px; background: none; color: inherit; font: inherit; line-height: 42px; cursor: pointer; text-align: center; }
.sb-w:hover { border-color: var(--line); background: rgba(166, 124, 82, .1); }
.sb-it { font-style: italic; }
.sb-pu { font-weight: 400; font-style: normal; }
.sb-w.sb-no { border-color: #b4553a; background: rgba(180, 85, 58, .12); animation: sbNo .35s; }
.sb-w.sb-ok, .sb-w.sb-ans { border-color: #3f8a4c; background: rgba(70, 140, 80, .18); font-weight: 700; }
@keyframes sbNo { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sb-fb { min-height: 1.3em; margin: .2rem 0; font: 600 .9rem var(--sans); }
.sb-fb.ok { color: #3f8a4c; } .sb-fb.no { color: #b4553a; }
.sb-acts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.sb-type { display: flex; gap: .4rem; margin: .4rem 0; }
.sb-type input { flex: 1 1 auto; min-height: 44px; box-sizing: border-box; padding: .4rem .7rem; font: 1rem var(--sans); border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.sb-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .sb-sheet, .sb-w.sb-no { animation: none; } .sb-bar > span { transition: none; } }

/* dark (cinematic) look */
html:not(.light) .sb-toc a, html:not(.light) .sb-btn { background: var(--surface); color: var(--cream); border-color: var(--line); }
html:not(.light) .sb-btn { color: var(--gold2); }
html:not(.light) .sb-n, html:not(.light) .sb-cont { background: linear-gradient(180deg, #e6c47f, #c89d52); color: #1a130b; border-color: transparent; }
html:not(.light) .sb-kicker, html:not(.light) .sb-h, html:not(.light) .sb-star, html:not(.light) .sb-arrow, html:not(.light) .sb-ref, html:not(.light) .sb-crumbs a { color: var(--gold); }
html:not(.light) .sb-q { background: rgba(217, 179, 106, .06); border-left-color: var(--gold); }
html:not(.light) .sb-bar > span { background: var(--gold); }
html:not(.light) .sb-line { border-bottom-color: var(--gold); }
html:not(.light) .sb-done .sb-line { color: var(--gold2); background: rgba(120, 190, 130, .14); border-bottom-color: #7fc48a; }
html:not(.light) .sb-done.sb-tap .sb-line::after, html:not(.light) .sb-fb.ok { color: #8fd49a; }
html:not(.light) .sb-done.sb-shown .sb-line, html:not(.light) .sb-done.sb-typed .sb-line, html:not(.light) .sb-done.sb-own .sb-line { background: rgba(217, 179, 106, .1); border-bottom-color: var(--gold); }
html:not(.light) .sb-active .sb-line { box-shadow: 0 0 0 2px var(--gold); background: rgba(217, 179, 106, .25); }
html:not(.light) .sb-sheet { background: #17120c; border-top-color: rgba(217, 179, 106, .35); box-shadow: 0 -14px 40px rgba(0, 0, 0, .6); }
html:not(.light) .sb-w:hover { background: rgba(217, 179, 106, .1); }
html:not(.light) .sb-w.sb-ok, html:not(.light) .sb-w.sb-ans { border-color: #7fc48a; background: rgba(120, 190, 130, .18); }
html:not(.light) .sb-w.sb-no { border-color: #e08a6e; background: rgba(224, 138, 110, .14); }
html:not(.light) .sb-fb.no { color: #f0a58c; }
html:not(.light) .sb-type input, html:not(.light) .sb-notes { background: rgba(0, 0, 0, .25); color: var(--cream); }
html:not(.light) .sb-fig img { background: #efe7d8; }
