.snrbar{position:fixed;left:0;right:0;bottom:0;background:#111;color:#fff;display:flex;align-items:center;gap:10px;padding:8px 14px;z-index:9999;box-shadow:0 -2px 10px rgba(0,0,0,.25)}
.snrbar img{width:38px;height:38px;border-radius:6px;object-fit:cover}
.snrbar button{background:none;border:0;color:#fff;font-size:18px;cursor:pointer;padding:6px 10px;line-height:1}
.snrbar span{flex:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.snrbar-on{padding-bottom:58px}

/* RTL layout */
body { text-align: right; }
.besiyata, header, footer, .empty, .loginbox, .note { text-align: center; }
.song-message { text-align: center; }

/* v5: logo, share, comments */
header { position:relative; }
header .logo-link { display:block; }
header img.logo { width:84px; height:84px; border-radius:50%; object-fit:cover; display:block; margin:0 auto 8px; }
@media (min-width:641px){
  header .logo-link { position:absolute; top:0; right:50px; left:auto; z-index:5; }
  header img.logo { width:96px; height:96px; margin:0; }
}
@media (min-width:641px) and (max-width:1100px){
  header .logo-link { right:24px; }
  header img.logo { width:72px; height:72px; }
  header h1, nav.crumbs { padding-inline-start:86px; }
}
.snr-sharebtn { display:inline-flex; align-items:center; gap:7px; }
.snr-tshare { background:none; border:0; cursor:pointer; color:#777; vertical-align:middle; padding:4px; }
.snr-tshare:hover { color:#111; }
.snr-comments { max-width:720px; margin:30px auto 0; border-top:1px solid #e4e4e4; padding-top:20px; direction:ltr; text-align:left; }
.snr-c-head { font-size:22px; margin:0 0 12px; text-align:left; color:#111; }
.snr-c-form { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.snr-c-text { font-size:16px; padding:10px 12px; border:1px solid #ccc; border-radius:10px; font-family:inherit; direction:ltr; text-align:left; width:100%; }
.snr-c-text { resize:vertical; min-height:70px; }
.snr-c-send { align-self:flex-start; }
.snr-c-note { font-size:12px; color:#999; }
.snr-cmt { border:1px solid #eee; border-radius:12px; padding:12px 14px; margin-bottom:10px; background:#fff; }
.snr-cmt-head { display:flex; align-items:center; justify-content:space-between; }
.snr-cmt-name { font-weight:600; font-size:14px; color:#888; }
.snr-cmt-text { font-size:17px; line-height:1.6; margin-top:4px; white-space:pre-line; color:#222; }
.snr-like { display:inline-flex; align-items:center; gap:4px; background:none; border:0; cursor:pointer; color:#999; font-size:14px; padding:2px 6px; }
.snr-like svg { fill:none; stroke:currentColor; stroke-width:2; }
.snr-like.liked { color:#e0245e; }
.snr-like.liked svg { fill:#e0245e; stroke:#e0245e; }
.snr-c-empty { color:#888; font-size:15px; padding:8px 0; }
.snr-toast { position:fixed; bottom:96px; left:50%; transform:translateX(-50%); background:#111; color:#fff; padding:10px 18px; border-radius:999px; font-size:15px; opacity:0; pointer-events:none; transition:opacity .25s; z-index:9999; max-width:90vw; text-align:center; }
.snr-toast.show { opacity:1; }

@media (max-width:480px){ .playrow .btn { font-size:14px !important; padding:9px 12px !important; white-space:nowrap; } .playrow { justify-content:center; gap:8px !important; } }

/* Torah scans must fit even when opened through the persistent player navigation. */
.reader-wrap{width:100%;max-width:100%;min-width:0;overflow:hidden;margin-inline:auto}
.reader-wrap .reader-img,.reader-wrap .reader-img.zoomed{width:100%;max-width:100%;height:auto;border:1px solid #e5e1d8;border-radius:10px;cursor:default;display:block;margin-inline:auto}
.zoomhint{text-align:center;color:#999;font-size:13px;margin:8px 0 12px}

/* Desktop public song list: three cards per column, phone list unchanged. */
@media (min-width:900px){
  main.song-grid{max-width:1160px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,auto);grid-auto-flow:column;gap:18px}
  .song-grid .card{margin-bottom:0;min-width:0}
  .song-grid .card img.cover{width:140px;height:140px}
}

/* Draft only: original green cloth background with a soft warm overhead glow. */
body{min-height:100vh;background:#071c11 url('/assets/green-velvet-draft.jpg') center top / cover fixed no-repeat;color:#f7f1df}
header h1{color:#f4e3b5;text-shadow:0 2px 12px rgba(0,0,0,.35)}
.besiyata,footer{color:#d3c49c}
nav.crumbs,nav.crumbs a,.zoomhint,.note{color:#e1d7bb}
.section-card,.card{background:rgba(255,253,246,.96);border-color:rgba(233,207,139,.6);box-shadow:0 5px 24px rgba(0,0,0,.16);color:#16251a!important}
.section-card h2,.card h2{color:#16251a}
main.songpage,.loginbox{background:rgba(255,253,248,.97);color:#111;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.16)}
.songpage .snr-comments{color:#111}
.snr-tshare{color:#e7d29a}
header .logo-link{filter:drop-shadow(0 1px 8px rgba(255,239,190,.15))}
@media(max-width:640px){body{background-attachment:scroll;background-size:auto 1300px;background-color:#071c11}}

/* A separate top utility row keeps Back clear of the faded header logo. */
.besiyata{min-height:44px;padding-bottom:16px}
.snr-back{position:absolute;top:7px;right:12px;z-index:20;display:inline-flex;align-items:center;gap:5px;direction:rtl;border:1px solid rgba(237,213,151,.55);border-radius:999px;background:rgba(5,25,14,.75);color:#f4e3b5;font:13px -apple-system,"Segoe UI",Arial,sans-serif;padding:6px 10px;cursor:pointer;line-height:16px}
.snr-back:hover{background:#173b22}
.snr-back:focus-visible{outline:2px solid #f4e3b5;outline-offset:3px}

/* Desktop Back sits inward, to the left of the faded logo. */
@media(min-width:1101px){.snr-back{right:162px}}
@media(min-width:641px) and (max-width:1100px){.snr-back{right:112px}}

/* Back belongs to the content column, just above its first item. */
.besiyata{min-height:0;padding-bottom:0}
.snr-page-tools{display:flex;justify-content:flex-start;direction:rtl;margin:0 0 8px;grid-column:1/-1;grid-row:1}
.snr-page-tools .snr-back{position:static;flex:none}
.snr-page-tools + .sections{margin-top:8px}
@media(min-width:900px){main.song-grid{grid-template-rows:auto repeat(3,auto)}}
