/* Syllexis: one look for the whole reader (header, tabs, toolbars, buttons, fields, menus, pop-ups, dialogs).
   Loaded after the page's own styles. Parts that add their own <style> later still win where they are more specific,
   so the shared rules here use "html body" where a part's own rule would otherwise override them.
   Tokens: change these to re-theme a clone of the site. */
:root{
  --r:8px; --r-lg:12px; --ctl-h:30px;
  --ctl-bg:#fffdf9; --ctl-line:#d9cfbd; --ctl-hover:#f4ede1;
  --soft:rgba(138,59,18,.09); --soft-2:rgba(138,59,18,.15);
  --bar:#fbf9f4; --hdr:#fffdfa;
  --pop-shadow:0 12px 36px rgba(40,25,10,.16),0 2px 6px rgba(40,25,10,.06);
  --ui:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{--ctl-bg:#2a2826;--ctl-line:#48423b;--ctl-hover:#35312c;--soft:rgba(224,154,106,.12);--soft-2:rgba(224,154,106,.2);--bar:#201f1d;--hdr:#252321;
    --pop-shadow:0 12px 36px rgba(0,0,0,.5),0 2px 6px rgba(0,0,0,.3)}
}

/* ---------- controls: one size, one radius, one hover ---------- */
html body button,html body .btn,html body select{font-family:var(--ui);font-size:13px;padding:5px 11px;border:1px solid var(--ctl-line);
  background:var(--ctl-bg);color:var(--ink);border-radius:var(--r);line-height:18px;
  transition:background-color .12s,border-color .12s,color .12s,box-shadow .12s}
html body select{padding:5px 6px;height:var(--ctl-h);text-overflow:ellipsis}
html body button:hover,html body .btn:hover{background:var(--ctl-hover);border-color:#cdbfa6}
html body button:active{transform:translateY(.5px)}
html body button.on,html body button.prim,html body button.primary,html body .mbtns .primary{background:var(--accent);border-color:var(--accent);color:#fff}
html body button.on:hover,html body button.prim:hover,html body button.primary:hover{filter:brightness(1.07);background:var(--accent)}
html body .mbtns .primary{font-weight:600}
html body button.danger{color:#a3271b;border-color:#e3b5ad}
html body input[type=search],html body input[type=text],html body input[type=email],html body input[type=number],html body input:not([type]){font-size:14px;height:var(--ctl-h);
  padding:0 10px;border:1px solid var(--ctl-line);border-radius:var(--r);background:var(--ctl-bg);color:var(--ink);outline:0;transition:border-color .12s,box-shadow .12s}
html body input:focus-visible,html body select:focus-visible,html body textarea:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px var(--soft-2);outline:0}
html body button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
input[type=checkbox],input[type=radio]{accent-color:var(--accent);margin:0}
/* small inline buttons stay small */
html body .xbtn,html body .wlink,html body .wsbtn,html body button.say,html body .pgshow,html body .psgopen,html body .scanbtn,html body .tag button,html body .chips button,
html body button.say,html body .xbtn,html body .wlink{padding:0 7px;line-height:18px;border-radius:9px}
html body .chips button,html body .wsbooks button,html body .tag button{padding:2px 8px}
html body #lkFloat{padding:0 5px;line-height:18px}
/* icon-only buttons */
html body #prevCh,html body #nextCh,html body #btnMenu,html body .rvfocus{min-width:var(--ctl-h);padding-left:8px;padding-right:8px}

/* ---------- header: one row; brand, tabs, search, tools ---------- */
html body header{flex-wrap:nowrap;gap:8px;padding:0 12px;min-height:50px;background:var(--hdr);border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(0,0,0,.02);position:relative;z-index:25}
html body header h1{display:flex;align-items:center;gap:8px;font:600 16px/1 var(--ui);letter-spacing:.01em;color:var(--ink);margin:0 6px 0 0;white-space:nowrap}
html body header h1::before{content:"λ";display:inline-block;width:26px;height:26px;border-radius:7px;background:var(--accent);color:#fbf3e6;font:21px/26px var(--gk);text-align:center}
#tabs{display:flex;align-items:center;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none;flex:0 1 auto}
@media (max-width: 1480px){ html body header .lbl{display:none} html body header h1{margin-right:0} }
@media (max-width: 1180px){ html body header button[id^=tab]{padding-left:8px;padding-right:8px;font-size:13px} }
#tabs::-webkit-scrollbar{display:none}
html body header button[id^=tab]{border:0;background:transparent;color:var(--muted);font-weight:500;font-size:13.5px;padding:7px 11px;border-radius:var(--r);white-space:nowrap}
html body header button[id^=tab]:hover{background:var(--soft);color:var(--ink);filter:none}
html body header button[id^=tab].on{background:var(--soft-2);color:var(--accent);font-weight:600}
html body header button[id^=tab].on:hover{background:var(--soft-2)}
html body header #tabs>button:not([id^=tab]){margin-left:8px;flex:none;white-space:nowrap;background:transparent;border-color:var(--ctl-line);color:var(--accent);font-weight:600;padding:5px 11px}
html body header #tabs>button:not([id^=tab]):hover{background:var(--soft)}
html body header #tabs>button[id^=tab]{flex:none}
html body header .sep{display:none}
html body header #search{flex:1 1 200px;min-width:150px;max-width:360px;width:auto;margin-left:auto;padding-left:30px;border-radius:999px;font-family:var(--gk);
  background:var(--ctl-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23998f80' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px 50%}
html body header > button,html body header > .btn{flex:none}
html body #btnLink,html body #tqTop{background:transparent;border-color:transparent;color:var(--ink)}
html body #btnLink:hover,html body #tqTop:hover{background:var(--soft);border-color:transparent}
html body #btnGetApp{background:transparent}
html body #btnSignIn{font-weight:600}
/* the status line moves to a slim bar at the foot of the page; #status stays in the header for the parts that place buttons beside it */
html body header #status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
#statusbar{flex:none;display:flex;align-items:center;gap:10px;min-height:22px;padding:0 12px;font:11.5px var(--ui);color:var(--muted);background:var(--hdr);border-top:1px solid var(--line);white-space:nowrap;overflow:hidden}
#statusbar .st{overflow:hidden;text-overflow:ellipsis}
#statusbar:empty{display:none}

/* ---------- toolbars (.bar): the same height, spacing and grouping in every tab ---------- */
html body .bar{gap:8px;padding:8px 14px;background:var(--bar);border-bottom:1px solid var(--line);row-gap:7px;align-items:center}
html body .bar .sep{display:inline-block;width:1px;height:20px;background:var(--line);margin:0 2px}
html body .bar label.chk,html body label.chk{font-size:12.5px;color:var(--muted);gap:5px;white-space:nowrap}
html body .bar label.chk:hover{color:var(--ink)}
html body .bar select{max-width:200px}
html body #selOt,html body #selNt{max-width:120px;min-height:26px;font-size:12.5px;padding:0 4px}
html body .bar input[type=search]{border-radius:var(--r)}
html body .viewopts{gap:10px}

/* ---------- menus and pop-ups: one surface ---------- */
html body #menu,html body #rvPop,html body #tqPop,html body #sayPill{background:var(--panel);border:1px solid var(--line);box-shadow:var(--pop-shadow)}
html body #menu{top:52px;right:10px;border-radius:var(--r-lg);padding:6px;min-width:250px;gap:0;animation:popin .12s ease-out}
html body #rvPop,html body #tqPop{border-radius:var(--r-lg)}
@keyframes popin{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
html body #menu button{display:flex;justify-content:space-between;align-items:center;width:100%;border:0;background:none;text-align:left;padding:7px 10px;border-radius:7px;font-size:13.5px;color:var(--ink)}
html body #menu button:hover,html body #menu button:focus{background:var(--soft);outline:0}
html body #menu .mk{font:11.5px ui-monospace,Menlo,monospace;color:var(--muted);margin-left:16px}
html body #menu .mhd{font:600 10.5px var(--ui);text-transform:uppercase;letter-spacing:.07em;color:var(--muted);padding:8px 10px 3px}
html body #menu .msep{height:1px;background:var(--line);margin:5px 4px}
html body #menu .mwho{font-size:12px;color:var(--muted);padding:6px 10px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #sayPill{border-radius:999px;padding:3px;gap:2px}
html body #sayPill button{border:0;border-radius:999px;font-size:12.5px;padding:5px 11px;background:transparent}
html body #sayPill button:hover{background:var(--soft)}

/* ---------- dialogs, cards, toasts ---------- */
html body .modal{background:rgba(30,22,14,.38);backdrop-filter:blur(2px)}
html body .mbox{border-radius:var(--r-lg);padding:18px 20px;box-shadow:0 24px 60px rgba(0,0,0,.28);border:1px solid var(--line)}
html body .mbox h3{font:600 16px var(--ui)}
html body .mhead{padding-bottom:6px;border-bottom:1px solid var(--line)}
html body .mclose{padding:3px 8px;border-radius:7px;border:0;background:none}
html body .mclose:hover{background:var(--soft)}
html body .entry{border-radius:10px}
html body .toast{border-radius:10px}
html body #askBox,html body #hlpBox,html body #ltBox{border-radius:var(--r-lg)}
html body #askBtn{border-radius:999px;padding:9px 16px;background:var(--accent);color:#fff;border:0}

/* ---------- panes ---------- */
html body #left{border-right:1px solid var(--line)}
html body #right{padding:14px 18px}
html body .welcome .hint{line-height:1.55}
html body .dictname{font:600 11px var(--ui);letter-spacing:.08em}
::selection{background:rgba(255,200,90,.55)}

/* ---------- phones ---------- */
@media (max-width: 820px){
  html body header{flex-wrap:wrap;padding:calc(6px + env(safe-area-inset-top)) 8px 6px;row-gap:6px;min-height:0}
  html body header h1{display:flex;margin-right:auto}
  html body header h1 .lbl{display:inline}
  #tabs{order:5;flex:1 1 100%;margin:0 -8px;padding:0 8px}
  html body #biblePane .bar #selBook{flex:1 1 90px;min-width:0;max-width:none}
  html body #biblePane .bar #selChap{flex:0 1 auto;min-width:0}
  html body #biblePane .bar #bibleSearch{order:20;flex:1 1 100%;width:auto}
  html body header button[id^=tab]{padding:7px 10px;font-size:13.5px}
  html body header #search{order:9;flex:1 1 100%;max-width:none;margin-left:0;font-size:16px;height:36px}
  html body #menu{top:calc(48px + env(safe-area-inset-top));right:8px}
  html body .bar{padding:6px 8px;gap:6px}
  html body header button,html body .bar button{padding-top:7px;padding-bottom:7px}
  html body .bar select{height:34px}
  #statusbar{display:none}
}
@media print{ #statusbar,#sayPill{display:none!important} }
body.rv-focus #statusbar{display:none!important}
@media (min-width: 821px){ html body #biblePane .bar #selBook{width:160px} html body #biblePane .bar #bibleSearch{width:160px} }
