/* ── fonts (copied from the app's assets) ───────────────────────────────── */
@font-face { font-family:'Hebrew';    src:url('/fonts/SBL_Hbrw.ttf') format('truetype'); }
@font-face { font-family:'Samaritan'; src:url('/fonts/Sam_font.ttf') format('truetype'); }
@font-face { font-family:'Arabic';    src:url('/fonts/Amiri-Regular.ttf') format('truetype'); }
@font-face { font-family:'Translit';  src:url('/fonts/CharisSIL-Regular.ttf') format('truetype'); }

:root{
  --navy:#1a3873; --accent:#2e61b8; --active:#3880e6; --cream:#f7f7f2;
  --share:#218c66; --dark:#141414; --muted:#73738c; --line:#c9cfe0;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; height:100%; }
body{
  font-family:'Hebrew',sans-serif; background:var(--cream); color:var(--dark);
  direction:rtl; overflow:hidden;
}
#app{ display:flex; flex-direction:column; height:100vh; height:100dvh; height:var(--app-h, 100dvh);
      max-width:760px; margin:0 auto;
      background-color:var(--cream); position:relative;
      background-image:linear-gradient(rgba(247,247,242,.86), rgba(247,247,242,.90)),
                       url('/static/img/background.jpg');
      background-size:cover; background-position:center top; background-repeat:no-repeat;
      box-shadow:0 0 26px rgba(0,0,0,.14); }

/* The native Kivy app is laid out physically left→right (first-added widget on
   the left), so "חלוקה שומרונית" (added 2nd) sits on the RIGHT. We reproduce that
   exact physical order by making the button bars LTR; the Hebrew TEXT inside each
   button still shapes right-to-left. Verse/list CONTENT stays RTL (it is below). */
.title-row, .toggle-row, .search-bar, .flag, .root-box-row,
#navbar, .tb-row, .search-foot{ direction:ltr; }

/* header */
#hdr{ background:var(--navy); color:#fff; flex:0 0 auto; }
.brand-top{ text-align:center; font-weight:700; font-size:16px; color:#dfe8ff;
            letter-spacing:.5px; padding:7px 10px 0; }
.title-row{ display:flex; align-items:center; gap:8px; padding:4px 10px 2px; }
.title-row h1{ flex:1; font-size:20px; font-weight:600; text-align:center; margin:0; }
.brand-stack{ flex:0 0 auto; display:flex; flex-direction:column; align-items:center; gap:2px; }
.vsplit-lab{ display:block; text-align:right; font-size:13px; font-weight:600; margin:6px 2px 2px; color:var(--navy); }
.vsplit-area{ width:100%; box-sizing:border-box; min-height:64px; font-family:inherit; font-size:16px;
              border:1px solid #bbb; border-radius:6px; padding:7px; resize:vertical; }
.renum-inp{ width:100%; box-sizing:border-box; height:44px; font-family:inherit; font-size:20px;
            text-align:center; border:1px solid #bbb; border-radius:6px; padding:6px; margin-bottom:4px; }
.scroll-ico{ width:36px; height:36px; object-fit:contain; }
.ver{ font-size:11px; color:#bcd0ff; white-space:nowrap; }
.toggle-row{ display:flex; gap:4px; padding:4px 8px 8px;
             overflow:hidden; transition:max-height .25s ease, opacity .2s ease, padding .25s ease; max-height:60px; }
/* when the bottom toolbar folds, collapse the division-toggle bar upward too (more text) */
body.div-collapsed .toggle-row{ max-height:0 !important; min-height:0 !important; opacity:0 !important;
                                padding-top:0 !important; padding-bottom:0 !important; }
.divbtn{ flex:1; padding:8px; border:0; border-radius:6px; background:#4d4d80; color:#fff;
         font-family:inherit; font-size:14px; cursor:pointer; }
.divbtn.active{ background:var(--active); }
/* drag handle / fold control at the bottom of the division-toggle bar — mirrors #tbHandle */
.div-handle{ display:flex; align-items:center; justify-content:center; gap:10px; position:relative;
  width:100%; height:14px; padding:0 0 2px; border:0; background:transparent; cursor:pointer; touch-action:none; }
body.div-collapsed .div-handle{ height:26px; }
.div-handle .tb-grip{ position:relative; width:60px; height:12px; border-radius:6px;
  background:linear-gradient(#ffffff55,#ffffff2e); box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.3);
  transition:background .2s; }
.div-handle:hover .tb-grip{ background:linear-gradient(#ffffff77,#ffffff44); }
.div-handle .tb-uparrow, .div-handle .tb-downarrow{ display:none; position:absolute; left:50%; bottom:-2px; font-size:28px;
  line-height:1; color:#ffd86b; font-weight:900; text-shadow:0 0 12px rgba(255,216,107,1),0 0 4px rgba(255,216,107,1);
  pointer-events:none; }
/* TOP bar reverses the bottom bar's convention: DOWN arrow while folding inward,
   UP arrow while opening (per request — the top bar opens downward). */
.div-handle.show-arrow .tb-downarrow{ display:block; animation:tbArrowBlinkDown .46s ease-in-out infinite alternate; }
.div-handle.show-down .tb-uparrow{ display:block; animation:tbArrowBlink .46s ease-in-out infinite alternate; }

/* breadcrumb */
/* padding-left reserves room for the three pinned buttons (bookmark 6px · PLAY 42px · הגייה 78px);
   flex-wrap lets a long breadcrumb path drop to a second line instead of hiding under them */
#crumbs{ flex:0 0 auto; min-height:40px; display:flex; align-items:center; justify-content:flex-start;
         gap:5px; padding:6px 10px 6px 108px; flex-wrap:wrap; font-size:15.5px; position:relative; }
#crumbs .crumb{ color:var(--accent); cursor:pointer; background:none; border:0; font-family:inherit; font-size:15.5px; padding:0; }

/* clear-filter bar — shown above the verses when a single verse is filtered */
.clear-filter-bar{ display:flex; justify-content:flex-end; padding:6px 4px 2px; }
.clear-filter-btn{ background:#bf3930; color:#fff; border:0; border-radius:8px; padding:10px 18px;
                   font-family:inherit; font-size:15px; font-weight:600; cursor:pointer; }
#crumbs .crumb.static{ color:var(--dark); cursor:default; }
#crumbs .sep{ color:var(--muted); }

/* main content */
#content{ flex:1 1 auto; overflow-y:auto; padding:6px 8px; -webkit-overflow-scrolling:touch; }
/* page-turn animation: a clone of the outgoing chapter rotates away like a leaf */
.flip-ghost{ position:fixed; overflow:hidden; z-index:60; pointer-events:none;
  background-color:var(--cream); transform-style:preserve-3d; backface-visibility:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.18); will-change:transform; }
/* parchment layer inside the leaf: JS sizes/positions it to the app box so it lines up
   pixel-for-pixel with the background behind — the turn no longer wipes the texture flat */
.flip-ghost-bg{ position:absolute; background-repeat:no-repeat; }
.flip-ghost-inner{ position:absolute; left:0; right:0; padding:6px 8px; }
/* corrugated self-shadow ON the leaf: alternating dark troughs (multiply) + light crests
   (soft-light) that ripple across the width, so the page looks curved/sunken, not flat */
.flip-ghost-shade{ position:absolute; inset:0; opacity:0; pointer-events:none;
  mix-blend-mode:multiply; background-repeat:no-repeat; }
.flip-ghost-gloss{ position:absolute; inset:0; opacity:0; pointer-events:none;
  mix-blend-mode:soft-light; background-repeat:no-repeat; }
/* a special slow-dissolving blessing floated over a particular verse (Samaritan division) */
.verse-bless{ position:fixed; z-index:55; pointer-events:none; display:flex;
  align-items:center; justify-content:center; text-align:center; padding:0 5vw;
  font-family:'Hebrew',serif; font-weight:800; line-height:1.25; opacity:0;
  color:#b4862c; font-size:min(15vw,80px);
  text-shadow:0 1px 2px rgba(255,255,255,.5), 0 3px 22px rgba(120,86,20,.35); }
#searchScreen{ flex:1 1 auto; display:flex; flex-direction:column; overflow:hidden; padding:10px; }

/* list buttons (books / portions) */
.listbtn{ display:flex; align-items:center; gap:8px; width:100%; margin-bottom:3px;
          padding:12px 12px; border:0; border-radius:6px; background:#d9d9d9; color:var(--dark);
          font-family:inherit; font-size:20px; text-align:right; cursor:pointer; }
.listbtn .ico{ width:28px; height:28px; opacity:.8; }
.listbtn small{ color:var(--muted); font-size:15px; }

.hint{ color:var(--muted); font-size:14px; padding:6px 4px; }

/* chapter grids */
.grid{ display:grid; gap:6px; padding:4px 2px; }
.grid.g5{ grid-template-columns:repeat(5,1fr); }
.grid.g3{ grid-template-columns:repeat(3,1fr); }
.grid.g15{ grid-template-columns:repeat(8,1fr); }
.cell{ padding:14px 0; border:0; border-radius:8px; background:#e7ecfb; color:var(--navy);
       font-family:inherit; font-size:17px; cursor:pointer; }
.cell:hover{ background:#d4ddf7; }
.grid.g15 .cell{ padding:10px 0; font-size:13px; }
/* Samaritan chapter cells: number on top, the chapter's opening two words beneath */
.cell.has-incipit{ display:flex; flex-direction:column; align-items:center; gap:3px; padding:10px 4px; }
.cell.has-incipit .cell-num{ font-size:17px; font-weight:700; }
.cell.has-incipit .cell-incipit{ font-size:13px; color:var(--accent); line-height:1.25;
  direction:rtl; word-break:break-word; }

/* verse rows — LTR row so the number button sits on the RIGHT (as in the source
   app); the Hebrew verse text inside stays RTL and right-aligned. */
.vrow{ display:flex; gap:6px; align-items:flex-start; padding:4px 2px; direction:ltr; }
/* live pronunciation preview line (under a verse): transcription → pointed Hebrew the TTS speaks */
.vpron{ direction:rtl; text-align:right; margin:0 40px 8px 2px; padding:5px 9px;
        background:rgba(23,169,196,.09); border-right:3px solid rgba(23,169,196,.5); border-radius:6px; }
.vpron .vpron-lat{ direction:ltr; unicode-bidi:isolate; font-family:'Translit',serif; color:#5a6b7a; font-size:15px; }
.vpron .vpron-arrow{ color:#17a9c4; margin:0 7px; }
.vpron .vpron-heb{ font-size:20px; color:var(--navy); }
.bm-nav.pron-nav{ left:78px; padding:0 5px; font-size:19px; font-weight:700; line-height:1; color:#17a9c4; }
.pron-nav.on{ background:rgba(23,169,196,.9); color:#fff; border-radius:6px; }
.vrow .num{ flex:0 0 auto; min-width:34px; height:30px; border:0; border-radius:6px;
            background:#c2cbef; color:var(--navy); font-family:inherit; font-size:14px; cursor:pointer; margin-top:4px; }
.vrow .num.active{ background:var(--accent); color:#fff; }
.vrow .vtext{ flex:1; font-size:20px; line-height:1.7; direction:rtl; text-align:right; }
.vrow .vtext.eng{ direction:ltr; text-align:left; font-family:'Translit',serif; font-size:17px; }
.vrow .vtext.interp{ white-space:pre-wrap; text-align:justify; text-align-last:right;
                     overflow-wrap:break-word; word-break:break-word; }
.sam .vrow .vtext{ font-size:19px; text-align:justify; text-align-last:right;
                   overflow-wrap:break-word; word-break:break-word; }

.numstrip{ display:flex; flex-wrap:wrap; gap:5px; padding:5px 2px; justify-content:flex-end; direction:ltr; }
.numstrip .num{ min-width:36px; height:34px; border:0; border-radius:6px; background:#c2cbef;
                color:var(--navy); font-family:inherit; font-size:14px; cursor:pointer; }
.numstrip .num.active{ background:var(--accent); color:#fff; }
.numstrip .clear{ background:#bf3930; color:#fff; padding:0 10px; font-weight:600; }

/* Samaritan glyphs */
.samchar{ font-family:'Samaritan'; }
.eng-credit{ text-align:center; color:var(--navy); font-size:13px; padding:6px; line-height:1.4; }

/* panels (compare / interpret / aramaic / arabic / commentary / source) */
/* LTR pair so the translation/Masoretic panel sits on the LEFT and the original
   on the RIGHT (as in the source app); the Hebrew text inside each panel is RTL. */
.pair{ display:flex; gap:8px; padding:4px 2px; align-items:stretch; direction:ltr; }
/* Masoretic-comparison grid: one row per verse → exact verse-opposite-verse alignment */
.cmp-grid{ display:grid; grid-template-columns:1fr 1fr; column-gap:8px; direction:ltr;
           padding:4px 2px; background:var(--cream); border:1.3px solid rgba(26,56,115,.55); border-radius:6px; }
.cmp-cell{ direction:rtl; text-align:right; line-height:1.6; padding:5px 8px;
           border-bottom:1px solid rgba(26,56,115,.18); }
.cmp-head{ text-align:center; font-weight:700; color:var(--navy); font-size:17px;
           position:sticky; top:0; background:var(--cream); border-bottom:1.3px solid rgba(26,56,115,.5); }
.cmp-missing{ color:#b00020; letter-spacing:2px; font-weight:700; }
/* Onkelos comparison: three columns (source · Samaritan Aramaic · Onkelos) */
.cmp-grid3{ grid-template-columns:1fr 1fr 1fr; }
.cmp-grid3 .cmp-head{ font-size:15.5px; }
.cmp-vn{ color:var(--accent); }
/* a Samaritan-Aramaic verse with no Onkelos counterpart shows a dashed line */
.cmp-dashline{ display:block; height:0; margin:11px 4px; border-top:2px dashed rgba(26,56,115,.5); }
/* Ben-Ḥayyim Latin phonetic transcription cell (תעתיק הגייה) */
.tr-latin{ direction:ltr; text-align:left; font-family:'Translit', 'CharisSIL', serif; }
/* small "info" icon next to the compared-version name; links to a web article */
.cmp-info{ display:inline-block; font-size:.72em; color:var(--navy); opacity:.72;
           text-decoration:none; vertical-align:super; cursor:pointer; }
.cmp-info{ cursor:pointer; }
.cmp-info:hover{ opacity:1; }
.ver-info{ line-height:1.7; font-size:16px; text-align:right; padding:4px 2px; color:var(--dark); }
.panel{ flex:1; background:var(--cream); border:1.3px solid rgba(26,56,115,.55);
        border-radius:12px; padding:8px; }
.panel .ptitle{ text-align:center; font-weight:700; color:var(--navy); font-size:17px; margin-bottom:4px; }
.panel .pbody{ font-size:20px; line-height:1.7; white-space:pre-wrap; direction:rtl; text-align:right; }
.panel .pbody.ltr{ direction:ltr; text-align:left; font-family:'Translit',serif; font-size:17px; }
.panel .pbody.ar{ font-family:'Arabic'; direction:rtl; text-align:right; font-size:21px; }
.diff{ color:#cc0000; }

.srcpanel{ background:var(--cream); border:1.3px solid rgba(26,56,115,.55); border-radius:12px;
           padding:8px; margin:4px 2px; }
.srcpanel .shead{ display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.srcpanel .shead .stitle{ flex:1; text-align:center; font-weight:700; color:var(--navy); font-size:17px; }
.miniback{ background:var(--accent); color:#fff; border:0; border-radius:6px; padding:6px 10px;
           font-family:inherit; font-size:13px; cursor:pointer; white-space:nowrap; }
.picker-btn{ display:block; width:100%; margin:6px 0; padding:13px; border:0; border-radius:6px;
             background:var(--navy); color:#fff; font-family:inherit; font-size:16px; cursor:pointer; }
.card{ background:#fdfdf7; border:1px solid rgba(46,97,184,.35); border-radius:8px; padding:6px 8px; margin:5px 0; }
.card .chead{ color:var(--accent); font-weight:700; font-size:14px; margin-bottom:3px; cursor:pointer; }
.card .cbody{ font-size:18px; line-height:1.6; }
.note{ color:var(--muted); font-size:15px; text-align:center; padding:8px; }

/* dictionary */
.dictpanel{ background:#f5f5ec; border:1.2px solid rgba(26,56,115,.45); border-radius:12px;
            padding:8px; margin:6px 2px; }
/* word-by-word picker: the hint, the underlined clickable words, the single-word row */
.dict-pick-hint{ background:#eef2fb; border:1px solid rgba(26,56,115,.2); border-radius:10px;
  color:var(--navy); font-size:14.5px; line-height:1.5; padding:8px 12px; margin:2px 2px 8px; text-align:center; }
.vrow .vtext .dw{ cursor:default; }
.vrow .vtext .dw.on{ cursor:pointer; text-decoration:underline; text-decoration-color:rgba(46,97,184,.5);
  text-underline-offset:3px; text-decoration-thickness:1.5px; border-radius:3px; transition:background .12s; }
.vrow .vtext .dw.on:hover{ background:#e2ebfb; }
.vrow .vtext .dw.sel{ background:var(--accent); color:#fff; text-decoration:none; padding:0 2px; }
.dict-one{ position:relative; }
.dict-one.hidden{ display:none; }
.dict-one-close{ position:absolute; top:5px; inset-inline-start:7px; z-index:1; width:28px; height:28px;
  border:0; border-radius:50%; background:var(--navy); color:#fff; font-size:15px; line-height:1; cursor:pointer; }
.dict-one-close:hover{ background:var(--accent); }
.wt-trans{ font-weight:700; color:var(--navy); }
.wt-eng{ direction:ltr; text-align:left; color:#3a4a66; }
.dict-one-tap{ text-align:center; color:var(--muted); font-size:12.5px; padding:6px 2px 2px; }
/* the per-source breakdown popup */
.ws-h{ color:var(--navy); font-weight:700; font-size:15px; margin:10px 0 3px; border-bottom:1px solid rgba(26,56,115,.15); padding-bottom:2px; }
.ws-block{ background:#f7f9ff; border-radius:8px; padding:6px 10px; margin-bottom:4px; }
.ws-val{ color:var(--dark); font-size:16px; line-height:1.5; }
.ws-from{ color:var(--accent); font-size:12.5px; margin-top:1px; }
.ws-from.ws-pending{ color:var(--muted); font-style:italic; }
.dictpanel .dtitle{ text-align:center; font-weight:700; color:var(--navy); font-size:17px; }
.dictpanel .dhint{ text-align:center; color:var(--muted); font-size:12px; margin-bottom:4px; }
.dictpanel .dhint-strong{ text-align:center; color:var(--navy); font-size:16px; font-weight:700; margin-bottom:8px; }
.dictpanel .online-row{ display:flex; align-items:center; justify-content:flex-end; gap:6px; color:var(--navy); font-size:14px; margin-bottom:4px; }
.dict-item{ border-bottom:1px solid rgba(26,56,115,.10); padding-bottom:2px; }
.dictword{ color:var(--accent); font-size:19px; cursor:pointer; padding:3px 2px; border-bottom:1px dotted transparent; }
.dictword:hover{ border-bottom-color:var(--accent); }
/* Tal-dictionary results, expanded inline under the tapped word — clean dark text,
   results one after another separated by a comma. */
.tal-inline{ padding:2px 14px 7px; font-size:15px; line-height:1.7; color:var(--dark);
             direction:rtl; text-align:right; }
.tal-inline b{ color:var(--navy); font-weight:700; }
.tal-inline .pos{ color:var(--muted); font-size:12px; }
.tal-inline .sep{ color:var(--muted); }
.dict-scroll{ max-height:340px; overflow-y:auto; overflow-x:auto; }
.dict-online{ color:var(--dark); font-size:15px; padding:2px 12px 6px; }
.dict-online .src{ color:var(--accent); font-weight:700; font-size:12px; }

/* word table: מילה · תרגום ארמי · פירוש עברי · מילון טל · ערבית */
.wtbl{ width:100%; border-collapse:collapse; direction:rtl; font-size:15px; }
.wtbl th{ position:sticky; top:0; background:var(--navy); color:#fff; font-weight:700;
          font-size:13px; padding:6px 7px; text-align:right; white-space:nowrap; z-index:1; }
.wtbl td{ padding:6px 7px; text-align:right; border-bottom:1px solid rgba(26,56,115,.12);
          vertical-align:top; }
.wtbl tr:nth-child(even) td{ background:rgba(26,56,115,.035); }
.wtbl tr.tappable{ cursor:pointer; }
.wtbl tr.tappable:hover td{ background:rgba(115,84,56,.10); }
.wtbl .wt-word{ font-weight:700; color:var(--navy); white-space:nowrap; }
.wtbl .wt-aram{ color:var(--accent); font-weight:700; white-space:nowrap; }
.wtbl .wt-mean{ color:var(--dark); }
.wtbl .wt-tal{ color:#4d4d80; font-size:13.5px; }
.wtbl .wt-ar{ font-family:'Arabic',serif; font-size:17px; color:var(--dark); direction:rtl; }
.wtbl .wt-meliz{ color:#6b4d2e; font-size:14px; font-weight:600; }
.online-block{ margin-top:8px; border-top:1px solid rgba(26,56,115,.18); padding-top:6px; }
.online-block .online-item{ color:var(--dark); font-size:14.5px; padding:3px 2px; }
.online-block .src{ color:var(--accent); font-weight:700; font-size:12px; }

/* חילופי נוסח — von Gall critical apparatus */
.app-vhead{ color:var(--navy); font-weight:700; font-size:15px; margin:10px 0 4px;
            border-bottom:1px solid rgba(26,56,115,.2); }
.app-card{ background:#f7f3ea; border:1px solid rgba(122,53,80,.30); border-radius:8px;
           padding:6px 9px; margin-bottom:6px; direction:rtl; text-align:right; }
.app-lemma{ font-size:18px; color:var(--dark); }
.app-lemma .app-mark{ color:#7a3550; font-size:11.5px; font-weight:700; }
.app-reg{ background:#7a3550; color:#fff; font-size:11px; padding:1px 6px; border-radius:8px; }
.app-read{ font-size:16px; color:var(--dark); margin-top:2px; }
.app-type{ background:#7a3550; color:#fff; font-size:12px; padding:1px 7px; border-radius:8px; }
.app-wit{ font-size:13.5px; color:var(--accent); margin-top:3px; }
.app-wit .app-wit-h{ font-weight:700; font-size:12.5px; color:var(--accent); }
.app-wit .app-wit-ms{ font-size:12.5px; color:var(--dark); line-height:1.5; padding-inline-start:6px; }
.app-wit .app-sig{ display:inline-block; min-width:22px; background:#7a3550; color:#fff;
  border-radius:5px; padding:0 5px; font-weight:700; font-size:11.5px; margin-inline-end:4px; }
.app-wit .app-wit-unk{ color:var(--muted); }
.app-note{ font-size:12.5px; color:var(--muted); margin-top:2px; }
/* a verse word that carries a textual variant — emphasised + clickable (inline) */
.vtext .app-word{ color:#7a3550; font-weight:700; cursor:pointer;
  border-bottom:2px dotted #7a3550; padding-bottom:1px; }
.vtext .app-word:hover{ background:rgba(122,53,80,.12); }
.app-card{ scroll-margin-top:60px; }
.app-hint{ color:var(--muted); font-size:13px; line-height:1.5; margin-bottom:6px; }
/* brief flash when jumping between a word and its variant card */
@keyframes appFlash{ 0%{ background:rgba(122,53,80,.45); } 100%{ background:transparent; } }
.app-flash{ animation:appFlash 1.3s ease-out; }
.vtext .app-word.app-flash{ border-radius:4px; }

/* spread + navbar */
.wide-btn{ flex:0 0 auto; margin:2px 6px; padding:13px; border:0; border-radius:6px;
           background:var(--navy); color:#fff; font-family:inherit; font-size:16px; cursor:pointer; }
#navbar{ flex:0 0 auto; display:flex; gap:6px; padding:4px 6px; align-items:center; }
/* transparent arrows: just a glyph while paging chapters; a parasha/book label
   appears inside only at a crossing (set in JS) */
.nav-arrow{ flex:1; padding:6px 4px; border:0; border-radius:6px; background:transparent;
            color:rgba(23,169,196,.45); font-family:inherit; font-size:15px; font-weight:700; cursor:pointer;
            display:inline-flex; align-items:center; justify-content:center; }
.nav-arrow .nav-chevron{ width:30px; height:30px; }   /* outline arrow, translucent (no fill) */
.nav-arrow:hover{ background:rgba(0,0,0,.05); }
.nav-arrow:disabled{ opacity:.35; cursor:default; }
/* at a parasha/book crossing the arrow carries a label → show it as a clear button */
.nav-arrow.nav-haslabel{ background:var(--navy); color:#fff; font-size:13px; padding:10px 6px; }
.nav-arrow.nav-haslabel:hover{ background:var(--accent); }
.round{ flex:0 0 auto; width:50px; padding:8px 0; border:0; border-radius:8px; background:transparent;
        color:#17a9c4; font-size:24px; font-weight:700; cursor:pointer; }   /* gray magnifiers/back */
.round:hover{ background:rgba(0,0,0,.06); }
/* magnifier shown as unavailable (no text to zoom / no search results) */
.round:disabled{ opacity:.3; cursor:default; pointer-events:none; }
.round:disabled:hover{ background:transparent; }
/* back button relocated into the navbar (between the two magnifiers); its original (navy) color */
.nav-back{ color:var(--navy); }
.nav-back .tbi{ width:25px; height:25px; }
/* on the plain browse screens (books / portions / spread) only the back button shows */
#navbar.nav-backonly{ justify-content:center; }

/* toolbar */
#toolbar{ flex:0 0 auto; background:var(--navy); padding:3px; display:flex; flex-direction:column; gap:2px; }
.tb-rows{ display:flex; flex-direction:column; gap:2px; min-height:0; max-height:360px; overflow:hidden;
  transition:max-height .38s ease, opacity .22s ease; }
#toolbar.folded .tb-rows{ max-height:0; opacity:0; pointer-events:none; }
.tb-row{ display:flex; gap:2px; }
/* drag handle / fold control at the top of the bottom toolbar */
.tb-handle{ display:flex; align-items:center; justify-content:center; gap:10px; position:relative;
  width:100%; height:14px; padding:0; border:0; background:transparent; cursor:pointer; touch-action:none; }
#toolbar.folded .tb-handle{ height:32px; }
/* a chunky "shutter handle" — a rounded bar with a groove line down its middle */
.tb-grip{ position:relative; width:60px; height:12px; border-radius:6px;
  background:linear-gradient(#ffffff55,#ffffff2e); box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.3);
  transition:background .2s; }
.tb-grip::after{ content:''; position:absolute; left:9px; right:9px; top:50%; height:2.5px; transform:translateY(-50%);
  background:rgba(16,26,56,.5); border-radius:2px; }
.tb-handle:hover .tb-grip{ background:linear-gradient(#ffffff77,#ffffff44); }
/* prominent blinking arrows on the handle: UP right after folding ("pull up to
   reopen"), DOWN for a moment right after opening ("you can fold it back down") */
.tb-uparrow, .tb-downarrow{ display:none; position:absolute; left:50%; top:-2px; font-size:28px;
  line-height:1; color:#ffd86b; font-weight:900; text-shadow:0 0 12px rgba(255,216,107,1),0 0 4px rgba(255,216,107,1);
  pointer-events:none; }
#toolbar.folded.show-arrow .tb-uparrow{ display:block; animation:tbArrowBlink .46s ease-in-out infinite alternate; }
#toolbar.show-down:not(.folded) .tb-downarrow{ display:block; animation:tbArrowBlinkDown .46s ease-in-out infinite alternate; }
@keyframes tbArrowBlink{
  from{ opacity:.18; transform:translate(-50%,7px) scale(.8); }
  to{   opacity:1;   transform:translate(-50%,-10px) scale(1.28); } }
@keyframes tbArrowBlinkDown{
  from{ opacity:.18; transform:translate(-50%,-7px) scale(.8); }
  to{   opacity:1;   transform:translate(-50%,10px) scale(1.28); } }
/* zoom (magnifier ±) buttons centre their icon */
.round{ display:inline-flex; align-items:center; justify-content:center; }
.round .zoomi{ width:31px; height:31px; }
.tb{ flex:1 1 0; min-width:0; padding:12px 3px; border:0; border-radius:5px; background:#414166; color:#fff;
     font-family:inherit; font-size:13.5px; line-height:1.2; cursor:pointer; white-space:normal; }
/* a temporarily-disabled toolbar button: looks unavailable but still tappable (shows a notice) */
.tb.unavail{ opacity:.5; }
.tb.navy{ background:var(--navy); }
.tb.accent{ background:var(--accent); }
/* search button gets its own colour so it stands out from "עיון" next to it */
#searchBtn{ background:#1f8a8a; }
/* small magnifying-glass icon before the "חיפוש" label (i18n sets the text; this
   pseudo-element is independent so it isn't wiped) */
#searchBtn::before{ content:''; display:inline-block; width:13px; height:13px; margin-inline-end:5px;
   vertical-align:-1px; background-color:currentColor;
   -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='21' y1='21' x2='15.2' y2='15.2'/%3E%3C/svg%3E") center/contain no-repeat;
           mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='21' y1='21' x2='15.2' y2='15.2'/%3E%3C/svg%3E") center/contain no-repeat; }
.tb.green{ background:var(--share); flex:0 0 auto; min-width:54px; }
#shareBtn{ display:flex; align-items:center; justify-content:center; padding:10px 12px; }
/* compact icon buttons in the search footer (share + Excel export) */
.tb.icon-btn{ flex:0 0 auto; min-width:48px; display:inline-flex; align-items:center;
              justify-content:center; padding:10px 12px; }
.tb.excel{ background:#1d7044; }
#shareBtn svg{ display:block; }
.toast{ position:fixed; left:50%; bottom:96px; transform:translateX(-50%) translateY(8px);
        background:var(--navy); color:#fff; font-size:14px; padding:9px 16px; border-radius:8px;
        box-shadow:0 2px 10px rgba(0,0,0,.35); z-index:80; opacity:0; pointer-events:none;
        transition:opacity .2s, transform .2s; max-width:80%; text-align:center; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.tb.on{ background:var(--active); }
.tb:disabled{ background:#555 !important; opacity:.6; cursor:default; }
.tb.hidden{ display:none; }
/* toolbar icons: book (עיון) · scroll (פירוש) · Samaritan א.ב (כתב שומרוני) */
.tb.has-ico{ display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.tb .tbi{ width:15px; height:15px; flex:0 0 auto; }
/* the כתב-שומרוני button shows only "א-ב", in Samaritan or Hebrew script */
.tb.font-btn .font-ab{ font-size:1.15em; font-weight:700; line-height:1; letter-spacing:.04em; }
.tb.font-btn .font-ab.sam-script{ font-family:'Samaritan',serif; font-size:1.35em; }
/* Samaritan א.ב: only the LETTERS use the Samaritan font; the "." between them stays
   in the default font so it matches the dot in the Hebrew א.ב exactly. */
.tb.font-btn .font-ab .sam-let{ font-family:'Samaritan',serif; font-size:1.18em; }
/* round "back" button — icon only, spins a full turn on press */
.tb.ico-btn{ flex:0 0 auto; min-width:44px; display:inline-flex; align-items:center; justify-content:center; }
.tb.ico-btn .tbi{ width:18px; height:18px; }
@keyframes spin360{ from{ transform:rotate(0); } to{ transform:rotate(-360deg); } }
.tb.ico-btn .tbi.spin360{ animation:spin360 .6s ease; }

/* search */
.search-bar{ display:flex; gap:6px; margin-bottom:6px; }
#searchInput{ flex:1; padding:10px; border:1px solid var(--line); border-radius:6px; font-family:inherit; font-size:18px; }
#doSearchBtn{ width:92px; border:0; border-radius:8px; background:#1f8a8a; color:#fff; font-family:inherit; font-size:19px; font-weight:600; cursor:pointer; }
.flag{ display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:5px 2px; color:var(--accent); font-size:16px; }
.flag input{ width:20px; height:20px; }
.root-box-row input{ flex:1; padding:8px; border:1px solid var(--line); border-radius:6px; font-family:inherit; font-size:18px; }
#searchStatus{ color:var(--accent); font-size:15px; padding:4px 2px; min-height:22px; }
#searchStatus .res-count{ color:var(--navy); font-weight:800; font-size:18px; }
#searchStatus .res-shown{ color:#8a7a55; font-size:13px; }
#searchStatus.searching{ font-size:22px; font-weight:800; color:var(--navy); text-align:center;
                         padding:14px 2px; animation:blink 1s steps(2,start) infinite; }
@keyframes blink{ 50%{ opacity:.2; } }
#searchResults{ flex:1; overflow-y:auto; }
.res-path{ display:block; width:100%; text-align:right; background:none; border:0; font-family:inherit;
           font-size:16.5px; padding:6px 2px; cursor:pointer; line-height:1.4; }
.res-path.jew{ color:var(--accent); }
.res-path.sam{ color:#8c4d1a; }
.res-path b{ font-weight:700; }
.res-path .dir{ unicode-bidi:isolate; color:var(--muted); padding:0 4px; }

/* advanced-search button + panel (holds all the flags) */
.adv-btn{ display:block; width:100%; margin:2px 0 6px; padding:11px; border:0; border-radius:8px;
          background:#405973; color:#fff; font-family:inherit; font-size:16px; cursor:pointer; }
.search-btn-row{ display:flex; gap:6px; }
.search-btn-row .adv-btn{ flex:1 1 0; width:auto; }
.adv-btn.help{ background:#2f6f5e; }
.adv-panel{ border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:6px; background:#fbfbf6; }
.adv-hint{ color:#555; font-size:13.5px; line-height:1.55; padding:8px 2px 2px; text-align:right; }
.adv-hint b{ color:var(--navy); }
.adv-apply{ display:block; width:100%; margin-top:6px; padding:12px; border:0; border-radius:8px;
            background:var(--share); color:#fff; font-family:inherit; font-size:17px; font-weight:600; cursor:pointer; }
.res-verse{ font-size:19px; padding:2px 2px 6px; line-height:1.6; }
.res-verse .hl{ color:#cc0000; font-weight:700; }
.res-occ{ font-family:'Translit',serif; color:#337373; font-size:18px; padding:0 2px 2px; }
.res-occ .extra{ color:#8a8a8a; font-family:'Hebrew'; }
.res-meaning{ color:#555; font-size:15px; padding:0 2px 8px; line-height:1.5; }
.res-meaning-btn{ display:inline-block; margin:2px 2px 8px; border:1px solid var(--accent); background:#f3f7ff;
  color:var(--accent); border-radius:9px; padding:6px 12px; font-family:inherit; font-size:14.5px; cursor:pointer; }
.res-meaning-btn:hover{ background:var(--accent); color:#fff; }
.res-meaning-btn b{ color:inherit; }
.res-meaning b{ color:var(--navy); }
.res-meaning .aram-link{ color:var(--accent); cursor:pointer; }
.res-meaning .aram-link:hover{ text-decoration:underline; }
.res-meaning .aram-link b{ color:var(--navy); }
.res-meaning .more-hint{ color:var(--muted); font-size:13px; }

/* search-flags in two columns */
.flags-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; margin-bottom:2px; }

/* word-sources popup (Tal root + Tibåt Mårqe / tradition occurrences) — readable */
#infoBody .ws-h{ color:var(--navy); font-weight:700; font-size:19px; margin:14px 0 6px;
                 border-bottom:2px solid rgba(26,56,115,.25); padding-bottom:4px; }
#infoBody .ws-item{ font-size:17px; padding:8px 4px; color:var(--dark); line-height:1.65;
                    border-bottom:1px solid rgba(26,56,115,.08); }
#infoBody .ws-item b{ color:var(--navy); }
#infoBody .ws-item .pos{ color:var(--muted); font-size:13px; }
#infoBody .ws-cite{ color:#555; font-size:15px; padding:3px 10px 0; }
#infoBody .ws-snip{ color:#333; font-size:16px; padding:3px 10px 0; line-height:1.6; }

/* user-help window */
#infoBody .help-h{ color:var(--navy); font-weight:700; font-size:18px; margin:14px 0 5px;
                   border-bottom:2px solid rgba(26,56,115,.2); padding-bottom:3px; }
#infoBody .help-list{ margin:0; padding:0 18px 0 0; }
#infoBody .help-list li{ font-size:15.5px; line-height:1.65; margin-bottom:4px; color:var(--dark); }
#infoBody .help-list b{ color:var(--navy); }
/* ── install card (navy + gold parchment, the dedicated install-module look) ── */
.pwa-card{ width:92%; max-width:430px; background:#FBF8F0; border:1px solid #E4D9BE; border-radius:18px;
  overflow:hidden; box-shadow:0 18px 50px -18px rgba(20,33,61,.45); font-family:inherit;
  animation:pwaRise .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pwaRise{ from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
.pwa-head{ display:flex; align-items:center; gap:12px; padding:16px 18px 12px; position:relative;
  background:linear-gradient(180deg,#F4EEDF,#FBF8F0); border-bottom:1px solid #E4D9BE; }
.pwa-head::after{ content:""; position:absolute; inset-inline:18px; bottom:-1px; height:2px;
  background:linear-gradient(90deg,transparent,#B8860B,transparent); opacity:.5; }
.pwa-mark{ flex:none; width:42px; height:42px; border-radius:11px; display:grid; place-items:center;
  background:#1F3864; box-shadow:inset 0 0 0 1px rgba(255,255,255,.12), 0 2px 8px rgba(20,33,61,.3); }
.pwa-titles{ flex:1; min-width:0; }
.pwa-title{ margin:0; font-size:18px; font-weight:700; color:#14213D; }
.pwa-sub{ margin:2px 0 0; font-size:13.5px; color:#6B6B63; }
.pwa-x{ flex:none; width:32px; height:32px; border:none; border-radius:9px; background:transparent; color:#6B6B63;
  cursor:pointer; font-size:22px; line-height:1; display:grid; place-items:center; }
.pwa-x:hover{ background:#F4EEDF; color:#1F3864; }
.pwa-body{ padding:14px 18px 16px; }
.pwa-btn{ width:100%; border:none; cursor:pointer; font-family:inherit; font-size:17px; font-weight:700;
  color:#FBF8F0; background:#1F3864; padding:14px 16px; border-radius:12px; display:flex; align-items:center;
  justify-content:center; gap:10px; box-shadow:0 6px 16px -6px rgba(20,33,61,.55); }
.pwa-btn:hover{ background:#14213D; } .pwa-btn:active{ transform:translateY(1px); }
.pwa-hint{ margin:12px 2px 0; font-size:13px; color:#6B6B63; text-align:center; }
.pwa-steps{ list-style:none; margin:0; padding:0; counter-reset:s; }
.pwa-step{ display:flex; align-items:center; gap:13px; padding:11px 0; counter-increment:s; border-bottom:1px dashed #E4D9BE; }
.pwa-step:last-child{ border-bottom:none; }
.pwa-num{ flex:none; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:#F4EEDF;
  color:#7F6000; border:1px solid #E4D9BE; font-size:15px; font-weight:700; font-variant-numeric:tabular-nums; }
.pwa-num::before{ content:counter(s); }
.pwa-text{ flex:1; font-size:15.5px; color:#2A2A28; line-height:1.45; }
.pwa-text b{ color:#14213D; }
.pwa-glyph{ flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:#fff;
  border:1px solid #E4D9BE; box-shadow:0 1px 3px rgba(20,33,61,.08); }
.pwa-glyph svg{ display:block; }
.pwa-warn{ display:flex; gap:12px; align-items:flex-start; background:#FBF1E6; border:1px solid #E8C9A0;
  border-radius:12px; padding:13px 14px; margin-bottom:12px; }
.pwa-warn svg{ flex:none; margin-top:1px; } .pwa-warn p{ margin:0; font-size:14.5px; color:#7A4A12; line-height:1.5; }
.pwa-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 14px 11px;
  border-top:1px solid #E4D9BE; background:#FBF8F0; }
.pwa-langs{ display:inline-flex; gap:2px; padding:2px; background:#F4EEDF; border:1px solid #E4D9BE; border-radius:9px; }
.pwa-lang{ border:none; background:none; cursor:pointer; font-family:inherit; font-size:13px; color:#6B6B63;
  padding:4px 9px; border-radius:7px; line-height:1; }
.pwa-lang:hover{ color:#1F3864; } .pwa-lang.is-on{ background:#1F3864; color:#FBF8F0; }
.pwa-snooze{ background:none; border:none; cursor:pointer; font-family:inherit; color:#6B6B63; font-size:13.5px;
  padding:4px 8px; border-radius:7px; text-decoration:underline; text-underline-offset:3px; }
.pwa-snooze:hover{ color:#1F3864; background:#F4EEDF; }
.res-subroot{ font-size:25px; font-weight:700; text-decoration:underline; padding:8px 2px 2px; }
.search-foot{ display:flex; align-items:center; gap:6px; padding-top:6px; }
.search-foot .grow{ flex:1; }

/* footer */
footer{ flex:0 0 auto; text-align:center; padding:3px; font-size:11px; color:#666;
        padding-bottom:calc(3px + env(safe-area-inset-bottom)); }
footer a{ color:var(--accent); text-decoration:none; }

/* modals */
.modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center;
        justify-content:center; z-index:50; }
.modal-box{ background:#fff; border-radius:12px; padding:16px; width:80%; max-width:340px; display:flex; flex-direction:column; gap:10px; }
.modal-box.big{ max-width:560px; width:92%; max-height:85vh; }
/* the occurrence popup body must scroll inside the capped box, so a long verse/Memar
   passage doesn't push the close button off-screen (was: no scroll, couldn't close) */
#occBody{ overflow-y:auto; flex:1 1 auto; min-height:0; -webkit-overflow-scrolling:touch; }
.modal-title{ text-align:center; font-weight:700; color:var(--navy); font-size:18px; }
.share-opt{ padding:14px; border:0; border-radius:8px; color:#fff; font-family:inherit; font-size:17px; cursor:pointer; }
.share-opt.close{ background:var(--navy); }
.trans-opt.sel{ outline:3px solid #fff; outline-offset:-3px; box-shadow:0 0 0 2px var(--navy); }

/* onboarding cards (welcome · install · notifications) */
.modal-box.ob-box{ max-width:390px; }
#onboardModal .ob-body{ color:var(--dark); font-size:15.5px; line-height:1.7; }
#onboardModal .ob-body b{ color:var(--navy); }
#onboardModal .ob-dont{ display:flex; align-items:center; gap:8px; font-size:14px; color:var(--muted); cursor:pointer; }
#onboardModal .ob-dont input{ width:17px; height:17px; flex:0 0 auto; }
#onboardModal .ob-actions{ display:flex; gap:8px; margin-top:2px; }
#onboardModal .ob-primary{ flex:1 1 auto; padding:12px; border:0; border-radius:8px; background:var(--navy); color:#fff; font:inherit; font-size:16px; cursor:pointer; }
#onboardModal .ob-primary:hover{ background:var(--accent); }
#onboardModal .ob-later{ flex:0 0 auto; padding:12px 16px; border:1px solid #cfd6e6; border-radius:8px; background:#fff; color:var(--dark); font:inherit; font-size:15px; cursor:pointer; }
/* welcome carousel: parchment card so a white-filled "current" dot reads against it */
.modal-box.wc-box{ max-width:400px; width:90%; max-height:86vh; gap:12px; background:#f2ecdb; }
.wc-track{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.wc-track::-webkit-scrollbar{ display:none; }
.wc-page{ flex:0 0 100%; min-width:100%; scroll-snap-align:center; box-sizing:border-box;
  padding:2px 6px; max-height:54vh; overflow-y:auto; color:var(--dark); font-size:15.5px; line-height:1.7; }
.wc-page b{ color:var(--navy); }
.wc-page p{ margin:0 0 10px; }
.wc-page p:last-child{ margin-bottom:0; }
.wc-page ul{ margin:6px 0; padding-inline-start:20px; }
.wc-page li{ margin-bottom:3px; }
.wc-page .wc-sign{ text-align:center; margin-top:14px; color:var(--navy); font-size:16px; }
.wc-dots{ display:flex; justify-content:center; gap:10px; padding:2px 0 0; }
.wc-dot{ width:12px; height:12px; border-radius:50%; border:1.6px solid #000;
  background:transparent; padding:0; cursor:pointer; transition:background .15s; }
.wc-dot.active{ background:#fff; }
.wc-read{ display:flex; align-items:center; justify-content:center; gap:8px;
  font-size:14.5px; font-weight:600; color:var(--navy); cursor:pointer; }
.wc-read input{ width:18px; height:18px; flex:0 0 auto; cursor:pointer; }
.popup-close{ padding:14px; border:0; border-radius:8px; background:var(--navy); color:#fff;
              font-family:inherit; font-size:17px; cursor:pointer; margin-top:8px; }
#popupBody, #infoBody{ flex:1 1 auto; min-height:0; overflow-y:auto; }
.modal-box .popup-close, .modal-box .share-opt{ flex:0 0 auto; }
#popupBody .tal-head{ color:var(--navy); font-weight:700; font-size:19px; margin-top:8px; }
#popupBody .tal-gloss{ color:var(--accent); font-size:15px; }
#popupBody .tal-note{ color:var(--dark); font-size:14px; }
#popupBody .tal-cite{ color:var(--muted); font-size:13px; }
#popupBody hr{ border:0; border-top:1px solid rgba(26,56,115,.25); }

/* up-arrow marking "more results" beside an Aramaic word in the word table */
.wtbl .wt-aram .more-arrow{ color:var(--accent); font-size:12px; font-weight:700;
  vertical-align:.35em; margin-inline-start:3px; opacity:.85; }
.wtbl tr.tappable{ cursor:pointer; }
.wtbl tr.tappable:hover{ background:#eef2fd; }

/* authoritative Tal entry (showTalFull popup + dictionary app) */
.tal-sec{ color:var(--navy); font-weight:700; font-size:13.5px; margin:10px 0 3px;
  border-bottom:1px solid rgba(26,56,115,.18); padding-bottom:2px; }
.tal-sense{ color:var(--dark); font-size:15px; line-height:1.6; margin:3px 0; }
.tal-sense .pos{ color:var(--muted); font-size:12.5px; font-style:italic; }
.tal-sense .tal-pg{ color:var(--muted); font-size:12px; }
.tal-locs{ display:flex; flex-wrap:wrap; gap:5px; }
.tal-loc{ background:#eef2fd; color:var(--navy); border-radius:5px; padding:2px 7px; font-size:13px; white-space:nowrap; }
.tal-loc.occ-link{ cursor:pointer; border:1px solid transparent; }
.tal-loc.occ-link:hover{ background:#dde7fb; border-color:var(--accent); }
#occBody .occ-text{ display:block; font-size:19px; line-height:1.7; color:var(--dark); text-align:right; direction:rtl; padding:4px 2px; }
#occBody .occ-text.aram{ color:#5a4326; }
#occBody .occ-heb{ margin-top:8px; padding-top:8px; border-top:1px solid rgba(26,56,115,.15); color:var(--muted); font-size:16px; line-height:1.6; }
.tal-more{ color:var(--muted); }
.tal-formlist{ color:var(--accent); font-size:14px; line-height:1.7; }

/* search result: emphasised dictionary meaning + clickable precise entry */
.res-dict{ margin-top:3px; }
.res-dict .dict-label{ color:var(--muted); font-size:13.5px; }
.res-dict .dict-gloss{ color:var(--navy); font-weight:700; font-size:16px; }
.res-dict .dict-precise{ display:inline-block; margin-inline-start:8px; color:var(--accent);
  font-size:13px; cursor:pointer; text-decoration:underline; }
.res-dict .dict-precise:hover{ color:var(--navy); }

/* library sub-menu */
.menu-item.menu-sub-head{ font-weight:700; }
.menu-item.menu-sub-head::after{ content:'▾'; float:left; opacity:.55; font-size:13px; }
.menu-item.menu-sub-head.open::after{ content:'▴'; }
/* the Samaritan-Library submenu sits offset to the left of the main menu, with a
   branch line marking it as a nested group */
.menu-sub-items{ background:rgba(26,56,115,.05); margin-inline-start:18px;
  border-inline-start:2px solid rgba(26,56,115,.22); }
/* opens like a shutter rolling outward when the group is expanded */
.menu-sub-items:not(.hidden){ animation:libOpen .24s cubic-bezier(.2,.8,.2,1) both;
  transform-origin:top right; }
@keyframes libOpen{ from{ opacity:0; transform:translateX(14px) scaleY(.96); }
  to{ opacity:1; transform:none; } }
.menu-item.menu-sub-item{ padding-inline-start:22px; font-size:15.5px; color:var(--accent); }
/* search-a-book bar, pinned at the top of the (scrollable) library list */
.lib-search-row{ position:sticky; top:0; z-index:2; padding:8px 12px 7px 22px;
  background:rgba(238,242,251,.96); backdrop-filter:blur(2px);
  border-bottom:1px solid rgba(26,56,115,.14); }
.lib-search{ width:100%; box-sizing:border-box; padding:8px 11px; font-size:14.5px;
  border:1px solid #cfd6e6; border-radius:9px; background:#fff; color:var(--navy);
  outline:none; }
.lib-search:focus{ border-color:var(--accent); box-shadow:0 0 0 2px rgba(26,56,115,.12); }
#libraryList{ max-height:46vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.lib-noresult{ padding:12px 22px; color:var(--accent); opacity:.7; font-size:14px; }

/* dictionary app modal */
.modal-box.dict-app{ max-width:620px; }
.dict-app-search{ display:flex; gap:8px; }
.dict-app-search input{ flex:1; padding:10px 12px; border:1px solid #cfd6e6; border-radius:8px; font:inherit; font-size:17px; }
.dict-app-go{ flex:0 0 auto; padding:10px 18px; border:0; border-radius:8px; background:var(--navy); color:#fff; font:inherit; font-size:16px; cursor:pointer; }
.dict-app-go:hover{ background:var(--accent); }
.dict-app-hint{ color:var(--muted); font-size:13.5px; line-height:1.5; }
#dictAppBody{ overflow-y:auto; }
#dictAppBody .dict-entry{ border-top:1px solid rgba(26,56,115,.15); padding-top:6px; margin-top:8px; }
#dictAppBody .tal-head{ color:var(--navy); font-weight:700; font-size:19px; }
/* dictionary app: mode tabs, page/index nav, clickable forms + locations */
.dict-dir{ display:flex; gap:6px; margin-bottom:6px; }
.dict-dir-btn{ flex:1 1 0; padding:8px 4px; border:1px solid var(--accent); border-radius:8px; background:#fff;
  color:var(--accent); font-family:inherit; font-size:14.5px; font-weight:600; cursor:pointer; }
.dict-dir-btn.active{ background:var(--accent); color:#fff; }
.dict-he-res{ border-top:1px solid rgba(26,56,115,.12); padding:8px 2px; }
.dict-he-word{ color:var(--navy); font-weight:800; font-size:calc(19px*var(--dict-fs,1)); }
.dict-he-rlabel{ color:var(--muted); font-size:13px; margin:3px 0 2px; }
.dict-he-roots{ display:flex; flex-wrap:wrap; gap:6px; }
.dict-he-root{ border:1px solid var(--accent); background:#f3f7ff; color:var(--accent); border-radius:14px;
  padding:4px 12px; font-family:inherit; font-size:calc(16px*var(--dict-fs,1)); cursor:pointer; }
.dict-he-root:hover{ background:var(--accent); color:#fff; }
.dict-tabs{ display:flex; gap:6px; }
.dict-tab.hidden{ display:none; }
.dict-tab{ flex:1 1 0; padding:8px 4px; border:1px solid #cfd6e6; border-radius:8px; background:#fff;
  color:var(--navy); font:inherit; font-size:14px; cursor:pointer; }
.dict-tab.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.dict-nav{ display:flex; align-items:center; justify-content:center; gap:10px; }
.dict-nav-btn{ border:1px solid #cfd6e6; background:#fff; color:var(--navy); border-radius:8px;
  padding:6px 12px; font:inherit; font-size:14px; cursor:pointer; }
.dict-nav-btn:disabled{ opacity:.4; cursor:default; }
.dict-nav-lbl{ color:var(--navy); font-weight:600; font-size:14px; }
.dict-index{ display:flex; flex-direction:column; }
.dict-index-row{ display:flex; align-items:baseline; gap:10px; width:100%; text-align:right;
  border:0; border-top:1px solid rgba(26,56,115,.1); background:transparent; padding:8px 4px; cursor:pointer; font:inherit; }
.dict-index-row:hover{ background:#f3f5fb; }
.dict-ix-lemma{ flex:1 1 auto; color:var(--navy); font-weight:600; font-size:16px; }
.dict-ix-root{ color:var(--muted); font-size:13px; }
.dict-ix-page{ color:var(--accent); font-size:12.5px; }
.dict-pageentry{ border-top:1px solid rgba(26,56,115,.1); padding:7px 2px; color:var(--dark); font-size:calc(15px*var(--dict-fs,1)); line-height:1.6; }
.dict-direct-sec{ margin-top:2px; }
.dict-direct{ border-inline-start:3px solid var(--accent); padding:5px 8px; margin:4px 0; color:var(--dark);
  font-size:calc(15.5px*var(--dict-fs,1)); line-height:1.6; background:#f7f9ff; border-radius:0 6px 6px 0; }
#dictAppBody .tal-sense{ font-size:calc(15.5px*var(--dict-fs,1)); }
#dictAppBody .dict-ix-lemma{ font-size:calc(16px*var(--dict-fs,1)); }
#dictAppBody .tm-wtbl td{ font-size:calc(15px*var(--dict-fs,1)); }
.dict-direct-root{ color:var(--muted); font-size:13px; }
.dict-form-hint{ color:var(--muted); font-size:12.5px; margin:2px 0; }
.tal-formlist.clickable-forms{ display:flex; flex-wrap:wrap; gap:6px; }
.dict-form{ display:inline-flex; align-items:center; gap:3px; border:1px solid rgba(46,97,184,.4);
  border-radius:14px; padding:3px 10px; color:var(--accent); font-size:15px; cursor:pointer; background:#fff; }
.dict-form:hover{ background:#eef3fc; }
.dict-form.open{ background:var(--accent); color:#fff; }
.dict-form-i{ font-size:11px; opacity:.85; }
.dict-loclist{ flex-basis:100%; margin-top:6px; border:1px solid rgba(46,97,184,.25); border-radius:8px; padding:6px 8px; background:#fbfcff; }
.dict-loc-head{ color:var(--navy); font-weight:700; font-size:13.5px; margin-bottom:4px; }
.dict-loc-row{ display:flex; gap:8px; padding:3px 0; border-top:1px dashed rgba(26,56,115,.12); font-size:14px; }
.dict-loc-ref{ flex:0 0 auto; color:var(--accent); font-weight:600; min-width:70px; }
.dict-loc-q{ color:var(--dark); opacity:.85; }

/* ── comprehensive word index: browsable grid + per-word detail ── */
.dict-wgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:6px; }
.dict-wcell{ display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:right;
  border:1px solid #dfe4f0; border-radius:9px; background:#fff; padding:7px 9px; cursor:pointer; font:inherit; }
.dict-wcell:hover{ background:#f3f5fb; border-color:var(--accent); }
.dict-wword{ color:var(--navy); font-weight:700; font-size:calc(16px*var(--dict-fs,1)); }
.dict-wbadges{ display:flex; gap:4px; }
.dict-wb{ font-size:11px; line-height:1; padding:2px 5px; border-radius:9px; font-weight:700; }
.dict-wb.tor{ background:#e8f0ff; color:var(--accent); }
.dict-wb.mem{ background:#fdf0e3; color:#b9711e; }
.dict-wb.mng{ background:#eef0f4; color:var(--muted); }
.dict-back{ border:1px solid #cfd6e6; background:#fff; color:var(--navy); border-radius:8px;
  padding:5px 12px; cursor:pointer; font:inherit; font-weight:600; margin-bottom:8px; }
.dict-back:hover{ background:#f3f5fb; }
.dict-detail-word{ color:var(--navy); font-weight:800; font-size:calc(22px*var(--dict-fs,1)); margin-bottom:6px; }
.dict-mcard{ border-top:2px solid rgba(26,56,115,.15); padding-top:8px; margin-top:10px; }
.dict-mroot{ color:var(--accent); font-weight:700; font-size:calc(15px*var(--dict-fs,1)); margin-bottom:3px; }
.dict-senses{ background:#f7f9ff; border-radius:7px; padding:6px 9px; margin-bottom:6px; }
.dict-sense{ color:var(--dark); font-size:calc(15px*var(--dict-fs,1)); line-height:1.55; padding:1px 0; }
.dict-occ-h{ color:var(--navy); font-weight:700; font-size:calc(13.5px*var(--dict-fs,1));
  margin:8px 0 4px; border-bottom:1px solid rgba(26,56,115,.12); padding-bottom:2px; }
.dict-occ-list{ display:flex; flex-direction:column; }
.dict-occ{ padding:5px 2px; border-top:1px dashed rgba(26,56,115,.1); }
.dict-occ-ref{ display:inline-block; color:var(--accent); font-weight:600; font-size:calc(13px*var(--dict-fs,1)); margin-inline-end:7px; }
.dict-occ-txt{ color:var(--dark); font-size:calc(15px*var(--dict-fs,1)); line-height:1.65; }
.dict-occ-txt.aram{ color:#5a4326; }
.dict-occ-heb{ color:var(--muted); font-size:calc(14px*var(--dict-fs,1)); line-height:1.55; margin-top:2px; }
.dict-hl{ background:#fff1bf; border-radius:3px; padding:0 1px; font-weight:700; color:var(--navy); }
.dict-noocc{ font-style:italic; }
.dict-more{ color:var(--muted); font-size:12.5px; padding:4px 2px; }
.dict-occ-btn{ display:inline-block; margin-top:8px; border:1px solid var(--accent); background:#f3f7ff;
  color:var(--accent); border-radius:9px; padding:6px 12px; cursor:pointer; font:inherit; font-weight:600; }
.dict-occ-btn:hover{ background:var(--accent); color:#fff; }
.dict-sense-banner{ display:inline-block; background:#fff6da; border:1px solid #e9c97a; color:#6b531a;
  border-radius:7px; padding:3px 10px; font-weight:700; font-size:calc(14px*var(--dict-fs,1)); margin:2px 0 4px; }

/* ── full-book reader (Tibåt Mårqe / Ṣadaqah al-Ḥakīm) — its own full window ── */
.modal.book-full{ align-items:stretch; justify-content:stretch; padding:0; }
.modal-box.book-reader{ max-width:none; width:100%; height:100%; max-height:100%;
  border-radius:0; gap:10px; padding:14px; }
/* explicit "return to the Torah app" button inside the reader / dictionary apps */
.rd-totorah{ flex:0 0 auto; border:1px solid var(--navy); background:var(--navy); color:#fff;
             border-radius:8px; padding:7px 12px; font-family:inherit; font-size:14px; font-weight:700;
             cursor:pointer; white-space:nowrap; }
.rd-totorah:hover{ background:var(--accent); border-color:var(--accent); }
/* header controls (return-to-Torah · back · title · zoom · language) wrap instead of
   piling on top of each other on narrow screens; the title truncates rather than push */
.rd-top{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; row-gap:6px; }
.tm-back{ flex:0 0 auto; border:1px solid var(--navy); background:var(--navy); color:#fff;
  border-radius:8px; padding:7px 13px; font:inherit; font-size:14px; font-weight:700;
  cursor:pointer; white-space:nowrap; }
.tm-back:hover{ background:var(--accent); border-color:var(--accent); }
.rd-top .modal-title{ flex:1 1 120px; min-width:0; text-align:center; font-size:17px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rd-lang{ flex:0 0 auto; border:0; border-radius:8px; background:var(--navy); color:#fff;
  padding:7px 12px; font:inherit; font-size:13.5px; cursor:pointer; white-space:nowrap; }
.rd-lang:hover{ background:var(--accent); }
.tm-secnum.tm-jump{ cursor:pointer; text-decoration:underline dotted; }
.tm-secnum.tm-jump:hover{ color:var(--active); }
.tm-search-row{ display:flex; gap:8px; }
.tm-search-row input{ flex:1; padding:9px 12px; border:1px solid #cfd6e6; border-radius:8px; font:inherit; font-size:16px; }
.tm-body{ flex:1 1 auto; min-height:0; overflow-y:auto; padding:2px 2px 4px; }
.tm-hint{ color:var(--muted); font-size:14px; margin:2px 0 8px; }
/* table of contents */
.tm-toc{ display:flex; flex-direction:column; gap:8px; }
.tm-toc-item{ display:flex; align-items:center; gap:12px; width:100%; text-align:right;
  border:1px solid rgba(26,56,115,.18); border-radius:10px; background:#fbfaf5; padding:12px 14px;
  cursor:pointer; font:inherit; }
.tm-toc-item:hover{ background:#f1eede; border-color:var(--accent); }
.tm-toc-letter{ flex:0 0 auto; width:34px; height:34px; border-radius:50%; background:var(--navy);
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:17px; }
.tm-toc-title{ flex:1 1 auto; color:var(--navy); font-weight:600; font-size:17px; }
.tm-toc-count{ flex:0 0 auto; color:var(--muted); font-size:12.5px; }
/* chapter view */
.tm-tools{ display:flex; gap:8px; margin-bottom:8px; position:sticky; top:0; background:#fff; padding:2px 0; z-index:1; }
.tm-words-btn{ border:0; border-radius:8px; background:#735438; color:#fff; padding:8px 14px;
  font:inherit; font-size:14px; cursor:pointer; }
.tm-words-btn:hover{ filter:brightness(1.1); }
.tm-sec{ border-top:1px solid rgba(26,56,115,.14); padding:9px 2px; }
.tm-sec.tm-flash{ background:rgba(255,216,107,.35); border-radius:8px; transition:background 1.4s; }
.tm-secnum{ color:var(--accent); font-weight:700; font-size:13px; margin-bottom:3px; }
.tm-aram{ direction:rtl; text-align:right; color:#5a4326; font-size:calc(16px*var(--rd-fs,1)); line-height:1.75; margin-bottom:5px; }
.tm-heb{ direction:rtl; text-align:right; color:var(--dark); font-size:calc(16px*var(--rd-fs,1)); line-height:1.8; }
/* text-zoom control shared by the readers + dictionary (A− / A+) */
.rd-zoom{ flex:0 0 auto; display:flex; gap:4px; }
.rd-zbtn{ border:1px solid #cfd6e6; background:#fff; color:var(--navy); border-radius:7px;
  min-width:30px; padding:5px 7px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; line-height:1; }
.rd-zbtn:hover{ background:#eef2fb; }
.dict-app-head{ display:flex; align-items:center; gap:8px; }
.dict-app-head .modal-title{ flex:1 1 auto; text-align:right; }
.tm-ref{ color:var(--accent); font-weight:600; cursor:pointer; text-decoration:underline dotted; }
.tm-ref:hover{ color:var(--active); }
/* search results */
.tm-result{ display:block; width:100%; text-align:right; border:0; border-top:1px solid rgba(26,56,115,.12);
  background:transparent; padding:9px 4px; cursor:pointer; font:inherit; }
.tm-result:hover{ background:#f3f5fb; }
.tm-res-ref{ display:block; color:var(--accent); font-weight:700; font-size:13.5px; }
.tm-res-snip{ display:block; color:var(--dark); font-size:15px; line-height:1.6; }
/* per-chapter glossary reuses .wtbl */
.tm-wtbl{ width:100%; }

/* ── guided interactive tour ("סרטון הסבר") ── */
.tour{ position:fixed; inset:0; z-index:200; pointer-events:none; }
.tour.hidden{ display:none; }
.tour-ring{ position:fixed; border-radius:10px; opacity:0;
  box-shadow:0 0 0 3px var(--gold-bright,#e9c97a), 0 0 0 9999px rgba(10,18,40,.60);
  transition:left .4s cubic-bezier(.4,0,.2,1), top .4s cubic-bezier(.4,0,.2,1),
             width .4s cubic-bezier(.4,0,.2,1), height .4s cubic-bezier(.4,0,.2,1), opacity .3s; }
.tour-ring.on{ opacity:1; }
.tour-arrow{ position:fixed; font-size:30px; line-height:1; color:var(--gold-bright,#e9c97a);
  text-shadow:0 1px 3px rgba(0,0,0,.6); pointer-events:none; opacity:0; transition:all .35s ease;
  animation:tourArrow 1s ease-in-out infinite alternate; }
.tour-arrow.on{ opacity:1; }
@keyframes tourArrow{ from{ transform:translate(0,0); } to{ transform:translate(0,-7px); } }
.tour-caption{ position:fixed; left:50%; bottom:22px; transform:translateX(-50%); width:min(93%,540px);
  background:#fff; border-radius:14px; box-shadow:0 10px 34px rgba(0,0,0,.45); padding:14px 16px;
  pointer-events:auto; z-index:201; }
.tour-caption.top{ bottom:auto; top:22px; }
.tour-cap-text{ color:var(--dark); font-size:16.5px; line-height:1.65; margin-bottom:10px; min-height:1.6em; }
.tour-controls{ display:flex; align-items:center; gap:7px; justify-content:center; }
.tour-btn{ border:1px solid #cfd6e6; background:#fff; color:var(--navy); border-radius:8px;
  min-width:42px; padding:8px 10px; font:inherit; font-size:17px; cursor:pointer; }
.tour-btn:hover{ background:#eef2fb; }
.tour-btn.tour-end{ color:#bf3930; }
.tour-step{ color:var(--muted); font-size:13px; min-width:48px; text-align:center; }

/* hamburger menu */
.menu-btn{ flex:0 0 auto; width:38px; height:38px; border:0; background:transparent; color:#fff;
           font-size:24px; line-height:1; cursor:pointer; border-radius:6px; }
.menu-btn:hover{ background:rgba(255,255,255,.15); }
.menu-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:60; }
.menu-drawer{ position:fixed; top:0; right:0; height:100%; width:min(330px,82%); z-index:61;
              background:var(--cream); box-shadow:-4px 0 20px rgba(0,0,0,.25);
              display:flex; flex-direction:column; padding:0; direction:rtl;
              animation:drawerIn .18s ease-out; }
@keyframes drawerIn{ from{ transform:translateX(100%); } to{ transform:translateX(0); } }
.menu-head{ background:var(--navy); color:#fff; font-size:20px; font-weight:700; text-align:center; padding:16px; }
.menu-item{ display:flex; align-items:center; gap:12px; width:100%; text-align:right; padding:16px 18px; border:0;
            border-bottom:1px solid rgba(26,56,115,.12); background:transparent; color:var(--dark);
            font-family:inherit; font-size:17px; cursor:pointer; }
.menu-item .mi-ico{ width:19px; height:19px; flex:0 0 auto; color:var(--navy); opacity:.85; }
.menu-item .mi-label{ flex:1 1 auto; text-align:right; }
.menu-item.menu-sub-item .mi-ico{ width:17px; height:17px; opacity:.7; }
.menu-item:hover{ background:#e7ecfb; }
.menu-item:disabled{ opacity:.4; cursor:default; pointer-events:none; }
.menu-sep{ height:1px; background:rgba(26,56,115,.28); margin:8px 14px; }
.menu-item.admin-item{ color:var(--accent); font-weight:700; }
.menu-item.admin-item .mi-ico{ color:var(--accent); }
.edit-pencil{ flex:0 0 auto; align-self:flex-start; width:28px; height:28px; border:0;
              border-radius:50%; background:#f0c33c; color:#3a2d00; font-size:15px; cursor:pointer;
              box-shadow:0 1px 4px rgba(0,0,0,.3); line-height:1; }
.edit-pencil:hover{ background:#ffd84d; }
#editArea{ width:100%; box-sizing:border-box; font-family:inherit; font-size:18px; line-height:1.6;
           direction:rtl; text-align:right; border:1px solid var(--line); border-radius:8px; padding:8px; }
.admin-bar{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:6px; margin-bottom:6px;
            background:#fff4e0; border:1px solid rgba(122,53,80,.35); border-radius:8px; }
.admin-btn{ border:0; border-radius:6px; background:var(--accent); color:#fff; padding:8px 12px;
            font-family:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.admin-btn.cancel{ background:#777; }
.admin-hint{ flex:1 1 100%; color:var(--navy); font-weight:700; font-size:14px; }

/* floating bookmark button + tooltip */
/* end-of-portion marker (Samaritan division): three centered medium asterisks */
.portion-end{ text-align:center; font-size:20px; letter-spacing:10px; color:var(--navy);
              padding:14px 0 8px; line-height:1; }
/* bookmark sign — pinned to the left corner of the breadcrumb row, no background */
.bm-nav{ position:absolute; left:6px; top:50%; transform:translateY(-50%); border:0; background:transparent;
         padding:0 4px; font-size:24px; line-height:1; cursor:pointer; z-index:5; }
.bm-nav.hidden{ display:none; }
.bm-nav:hover::after{ content:attr(title); position:absolute; top:34px; left:0; white-space:nowrap;
         background:var(--navy); color:#fff; font-size:13px; padding:5px 9px; border-radius:6px;
         box-shadow:0 1px 5px rgba(0,0,0,.3); z-index:50; }
/* read-aloud play button, just to the right of the bookmark */
.play-nav{ left:42px; color:var(--accent); padding:0 4px; }
.play-nav svg{ width:23px; height:23px; vertical-align:middle; }
.play-nav.playing{ color:#c0392b; }
.play-nav:disabled{ opacity:.35; cursor:default; }   /* dimmed / not yet active */
/* read-aloud mini player above the navbar */
#audioBar{ flex:0 0 auto; display:flex; align-items:center; gap:8px; padding:5px 10px;
           background:var(--cream); border-top:1px solid rgba(26,56,115,.22); }
#audioBar.hidden{ display:none; }
.au-btn{ flex:0 0 auto; border:0; background:transparent; color:var(--navy); cursor:pointer; padding:3px; line-height:0; }
.au-btn svg{ width:24px; height:24px; }
.au-seek{ flex:1 1 auto; accent-color:var(--accent); height:22px; }
.au-pos{ flex:0 0 auto; font-size:13px; color:var(--navy); min-width:46px; text-align:center; }
.tts-reading{ background:rgba(23,169,196,.16); border-radius:6px; }
/* bookmarks list */
#bmList{ max-height:55vh; overflow-y:auto; }
.bm-row{ display:flex; align-items:flex-start; gap:8px; padding:8px 4px;
         border-bottom:1px solid rgba(26,56,115,.12); }
.bm-row input[type=checkbox]{ margin-top:6px; width:18px; height:18px; flex:0 0 auto; }
.bm-main{ flex:1 1 auto; min-width:0; }
.bm-path{ color:var(--navy); font-weight:700; font-size:15.5px; cursor:pointer; text-align:right; }
.bm-path:hover{ text-decoration:underline; }
.bm-div{ font-size:12px; color:var(--accent); }
.bm-note{ width:100%; box-sizing:border-box; margin-top:4px; font-family:inherit; font-size:14px;
          border:1px solid var(--line); border-radius:6px; padding:5px; direction:rtl; text-align:right; }

/* contact form */
.form-row{ display:flex; flex-direction:column; gap:4px; text-align:right; margin-bottom:4px; }
.form-row label{ color:var(--navy); font-size:15px; font-weight:700; }
.form-row input, .form-row textarea{ padding:9px; border:1px solid var(--line); border-radius:6px;
            font-family:inherit; font-size:16px; resize:vertical; }
.form-count{ text-align:left; color:var(--muted); font-size:13px; }
.form-err{ color:#bf3930; font-size:14px; min-height:18px; text-align:right; }
.form-btns{ display:flex; gap:8px; }
.form-send{ flex:1; padding:14px; border:0; border-radius:8px; background:var(--share); color:#fff;
            font-family:inherit; font-size:17px; cursor:pointer; }
#infoBody .whatsnew{ white-space:pre-wrap; font-family:inherit; font-size:15px; line-height:1.7;
                     color:var(--dark); text-align:right; margin:0; }
#infoBody .ver-num{ text-align:center; font-size:30px; font-weight:700; color:var(--navy); padding:14px; }

/* ── responsive: narrow phones — bigger, comfortable touch targets ─────────── */
@media (max-width:430px){
  #toolbar{ padding:3px; }
  .tb-row{ gap:2px; }
  .tb{ font-size:12.5px; padding:11px 2px; }
  .tb.green{ min-width:46px; }
  .nav-arrow{ font-size:13px; padding:12px 3px; }
  #navbar{ gap:5px; }
  .round{ width:50px; font-size:24px; padding:10px 0; }
  .divbtn{ font-size:14px; padding:10px; }
  .title-row h1{ font-size:18px; }
  .ver{ font-size:10px; }
  .listbtn{ font-size:21px; padding:15px 12px; }
  .cell{ font-size:19px; padding:16px 0; }
}
@media (max-width:340px){
  .tb{ font-size:11px; padding:10px 1px; }
}

.hidden{ display:none !important; }

/* ───────── entry splash ("אבני שהם") — overlay shown on app launch ───────── */
#samaritan-splash{
  --ink-night:#0a1733; --ink-abyss:#04081a; --lapis:#173a72;
  --gold:#c8a456; --gold-bright:#eccd84; --parchment:#efe6cc;
  position:fixed; inset:0; z-index:99999; display:grid; place-items:center;
  overflow:hidden;
  background:radial-gradient(120% 80% at 50% 32%, var(--lapis) 0%, var(--ink-night) 46%, var(--ink-abyss) 100%);
  font-family:'Heebo',system-ui,sans-serif; color:var(--parchment);
  opacity:1; transition:opacity 1.1s ease;
}
#samaritan-splash.is-done{ opacity:0; pointer-events:none; }
#samaritan-splash .pages{
  position:absolute; inset:-6% -4%; display:flex; gap:2.6vw; justify-content:center;
  pointer-events:none; opacity:0; animation:sp-pages-in 2.4s ease 0.1s forwards;
}
#samaritan-splash .pages .col{
  writing-mode:vertical-rl; font-family:'Samaritan',serif; font-size:2.0vw;
  line-height:1.7; letter-spacing:.18em; color:var(--gold); opacity:.06;
  white-space:nowrap; filter:blur(.4px); user-select:none;
}
@keyframes sp-pages-in{ to{ opacity:1; } }
#samaritan-splash::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(130% 95% at 50% 38%, transparent 52%, rgba(4,8,26,.78) 100%);
}
#samaritan-splash .core{ position:relative; z-index:2; width:min(92vw,760px); text-align:center; padding:6vh 0; }
#samaritan-splash .imprint{
  font-family:'Frank Ruhl Libre',serif; font-weight:500; font-size:clamp(15px,2.4vw,20px);
  letter-spacing:.62em; padding-inline-start:.62em; color:var(--gold);
  opacity:0; transform:translateY(10px); animation:sp-rise .9s ease .35s forwards;
}
#samaritan-splash .imprint::before, #samaritan-splash .imprint::after{
  content:""; display:inline-block; vertical-align:middle;
  width:clamp(26px,7vw,64px); height:1px; margin:0 .9em;
  background:linear-gradient(90deg,transparent,var(--gold)); opacity:.7;
}
#samaritan-splash .imprint::after{ transform:scaleX(-1); }
#samaritan-splash .app-name{
  font-family:'Frank Ruhl Libre',serif; font-weight:700; font-size:clamp(34px,7.4vw,82px);
  line-height:1.05; margin:.18em 0 .12em; color:var(--parchment);
  text-shadow:0 2px 30px rgba(0,0,0,.45);
  opacity:0; transform:translateY(16px) scale(.985);
  animation:sp-rise 1s cubic-bezier(.2,.7,.2,1) .6s forwards;
}
#samaritan-splash .version{
  font-family:'Heebo',sans-serif; font-weight:300; font-size:clamp(13px,2.2vw,17px);
  letter-spacing:.34em; padding-inline-start:.34em; color:var(--gold);
  opacity:0; transform:translateY(10px); animation:sp-rise .9s ease .9s forwards;
}
@keyframes sp-rise{ to{ opacity:1; transform:none; } }
#samaritan-splash .stage{
  position:relative; margin-top:clamp(34px,6vh,64px); padding:clamp(22px,4vh,40px) 0;
  opacity:0; animation:sp-rise 1s ease 1.05s forwards;
}
#samaritan-splash .stage::before, #samaritan-splash .stage::after{
  content:""; position:absolute; left:8%; right:8%; height:1px;
  background:linear-gradient(90deg,transparent,var(--gold) 18%,var(--gold) 82%,transparent); opacity:.42;
}
#samaritan-splash .stage::before{ top:0; }
#samaritan-splash .stage::after{ bottom:0; }
#samaritan-splash .verse{
  direction:rtl; font-family:'Samaritan',serif; color:var(--gold-bright);
  line-height:1.85; letter-spacing:.01em; text-shadow:0 0 0 transparent; transition:text-shadow 1.1s ease;
}
#samaritan-splash .verse.lit{ text-shadow:0 0 22px rgba(236,205,132,.45), 0 0 4px rgba(236,205,132,.5); }
/* the verse starts fully hidden and is revealed only as the quill writes it */
#samaritan-splash .verse-line{ display:block; font-size:clamp(22px,5.6vw,54px);
  white-space:nowrap; clip-path:inset(0 0 0 100%); max-width:100%; }
/* Samaritan word-separator dot, centred in the gap between words */
#samaritan-splash .verse .wsep{ font-style:normal; font-family:'Heebo',sans-serif;
  margin:0 .07em; font-size:.62em; font-weight:700; vertical-align:.2em;
  color:var(--gold-bright); opacity:1; }
#samaritan-splash .pen{
  position:absolute; left:0; top:0; width:clamp(132px,23vw,196px); height:auto; opacity:0;
  pointer-events:none; will-change:transform; filter:drop-shadow(0 10px 16px rgba(0,0,0,.55));
}
#samaritan-splash .skip{
  position:absolute; top:max(18px,2.4vh); inset-inline-end:max(20px,3vw); z-index:3;
  background:none; border:none; cursor:pointer; font-family:'Heebo',sans-serif; font-weight:300;
  font-size:14px; letter-spacing:.12em; color:var(--gold); opacity:0; padding:8px 10px;
  transition:color .2s ease, opacity .4s ease; animation:sp-rise .8s ease 2.4s forwards;
}
#samaritan-splash .skip:hover{ color:var(--gold-bright); }
#samaritan-splash .skip:focus-visible{ outline:1px solid var(--gold); outline-offset:4px; border-radius:4px; }
/* "always skip" pill — centred on the page, on the line just above the copyright
   (installed app only) */
#samaritan-splash .skip-always{
  position:absolute; bottom:max(120px,17vh); left:0; right:0; margin-inline:auto; width:max-content; z-index:3;
  background:rgba(200,164,86,.12); border:1px solid var(--gold); border-radius:20px; cursor:pointer;
  font-family:'Heebo',sans-serif; font-weight:300; font-size:13px; letter-spacing:.06em;
  color:var(--gold-bright); padding:7px 16px;
  opacity:0; transform:translateY(10px); animation:sp-rise .8s ease 2.6s forwards;
  white-space:nowrap;
}
@media (max-width:560px){ #samaritan-splash .skip-always{ bottom:max(132px,19vh); } }
#samaritan-splash .skip-always:hover{ background:rgba(200,164,86,.22); }
#samaritan-splash .skip-always.hidden{ display:none; }
/* enable-sound button (top corner opposite the skip control) */
#samaritan-splash .sp-sound{
  position:absolute; top:max(18px,2.4vh); inset-inline-start:max(20px,3vw); z-index:3;
  width:38px; height:38px; border-radius:50%; cursor:pointer; line-height:1; font-size:17px;
  background:rgba(200,164,86,.12); border:1px solid var(--gold); color:var(--gold-bright);
  opacity:0; animation:sp-rise .8s ease 1.6s forwards;
}
#samaritan-splash .sp-sound:hover{ background:rgba(200,164,86,.22); }
#samaritan-splash .sp-sound.on{ background:rgba(200,164,86,.32); border-color:var(--gold-bright); }
#samaritan-splash .copyright{
  position:absolute; left:0; right:0; bottom:max(16px,2.4vh); z-index:3;
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding-inline:clamp(18px,4vw,46px); font-family:'Heebo',sans-serif; font-weight:300;
  font-size:11px; letter-spacing:.05em; color:var(--gold); opacity:0; animation:sp-rise .9s ease 2.7s forwards;
}
#samaritan-splash .copyright .he{ direction:rtl; opacity:.85; }
#samaritan-splash .copyright .en{ direction:ltr; opacity:.75; }
@media (max-width:560px){
  #samaritan-splash .copyright{ flex-direction:column; gap:4px; justify-content:center; text-align:center; }
}
@media (prefers-reduced-motion:reduce){
  #samaritan-splash *{ animation-duration:.01ms!important; animation-delay:0ms!important; transition-duration:.2s!important; }
}
/* transition layer — the dimmed etching the splash dissolves through before the
   app appears; it then fades slowly into the app */
#splash-image{
  position:fixed; inset:0; z-index:99998; background:#f1ead7;
  opacity:1; transition:opacity 1.2s ease;
}
#splash-image .pic{   /* dimmed + washed-out (faded) colours */
  position:absolute; inset:0;
  background:url('/static/img/splash_elder.jpg') center/cover no-repeat;
  opacity:.4; filter:saturate(.4) sepia(.22) brightness(1.12) contrast(.85);
}
#splash-image::after{   /* soft vignette to settle it into the page */
  content:""; position:absolute; inset:0;
  background:radial-gradient(120% 100% at 50% 42%, transparent 55%, rgba(120,104,70,.22) 100%);
}
#splash-image.is-gone{ opacity:0; pointer-events:none; }

/* small biblical-anchor footnote at the foot of a source card (שו"ת / eyalk) */
.srcpanel .card .canchors{ margin-top:8px; padding-top:6px; border-top:1px dashed rgba(26,56,115,.3);
  font-size:12.5px; line-height:1.6; color:var(--muted); }
