/* UECF.NET Teen Study Bible (NKJV) — stylesheet
   Modern blue/teal/navy palette built around this edition's own
   cyan-teal accent (#00BCE4), re-themed for a teen audience while
   staying professional and readable. */

:root{
  --navy:#0F2545;
  --navy-soft:#33507A;
  --teal:#00A9C7;
  --teal-bright:#00BCE4;
  --teal-deep:#0A7F97;
  --coral:#FF6B5B;
  --paper:#F6FAFC;
  --paper-dim:#EAF3F6;
  --line:#D8E6EC;
  --font-display:'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body:'Inter', system-ui, -apple-system, sans-serif;
  --font-scripture:'Source Serif 4', Georgia, serif;

  --bg:var(--paper);
  --bg-panel:#ffffff;
  --bg-panel-alt:var(--paper-dim);
  --text:var(--navy);
  --text-soft:#3F5872;
  --border:var(--line);
  --accent:var(--teal-deep);
  --accent-soft:var(--teal-bright);
  --link:var(--teal-deep);
  --highlight-bg:#DFF6FB;
  --dropcap-color:var(--teal-deep);

  --badge-footnote-bg:#EAF0F5; --badge-footnote-fg:#5A6B80; --badge-footnote-border:#CBD8E2;
  --badge-insight-bg:#E4F7FB; --badge-insight-fg:#0A7F97; --badge-insight-border:#A9E4EF;
  --badge-feature-bg:#0F2545; --badge-feature-fg:#ffffff; --badge-feature-border:#0F2545;
  --badge-unclassified-bg:#F1EFF7; --badge-unclassified-fg:#6B6480; --badge-unclassified-border:#DCD7E8;

  --scripture-size:1.08rem;
  --scripture-line:1.85;
}

:root[data-theme="dark"]{
  --bg:#0A1526;
  --bg-panel:#122036;
  --bg-panel-alt:#0E1A2E;
  --text:#E7F1F6;
  --text-soft:#A9BFD1;
  --border:#233B57;
  --accent:#3FD4F0;
  --accent-soft:#00BCE4;
  --link:#5CE1F5;
  --highlight-bg:#0F3C46;
  --dropcap-color:#3FD4F0;

  --badge-footnote-bg:#1B2A3C; --badge-footnote-fg:#9FB4C8; --badge-footnote-border:#2C4258;
  --badge-insight-bg:#0F3542; --badge-insight-fg:#6FE2F5; --badge-insight-border:#175064;
  --badge-feature-bg:#3FD4F0; --badge-feature-fg:#062231; --badge-feature-border:#3FD4F0;
  --badge-unclassified-bg:#241E33; --badge-unclassified-fg:#B7ADCB; --badge-unclassified-border:#372C4A;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0A1526;
    --bg-panel:#122036;
    --bg-panel-alt:#0E1A2E;
    --text:#E7F1F6;
    --text-soft:#A9BFD1;
    --border:#233B57;
    --accent:#3FD4F0;
    --accent-soft:#00BCE4;
    --link:#5CE1F5;
    --highlight-bg:#0F3C46;
    --dropcap-color:#3FD4F0;

    --badge-footnote-bg:#1B2A3C; --badge-footnote-fg:#9FB4C8; --badge-footnote-border:#2C4258;
    --badge-insight-bg:#0F3542; --badge-insight-fg:#6FE2F5; --badge-insight-border:#175064;
    --badge-feature-bg:#3FD4F0; --badge-feature-fg:#062231; --badge-feature-border:#3FD4F0;
    --badge-unclassified-bg:#241E33; --badge-unclassified-fg:#B7ADCB; --badge-unclassified-border:#372C4A;
  }
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html{-webkit-text-size-adjust:100%; overscroll-behavior-y:contain;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:var(--bg);
  line-height:1.5;
  overscroll-behavior-y:contain;
  background-image:
    radial-gradient(ellipse 900px 500px at 100% -10%, rgba(0,188,228,.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 15%, rgba(15,37,69,.05), transparent 55%);
  background-attachment:fixed;
}
:root[data-theme="dark"] body{
  background-image:
    radial-gradient(ellipse 900px 500px at 100% -10%, rgba(63,212,240,.09), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 15%, rgba(63,212,240,.04), transparent 55%);
}
h1,h2,h3{font-family:var(--font-display); color:var(--text); margin:0 0 .5em;}
a{color:var(--link); text-decoration:none;}
a:hover{text-decoration:underline;}
button{font-family:inherit;}
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--teal-bright); color:var(--navy);
  padding:10px 16px; z-index:200; font-weight:600; border-radius:0 0 6px 0;
}
.skip-link:focus{left:0;}
:focus-visible{outline:3px solid var(--teal-bright); outline-offset:2px;}

/* ---------- Header ---------- */
.sb-header{
  background:linear-gradient(135deg, var(--navy) 0%, #16345F 100%);
  color:#EAF6FA; border-bottom:3px solid var(--teal-bright);
}
:root[data-theme="dark"] .sb-header{background:linear-gradient(135deg,#081020 0%,#0D1D33 100%);}
.sb-header-inner{
  max-width:1400px; margin:0 auto; padding:10px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.sb-brand{display:flex; align-items:center; gap:12px; color:#EAF6FA;}
.sb-brand img{border-radius:6px; display:block;}
.sb-brand-mark{
  width:38px; height:38px; border-radius:10px; flex:0 0 auto;
  background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:700; font-size:1.2rem; color:var(--navy);
}
.sb-brand-text{display:flex; flex-direction:column; line-height:1.25;}
.sb-brand-text strong{font-family:var(--font-display); font-size:1.05rem; color:#fff; font-weight:600;}
.sb-brand-text small{font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--teal-bright); font-weight:600;}
.sb-header-nav{display:flex; align-items:center; gap:4px;}
.sb-header-nav a{color:#EAF6FA; font-size:.9rem; font-weight:600; padding:8px 12px; border-radius:6px;}
.sb-header-nav a:hover{background:rgba(0,188,228,.18); color:var(--teal-bright); text-decoration:none;}

/* ---------- Desktop "Other Bibles" dropdown (kept minimal / Home-only) ---------- */
.sb-other-bibles-menu{position:relative;}
.sb-other-bibles-trigger{
  background:none; border:none; color:#EAF6FA; font-size:.9rem; font-weight:600;
  padding:8px 12px; border-radius:6px; cursor:pointer; font-family:inherit;
}
.sb-other-bibles-trigger:hover{background:rgba(0,188,228,.18); color:var(--teal-bright);}
.sb-other-bibles-drop{
  display:none; position:absolute; right:0; top:calc(100% + 6px); background:var(--bg-panel);
  border:1px solid var(--border); border-radius:8px; padding:6px; min-width:200px;
  box-shadow:0 10px 30px rgba(15,37,69,.25); z-index:80;
}
.sb-other-bibles-drop.show{display:block;}
.sb-other-bibles-drop a{
  display:block; padding:9px 12px; border-radius:5px; color:var(--text); font-size:.88rem; font-weight:500;
}
.sb-other-bibles-drop a:hover{background:var(--bg-panel-alt); text-decoration:none; color:var(--accent);}
.sb-other-bibles-sheet{display:none;}

/* ---------- Copyright/edition notice banner ---------- */
.sb-notice{background:linear-gradient(90deg, var(--teal-bright), var(--teal)); color:var(--navy); border-bottom:1px solid var(--teal-deep);}
.sb-notice-inner{
  max-width:1400px; margin:0 auto; padding:8px 20px; display:flex; align-items:center;
  justify-content:space-between; gap:12px; font-size:.85rem;
}
.sb-notice a{color:var(--navy); font-weight:700; text-decoration:underline;}
.sb-notice button{background:none; border:none; color:var(--navy); cursor:pointer; font-size:1rem; line-height:1; padding:4px;}
.sb-notice[hidden]{display:none;}

/* ---------- Mobile app-style top bar (phones only) ---------- */
.sb-mtop{
  display:none; position:sticky; top:0; z-index:75;
  background:linear-gradient(135deg, var(--navy) 0%, #16345F 100%); color:#EAF6FA;
  align-items:center; gap:10px; padding:10px 14px; padding-top:calc(10px + env(safe-area-inset-top));
  border-bottom:2px solid var(--teal-bright);
}
:root[data-theme="dark"] .sb-mtop{background:linear-gradient(135deg,#081020 0%,#0D1D33 100%);}
.sb-mtop-home{
  width:34px; height:34px; border-radius:50%; background:rgba(255,255,255,.1); border:1px solid rgba(0,188,228,.4);
  display:flex; align-items:center; justify-content:center; font-size:1rem; flex:0 0 auto; text-decoration:none;
}
.sb-mtop-home:hover{background:rgba(0,188,228,.22); text-decoration:none;}
.sb-mtop-title{flex:1; min-width:0; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.sb-mtop-title strong{font-family:var(--font-display); font-size:1rem; color:#fff; font-weight:600;}
.sb-mtop-more{
  width:34px; height:34px; border-radius:50%; background:rgba(255,255,255,.1); border:1px solid rgba(0,188,228,.4);
  color:#EAF6FA; font-size:1.2rem; line-height:1; cursor:pointer; flex:0 0 auto;
}
.sb-mtop-more:hover{background:rgba(0,188,228,.22);}

/* ---------- Toolbar ---------- */
.sb-toolbar{
  position:sticky; top:0; z-index:50; background:var(--bg-panel); border-bottom:1px solid var(--border);
  box-shadow:0 2px 10px rgba(15,37,69,.07);
}
.sb-sheet-handle{display:none;}
.sb-toolbar-inner{
  max-width:1400px; margin:0 auto; padding:10px 16px; display:flex; align-items:center;
  gap:8px; flex-wrap:wrap;
}
.sb-select, .sb-input, .sb-btn{
  font-size:.88rem; padding:8px 10px; border-radius:8px; border:1px solid var(--border);
  background:var(--bg-panel); color:var(--text); font-family:var(--font-body);
}
.sb-select{cursor:pointer; min-width:120px;}
.sb-btn{cursor:pointer; font-weight:600; white-space:nowrap; transition:background .15s, border-color .15s;}
.sb-btn:hover{background:var(--bg-panel-alt); border-color:var(--accent-soft);}
.sb-btn-quiet{background:transparent; border-color:transparent; color:var(--accent);}
.sb-btn-quiet:hover{background:var(--bg-panel-alt); border-color:var(--border);}
.sb-nav-btns{display:flex; gap:4px;}
.sb-search-wrap{flex:1 1 220px; min-width:180px;}
.sb-search-btn{width:100%; text-align:left; cursor:pointer; color:var(--text-soft);}
.sb-search-btn kbd{
  float:right; font-size:.7rem; border:1px solid var(--border); border-radius:4px; padding:1px 5px;
  background:var(--bg-panel-alt);
}
.sb-tool-group{display:flex; gap:4px;}

/* ---------- App-style bottom tab bar (phones only) ---------- */
.sb-bottom-nav{
  display:none; position:fixed; left:0; right:0; bottom:0; z-index:70;
  background:var(--bg-panel); border-top:1px solid var(--border);
  padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 18px rgba(15,37,69,.12);
}
.sb-bn-btn{
  background:none; border:none; color:var(--text-soft); font-family:var(--font-body);
  display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.68rem; font-weight:600;
  padding:6px 4px; border-radius:8px; cursor:pointer; flex:1 1 0;
}
.sb-bn-btn .ic{font-size:1.15rem; line-height:1;}
.sb-bn-btn:hover, .sb-bn-btn:active{background:var(--bg-panel-alt); color:var(--text);}
.sb-bn-btn.sb-bn-primary{color:var(--accent);}
.sb-bn-btn.sb-bn-primary .ic{
  background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep)); color:#062231; width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; margin-bottom:1px;
}

.sb-sheet-backdrop{
  display:none; position:fixed; inset:0; background:rgba(10,21,38,.55); z-index:59;
}
.sb-sheet-backdrop.show{display:block;}

/* ---------- Layout ---------- */
.sb-layout{
  max-width:1400px; margin:0 auto; padding:20px 16px 60px;
  display:grid; grid-template-columns:230px minmax(0,1fr) 280px; gap:22px; align-items:start;
}
.sb-side, .sb-notes-panel-col{position:sticky; top:70px; max-height:calc(100vh - 90px); overflow-y:auto;}
.sb-side h2{font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:var(--accent); margin:0 0 8px;}
.sb-book-list{display:flex; flex-direction:column; gap:1px; margin-bottom:6px;}
.sb-book-list button{
  text-align:left; background:none; border:none; padding:6px 8px; border-radius:6px; cursor:pointer;
  color:var(--text-soft); font-size:.86rem;
}
.sb-book-list button:hover{background:var(--bg-panel-alt); color:var(--text);}
.sb-book-list button.active{background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep)); color:#062231; font-weight:700;}
.sb-chapter-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(34px,1fr)); gap:5px;}
.sb-chapter-grid button{
  padding:6px 0; border-radius:6px; border:1px solid var(--border); background:var(--bg-panel);
  color:var(--text); font-size:.82rem; cursor:pointer;
}
.sb-chapter-grid button:hover{background:var(--bg-panel-alt); border-color:var(--accent-soft);}
.sb-chapter-grid button.active{background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep)); border-color:var(--teal-deep); color:#062231; font-weight:700;}

.sb-main{min-width:0; background:var(--bg-panel); border:1px solid var(--border); border-radius:14px; padding:26px 30px 40px; box-shadow:0 1px 3px rgba(15,37,69,.05);}
.sb-chapter-head .kicker{font-size:.78rem; text-transform:uppercase; letter-spacing:.1em; color:var(--accent); font-weight:700; margin:0;}
.sb-chapter-head h1{font-size:1.9rem; margin:4px 0 14px;}
.sb-chapter-nav{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:18px; flex-wrap:wrap;}

/* ---------- Book introduction panel ---------- */
.sb-book-intro{
  background:var(--bg-panel-alt); border:1px solid var(--border); border-left:4px solid var(--teal-bright);
  border-radius:10px; padding:22px 24px; margin-bottom:22px; color:var(--text-soft);
}
.sb-book-intro[hidden]{display:none;}
.sb-intro-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:18px;}
.sb-intro-field{font-size:.85rem;}
.sb-intro-field .lbl{
  display:block; font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700;
  color:var(--accent); margin-bottom:3px;
}
.sb-intro-field .val{color:var(--text); font-weight:500; line-height:1.4;}
.sb-intro-pullquote{
  font-family:var(--font-display); font-size:1.15rem; font-weight:500; line-height:1.5; color:var(--text);
  border-left:3px solid var(--teal-bright); padding:4px 0 4px 18px; margin:0 0 20px;
  font-style:italic;
}
.sb-intro-pullquote .cite{display:block; margin-top:6px; font-size:.78rem; font-style:normal; font-weight:700; color:var(--accent); text-transform:uppercase; letter-spacing:.05em;}
.sb-intro-heading{font-family:var(--font-display); font-size:.95rem; font-weight:700; color:var(--text); margin:18px 0 8px;}
.sb-intro-purpose{font-size:.95rem; line-height:1.7;}
.sb-outline-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px;}
.sb-outline-list li{border-bottom:1px solid var(--border);}
.sb-outline-list li:last-child{border-bottom:none;}
.sb-outline-list button{
  width:100%; text-align:left; background:none; border:none; cursor:pointer; padding:9px 4px;
  display:flex; gap:10px; align-items:baseline; font-family:var(--font-body); color:var(--text);
  font-size:.92rem; border-radius:6px;
}
.sb-outline-list button:hover{background:var(--bg-panel); color:var(--accent);}
.sb-outline-list .rng{font-weight:700; color:var(--accent); font-size:.78rem; flex:0 0 auto; min-width:70px;}
.sb-feature-boxes{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:18px;}
.sb-feature-card{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:10px; padding:14px 16px;
}
.sb-feature-card .fb-label{
  display:inline-block; font-family:var(--font-display); font-size:.72rem; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:#fff; background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
  padding:3px 10px; border-radius:99px; margin-bottom:8px;
}
.sb-feature-card .fb-text{font-size:.88rem; line-height:1.65; color:var(--text-soft);}

.sb-scripture{font-family:var(--font-scripture); font-size:var(--scripture-size); line-height:var(--scripture-line); color:var(--text);}
.loading-msg{color:var(--text-soft); font-style:italic;}
.sb-superscription{font-style:italic; color:var(--text-soft); margin-bottom:1em; font-size:.92em;}
.sb-heading{
  display:block; font-family:var(--font-display); font-weight:700; font-size:1.05em; color:var(--accent);
  margin:1.3em 0 .5em; line-height:1.4;
}
.sb-verse{cursor:pointer; border-radius:4px; padding:1px 2px; scroll-margin-top:90px;}
.sb-verse:hover{background:var(--bg-panel-alt);}
.sb-verse.active{background:var(--highlight-bg);}
.sb-verse-num{
  font-family:var(--font-body); font-weight:700; font-size:.72em; color:var(--accent);
  vertical-align:super; margin-right:2px; user-select:none;
}
.sb-verse.has-note .sb-verse-num::after{content:"●"; color:var(--teal-bright); font-size:.6em; margin-left:2px; vertical-align:middle;}

/* ---------- Notes panel ---------- */
.sb-notes-panel{background:var(--bg-panel); border:1px solid var(--border); border-radius:14px; padding:18px;}
.sb-notes-panel h2{font-size:1rem; margin-bottom:12px;}
.sb-notes-empty{color:var(--text-soft); font-size:.88rem; font-style:italic;}
.sb-note-entry{border-bottom:1px solid var(--border); padding:12px 0; font-size:.88rem; line-height:1.6;}
.sb-note-entry:last-child{border-bottom:none;}
.sb-note-badge{
  display:inline-flex; align-items:center; gap:5px; font-size:.68rem; font-weight:700; letter-spacing:.05em;
  text-transform:uppercase; padding:3px 9px; border-radius:99px; margin-bottom:6px; border:1px solid transparent;
}
.sb-note-badge.type-footnote{background:var(--badge-footnote-bg); color:var(--badge-footnote-fg); border-color:var(--badge-footnote-border);}
.sb-note-badge.type-insight{background:var(--badge-insight-bg); color:var(--badge-insight-fg); border-color:var(--badge-insight-border);}
.sb-note-badge.type-feature{background:var(--badge-feature-bg); color:var(--badge-feature-fg); border-color:var(--badge-feature-border);}
.sb-note-badge.type-unclassified{background:var(--badge-unclassified-bg); color:var(--badge-unclassified-fg); border-color:var(--badge-unclassified-border);}
.sb-note-entry .ref{font-weight:700; color:var(--accent); display:block; margin-bottom:3px; font-size:.8rem;}
.sb-note-entry .heading{font-weight:700; font-style:italic; color:var(--text); display:block; margin-bottom:4px;}
.sb-note-entry .body{color:var(--text-soft);}
.sb-note-entry.highlighted{background:var(--highlight-bg); margin:0 -10px; padding:12px 10px; border-radius:8px; border-bottom-color:transparent;}

/* ---------- Verse actions popover ---------- */
.sb-verse-actions{
  position:fixed; display:none; gap:4px; background:var(--navy); border-radius:10px; padding:6px; z-index:60;
  box-shadow:0 8px 24px rgba(15,37,69,.35);
}
.sb-verse-actions.show{display:flex;}
.sb-verse-actions button{
  background:none; border:none; color:#EAF6FA; font-size:.8rem; padding:6px 10px; border-radius:6px; cursor:pointer;
}
.sb-verse-actions button:hover{background:rgba(0,188,228,.2);}

/* ---------- Search modal ---------- */
.sb-modal{
  position:fixed; inset:0; background:rgba(10,21,38,.6); z-index:100;
  display:flex; align-items:flex-start; justify-content:center; padding:8vh 16px;
}
.sb-modal[hidden]{display:none;}
.sb-modal-panel{
  background:var(--bg-panel); border-radius:14px; width:min(640px,100%); max-height:76vh;
  display:flex; flex-direction:column; box-shadow:0 24px 64px rgba(15,37,69,.35);
}
.sb-modal-field{display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border);}
.sb-modal-field input{flex:1; border:none; outline:none; font-size:1.05rem; background:transparent; color:var(--text);}
.sb-modal-status{padding:8px 16px; font-size:.8rem; color:var(--text-soft); margin:0;}
.sb-modal-results{list-style:none; margin:0; padding:0 8px 8px; overflow-y:auto;}
.sb-modal-results li{padding:10px 8px; border-radius:8px; cursor:pointer; font-size:.88rem;}
.sb-modal-results li:hover, .sb-modal-results li.sel{background:var(--bg-panel-alt);}
.sb-modal-results .ref{font-weight:700; color:var(--accent); display:block; font-size:.78rem; margin-bottom:2px;}
.sb-modal-results mark{background:var(--accent-soft); color:var(--navy); border-radius:3px;}

/* ---------- Misc ---------- */
.sb-to-top{
  position:fixed; right:18px; bottom:18px; width:42px; height:42px; border-radius:50%;
  background:linear-gradient(135deg, var(--teal-bright), var(--teal-deep)); color:#062231; border:none; cursor:pointer; font-size:1.1rem;
  box-shadow:0 6px 18px rgba(0,188,228,.35); display:none; z-index:40;
}
.sb-to-top.show{display:block;}
.sb-footer{
  text-align:center; padding:26px 16px 50px; color:var(--text-soft); font-size:.82rem;
  border-top:1px solid var(--border); margin-top:20px;
}
.sb-footer p{margin:4px 0;}
.sb-footer-links a{color:var(--accent); font-weight:600;}

/* ---------- Responsive ---------- */
@media (max-width: 1080px){
  .sb-layout{grid-template-columns:1fr;}
  .sb-side, .sb-notes-panel-col{
    position:static; max-height:none; display:none; margin-bottom:16px;
  }
  .sb-side.open, .sb-notes-panel-col.open{display:block;}
  .sb-main{padding:20px 16px 30px;}
}
@media (max-width: 640px){
  .sb-toolbar-inner{gap:6px;}
  .sb-select{min-width:100px; flex:1 1 auto;}
  .sb-search-wrap{order:5; flex-basis:100%;}
  .sb-chapter-head h1{font-size:1.5rem;}
  .sb-nav-btns{order:4;}
  .sb-intro-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr));}
}

/* ---------- Phone "app mode" ---------- */
@media (max-width: 780px){
  .sb-header{display:none;}
  .sb-mtop{display:flex;}
  .sb-bottom-nav{display:flex;}
  .sb-other-bibles-sheet{
    display:flex; flex-direction:column; gap:2px; padding-top:10px; margin-top:6px;
    border-top:1px solid var(--border);
  }
  .sb-other-bibles-sheet a{padding:9px 6px; border-radius:6px; font-weight:600; color:var(--accent);}
  .sb-other-bibles-sheet a:hover{background:var(--bg-panel-alt); text-decoration:none;}

  .sb-toolbar{
    position:fixed; top:auto; bottom:0; left:0; right:0; z-index:60;
    border-radius:18px 18px 0 0; border:1px solid var(--border); border-bottom:none;
    box-shadow:0 -10px 30px rgba(15,37,69,.25);
    max-height:78vh; overflow-y:auto;
    transform:translateY(105%); transition:transform .25s ease;
    padding-bottom:env(safe-area-inset-bottom);
  }
  .sb-toolbar.mobile-open{transform:translateY(0);}
  .sb-sheet-handle{
    display:block; width:40px; height:4px; border-radius:99px; background:var(--border);
    margin:10px auto 2px;
  }
  .sb-toolbar-inner{flex-direction:column; align-items:stretch; padding:8px 16px 18px;}
  .sb-toolbar-inner > *{order:0;}
  .sb-toolbar-inner .sb-select, .sb-toolbar-inner .sb-input, .sb-toolbar-inner .sb-search-btn{width:100%;}
  .sb-nav-btns{display:grid; grid-template-columns:1fr 1fr;}
  .sb-search-wrap{margin:2px 0;}
  .sb-tool-group{display:grid; grid-template-columns:1fr 1fr; margin-top:2px;}
  .sb-tool-group .sb-btn{width:100%;}

  .sb-side, .sb-notes-panel-col{
    position:fixed !important; top:0; bottom:0; z-index:65; width:86vw; max-width:360px;
    max-height:none; margin:0; background:var(--bg-panel);
    padding:16px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow:0 0 30px rgba(15,37,69,.3);
    transition:transform .25s ease;
  }
  .sb-side{left:0; transform:translateX(-105%);}
  .sb-side.open{transform:translateX(0);}
  .sb-notes-panel-col{right:0; transform:translateX(105%);}
  .sb-notes-panel-col.open{transform:translateX(0);}
  .sb-notes-panel{border:none; padding:0; height:100%; overflow-y:auto;}

  .sb-layout{padding-bottom:78px;}
  .sb-footer{padding-bottom:calc(78px + env(safe-area-inset-bottom));}
  .sb-to-top{bottom:calc(78px + env(safe-area-inset-bottom) + 10px);}
}

/* ---------- Standalone content pages (front/back matter, about) ---------- */
.sb-page-wrap{max-width:820px; margin:0 auto; padding:40px 20px 90px;}
.sb-page-wrap h1{font-size:1.8rem;}
.sb-page-wrap h2{font-size:1.2rem; margin-top:2em; color:var(--accent);}
.sb-page-wrap p, .sb-page-wrap li{color:var(--text-soft); line-height:1.75; font-size:1rem;}
.sb-page-wrap ul{padding-left:1.3em;}
.sb-page-wrap .callout{
  background:var(--bg-panel-alt); border:1px solid var(--border); border-left:4px solid var(--teal-bright);
  border-radius:10px; padding:16px 20px; margin:1.5em 0;
}
.sb-matter-section{background:var(--bg-panel); border:1px solid var(--border); border-radius:14px; padding:24px 26px; margin-bottom:22px;}
.sb-matter-section h2{margin-top:0;}
.sb-matter-section .body-text{white-space:pre-wrap; font-size:.96rem; line-height:1.75; color:var(--text-soft);}
.sb-matter-jump{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:26px;}
.sb-matter-jump a{
  font-size:.82rem; font-weight:600; padding:6px 12px; border-radius:99px; background:var(--bg-panel-alt);
  border:1px solid var(--border); color:var(--accent);
}
.sb-matter-jump a:hover{background:var(--accent); color:#fff; text-decoration:none;}
.sb-mtop-back-fallback{display:none;}
@media (max-width: 780px){
  .sb-mtop-back-fallback{
    display:block; position:sticky; top:0; z-index:75;
    background:linear-gradient(135deg, var(--navy) 0%, #16345F 100%); color:#EAF6FA;
    padding:12px 16px; padding-top:calc(12px + env(safe-area-inset-top));
    font-weight:600; font-size:.92rem; border-bottom:2px solid var(--teal-bright);
  }
  .sb-mtop-back-fallback:hover{text-decoration:underline;}
}

/* ---------- Print ---------- */
@media print{
  .sb-header, .sb-mtop, .sb-notice, .sb-toolbar, .sb-bottom-nav, .sb-side, .sb-notes-panel-col,
  .sb-to-top, .sb-footer, .sb-verse-actions, .sb-chapter-nav, .sb-sheet-backdrop{display:none !important;}
  .sb-layout{display:block; padding:0;}
  .sb-main{border:none; padding:0;}
  body{background-image:none;}
}
