/* Sheet Player 2026 redesign (approved mockup v1) */
:root{--bg:#FAF7F2;--card:#fff;--ink:#1E1B16;--muted:#6F675C;--line:#ECE5D8;--accent:#9A6B2F;--tint:#F3E8D6;--ok:#2F6B4F;--err:#B3261E;--shadow:0 6px 24px #3a2a1418;
 --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;--sans:Inter,-apple-system,system-ui,"Segoe UI",sans-serif;--tabh:64px;--minih:68px}
@media (prefers-color-scheme:dark){:root{--bg:#14120F;--card:#1E1B17;--ink:#F3EEE6;--muted:#A39A8C;--line:#2C2822;--accent:#D9A55B;--tint:#2E261B;--ok:#6FBF93;--err:#F2B8B5;--shadow:0 6px 24px #0008}}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.45 var(--sans);-webkit-tap-highlight-color:transparent}
button,select,input{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
a{color:var(--accent)}
.meta{font-size:13px;color:var(--muted)}
.hidden{display:none!important}
.topbar{padding:22px 20px 4px;max-width:720px;margin:auto}
.topbar .hello{color:var(--muted);font-size:14px}
.topbar h1{font:700 32px/1.15 var(--serif);margin:2px 0 0}
main{max-width:720px;margin:auto;padding:8px 20px calc(var(--tabh) + var(--minih) + 40px)}
.view{display:none}.view.on{display:block}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;margin:12px 0}
.btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;background:var(--accent);color:#fff;border:0;border-radius:999px;padding:10px 18px;font-size:15px;font-weight:500;margin:4px 6px 4px 0;cursor:pointer;text-decoration:none}
@media (prefers-color-scheme:dark){.btn{color:#1E1B16}}
.btn.alt{background:var(--card);color:var(--ink);border:1px solid var(--line)}
.btn.sm{min-height:36px;padding:6px 14px;font-size:14px}.btn.danger{background:transparent;color:var(--err);border:1px solid var(--line)}
.btn:disabled{opacity:.4;cursor:default}
input[type=file]{display:none}
select,input[type=text],input[type=search],input[type=number]{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px;min-height:44px;font-size:16px}
input[type=range]{accent-color:var(--accent);vertical-align:middle}
input[type=checkbox]{accent-color:var(--accent);width:18px;height:18px;vertical-align:middle}
label.lbl{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);display:block;margin:14px 0 6px}
.row{margin:8px 0}
#status{margin-top:8px;color:var(--muted)} #status.err,#npstatus.err{color:var(--err)}
.prog{width:100%;height:6px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:10px}.prog div{height:100%;width:0;background:var(--accent);transition:width .3s}
.tag{background:var(--tint);color:var(--accent);border-radius:6px;padding:1px 7px;margin-right:4px;font-size:12px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.grid input{width:100%}
/* segmented My library / Catalog */
.seg{display:flex;background:var(--tint);border-radius:14px;padding:4px;margin:14px 0 12px}
.seg button{flex:1;border:0;background:transparent;border-radius:10px;min-height:40px;font-weight:600;cursor:pointer}
.seg button.on{background:var(--card);box-shadow:0 1px 3px #0002}
.searchrow{display:flex;gap:8px}
.searchrow input{flex:1;width:auto}
.iconbtn{min-width:44px;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--card);cursor:pointer;font-size:18px;display:inline-flex;align-items:center;justify-content:center}
.chips{display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px;scrollbar-width:none}
.chip{flex:none;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:7px 16px;min-height:36px;cursor:pointer;white-space:nowrap}
.chip.on{background:var(--accent);border-color:var(--accent);color:#fff}
@media (prefers-color-scheme:dark){.chip.on{color:#1E1B16}}
details.libinst{margin:6px 0}details.libinst summary{cursor:pointer;color:var(--muted);font-size:13px;padding:6px 0}
details.libinst select{max-width:100%}
/* hymn rows */
#items .item{display:grid;grid-template-columns:52px 1fr auto auto;gap:4px 12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);position:relative}
.badge{width:52px;height:52px;border-radius:12px;background:var(--tint);color:var(--accent);display:flex;align-items:center;justify-content:center;font:700 16px var(--serif)}
.item .main{min-width:0;cursor:pointer}
.item h4{margin:0;font:400 18px/1.25 var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item h4 .tag{font-family:var(--sans)}
.item .sub{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item audio{display:none}
.item .prep{grid-column:2/-1;font-size:12px}
.item .prep:empty,.item .enh:empty{display:none}
.item .enh{grid-column:2/-1}
.rowplay,.rowstop,.more{width:44px;height:44px;border:0;background:transparent;border-radius:50%;cursor:pointer;font-size:20px;color:var(--muted)}
.rowplay{color:var(--accent);font-size:18px}
.rowstop{color:var(--ink);font-size:14px}
.rowplay.on{background:var(--tint)}
.rowstop.hidden{display:none !important}
.item.playing .badge{background:var(--accent);color:#fff}
.item .menu{display:none;grid-column:1/-1;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:8px;box-shadow:var(--shadow)}
.item.menuopen .menu{display:flex;flex-wrap:wrap}
.item .xmeta{grid-column:1/-1;margin:2px 0 6px;font-size:12px;color:var(--muted)}
.item .menu .btn{margin:3px}
/* mini-player */
#mini{position:fixed;left:12px;right:12px;bottom:calc(var(--tabh) + 10px + env(safe-area-inset-bottom));max-width:696px;margin:auto;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;padding:10px 12px 14px;z-index:30;cursor:pointer}
#mini .badge{width:44px;height:44px;font-size:14px}
#mini .t{font:400 16px var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mini .s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#miniPlay{width:44px;height:44px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:16px;cursor:pointer}
#miniBar{position:absolute;left:16px;right:16px;bottom:6px;height:3px;background:var(--line);border-radius:2px;overflow:hidden}
#miniBar div{height:100%;width:0;background:var(--accent)}
/* bottom tabs */
#tabs{position:fixed;left:0;right:0;bottom:0;height:calc(var(--tabh) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--card);border-top:1px solid var(--line);display:flex;z-index:31}
#tabs button{flex:1;border:0;background:transparent;color:var(--muted);font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
#tabs button span{font-size:20px;line-height:1}
#tabs button.on{color:var(--accent);font-weight:600}
/* Now Playing / full-screen hymn page (#player) */
#player{position:fixed;inset:0;z-index:40;background:var(--bg);overflow-y:auto;padding:0 20px 40px;transition:transform .28s ease}
#player.min{transform:translateY(105%);pointer-events:none}
@media (prefers-reduced-motion:reduce){#player{transition:none}}
.nphead{display:flex;justify-content:space-between;align-items:center;max-width:720px;margin:auto;padding:14px 0 4px;position:sticky;top:0;background:var(--bg);z-index:2}
.nphead button{border:0;background:transparent;color:var(--muted);min-height:44px;padding:0 8px;cursor:pointer;font-size:15px}
.npbody{max-width:720px;margin:auto}
#title{display:block;font:400 28px/1.2 var(--serif);margin:4px 0 2px}
#npsub{font-size:14px;color:var(--muted)}
.pagetabs{margin:14px 0 10px}
.pagewrap{position:relative;background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden}
#pageimg{display:block;width:100%;height:auto}
#trioOverlay{position:absolute;inset:0;pointer-events:none;z-index:5}
#osmd{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:16px;padding:6px;color:#000}
.npprog{display:flex;gap:6px;margin:16px 0 6px}.npprog .prog{margin:0;flex:1}
.nptime{display:flex;justify-content:space-between;font-size:14px;color:var(--muted)}
.transport{display:flex;justify-content:center;align-items:center;gap:12px;margin:14px 0;flex-wrap:wrap}
.seekbtn{min-width:56px;min-height:48px;padding:8px 12px;font-size:15px;font-weight:600;border-radius:999px}
@media (min-width:900px){.transport{gap:16px}.seekbtn{min-height:44px}}
#play{width:84px;height:84px;border-radius:50%;justify-content:center;font-size:17px;padding:0;margin:0}
#stop{width:52px;height:52px;border-radius:50%;justify-content:center;padding:0;margin:0}
#npstatus{text-align:center;font-size:13px;color:var(--muted);min-height:18px}
.chiprow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#instChip{background:var(--accent);color:#fff;border:0;border-radius:999px;min-height:40px;padding:8px 16px;cursor:pointer;font-weight:500}
@media (prefers-color-scheme:dark){#instChip,#miniPlay{color:#1E1B16}}
.layer{margin-top:8px}.layer summary{cursor:pointer;display:inline-flex;align-items:center;border:1px solid var(--line);background:var(--card);border-radius:999px;min-height:40px;padding:8px 16px;list-style:none}
.layer summary::-webkit-details-marker{display:none}
.layer .card select{width:100%;margin:2px 0 8px}
#savebox summary{cursor:pointer}
/* instrument sheet */
#sheetBg{position:fixed;inset:0;background:#0006;z-index:50;opacity:0;pointer-events:none;transition:opacity .2s}
#sheetBg.on{opacity:1;pointer-events:auto}
#instSheet{position:fixed;left:0;right:0;bottom:0;max-width:720px;margin:auto;max-height:80vh;overflow-y:auto;background:var(--card);border-radius:20px 20px 0 0;z-index:51;padding:10px 20px calc(24px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .25s ease}
#instSheet.on{transform:none}
#instSheet .grab{width:40px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 10px}
#instSheet h3{font:400 22px var(--serif);margin:4px 0 6px}
#instSheet .grp{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:16px 0 4px}
#instSheet .opt{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:50px;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;font-size:16px;cursor:pointer;padding:0 4px}
#instSheet .opt.on{color:var(--accent);font-weight:600}
#instSheet .opt.on::after{content:"✓"}
/* number pad */
#numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}
#numpad button{min-height:48px;border-radius:12px;border:1px solid var(--line);background:var(--card);font-size:20px;cursor:pointer}
.about{font-size:12px;color:var(--muted)}
.npctl{position:sticky;bottom:0;z-index:3;background:var(--bg);padding:2px 0 8px;margin:0 -20px;padding-left:20px;padding-right:20px;box-shadow:0 -8px 16px -12px #0003}
.npctl .transport{margin:8px 0}.npctl #play{width:68px;height:68px}

/* MASTER control + full-screen score (master.js) */
.master{padding:12px 14px}
.mc-row{display:flex;align-items:center;gap:8px;padding:6px 0;border-top:1px solid var(--line)}.mc-row:first-of-type{border-top:0}
.mc-tog{display:flex;align-items:center;gap:8px;min-width:104px;min-height:44px;border:1px solid var(--line);background:var(--card);border-radius:12px;padding:6px 10px;font-weight:600;cursor:pointer}
.mc-tog i{width:12px;height:12px;border-radius:50%;border:2px solid var(--c)}
.mc-row.on .mc-tog{background:var(--tint)}.mc-row.on .mc-tog i{background:var(--c)}
.mc-parts{display:flex;flex-wrap:wrap;gap:4px;flex:1}
.mc-parts button{border:1px solid var(--line);background:transparent;border-radius:999px;padding:5px 9px;font-size:13px;min-height:34px;cursor:pointer}
.mc-parts button.on{background:var(--accent);color:#fff;border-color:var(--accent)}
.mc-parts button:disabled{opacity:.35;cursor:default}
#fsopen{margin:8px 0}
html.fsopen,html.fsopen body{overflow:hidden}
#fs{position:fixed;inset:0;z-index:1000;background:#fff}
#fsscroll{position:absolute;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
#fspage{position:relative;width:100%;margin:0 auto}
#fsimg{display:block;width:100%;height:auto}
#fsosmd{background:#fff}#fsosmd svg{width:100%!important;height:auto!important}
.fsdots{position:absolute;inset:0;pointer-events:none;z-index:5}
.fsdot{position:absolute;aspect-ratio:1;border-radius:50%;opacity:.92;transform:translate(-50%,-50%);transition:opacity .2s;z-index:6}
/* seekbtns 2026-10-19: play + seek row always visible (was opacity:0 until tap; Mac Chrome users couldn't find Play). Highlighter pills still use #fs.ctl. */
#fsctl{position:fixed;left:0;right:0;bottom:calc(16px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:8px;opacity:1;pointer-events:auto;transition:opacity .3s;flex-wrap:wrap;padding:0 8px}
#fs.ctl #fsctl{opacity:1;pointer-events:auto}
#fsctl button{background:#000a;color:#fff;border:0;border-radius:999px;min-width:52px;min-height:52px;font-size:20px;cursor:pointer;backdrop-filter:blur(6px);padding:0 12px}
#fsctl #fsSeekBack,#fsctl #fsSeekStart,#fsctl #fsSeekFwd{font-size:15px;font-weight:600;min-width:48px}
/* Hymns tab shelves */
.shelves{display:grid;gap:10px;margin-top:6px}
.shelf{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;min-height:76px;cursor:pointer;box-shadow:var(--shadow)}
.shelf b{display:block;font:600 19px var(--serif)}.shelf .sbook{font-size:30px}.shelf .chev{margin-left:auto;font-size:26px;color:var(--muted)}
.shelfback{margin:4px 0 10px;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:6px 14px;min-height:36px;cursor:pointer}

/* mini-player retired: rows open the full-screen score instead */
#mini{display:none!important}

/* collapsible master control */
.master{padding:0;border-radius:999px;display:inline-block;max-width:100%;margin:10px 0}
.master.open{display:block;border-radius:16px;padding:0 0 10px}
.mc-pill{display:flex;align-items:center;gap:6px;min-height:44px;padding:8px 16px;border:0;background:transparent;font-weight:600;cursor:pointer;width:100%;text-align:left}
.mc-pill i{width:12px;height:12px;border-radius:50%;flex:none}.mc-pill span{margin-left:4px}.mc-pill em{font-style:normal;color:var(--muted);margin-left:auto;padding-left:10px}
.master .mc-body{display:none;padding:0 14px}.master.open .mc-body{display:block}
.mc-t{display:flex;flex-direction:column;line-height:1.2}.mc-t small{font-weight:400;font-size:12.5px;color:var(--muted)}
.mc-dots{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0 2px;font-weight:600;cursor:pointer}.mc-dots input{width:44px;height:24px;appearance:none;-webkit-appearance:none;background:var(--line);border-radius:999px;position:relative;transition:background .2s;cursor:pointer}.mc-dots input::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:left .2s}.mc-dots input:checked{background:var(--ok)}.mc-dots input:checked::after{left:23px}
#fsback{position:fixed;top:calc(env(safe-area-inset-top) + 10px);left:calc(env(safe-area-inset-left) + 10px);z-index:1002;pointer-events:auto;background:#000a;color:#fff;border:0;border-radius:999px;min-height:44px;padding:8px 16px;font-size:17px;font-weight:600;opacity:.75;cursor:pointer;backdrop-filter:blur(6px)}
#fsctl{z-index:1001}
#fsverse{background:#000a;color:#fff;border:0;border-radius:999px;min-height:56px;padding:0 14px;font-size:17px;appearance:none;-webkit-appearance:none;text-align:center}

/* aitab: whole shelf card is the tap target; per-instrument dot switch */
.shelf *{pointer-events:none}.shelf{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.mc-dk{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;cursor:pointer}.mc-dk input{position:absolute;opacity:0;width:1px;height:1px}
.mc-dk i{width:16px;height:16px;border-radius:50%;border:2px solid var(--c);opacity:.45}.mc-dk input:checked+i{background:var(--c);opacity:1}
#fslegend{position:fixed;left:0;right:0;bottom:calc(2px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:10px;font-size:11px;color:#fff;opacity:0;pointer-events:none;transition:opacity .3s;z-index:1001}
#fs.ctl #fslegend{opacity:.85}#fslegend span{background:#0008;border-radius:999px;padding:1px 7px;display:flex;align-items:center;gap:4px}#fslegend i{width:7px;height:7px;border-radius:50%}#fslegend.hidden{display:none}

/* ---- desktop layout (>= 900px wide). Phones never match this block, so their layout is unchanged. ---- */
@media (min-width:900px){
  html,body{font-size:14px}
  main,.topbar{max-width:1100px}
  #fs{--fsbase:min(900px, 100%)} #fspage{width:min(900px, 100%)}                  /* full-screen score: comfortable 900px page, zoom still multiplies it */
  #fsscroll{background:#f3f1ec}
  #fspage{background:#fff;box-shadow:0 2px 18px #0002}
  #items{display:grid;grid-template-columns:1fr 1fr;column-gap:18px}
  #items>.meta{grid-column:1/-1}
  .btn{min-height:38px;padding:7px 16px;font-size:14px}
  .rowplay,.rowstop,.more{width:38px;height:38px}
  .iconbtn{min-width:38px;min-height:38px}
  #tabs{max-width:720px;margin:0 auto;border-left:1px solid var(--line);border-right:1px solid var(--line);border-radius:14px 14px 0 0}
  #player{padding:0 max(20px, calc((100vw - 1000px) / 2)) 40px}
  #play{width:68px;height:68px}
  .shelves{grid-template-columns:1fr 1fr}
}
.mc-ver{min-height:36px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:inherit;padding:4px 6px;font:inherit;font-size:14px}
.mc-left{display:flex;flex-direction:column;gap:6px;align-self:flex-start}.mc-left .mc-ver{width:100%}
#fslegend{opacity:1!important;bottom:auto;top:calc(8px + env(safe-area-inset-top));gap:6px;font-size:12px;font-weight:600}#fslegend span{background:rgba(0,0,0,.72);padding:2px 8px}#fslegend i{width:10px;height:10px;border:1.5px solid #fff;box-sizing:border-box}
#fslegend{left:auto;right:calc(10px + env(safe-area-inset-right));top:calc(18px + env(safe-area-inset-top));flex-wrap:wrap;justify-content:flex-end;max-width:65vw}
#fslegend{display:none!important}
/* note glow: separate light overlay above the score image, normal blending; dots stay on top */
.inkcol{position:absolute;pointer-events:none;image-rendering:auto;transition:opacity .2s;z-index:1}
#mqueue .mq-h{display:flex;align-items:center;gap:8px;margin-bottom:6px}#mqueue .mq-h .meta{flex:1}
.mq-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-top:1px solid var(--line)}
.mq-row img,.mq-row>i{width:44px;height:44px;object-fit:cover;border-radius:8px;background:#8882;display:flex;align-items:center;justify-content:center;font-style:normal;flex:none}
.mq-t{flex:1;min-width:0}.mq-n{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#uploader.drop{outline:3px dashed var(--accent,#36c);outline-offset:-6px}

html,body{max-width:100%;overflow-x:hidden}.mq-t,.mq-t *{overflow-wrap:anywhere;word-break:break-word}
/* now-playing bar (2026-10-14) */
#npbar{position:fixed;left:12px;right:12px;bottom:calc(var(--tabh) + 10px + env(safe-area-inset-bottom));max-width:696px;margin:auto;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);display:flex;gap:10px;align-items:center;padding:8px 10px 12px;z-index:31}
#npbar.hidden{display:none}
#npbOpen{flex:1;min-width:0;display:flex;gap:10px;align-items:center;background:none;border:0;padding:0;text-align:left;color:inherit;cursor:pointer}
#npbOpen .badge{width:40px;height:40px;font-size:14px;flex:none}
.npbt{min-width:0;display:flex;flex-direction:column}
#npbar .t{font:400 16px var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#npbar .s{font-size:12px;color:var(--muted)}
#npbPlay,#npbStop{width:42px;height:42px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:15px;cursor:pointer;flex:none}
#npbStop{background:var(--line);color:inherit}
#npbBar{position:absolute;left:16px;right:16px;bottom:5px;height:3px;background:var(--line);border-radius:2px;overflow:hidden}
#npbBar div{height:100%;width:0;background:var(--accent)}

html.fsopen #npbar{display:none}
#items .item.pinned .badge{outline:2px solid var(--accent);outline-offset:1px}
@media (prefers-color-scheme:dark){#npbPlay{color:#1E1B16}}
html.npbar-on #view-lib{padding-bottom:calc(var(--tabh) + 88px + env(safe-area-inset-bottom))}

.mc-lead{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:10px 0 2px;font-weight:600}
.mc-lb{display:flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}.mc-lb button{border:0;background:transparent;padding:6px 14px;font:inherit;font-weight:600;cursor:pointer;color:inherit}.mc-lb button.on{background:var(--c);color:#fff}

/* lyric follower (2026-10-17): the word sung on the current note */
.fsword{position:absolute;pointer-events:none;z-index:4;background:rgba(255,214,0,.42);border-radius:4px;box-shadow:0 0 0 2px rgba(255,170,0,.85);mix-blend-mode:multiply;transition:opacity .12s}
/* shuffle (2026-10-17): own button directly above the Arrangement Selection pill; a bar on the full-screen page */
#shufbox{margin:10px 0 0}
.shufbtn{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 18px;border:0;border-radius:16px;background:var(--accent);color:#fff;font:inherit;cursor:pointer;text-align:left;box-shadow:var(--shadow)}
.shufbtn .ico{font-size:24px;line-height:1}.shufbtn .lab{display:flex;flex-direction:column;min-width:0}
.shufbtn b{font-size:18px}.shufbtn small{font-size:13px;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shufon{display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 8px 6px 14px;border-radius:16px;background:var(--card);border:2px solid var(--accent);box-shadow:var(--shadow)}
.shufon.hidden{display:none}
.shufon .ico{font-size:20px}.shufon .t{flex:1;min-width:0;border:0;background:transparent;color:inherit;font:400 16px var(--serif);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:44px;cursor:pointer;padding:0}
.shufon button:not(.t){min-width:48px;min-height:48px;border:0;border-radius:999px;background:var(--accent);color:#fff;font-size:20px;cursor:pointer}
#shufFs{position:fixed;top:calc(env(safe-area-inset-top) + 10px);right:calc(env(safe-area-inset-right) + 10px);left:calc(env(safe-area-inset-left) + 110px);max-width:460px;margin-left:auto;z-index:1002;display:flex;align-items:center;gap:6px;padding:4px 4px 4px 12px;border-radius:999px;background:#000b;color:#fff;backdrop-filter:blur(6px)}
#shufFs.hidden{display:none}
#shufFs .t{flex:1;min-width:0;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#shufFs button{min-width:44px;min-height:44px;border:0;border-radius:999px;background:#fff2;color:#fff;font-size:18px;cursor:pointer}
.mc-intro span{display:flex;flex-direction:column}.mc-intro small{font-weight:400;font-size:12px;color:var(--muted)}
/* sections 2026-10-17: each part of the Arrangement panel folds on its own */
.mc-sec{border-top:1px solid var(--line)}.mc-sec:first-child{border-top:0}
.mc-sec>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;font-weight:600;-webkit-tap-highlight-color:transparent}
.mc-sec>summary::-webkit-details-marker{display:none}
.mc-sec>summary .st{white-space:nowrap}
.mc-sec>summary .ss{flex:1;min-width:0;text-align:right;font-weight:400;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mc-sec>summary em{font-style:normal;color:var(--muted);transition:transform .2s;flex:none}.mc-sec[open]>summary em{transform:rotate(180deg)}
.mc-sec[open]>summary .ss{visibility:hidden}
.mc-secb{padding-bottom:6px}.mc-secb>.mc-row:first-child,.mc-secb>.mc-lead:first-child,.mc-secb>.mc-volmode:first-child{border-top:0}
.mc-secb>.mc-lead{padding-top:2px}
/* shuffle source switch (2026-10-17) */
.shufsrc{display:flex;gap:6px;margin:8px 2px 0}
.shufsrc button{flex:1 1 0;min-height:36px;padding:6px 8px;border:1px solid var(--line,#e6dccb);border-radius:999px;background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shufsrc button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
/* highlighter toggles on the full-screen hymn page (2026-10-17): above the play controls, shown with them */
#fshl{position:fixed;left:0;right:0;bottom:calc(84px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:8px;opacity:0;pointer-events:none;transition:opacity .3s;z-index:1001}
#fs.ctl #fshl{opacity:1;pointer-events:auto}
#fshl button{background:#000a;color:#fff;border:1.5px solid transparent;border-radius:999px;min-height:44px;padding:6px 14px;font:inherit;font-size:14px;cursor:pointer;backdrop-filter:blur(6px);opacity:.75}
#fshl button.on{opacity:1;border-color:#fff}
#fshl button:not(.on){text-decoration:line-through}
.mc-hl span{display:flex;flex-direction:column}.mc-hl small{font-weight:400;font-size:12px;color:var(--muted)}
/* self-contained on/off switch (2026-10-17): real track + knob elements, never squeezed by long labels, same on
   every page (list, Now Playing, full screen) - replaces the input::after knob that collapsed to a dot */
.mc-dots{gap:12px;min-height:52px}.mc-dots>span:first-child{flex:1 1 auto;min-width:0}
.mc-sw{position:relative;flex:0 0 56px;width:56px;min-width:56px;height:44px;display:inline-flex;align-items:center;justify-content:flex-end}
.mc-dots .mc-sw input,.mc-sw input{position:absolute;inset:0;width:100%;height:100%;min-width:0;margin:0;opacity:0;-webkit-appearance:none;appearance:none;background:none;border:0;cursor:pointer;z-index:1}
.mc-dots .mc-sw input::after{display:none}
.mc-sw i{position:relative;display:block;flex:none;width:48px;height:28px;border-radius:999px;background:#cfc4b2;transition:background .2s;pointer-events:none}
.mc-sw i b{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:left .2s}
.mc-sw input:checked+i{background:var(--ok,#2f6b4f)}.mc-sw input:checked+i b{left:23px}
.mc-sw input:focus-visible+i{outline:2px solid var(--accent,#9a6a2f);outline-offset:2px}
/* every Arrangement row uses the same switch (2026-10-17) */
.mc-head{display:flex;align-items:center;gap:6px;padding-right:12px}.mc-head .mc-pill{flex:1 1 auto;min-width:0}
.mc-sec>summary .mc-sw{margin-left:2px}
.mc-sec>summary .ss{flex:1 1 auto}
.mc-sec-fold[open]>summary .ss{visibility:hidden}
.mc-sec:not(.mc-sec-fold)[open]>summary .ss{visibility:hidden}
.mc-dk{min-width:52px}.mc-dk .mc-sw{flex-basis:48px;width:48px;min-width:48px}
.mc-dk .mc-sw i{width:40px;height:24px}.mc-dk .mc-sw i b{width:18px;height:18px}.mc-dk .mc-sw input:checked+i{background:var(--c)}.mc-dk .mc-sw input:checked+i b{left:19px}
.mc-volbox.off .mc-vol,.mc-volbox.off .mc-volmode button{opacity:.45;pointer-events:none}
/* full-screen page highlighter switches: same switch, on a dark pill */
#fshl label{display:flex;align-items:center;gap:8px;background:#000b;color:#fff;border-radius:999px;padding:2px 6px 2px 14px;font-size:14px;font-weight:600;cursor:pointer;backdrop-filter:blur(6px)}
#fshl label .mc-sw i{background:#777}
/* list order (2026-10-17): one column in hymn-number order on every width (the 2-column grid read 1,2 / 3,4 and the
   shelf 'back' chip took a grid cell, so the numbers looked scattered) */
@media (min-width:0px){ #items{display:block} #items>.shelfback{display:inline-flex;margin:4px 0 8px} }
#fshl label{white-space:nowrap;font-size:13px;padding-left:12px}#fshl label .mc-sw input:checked+i{background:var(--ok,#2f6b4f)}
@media (max-width:420px){#fshl{gap:6px}#fshl label{font-size:12.5px;padding-left:10px}}
#shufbox{margin:2px 0 10px}
.mc-leadfix{border-top:1px solid var(--line);padding:10px 0 6px;min-height:52px}
/* full-screen page (2026-10-17): Back and the shuffle bar sit at the BOTTOM, above the highlighter switches and the
   play controls, and show / auto-hide with them - nothing covers the title or the top staff */
#fsback{top:auto;bottom:calc(env(safe-area-inset-bottom) + 136px);opacity:0;pointer-events:none;transition:opacity .3s}
#fs.ctl #fsback{opacity:.9;pointer-events:auto}
#shufFs{top:auto;bottom:calc(env(safe-area-inset-bottom) + 136px);left:calc(env(safe-area-inset-left) + 104px);opacity:0;pointer-events:none;transition:opacity .3s}
#fs.ctl #shufFs{opacity:1;pointer-events:auto}
/* shuffle playback view (2026-10-17): a tap shows only Back + the shuffle bar at the bottom; highlighter switches,
   play controls and legend stay out (their saved settings still apply) */
#fs.shuf #fshl,#fs.shuf #fsctl,#fs.shuf #fslegend{display:none!important}
#fs.shuf #fsback,#fs.shuf #shufFs{bottom:calc(env(safe-area-inset-bottom) + 16px)}
/* Realism / Strict: two linked switches side by side under Instruments & parts (2026-10-17) */
.mc-realism{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;border-top:1px solid var(--line)}
.mc-realism .mc-dots{border-top:0}
.mc-realism .mc-dots small{line-height:1.25}


/* preplay 2026-10-19 (flag ?preplay=1 only) */
#preplay{position:fixed;inset:0;z-index:1200;background:#0008;display:flex;align-items:flex-end;justify-content:center;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
#preplay.hidden{display:none}
#preplay .ppcard{background:var(--card,#fff);color:var(--ink);border-radius:18px 18px 12px 12px;padding:18px 18px 22px;width:min(440px,100%);box-shadow:var(--shadow,0 8px 32px #0005);display:flex;flex-direction:column;gap:10px}
#preplay h2{font:400 22px var(--serif,Georgia,serif);margin:0}
#preplay #ppBack{align-self:flex-start}
#preplay #ppVerse{min-height:48px;font-size:16px;border-radius:12px;padding:8px 12px;width:100%;border:1px solid var(--line);background:var(--bg,#fff);color:inherit}
#preplay .ppdots{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;font-weight:600}
#preplay .ppdots small{display:block;font-weight:400;color:var(--muted);font-size:12px}
#preplay #ppGo{min-height:52px;font-size:17px;width:100%;margin-top:6px}
#fshl.pp-hide{display:none!important}
html.preplay-open{overflow:hidden}
@media (min-width:900px){
  #preplay{align-items:center}
  #preplay .ppcard{border-radius:18px;padding:22px}
}
