/* Broadcast Graphics — main stylesheet (moved out of broadcast-graphics.html unchanged) */
*{box-sizing:border-box;margin:0;padding:0}
:root{
  --gold:#C9A84C;--gold-light:#FAF3DE;--gold-dark:#8B6914;
  --deep:#1A1A2E;
  --bg:#F8F7F4;--surface:#FFFFFF;--surface2:#F4F2EF;--surface3:#EDEAE5;
  --border:#E8E4DC;--border2:#D4CFC4;
  --text:#1C1A16;--text2:#6B6558;--text3:#A09890;
  --success-bg:#EAF3DE;--success-text:#3B6D11;
  --warn-bg:#FAEEDA;--warn-text:#854F0B;
  --danger-bg:#FCEBEB;--danger-text:#A32D2D;
  --radius:10px;--radius-lg:14px;--sb-w:230px;
  /* Broadcast Graphics module accent — scoped to this page only,
     distinct from the CMS gold theme so this tool reads as its own
     on-air control surface (matching the reference design). */
  --bg2:#7C6FEE;--bg2-dark:#5F52D6;--bg2-light:#EEECFE;
  --inner-w:250px;
}
body{font-family:'DM Sans',sans-serif;color:var(--text);background:var(--bg);font-size:14px;line-height:1.5;display:flex;min-height:100vh}
h1,h2,h3,.serif{font-family:'Cormorant Garamond',serif}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font-family:'DM Sans',sans-serif}

/* ===== SIDEBAR (shared CMS shell) ===== */
.sidebar{width:var(--sb-w);background:var(--deep);display:flex;flex-direction:column;flex-shrink:0;position:fixed;top:0;left:0;height:100vh;overflow-y:auto;z-index:100;isolation:isolate}
.sidebar-logo{padding:22px 18px 18px;border-bottom:1px solid rgba(201,168,76,0.2)}
.sidebar-logo .cross{font-size:22px;color:var(--gold);margin-bottom:8px;display:block}
.sidebar-logo h1{font-size:14px;color:#fff;font-family:'Cormorant Garamond',serif;font-weight:600;line-height:1.4;letter-spacing:0.03em}
.sidebar-logo p{font-size:10px;color:rgba(255,255,255,0.4);margin-top:3px;letter-spacing:0.1em;text-transform:uppercase}
.nav{flex:1;padding:14px 0}
.sidebar-user{padding:14px 18px;border-top:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;gap:10px}
.av{width:34px;height:34px;border-radius:50%;background:rgba(201,168,76,0.2);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--gold);flex-shrink:0}
.sidebar-user-info h4{font-size:12.5px;color:#fff;font-weight:600}
.sidebar-user-info p{font-size:11px;color:rgba(255,255,255,0.45)}
.logout-btn{display:flex;align-items:center;gap:8px;padding:11px 18px;font-size:12.5px;color:rgba(255,255,255,0.55);cursor:pointer;border-top:1px solid rgba(255,255,255,0.06)}
.logout-btn:hover{color:#fff;background:rgba(255,255,255,0.04)}
#sidebar-overlay{display:none}
/* This page still uses the CMS's older .sidebar-* markup (predating
   sidebar.js's .sb-mini redesign), so the mini/collapsed state's CSS —
   scoped to the newer .sb-* classes — never reached this header/user
   card/logout row: they stayed full width and, since #main-sidebar.sb-mini
   switches to overflow:visible, spilled out over the page next to it
   instead of collapsing to icon-only. These rules make the old markup
   collapse correctly too. */
#main-sidebar.sb-mini{overflow-x:hidden}
#main-sidebar.sb-mini .sidebar-logo{padding:17px 0;display:flex;flex-direction:column;align-items:center}
#main-sidebar.sb-mini .sidebar-logo h1,
#main-sidebar.sb-mini .sidebar-logo p{display:none}
#main-sidebar.sb-mini .sidebar-user{justify-content:center;padding:10px 4px}
#main-sidebar.sb-mini .sidebar-user-info{display:none}
#main-sidebar.sb-mini .logout-btn{justify-content:center;padding:11px 4px}
#main-sidebar.sb-mini .logout-btn span{display:none}

/* ===== MAIN ===== */
.main{flex:1;min-width:0;display:flex;margin-left:var(--sb-w);min-height:100vh}

/* ===== INNER APP SIDEBAR (Broadcast Graphics' own section nav) ===== */
.app-nav{width:var(--inner-w);flex-shrink:0;background:#0F0E1A;min-height:100vh;padding:18px 10px;position:sticky;top:0;align-self:flex-start;height:100vh;overflow-y:auto}
.app-nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;color:rgba(255,255,255,.62);font-size:14px;font-weight:500;cursor:pointer;margin-bottom:3px;transition:all .15s;border:1px solid transparent}
.app-nav-item .ic{width:18px;height:18px;flex-shrink:0;display:flex;align-items:center;justify-content:center;opacity:.85}
.app-nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.app-nav-item.active{background:rgba(124,111,238,.18);color:#fff;border-color:rgba(124,111,238,.5);font-weight:600}
.app-nav-item.active .ic{color:var(--bg2);opacity:1}
.app-nav-sep{height:1px;background:rgba(255,255,255,.08);margin:12px 6px}
.nav-shortcut-badge{margin-left:auto;flex-shrink:0;min-width:18px;height:18px;padding:0 4px;border-radius:5px;background:rgba(255,255,255,.12);color:rgba(255,255,255,.75);font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;font-family:'DM Sans',sans-serif}
.app-nav-item.active .nav-shortcut-badge{background:rgba(255,255,255,.22);color:#fff}
.shortcut-pill{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--text3,#8B8699);background:rgba(124,111,238,.08);border:1px solid rgba(124,111,238,.25);border-radius:7px;padding:3px 9px;letter-spacing:.02em;white-space:nowrap}
.shortcut-pill .key{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:rgba(124,111,238,.18);color:#5B4FD6}
.app-nav-ext{opacity:.55}
.app-nav-ext:hover{opacity:.85}

/* ===== CONTENT ===== */
.content-area{flex:1;min-width:0;padding:30px 36px 70px;max-width:1500px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:26px;flex-wrap:wrap;gap:14px}
.page-head h1{font-family:'DM Sans',sans-serif;font-size:27px;font-weight:700;color:#111}
.page-head p{color:var(--text2);font-size:13.5px;margin-top:4px}
.page-head-actions{display:flex;gap:10px}

.btn{padding:10px 18px;border-radius:10px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font-size:13.5px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:all .15s;font-weight:500}
.btn:hover{border-color:var(--bg2);color:var(--bg2)}
.btn-accent{background:var(--bg2);color:#fff;border-color:var(--bg2);font-weight:700}
.btn-accent:hover{background:var(--bg2-dark);border-color:var(--bg2-dark);color:#fff}
.btn-danger-outline{border-color:#f3c6c6;color:#b4423d}
.btn-danger-outline:hover{border-color:#b4423d;background:#fef2f2}
.btn-sm{padding:6px 12px;font-size:12.5px;border-radius:8px}
.btn[disabled]{opacity:.5;cursor:default}

.status-strip{background:#0F0E1A;border-radius:14px;padding:16px 20px;display:flex;align-items:center;gap:18px;margin-bottom:24px;flex-wrap:wrap;color:#fff}
.pill{display:inline-flex;align-items:center;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:4px 10px;border-radius:6px;background:var(--surface2);color:var(--text2)}
.pill.live{background:#2a1515;color:#ff8a7a}
.status-strip .pill{background:rgba(255,255,255,.1);color:rgba(255,255,255,.7)}
.status-strip .pill.live{background:#2a1515;color:#ff8a7a}
.status-strip .pill.live::before{content:'●';margin-right:5px;animation:dot 1.2s ease-in-out infinite}
@keyframes dot{0%,100%{opacity:1}50%{opacity:.25}}
.status-strip .main-stat{font-weight:700;font-size:14.5px}
.status-strip .sub-stat{font-size:12px;color:rgba(255,255,255,.5)}
.status-strip .spacer{flex:1}
.status-strip .sbtn{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#fff;padding:8px 14px;border-radius:9px;font-size:12.5px;cursor:pointer}
.status-strip .sbtn:hover{background:rgba(255,255,255,.15)}
.status-strip .sbtn.go{background:var(--bg2);border-color:var(--bg2)}

.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
@media (max-width:1150px){.two-col{grid-template-columns:1fr}}

.panel{background:var(--surface);border:1px solid var(--border);border-radius:16px;margin-bottom:20px;overflow:hidden}
.panel-head{display:flex;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--border)}
.step-badge{width:26px;height:26px;border-radius:50%;background:var(--bg2-light);color:var(--bg2-dark);font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.panel-head h2{font-size:16px;font-weight:700;color:#111}
.panel-head p{font-size:12px;color:var(--text3);margin-top:1px}
.panel-body{padding:20px 22px}

.field{margin-bottom:14px}
.field:last-child{margin-bottom:0}
.field label{display:block;font-size:11.5px;font-weight:700;letter-spacing:.03em;color:var(--text2);margin-bottom:6px}
.field .count{float:right;font-weight:400;color:var(--text3)}
input[type=text],input[type=number],input[type=datetime-local],textarea,select{
  width:100%;padding:10px 13px;border:1.5px solid var(--border2);border-radius:10px;
  font-size:13.5px;font-family:'DM Sans',sans-serif;color:var(--text);background:var(--surface)
}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--bg2);box-shadow:0 0 0 3px rgba(124,111,238,.14)}
textarea{resize:vertical;min-height:64px}
input[type=range]{width:100%;accent-color:var(--bg2)}
.row-between{display:flex;align-items:center;justify-content:space-between}
.slider-val{font-weight:700;color:var(--text)}

/* toggle switch */
.switch{position:relative;display:inline-block;width:42px;height:24px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;cursor:pointer;inset:0;background:var(--border2);border-radius:24px;transition:.2s}
.switch .slider::before{content:'';position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch input:checked + .slider{background:var(--bg2)}
.switch input:checked + .slider::before{transform:translateX(18px)}

/* collapsible sub-section */
.subsec{border:1px solid var(--border);border-radius:12px;margin-top:16px;overflow:hidden}
.subsec-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;cursor:pointer;background:var(--surface2)}
.subsec-head b{font-size:13px;display:flex;align-items:center;gap:7px}
.subsec-head small{color:var(--text3);font-weight:400;margin-left:4px}
.subsec-body{padding:16px;display:none}
.subsec.open .subsec-body{display:block}
.subsec.open .chev{transform:rotate(180deg)}
.chev{transition:.2s;color:var(--text3)}
.group-label{font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--text3);margin:16px 0 8px}
.field-hint{font-size:11.5px;color:var(--text3);line-height:1.4;margin-top:6px}
.group-label:first-child{margin-top:0}

.swatch-row{display:flex;gap:10px;flex-wrap:wrap}
.swatch{width:64px;text-align:center}
.swatch input[type=color]{width:100%;height:44px;border-radius:9px;border:1.5px solid var(--border2);cursor:pointer;padding:3px;background:var(--surface)}
.swatch span{display:block;font-size:10.5px;color:var(--text3);margin-top:4px}

/* live preview */
.preview-wrap{position:sticky;top:20px}
.preview-frame{
  width:100%;aspect-ratio:16/9;border-radius:var(--radius-lg);overflow:hidden;position:relative;
  background:
    linear-gradient(45deg,#2a2a3d 25%,transparent 25%) 0 0/24px 24px,
    linear-gradient(-45deg,#2a2a3d 25%,transparent 25%) 0 0/24px 24px,
    linear-gradient(45deg,transparent 75%,#2a2a3d 75%) 0 0/24px 24px,
    linear-gradient(-45deg,transparent 75%,#2a2a3d 75%) 0 0/24px 24px,
    #1d1d2b;
  border:1px solid var(--border2);
}
.preview-frame iframe{position:absolute;top:0;left:0;width:1920px;height:1080px;border:none;transform-origin:top left}
.preview-note{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:12px;color:var(--text3)}
.preview-note .d{width:7px;height:7px;border-radius:50%;background:#9ca3af}
.preview-note .d.on{background:#22c55e}
.url-box{display:flex;gap:8px;margin-top:12px}
.url-box input{flex:1;font-family:monospace;font-size:11.5px;background:var(--surface2)}

/* template galleries */
.tpl-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media (max-width:1300px){.tpl-grid{grid-template-columns:repeat(2,1fr)}}
.tpl-card{border:1px solid var(--border);border-radius:14px;overflow:hidden;cursor:pointer;transition:all .15s;background:var(--surface)}
.tpl-card:hover{border-color:var(--bg2);box-shadow:0 4px 14px rgba(124,111,238,.15);transform:translateY(-1px)}
@keyframes cdBlink{50%{opacity:.25}}
@keyframes cdPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes bugSpin{to{transform:rotate(360deg)}}
@keyframes bugSpinRev{to{transform:rotate(-360deg)}}
@keyframes bugFlip{from{transform:perspective(700px) rotateY(0deg)}to{transform:perspective(700px) rotateY(360deg)}}
@keyframes bugFlipRev{from{transform:perspective(700px) rotateY(0deg)}to{transform:perspective(700px) rotateY(-360deg)}}
.tpl-thumb{aspect-ratio:16/9;background:#0b0b14;position:relative;display:flex;align-items:flex-end;padding:12px}
.tpl-thumb .mock{width:100%}
.tpl-meta{padding:12px 14px}
.tpl-meta h4{font-size:13.5px;font-weight:700}
.tpl-meta p{font-size:11.5px;color:var(--text3);margin-top:1px}

.saved-list{display:flex;flex-direction:column;gap:8px}
.saved-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:11px;background:var(--surface2)}
.saved-row .sw{width:5px;align-self:stretch;border-radius:4px;background:var(--bg2);flex-shrink:0}
.saved-row .info{flex:1;min-width:0}
.saved-row .info b{font-size:13px;display:block}
.saved-row .info small{color:var(--text3);font-size:11px}
.empty-note{text-align:center;padding:30px 14px;color:var(--text3);font-size:12.5px}

/* quote canvas picker */
.canvas-size-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.cs-opt{border:1.5px solid var(--border2);border-radius:12px;padding:10px;text-align:center;cursor:pointer;transition:.15s}
.cs-opt:hover{border-color:var(--bg2)}
.cs-opt.active{border-color:var(--bg2);background:var(--bg2-light)}
.cs-opt .shape{margin:0 auto 6px;background:var(--border2);border-radius:3px}
.cs-opt.active .shape{background:var(--bg2)}
.cs-opt b{font-size:11.5px;display:block}
.cs-opt small{font-size:10px;color:var(--text3)}

.quote-tpl-row{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
@media (max-width:1300px){.quote-tpl-row{grid-template-columns:repeat(2,1fr)}}
.qt-card{border:1.5px solid var(--border);border-radius:13px;overflow:hidden;cursor:pointer;transition:.15s}
.qt-card.active{border-color:var(--bg2);box-shadow:0 0 0 3px rgba(124,111,238,.15)}
.qt-thumb{aspect-ratio:4/3;padding:14px;display:flex;flex-direction:column;justify-content:center;font-size:10px}
.qt-meta{padding:9px 11px;border-top:1px solid var(--border)}
.qt-meta b{font-size:12px;display:block}
.qt-meta small{font-size:10px;color:var(--text3)}

.quote-canvas-wrap{width:100%;border-radius:14px;overflow:hidden;border:1px solid var(--border2);background:#111}
#quote-canvas{width:100%;display:block}

/* Bible show — BibleCast-style 3-column workspace */
.queue-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;margin-bottom:8px;cursor:pointer}
.queue-item:hover{border-color:var(--bg2)}
.queue-item .q-ref{font-weight:700;font-size:12.5px}
.queue-item .q-txt{font-size:11.5px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bible-verse-row{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer}
.bible-verse-row:hover{background:var(--bg2-light)}
.bible-verse-row.active{background:var(--bg2-light);border:1px solid var(--bg2)}
.bible-verse-row.is-live{background:#eafbf0}
.bible-verse-row .bv-num{flex-shrink:0;width:22px;text-align:right;font-weight:700;color:var(--text3);font-size:12px;padding-top:1px}
.bible-verse-row .bv-txt{flex:1;font-size:13.5px;line-height:1.5}
.bible-verse-row button{flex-shrink:0}
.bv-live-tag{color:#1f9d55;font-size:10px;font-weight:700;letter-spacing:.03em}

.bshow-workspace{display:grid;grid-template-columns:230px 1fr 230px;gap:16px;align-items:start}
@media (max-width:1300px){.bshow-workspace{grid-template-columns:1fr}}
.bshow-left,.bshow-right{display:flex;flex-direction:column;gap:14px;position:sticky;top:20px}
.bshow-center{display:flex;flex-direction:column;gap:14px;min-width:0}
.bshow-panel{background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden}
.bshow-panel-head{padding:12px 14px;border-bottom:1px solid var(--border);font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text2);display:flex;justify-content:space-between;align-items:center}
.bshow-panel-head a{color:var(--bg2-dark);text-decoration:none}

.bshow-translations{max-height:150px;overflow-y:auto;padding:6px}
.bshow-trans-row{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:7px;font-size:12px;cursor:default}
.bshow-trans-row:hover{background:var(--surface2)}
.bshow-trans-row.active{background:var(--bg2);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.bshow-trans-row.active .nm,.bshow-trans-row.active .code{font-weight:700;color:#fff}
.bshow-trans-row .code{font-weight:700;color:var(--text3);width:38px;flex-shrink:0;font-size:10.5px}
.bshow-trans-row .nm{flex:1;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.bshow-tabs{display:flex;border-bottom:1px solid var(--border)}
.bshow-tab{flex:1;padding:10px;border:none;background:none;font-size:12.5px;font-weight:600;color:var(--text3);cursor:pointer;border-bottom:2px solid transparent}
.bshow-tab.active{color:var(--bg2-dark);border-bottom-color:var(--bg2)}
.bshow-tab-body{padding:10px 12px;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.bshow-book-list{flex:1;overflow-y:auto;max-height:260px;margin-bottom:10px}
.bshow-book{padding:7px 9px;border-radius:7px;font-size:12.5px;cursor:pointer;color:var(--text2)}
.bshow-book:hover{background:var(--surface2)}
.bshow-book.active{background:var(--bg2-light);color:var(--bg2-dark);font-weight:700}
.bshow-nums{display:flex;gap:10px;margin-bottom:10px}
.bshow-nums > div{flex:1}
.bshow-nums label{font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;display:block;margin-bottom:4px}
.bshow-stepper{display:flex;align-items:center;border:1.5px solid var(--border2);border-radius:8px;overflow:hidden}
.bshow-stepper button{width:26px;height:30px;border:none;background:var(--surface2);cursor:pointer;font-size:14px;flex-shrink:0}
.bshow-stepper input{border:none;text-align:center;width:100%;padding:0;font-size:13px}
.bshow-ref-row label{font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;display:block;margin-bottom:4px}
.bshow-ref-row input{font-size:13px}
.bshow-nav-arrows{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}
.bshow-nav-arrows .btn{justify-content:center;padding:6px}
.bshow-keyword-note{font-size:11px;color:var(--text3);margin:8px 0}
.bshow-local-book-text{max-height:260px;overflow-y:auto;font-size:12.5px;line-height:1.6;color:var(--text2);background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:10px;white-space:pre-wrap}
.bshow-local-book-text mark{background:#FFF1A8;color:#1a1a1a;border-radius:2px}
.local-bible-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border);font-size:12.5px}
.local-bible-row b{flex:1}
.local-bible-search-hit{padding:6px 0;border-bottom:1px solid var(--border);font-size:12px;line-height:1.5;color:var(--text2);cursor:pointer}
.local-bible-search-hit:hover{color:var(--bg2-dark)}
.local-bible-search-hit b{display:block;font-size:11px;color:var(--text3);margin-bottom:2px}
.bshow-showhide{display:flex;gap:8px}

.bshow-panes{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:700px){.bshow-panes{grid-template-columns:1fr}}
.bshow-pane{border-radius:14px;overflow:hidden;border:1px solid var(--border2);cursor:pointer}
.bshow-pane-label{padding:8px 12px;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;background:#0F0E1A;color:rgba(255,255,255,.6)}
.bshow-pane-label.live{background:#2a1515;color:#ff8a7a}
.bshow-pane-label.live::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#ff4136;margin-right:6px;animation:dot 1.2s ease-in-out infinite}
.bshow-pane-body{
  aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;padding:18px;position:relative;
  background:
    linear-gradient(45deg,#2a2a3d 25%,transparent 25%) 0 0/24px 24px,
    linear-gradient(-45deg,#2a2a3d 25%,transparent 25%) 0 0/24px 24px,
    linear-gradient(45deg,transparent 75%,#2a2a3d 75%) 0 0/24px 24px,
    linear-gradient(-45deg,transparent 75%,#2a2a3d 75%) 0 0/24px 24px,
    #1d1d2b;
}
.bshow-card{text-align:center;max-width:92%}
.bshow-card-txt{font-family:'Cormorant Garamond',serif;font-style:italic;font-weight:600;font-size:19px;line-height:1.4;text-shadow:0 2px 14px rgba(0,0,0,.5)}
.bshow-card-ref{margin-top:12px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}

.bshow-chapter-panel{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px 16px;max-height:260px;display:flex;flex-direction:column}
.bshow-verse-list{overflow-y:auto}

.bshow-bottombar{display:flex;align-items:center;justify-content:space-between;background:#0F0E1A;border-radius:12px;padding:10px 14px}
.bshow-target-toggle{display:flex;background:rgba(255,255,255,.08);border-radius:9px;padding:3px;gap:3px}
.bshow-target-toggle button{padding:7px 16px;border:none;background:none;color:rgba(255,255,255,.6);font-size:12.5px;font-weight:600;border-radius:7px;cursor:pointer}
.bshow-target-toggle button.on{background:var(--bg2);color:#fff}
.bshow-outputs-menu{position:absolute;right:0;top:calc(100% + 6px);background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 14px;width:200px;z-index:30;box-shadow:0 10px 30px rgba(0,0,0,.18)}

.bshow-theme-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:12px}
.bshow-theme-card{position:relative;border:1.5px solid var(--border2);border-radius:11px;padding:10px 8px;text-align:center;cursor:pointer}
.bshow-theme-card:hover{border-color:var(--bg2)}
.bshow-theme-card.active{border-color:var(--bg2);background:var(--bg2-light)}
.bshow-theme-card .sw{width:100%;height:30px;border-radius:7px;margin-bottom:6px}
.bshow-theme-card span{font-size:10.5px;font-weight:600}
.bshow-theme-card .edit{position:absolute;top:4px;right:4px;border:none;background:rgba(255,255,255,.85);border-radius:5px;width:18px;height:18px;font-size:10px;cursor:pointer;opacity:0;transition:.15s}
.bshow-theme-card:hover .edit{opacity:1}

/* scenes */
.scene-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:1150px){.scene-grid{grid-template-columns:1fr}}
.scene-card{border:1px solid var(--border);border-radius:14px;padding:18px;background:var(--surface)}
.scene-card h4{font-size:15px;font-weight:700;margin-bottom:8px}
.scene-tags{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:14px}
.scene-tags span{font-size:10px;padding:3px 8px;border-radius:6px;background:var(--surface2);color:var(--text2)}
.scene-tags span.excluded{background:none;border:1px dashed var(--border2);color:var(--text3);text-decoration:line-through}
.scene-actions{display:flex;gap:8px;flex-wrap:wrap}
.scene-actions .btn{flex:1;justify-content:center;white-space:nowrap}
.scene-type-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
@media (max-width:1150px){.scene-type-grid{grid-template-columns:repeat(2,1fr)}}
.scene-type-card{border:1.5px solid var(--border2);border-radius:13px;padding:14px;cursor:pointer;transition:.15s;text-align:center}
.scene-type-card:hover{border-color:var(--bg2)}
.scene-type-card.on{border-color:var(--bg2);background:var(--bg2-light)}
.scene-type-card .ic{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;margin:0 auto 8px}
.scene-type-card b{display:block;font-size:12.5px}
.scene-type-card small{display:block;font-size:10.5px;color:var(--text3);margin-top:3px}
.scene-type-card.on small{color:var(--bg2-dark);font-weight:600}

.section-panel{display:none}
.section-panel.active{display:block}

.logo-drop{border:1.5px dashed var(--border2);border-radius:10px;padding:18px;text-align:center;font-size:12.5px;color:var(--bg2-dark);font-weight:600;cursor:pointer;background:var(--bg2-light)}
.logo-current{display:flex;align-items:center;justify-content:space-between;background:var(--surface2);border-radius:10px;padding:10px;margin-top:10px}
.logo-current img{width:34px;height:34px;border-radius:7px;object-fit:cover;background:#fff}

@media (max-width:1000px){
  .app-nav{display:none}
  .content-area{padding:20px 16px 60px}
}

.eyebrow{display:block;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;margin-bottom:2px}
.qt-draghandle{border:1.5px dashed transparent;border-radius:6px;touch-action:none}
.qt-draghandle:hover{border-color:rgba(124,111,238,.5)}
.qt-draghandle.selected{border-color:var(--bg2)}
.qt-draghandle:focus{outline:none;border-color:var(--bg2)}
.btn-accent2{background:#7C6FEE;color:#fff;border:none}
.btn-accent2:hover{background:#6c5fe0}

/* ── Dashboard ──────────────────────────────────────────────── */
.dash-conn-dot{width:8px;height:8px;border-radius:50%;background:var(--text3);flex-shrink:0}
.dash-conn-dot.on{background:#3B6D11}
.dash-conn-dot.off{background:#A32D2D}
.dash-kicker{font-size:11px;font-weight:700;letter-spacing:.1em;color:var(--bg2);text-transform:uppercase}
.dash-title{font-size:26px;font-weight:700;margin:2px 0 20px}
.dash-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#241F3B,var(--deep));border-radius:16px;padding:30px 32px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:18px}
.dash-hero::before{content:'';position:absolute;right:-60px;top:-60px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(124,111,238,.35),transparent 70%)}
.dash-hero-kicker{font-size:10.5px;font-weight:700;letter-spacing:.14em;color:#B6ACF5;margin-bottom:6px}
.dash-hero h2{font-size:26px;font-weight:700;margin:0 0 6px;position:relative}
.dash-hero p{color:#C9C4DA;font-size:13px;margin:0;position:relative;max-width:420px}
.dash-hero-btn{position:relative;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:12px 18px;color:#fff;cursor:pointer;text-align:left}
.dash-hero-btn .sq{width:12px;height:12px;border-radius:2px;background:#fff}
.dash-hero-btn b{display:block;font-size:13px}
.dash-hero-btn small{display:block;color:#B6ACF5;font-size:11px;font-weight:400}
.dash-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:26px}
.dash-stat{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px}
.dash-stat .dot,.dash-stat .ic{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:7px;background:var(--bg2-light);color:var(--bg2-dark);font-size:12px;margin-bottom:8px}
.dash-stat .dot{width:8px;height:8px;background:var(--bg2);border-radius:50%;padding:0}
.dash-stat .ic.check{background:var(--success-bg);color:var(--success-text)}
.dash-stat b{display:block;font-size:22px;font-weight:700;color:var(--text)}
.dash-stat small{color:var(--text3);font-size:11.5px}
.dash-sec-head{display:flex;align-items:flex-end;justify-content:space-between;margin:8px 0 12px}
.dash-sec-head h3{font-size:17px;font-weight:700;margin:0 0 2px}
.dash-sec-head p{color:var(--text3);font-size:12px;margin:0}
.dash-multiview{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-bottom:28px}
.mv-tile{background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden}
.mv-tile-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px}
.mv-tile-head b{font-size:15px;font-weight:700}
.mv-tile-head .pill{background:var(--surface3);color:var(--text3)}
.mv-frame-wrap{position:relative;aspect-ratio:16/9;background-image:repeating-conic-gradient(#2a2a3d 0% 25%,#1d1d2b 0% 50%);background-size:20px 20px;overflow:hidden}
.mv-frame-wrap iframe{position:absolute;left:0;top:0;width:1920px;height:1080px;border:0;transform-origin:top left;pointer-events:none}
.mv-tile-foot{display:flex;gap:8px;justify-content:flex-end;padding:12px 18px;border-top:1px solid var(--border)}
.dash-outctl{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:28px}
.outctl-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:18px}
.outctl-card-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.outctl-ic{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:15px}
.outctl-card h4{font-size:14.5px;font-weight:700;margin:0}
.outctl-card .sub{color:var(--text3);font-size:11.5px}
.outctl-last{background:var(--surface2);border-radius:8px;padding:8px 10px;margin:10px 0;font-size:11.5px}
.outctl-last b{display:block;font-size:12.5px;color:var(--text);margin-top:2px}
.outctl-last span{color:var(--text3)}
.outctl-actions{display:flex;gap:8px}
.outctl-actions .btn{flex:1;justify-content:center;font-size:11.5px;padding:8px}
.dash-two-panel{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}
.dash-obs-row{display:flex;align-items:center;gap:12px;background:var(--surface2);border-radius:10px;padding:10px 12px;margin-bottom:8px}
.dash-obs-row .ic{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;flex-shrink:0}
.dash-obs-row .meta{flex:1;min-width:0}
.dash-obs-row .meta b{display:block;font-size:12.5px}
.dash-obs-row .meta small{color:var(--text3);font-size:10.5px}
.dash-lib-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.dash-lib-tile{background:var(--surface2);border-radius:10px;padding:10px;text-align:center}
.dash-lib-tile b{display:block;font-size:17px;font-weight:700;color:var(--bg2-dark)}
.dash-lib-tile small{color:var(--text3);font-size:10px}
.dash-recent-head{font-size:11px;font-weight:700;color:var(--text3);letter-spacing:.04em;border-top:1px solid var(--border);padding-top:12px;margin-bottom:8px}
.dash-recent-row{display:flex;align-items:center;gap:10px;padding:8px 0}
.dash-recent-row .sw{width:28px;height:28px;border-radius:8px;background:var(--bg2-light);color:var(--bg2-dark);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex-shrink:0}
.dash-recent-row .meta{flex:1;min-width:0}
.dash-recent-row .meta b{display:block;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-recent-row .meta small{color:var(--text3);font-size:10.5px}
@media (max-width:900px){ .dash-multiview,.dash-two-panel,.dash-lib-grid{grid-template-columns:1fr} .dash-stats{grid-template-columns:repeat(2,1fr)} }
/* ── Live control bar ── */
.lcb{position:sticky;top:0;z-index:40;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 14px;background:#12131a;border-bottom:1px solid #2a2c3a;color:#e8e9f0;font-size:13px}
.lcb-sync{font-weight:700;letter-spacing:.04em;padding:3px 10px;border-radius:12px;border:1px solid currentColor;white-space:nowrap}
.lcb-synced{color:#3ddc84}.lcb-syncing{color:#5aa9ff}.lcb-offline{color:#ff5c5c}.lcb-stale{color:#ffb020}.lcb-error{color:#ff5c5c}
.lcb-age{color:#9aa0b4;font-size:12px}
.lcb-air{flex:1;min-width:140px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.lcb-chip{background:#c62828;color:#fff;border-radius:10px;padding:2px 9px;font-size:12px;font-weight:600}
.lcb-none{color:#9aa0b4;font-size:12px}
.lcb-flash{background:#ffb020;color:#111;border-radius:8px;padding:2px 8px;font-size:12px;font-weight:600}
.lcb .btn{min-height:34px}
.lcb-danger{background:#b71c1c!important;color:#fff!important;border-color:#b71c1c!important}
.lcb-danger.armed{animation:lcbp .6s infinite alternate}
@keyframes lcbp{from{box-shadow:0 0 0 0 rgba(255,92,92,.8)}to{box-shadow:0 0 0 6px rgba(255,92,92,0)}}
.sc-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9999;display:flex;align-items:center;justify-content:center}
.sc-box{background:#1a1c28;color:#e8e9f0;border-radius:12px;padding:20px 24px;max-width:460px;width:92%;max-height:86vh;overflow:auto}
.sc-box table{width:100%;border-collapse:collapse}.sc-box td{padding:5px 4px;border-bottom:1px solid #2a2c3a;font-size:14px}
.sc-box kbd{background:#2a2c3a;border-radius:5px;padding:2px 8px;font-family:monospace;font-size:13px}
/* ── Accessibility / touch ── */
.btn:focus-visible,.app-nav-item:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.lcb button:focus-visible{outline:3px solid #ffb020;outline-offset:2px}
@media (pointer:coarse){.btn,.btn-sm{min-height:44px;min-width:44px}.lcb .btn{min-height:44px}.app-nav-item{min-height:44px}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* ── Bible Show: options bar, version chips, compare table ───────── */
.bshow-optbar{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;background:var(--bg2-light);border:1px solid var(--border);border-radius:12px;padding:8px 12px;margin:10px 0;font-size:12px}
.bshow-optbar .ob-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bshow-optbar .ob-label{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text3)}
.bshow-optbar select,.bshow-optbar input[type=text]{font-size:12px;padding:4px 6px;border:1px solid var(--border);border-radius:8px;background:#fff}
.bshow-optbar .btn.on{background:var(--bg2);color:#fff;border-color:var(--bg2)}
.bv-chips{display:inline-block;line-height:1}
.bv-chip{display:inline-block;margin:0 5px 2px 0;padding:3px 9px;border-radius:999px;background:#fff;border:1px solid var(--border2);font-weight:700;font-size:11.5px;line-height:1.35;cursor:pointer}
.bv-chip.is-main{background:var(--bg2);color:#fff;border-color:var(--bg2);cursor:default}
.bv-chip b{margin-left:5px;font-weight:700;opacity:.55;cursor:pointer;padding:0 1px}.bv-chip b:hover{opacity:1;color:#c0392b}
.bv-cmp-btn{margin-left:auto;border:1px solid var(--border2);background:#fff;border-radius:6px;font-size:12px;line-height:1;padding:3px 6px;cursor:pointer;color:var(--text3)}
.bv-cmp-btn.on{background:var(--bg2);color:#fff;border-color:var(--bg2)}
.bshow-trans-row{display:flex;align-items:center;gap:6px}
.bv-cmp-row{display:flex;gap:12px;align-items:flex-start}
.bv-cmp-row .bv-cmp-cell{flex:1;min-width:0;font-size:12.5px;line-height:1.45}
.bv-cmp-head{position:sticky;top:0;background:#fff;padding:4px 10px;border-bottom:1px solid var(--border);z-index:1}
.bible-verse-row[data-v].active{background:var(--bg2-light);border:1px solid var(--bg2)}
#bible-keyword-results mark,.bshow-verse-list mark{background:#ffe58a;padding:0 1px;border-radius:2px}

/* commentary panel */
.bshow-comm{max-height:380px;margin-top:10px}
.bshow-comm #comm-wrap{display:flex;flex-direction:column;min-height:0;flex:1}
.bshow-comm #comm-body{min-height:0;flex:1;overflow-y:auto}
.bshow-comm .comm-text{font-size:13.5px;line-height:1.6;color:var(--text);overflow-wrap:anywhere;user-select:text}
.bshow-comm .comm-ref{color:var(--accent,#E08A3C);text-decoration:none;border-bottom:1px dotted currentColor}
.bshow-comm .comm-text i{font-style:italic}
.comm-scope{display:inline-flex;border:1px solid var(--border2,var(--border));border-radius:8px;overflow:hidden}
.comm-scope button{background:transparent;border:0;padding:3px 9px;font-size:11.5px;color:var(--text2,var(--text));cursor:pointer}
.comm-scope button.on{background:var(--accent,#E08A3C);color:#fff}
/* dictionary mode: results list on the left, the entry on the right, much taller */
.bshow-comm.dict{max-height:none;height:560px}
.bshow-comm.dict #comm-wrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:14px;overflow:hidden}
.bshow-comm.dict #comm-dict{display:flex!important;flex-direction:column;min-height:0;border-right:1px solid var(--border);padding-right:12px}
.bshow-comm.dict #comm-dict input{width:100%;margin-bottom:6px}
.comm-hits{display:flex;flex-direction:column;gap:3px;overflow-y:auto;min-height:0;flex:1}
.comm-hit{display:flex;gap:6px;align-items:baseline;text-align:left;border:1px solid transparent;background:transparent;color:var(--text);border-radius:6px;padding:4px 8px;font-size:12.5px;cursor:pointer}
.comm-hit:hover{background:var(--surface2,rgba(127,127,127,.12))}
.comm-hit.on{background:var(--accent,#E08A3C);color:#fff}
.comm-hit .g{opacity:.75;font-size:12px}
.comm-hit .v{margin-left:auto;font-size:11px;opacity:.6;font-style:italic}
@media (max-width:900px){.bshow-comm.dict #comm-wrap{grid-template-columns:1fr}.bshow-comm.dict #comm-dict{border-right:0;padding-right:0;max-height:160px}}
.comm-nav{display:flex;justify-content:space-between;margin-bottom:8px}

/* projector / TV dialog */
.disp-box{background:var(--surface,#fff);color:var(--text,#111);border-radius:14px;padding:18px 20px;width:min(720px,94vw);max-height:92vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.disp-note{margin:6px 0 12px;color:var(--text3,#667);font-size:13px}
.disp-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px;margin-bottom:12px}
.disp-grid label{display:flex;flex-direction:column;gap:4px;font-size:12.5px;font-weight:600}
.disp-grid select,.disp-grid input[type=range]{width:100%}
.disp-checks{display:flex;flex-direction:column;gap:6px;justify-content:center}
.disp-checks label{flex-direction:row;align-items:center;gap:6px;font-weight:500}
.disp-sec{border-top:1px solid var(--border,#ddd);padding:10px 0 4px}
.disp-row{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 4px}
.disp-sub{font-size:11.5px;color:var(--text3,#667);font-weight:400;margin-top:3px}
.disp-qr{width:140px;height:140px;flex:none;background:#fff;border:1px solid var(--border,#ddd);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#667;overflow:hidden}
.disp-qr svg{width:100%;height:100%}
@media (max-width:640px){.disp-grid{grid-template-columns:1fr}}
.disp-det{margin:4px 0;border:1px solid var(--border,#ddd);border-radius:8px;padding:6px 10px;font-size:12.5px}
.disp-det summary{cursor:pointer;font-weight:600}
.disp-det ol{margin:8px 0 4px 18px;padding:0;line-height:1.5}
.devo-meta{font-size:12px;color:var(--text3,#667);margin-bottom:6px}
.devo-chips{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
.devo-chip{border:1px solid var(--border,#ddd);background:transparent;color:var(--text);border-radius:999px;padding:2px 10px;font-size:11.5px;cursor:pointer}
.devo-chip.on{background:var(--accent,#E08A3C);color:#fff;border-color:transparent}
.devo-slide{font-size:15px!important;line-height:1.65!important;white-space:normal}
.devo-count{font-size:12px;color:var(--text3,#667);align-self:center}
.devo-auto{display:flex;gap:6px;align-items:center;font-size:12px;margin-top:8px}

/* ── Bible Show: Browse navigator + larger verse list ───────────── */
.bb-wrap{padding:4px 2px 10px}
.bb-sec{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin:2px 0 6px}
.bb-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.bb-chip{padding:5px 12px;border-radius:999px;border:1px solid var(--border2);background:#fff;font-weight:700;font-size:12px;cursor:pointer}
.bb-chip.on{background:var(--bg2);color:#fff;border-color:var(--bg2)}
.bb-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0 10px}
.bb-head b{font-size:15px;margin-right:auto}
.bb-pills{display:inline-flex;gap:4px}
.bb-pill{padding:4px 12px;border-radius:999px;border:1px solid var(--border2);background:#fff;font-size:12px;font-weight:600;cursor:pointer}
.bb-pill.on{background:var(--bg2);color:#fff;border-color:var(--bg2)}
.bb-cat{font-size:12px;font-weight:700;color:var(--bbc);margin:12px 0 6px}
.bb-books{display:flex;flex-wrap:wrap;gap:6px}
.bb-book{padding:8px 13px;border-radius:9px;border:1.5px solid var(--bbc);background:#fff;color:var(--bbc);font-weight:700;font-size:13px;cursor:pointer}
.bb-book:hover,.bb-book.cur{background:var(--bbc);color:#fff}
.bb-chgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:8px}
.bb-ch{height:58px;border-radius:14px;border:1.5px solid var(--border2);background:#fff;font-size:20px;font-weight:700;cursor:pointer}
.bb-ch:hover{background:var(--bbc);color:#fff;border-color:var(--bbc)}
.bshow-verse-list .bible-verse-row .bv-txt{font-size:17px;line-height:1.55}
.bshow-verse-list .bible-verse-row .bv-num{color:#2a7fd0;font-size:15px;width:26px}
.bshow-chapter-panel.bb-open{max-height:620px}
.bb-wrap{overflow-y:auto;min-height:0;flex:0 1 auto;max-height:230px;border-bottom:1px solid var(--border);margin-bottom:8px}
.bb-ch.cur{background:var(--bbc);color:#fff;border-color:var(--bbc)}
.bshow-chapter-panel.bb-open .bshow-verse-list{flex:1;min-height:140px}

/* ── PHONE / TABLET (≤1000px): section nav becomes a bottom tab bar ─────
   The left section nav was simply hidden here, leaving no way to switch
   section on a phone. It now sits along the bottom and scrolls sideways. */
@media (max-width:1000px){
  .app-nav{display:flex!important;flex-direction:row;position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;height:auto;min-height:0;
    padding:6px 8px;gap:4px;overflow-x:auto;overflow-y:hidden;z-index:90;align-self:auto;border-top:1px solid rgba(255,255,255,.12);-webkit-overflow-scrolling:touch}
  .app-nav-item{flex:0 0 auto;flex-direction:column;gap:3px;padding:6px 12px;margin:0;font-size:11px;min-width:64px;text-align:center;white-space:nowrap}
  .app-nav-sep{display:none}
  .content-area{padding-bottom:190px!important}
}
/* ── PHONE (≤700px): Bible Show ─────────────────────────────────────── */
@media (max-width:700px){
  .bshow-workspace{display:flex;flex-direction:column;gap:12px}
  .bshow-center{order:1}.bshow-left{order:2}.bshow-right{order:3}
  .bshow-left,.bshow-right{position:static}
  /* Preview + Live stay side by side, smaller */
  .bshow-panes{grid-template-columns:1fr 1fr;gap:8px}
  .bshow-pane-body{padding:6px}
  .bshow-card-txt{font-size:10px!important;line-height:1.3}
  .bshow-card-ref{font-size:8px;margin-top:4px}
  .bshow-pane-label{padding:5px 8px;font-size:9px}
  /* SHOW / HIDE and Prev / Next pinned above the bottom tab bar */
  .bshow-showhide{position:fixed;left:0;right:0;z-index:89;background:#0F0E1A;padding:6px 10px;margin:0!important}
  .bshow-showhide:not([style]){bottom:118px}
  .bshow-showhide[style]{bottom:66px}
  .bshow-showhide .btn{min-height:46px;font-size:15px}
  .bshow-showhide[style] .btn{background:#2a2940;color:#fff;border-color:transparent}
  .bshow-book-list{max-height:150px}
  .bshow-chapter-panel{max-height:60vh;padding:10px}
  .bshow-chapter-panel.bb-open{max-height:70vh}
  .bshow-chapter-panel .row-between{flex-wrap:wrap;gap:6px}
  .bshow-chapter-panel .bshow-keyword-note{display:none}
  .bshow-verse-list .bible-verse-row .bv-txt{font-size:16px}
  .bb-chgrid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr))}
  .bb-ch{height:50px;font-size:18px}
  .bb-book{padding:9px 12px}
  .bshow-optbar{flex-wrap:wrap;gap:8px}
  .bshow-bottombar{flex-wrap:wrap;gap:8px}
  .bshow-comm.dict{height:70vh}
  input,select,textarea{font-size:16px}
}
@media (max-width:1000px){
  .app-nav-item{font-size:11px!important;padding:6px 10px!important;gap:2px!important;min-width:58px}
  .app-nav-item .nav-shortcut-badge{display:none}
  .app-nav-item .ic{margin:0 auto}
  .lcb{padding:8px 10px 8px 52px!important;gap:6px!important}
  .lcb .btn{padding:6px 10px;font-size:12px;min-height:40px}
}
@media (max-width:700px){
  .bshow-showhide:not([style]){bottom:112px}
  .bshow-showhide[style]{bottom:56px}
}
@media (max-width:700px){
  /* verses right under the Preview/Live panes; display options after them */
  .bshow-center>.bshow-panes{order:1}
  .bshow-center>.bshow-chapter-panel{order:2}
  .bshow-center>.bshow-optbar{order:3}
  .bshow-center>.bshow-comm{order:4}
  .bshow-center>*:not(.bshow-panes):not(.bshow-chapter-panel):not(.bshow-optbar):not(.bshow-comm){order:5}
}
@media (max-width:700px){ .lcb{position:static!important} }
@media (max-width:700px){.bb-wrap{max-height:200px}}
.bb-hint{font-size:11.5px;color:var(--text3)}
/* Browse: never squash the version chips — they wrap onto extra rows; only the Books/Chapters grid scrolls */
.bb-wrap{flex:0 0 auto!important}
.bb-wrap.bb-v{max-height:none;overflow:visible}
.bb-chips{overflow:visible}
#bible-chapter-title{white-space:nowrap;flex-shrink:0}
.bshow-chapter-panel.bb-open .bshow-keyword-note{display:none}
/* Search tab: the result list scrolls inside its own box so the tabs, search box
   and SHOW/HIDE buttons stay reachable no matter how many results there are */
#bible-keyword-results,#local-bible-search-results{max-height:calc(100vh - 380px);min-height:160px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid var(--border);padding-right:2px}
@media (max-width:700px){#bible-keyword-results,#local-bible-search-results{max-height:46vh}}
#bshow-tab-search #bible-keyword-input{position:sticky;top:0;z-index:2}
@media (min-width:1301px){
  .bshow-left,.bshow-right{max-height:calc(100vh - 40px);overflow-y:auto;overscroll-behavior:contain}
  #bible-keyword-results,#local-bible-search-results{max-height:calc(100vh - 520px);min-height:180px}
}
/* Local tab: compact, scrolling lists so both import buttons and every other control stay reachable */
.loc-info{font-size:11.5px;color:var(--text3);margin-bottom:8px}
.loc-info summary{cursor:pointer;font-weight:600;color:var(--text2)}
#local-bible-list,#comm-list{max-height:170px;overflow-y:auto;border:1px solid var(--border);border-radius:8px;padding:0 8px}
#local-bible-list:empty,#comm-list:empty{display:none}
.local-bible-row{flex-wrap:nowrap;gap:6px;padding:6px 0}
.local-bible-row b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.local-bible-row .btn{flex-shrink:0;padding:3px 8px;min-height:0}
.local-bible-row span{flex-shrink:0;white-space:nowrap}
.local-bible-row b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25;font-size:12px}
/* Search results in the wide centre panel */
.bs-host{border:1px solid var(--border);border-radius:10px;margin-bottom:10px;background:var(--surface)}
.bs-head{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);font-size:13px}
.bs-host .bshow-keyword-note{margin:6px 12px}
.bs-host #bible-keyword-results{max-height:46vh;min-height:120px;overflow-y:auto;border-top:0;padding:0 12px 8px}
.bs-host #bible-keyword-results .local-bible-search-hit,.bs-host #bible-keyword-results>div{font-size:14px;line-height:1.5}
.bshow-chapter-panel.srch-open{max-height:none}
@media (max-width:700px){.bs-host #bible-keyword-results{max-height:50vh}}
/* Collapsible section menu */
.app-nav-toggle{cursor:pointer;color:rgba(255,255,255,.55);font-size:12px;font-weight:600;padding:6px 10px 12px;text-align:right;user-select:none}
.app-nav-toggle:hover{color:#fff}
.app-nav{transition:width .18s}
.app-nav.collapsed{padding:18px 6px;overflow-x:hidden}
.app-nav.collapsed .app-nav-toggle{text-align:center;padding:6px 0 12px;font-size:16px}
.app-nav.collapsed .app-nav-item{font-size:0;justify-content:center;padding:12px 0;gap:0}
.app-nav.collapsed .app-nav-item .ic{font-size:17px;margin:0}
.app-nav.collapsed .nav-shortcut-badge{display:none}
@media (max-width:1000px){.app-nav-toggle{display:none}}
.devo-tag{display:inline-block;font-size:10px;font-weight:700;border-radius:5px;padding:1px 6px;letter-spacing:.03em}
.devo-tag.today{background:#1f9d55;color:#fff}
.devo-tag.appr{background:#fff3cd;color:#8a6d1d;margin-left:6px;flex-shrink:0}
.comm-hit.devo-today{border-left:3px solid #1f9d55}
/* Preview + Live stay put while the page scrolls (pinned just under the live control bar), at full size */
.bshow-panes{position:sticky;top:var(--lcb-h,56px);z-index:30;background:var(--bg,#f8f7f4);padding:6px 0 8px;margin-top:-6px;box-shadow:0 8px 10px -10px rgba(0,0,0,.4)}
.bshow-panes.unpinned{position:static;box-shadow:none}
.bshow-pane-body .bshow-card-txt{font-size:22px!important;line-height:1.35}
.bshow-pane-body .bshow-card-ref{font-size:13px;margin-top:10px}
.bshow-pane-label{padding:6px 12px;display:flex;justify-content:space-between;align-items:center}
.pane-pin{background:rgba(255,255,255,.12);color:#fff;border:0;border-radius:6px;font-size:11px;padding:2px 8px;cursor:pointer}
@media (max-width:700px){
  .lcb{position:static!important}
  .bshow-panes{top:0;padding:4px 0 6px}
  .bshow-pane-body{height:clamp(84px,14vh,120px);padding:4px 8px}
  .bshow-pane-body .bshow-card-txt{font-size:10.5px!important}
  .bshow-pane-body .bshow-card-ref{font-size:8.5px;margin-top:3px}
}

/* Devotional outline: Title · Scripture · Body · Meditation · Declaration · 1-Year Plan */
.devo-bar{flex-wrap:wrap;gap:6px;align-items:center}
.devo-bar .devo-live{background:#c0392b;color:#fff;border-color:transparent}
.devo-outline{display:flex;flex-direction:column;gap:8px;margin-top:8px;max-height:46vh;overflow:auto}
.devo-sec-h{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text3,#667);margin-bottom:3px}
.devo-sec-h span{font-weight:500;text-transform:none;letter-spacing:0}
.devo-sec-b{border:1px solid var(--border,#ddd);border-radius:8px;padding:7px 10px;font-size:14px;line-height:1.55;white-space:pre-line;cursor:pointer;margin-bottom:4px}
.devo-sec-b:hover{border-color:var(--accent,#E08A3C)}
.devo-sec-b.on{border-color:var(--accent,#E08A3C);box-shadow:0 0 0 2px rgba(224,138,60,.35);background:rgba(224,138,60,.08)}
.devo-sec.empty .devo-sec-b{opacity:.5;cursor:default;border-style:dashed}
.devo-hint{font-size:12px;color:var(--text3,#667);margin-top:6px}
.devo-sec-b{user-select:none}

/* ── Bible Show: File menu + arrange mode (bg-layout.js) ─────────── */
.bgl-hidden{display:none!important}
.bshow-left.bgl-empty,.bshow-center.bgl-empty,.bshow-right.bgl-empty{display:none}
.bgl-wrap{position:relative;display:inline-block;margin-right:8px;vertical-align:top}
.bgl-menu{display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:300;width:380px;max-width:92vw;max-height:80vh;overflow:auto;background:var(--surface,#fff);color:var(--text,#222);border:1px solid var(--border2,#ccc);border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,.28);padding:10px;text-align:left}
.bgl-menu.open{display:block}
.bgl-h{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.bgl-h b{font-size:14px}.bgl-h span{font-size:11.5px;color:var(--text3,#667);flex:1}
.bgl-x{border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:inherit}
.bgl-presets{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.bgl-list{display:flex;flex-direction:column;gap:2px;border-top:1px solid var(--border,#ddd);border-bottom:1px solid var(--border,#ddd);padding:6px 0;margin-bottom:8px}
.bgl-row{display:flex;align-items:center;gap:4px;padding:3px 2px;border-radius:6px}
.bgl-row:hover{background:rgba(124,111,238,.08)}
.bgl-row label{flex:1;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;min-width:0}
.bgl-row label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bgl-row.off label span{opacity:.5;text-decoration:line-through}
.bgl-mini{width:28px;height:26px;border:1px solid var(--border2,#ccc);background:transparent;color:inherit;border-radius:6px;cursor:pointer;font-size:13px;padding:0}
.bgl-mini:disabled{opacity:.3;cursor:default}
.bgl-colbtn{font-weight:700;font-size:11px}
.bgl-foot{display:flex;flex-wrap:wrap;gap:6px}
.bgl-note{font-size:11px;color:var(--text3,#667);margin-top:8px}
/* arrange mode */
.bgl-arrange .bshow-left,.bgl-arrange .bshow-center,.bgl-arrange .bshow-right{min-height:90px;border:2px dashed rgba(124,111,238,.45);border-radius:12px;padding:6px;position:static}
.bgl-arrange [data-bgl]{outline:2px solid rgba(124,111,238,.55);outline-offset:1px}
.bgl-arrange [data-bgl].bgl-dragging{opacity:.4}
.bgl-arrange .bgl-handle{position:absolute;top:0;left:0;right:0;z-index:60;display:flex;align-items:center;justify-content:space-between;gap:6px;background:#7C6FEE;color:#fff;font-size:11.5px;font-weight:700;padding:3px 8px;border-radius:8px 8px 0 0;cursor:grab;user-select:none}
.bgl-arrange .bgl-handle button{border:0;background:rgba(255,255,255,.25);color:#fff;border-radius:5px;cursor:pointer;width:20px;height:18px;line-height:1;padding:0}
.bgl-arrange [data-bgl].bgl-before{box-shadow:0 -4px 0 0 #1f9d55}
.bgl-arrange [data-bgl].bgl-after{box-shadow:0 4px 0 0 #1f9d55}
.bgl-arrange .bgl-over{background:rgba(31,157,85,.12)}
.bgl-arrange .bshow-showhide{position:relative!important;bottom:auto!important;left:auto!important;right:auto!important}
@media (max-width:700px){
  .bgl-menu{position:fixed;left:8px;right:8px;top:auto;bottom:70px;width:auto;max-height:72vh}
  .bgl-wrap{display:block;margin:0 0 8px}
}
.bgl-rel{position:relative}
.bgl-arrange [data-bgl]:not(.bgl-hidden){padding-top:26px!important}
