:root{--bg:#f7f5ef;--surface:#fff;--surface2:#eef2f3;--ink:#233646;--muted:#566877;--accent:#315f83;--accentText:#fff;--line:#d9e0e4;--shadow:0 8px 24px #213e5210;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;font-size:16px;color-scheme:light}*{box-sizing:border-box}html,body{overscroll-behavior-y:none}body{margin:0;background:var(--bg);color:var(--ink);padding-bottom:190px;line-height:1.5}body.dark{--bg:#18232d;--surface:#253541;--surface2:#324653;--ink:#f2f5f7;--muted:#c2d0d9;--accent:#b6d8f2;--accentText:#172b3b;--line:#435663;--shadow:0 8px 24px #0002;color-scheme:dark}body.large{font-size:18px}body.extra{font-size:21px}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:11px;padding:.7rem 1rem;font-weight:650}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #df9f48;outline-offset:3px}button:disabled{opacity:.4;cursor:not-allowed}.primary{background:var(--bab,var(--btn1bg,var(--accent)));color:var(--bat,var(--accentText))}.outline{background:var(--bab,var(--btn2bg,var(--surface)));color:var(--bat,var(--btn2text,var(--ink)));border:1px solid var(--line)}.muted,small{color:var(--muted)}.top{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem max(1rem,calc((100vw - 1050px)/2));background:var(--surface);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.7rem}.brandmark{display:grid;place-items:center;background:var(--accent);color:var(--accentText);border-radius:12px;width:44px;height:44px;font-size:1.6rem}.brand strong,.brand small{display:block}.brand small{font-size:.77rem}.settings{display:flex;gap:.6rem;align-items:center}.settings select{border:1px solid var(--line);border-radius:9px;padding:.55rem;background:var(--surface);color:var(--ink)}.size-label{font-size:.85rem}.shell{max-width:1050px;margin:auto;padding:1.4rem 1rem}.welcome{padding:2rem;background:linear-gradient(110deg,var(--surface),var(--surface2));border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.eyebrow{letter-spacing:.15em;color:var(--accent);font-size:.75rem;font-weight:800;margin:0}h1{font-size:clamp(1.65rem,4vw,2.5rem);line-height:1.2;margin:.6rem 0}h2{font-size:1.35rem;margin:0}.welcome p:not(.eyebrow){color:var(--muted);margin:.5rem 0 1.5rem}.welcome-actions,.sectionhead,.song-actions,.dialog-actions{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}.tabs{display:flex;border-bottom:1px solid var(--line);gap:.4rem;margin:1.5rem 0}.tab{border-radius:10px 10px 0 0;background:transparent;color:var(--muted);padding:.85rem 1.1rem}.tab.active{border-bottom:3px solid var(--navInd,var(--accent));color:var(--ink)}.sectionhead{justify-content:space-between;margin:1.2rem 0}.sectionhead p{margin:.2rem 0}.songlist{display:grid;gap:.6rem;margin-top:1rem}#search,.dialog-actions+input,#playlistName{width:100%;border:1px solid var(--line);border-radius:11px;padding:.85rem;background:var(--surface);color:var(--ink)}.song,.playlist-card,.detail{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:.9rem;display:flex;align-items:center;gap:.8rem}.song-info{min-width:0;flex:1}.song-info strong,.song-info small{display:block;overflow-wrap:anywhere}.song-info small{font-size:.85rem}.song-actions button{padding:.55rem .7rem}.iconbutton{background:var(--bab,var(--surface2));color:var(--bat,var(--ink));min-width:42px;min-height:42px}.song-number{width:34px;text-align:center;color:var(--muted)}.playlist-card{justify-content:space-between;margin-bottom:.65rem}.playlist-card strong,.playlist-card small{display:block}.playlist-card .buttons{display:flex;gap:.4rem;flex-wrap:wrap}.detail{display:block;margin-top:1rem}.detail h3{margin:.1rem 0}.detail-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}.detail .song{margin:.5rem 0}.empty{background:var(--surface);border:1px dashed var(--line);border-radius:12px;padding:1.4rem;color:var(--muted)}.player{position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -5px 22px #00000010;padding:.75rem max(1rem,calc((100vw - 1050px)/2));z-index:35;transform:translateZ(0)}.player-main{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1rem}.song-playing{display:flex;align-items:center;gap:.7rem;min-width:0;flex:1}.song-playing-text{min-width:0}.song-playing-text strong,.song-playing-text small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.song-playing-text small{font-size:.8rem}.note{background:var(--surface2);border-radius:10px;width:43px;height:43px;display:grid;place-items:center;font-size:1.5rem}.player-controls{display:flex;align-items:center;gap:.3rem}.player-controls button{background:transparent;color:var(--ink);font-size:1.25rem;min-width:40px;min-height:44px;padding:.35rem}.player-controls .play-circle{background:var(--bab,var(--btn1bg,var(--accent)));color:var(--bat,var(--accentText));border-radius:50%;height:52px;width:52px}.player-controls button.enabled{color:var(--accent);background:var(--surface2)}.timeline{display:flex;align-items:center;gap:.7rem;margin-top:.5rem}.timeline span{font-size:.78rem;color:var(--muted);min-width:35px;font-variant-numeric:tabular-nums}.timeline input{flex:1;accent-color:var(--accent);cursor:pointer;min-width:0}.player-message{font-size:.75rem;color:var(--muted);min-height:1.1rem;text-align:center}.toast{position:fixed;bottom:175px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:.65rem 1rem;border-radius:10px;z-index:20;max-width:90vw}dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:18px;padding:1.5rem;width:min(92vw,440px)}dialog::backdrop{background:#0009}dialog label{display:block;margin:.8rem 0 .3rem}.dialog-actions{justify-content:flex-end;margin-top:1rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}@media(max-width:620px){.top{align-items:flex-start}.settings{flex-wrap:wrap;justify-content:flex-end}.size-label,.hide-small{display:none}.welcome{padding:1.35rem}.player-main{display:flex;flex-direction:column;gap:.25rem}.song-playing{width:100%}.player-controls{width:100%;justify-content:space-evenly}.player-controls button{min-width:45px}.song .song-actions{gap:.3rem}.song-actions button{font-size:.85rem}.playlist-card{align-items:flex-start;flex-direction:column}.player{padding:.55rem .8rem}body{padding-bottom:220px}.toast{bottom:220px}}

.sort-row{display:flex;align-items:center;gap:.6rem;margin:1rem 0 1.25rem}.sort-row label{color:var(--muted);font-weight:600}.sort-row select{border:1px solid var(--line);border-radius:9px;padding:.55rem 2rem .55rem .8rem;background:var(--surface);color:var(--ink);cursor:pointer}
.welcome h1.verse{font-size:1.5rem;line-height:1.4;font-weight:600}.verse-ref{display:block;margin-top:.4rem;font-size:1rem;font-weight:700;color:var(--accent)}
.choices{display:grid;gap:.5rem;margin:1rem 0;max-height:40vh;overflow:auto}.choice{display:flex;justify-content:space-between;align-items:center;gap:1rem;text-align:left;padding:.8rem 1rem;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--ink);cursor:pointer}.choice:hover:not(:disabled){border-color:var(--accent)}.choice:disabled{opacity:.6;cursor:default}.choice-name{font-weight:700}.choice small{color:var(--muted)}.add-new{display:flex;gap:.6rem}.add-new input{flex:1;min-width:0;border:1px solid var(--line);border-radius:11px;padding:.75rem;background:var(--surface);color:var(--ink)}
/* Christmas Music (seasonal) */
.tabs{flex-wrap:wrap}
#xSearch,#xPlaylistName{width:100%;border:1px solid var(--line);border-radius:11px;padding:.85rem;background:var(--surface);color:var(--ink)}
.subtabs{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 1.2rem}
.subtab{min-height:48px;padding:.7rem 1.1rem;border:2px solid var(--line);background:var(--surface);color:var(--ink)}
.subtab.active{border-color:var(--accent);background:var(--accent);color:var(--accentText)}
.notice{background:var(--surface2);border:1px solid var(--line);border-left:6px solid #df9f48;border-radius:12px;padding:.9rem 1rem;margin:0 0 1rem}
.song.now-playing{border:2px solid var(--accent);box-shadow:inset 6px 0 0 var(--accent)}
.badge{display:inline-block;margin-top:.25rem;padding:.1rem .55rem;border-radius:999px;border:1px solid var(--accent);font-size:.8rem;font-weight:700;color:var(--ink)}
.xyear{margin:1.6rem 0 .6rem;font-size:1.35rem}
.xprograms{display:grid;gap:.6rem}
.xprogram{display:flex;justify-content:space-between;align-items:center;gap:1rem;width:100%;text-align:left;min-height:56px;padding:.9rem 1rem;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink)}
.xprogram small{display:block}
.xprogram:hover{border-color:var(--accent)}
.xback{margin:0 0 1rem}
.xprogram-head{margin:0 0 1rem}
.xprogram-head h2{margin:.2rem 0}
.xunavailable strong{color:var(--muted)}
.player-message button{margin-left:.6rem;padding:.5rem .9rem;min-height:44px;font-size:.9rem}
@media(max-width:620px){
.tabs{gap:.1rem}.tab{padding:.8rem .5rem;font-size:.92em}
.subtab{flex:0 1 auto;font-size:.95em;padding:.65rem .9rem;min-height:46px;text-align:center}
.song[data-ctx]{flex-wrap:wrap}
.song[data-ctx] .song-info{flex:1 1 0;min-width:0}
.song[data-ctx] .song-actions{flex:1 1 100%;justify-content:flex-start;padding-left:calc(34px + .8rem)}
}
@media(max-width:480px){.add-new{flex-wrap:wrap}.add-new input{flex:1 1 100%}}
.notice p{margin:.2rem 0}
.xsearch{margin:0 0 1rem}.xsearch label:not(.sr-only){display:block;margin:0 0 .3rem;color:var(--muted);font-weight:600}
.xgroup{margin:1.6rem 0 .6rem;font-size:1.35rem}.xcontext{font-weight:600}
/* the New indicators beside the tab names use the approved New colours (see --newInk / --newBg below) and stay compact */
.newdot{display:inline-block;margin-left:.4rem;padding:0 .4rem;border-radius:999px;background:var(--newBg);color:var(--newInk);font-size:.72rem;font-weight:800;letter-spacing:.05em;vertical-align:middle}
.filter{display:inline-flex;gap:.5rem;align-items:center;margin:.4rem 0 .4rem 1rem}
.filter input{width:1.25rem;height:1.25rem}
.backup-bar{display:flex;gap:.6rem;flex-wrap:wrap;margin:.6rem 0 .2rem}
.small-note{margin:.2rem 0 .8rem;font-size:.9rem}
#importDialog{width:min(92vw,460px)}
@media(max-width:620px){.filter{margin-left:0}.backup-bar button{flex:1 1 100%}}
.pl-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem .8rem;margin:.2rem 0 .7rem}.pl-summary .muted{flex:1 1 14rem}

/* ---- My Playlists: two panes on a computer, list then detail on a phone ---- */
.plwrap{display:grid;grid-template-columns:minmax(210px,290px) minmax(0,1fr);gap:1rem;align-items:start;margin-top:.8rem}
.plnav-item{display:block;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:.65rem .9rem;margin:0 0 .5rem;font:inherit;color:var(--ink);cursor:pointer;min-height:48px}
.plnav-item strong{display:block;overflow-wrap:anywhere;word-break:break-word}
.plnav-item small{display:block;color:var(--muted)}
.plnav-item[aria-current=true]{border-color:var(--accent);background:var(--surface2);box-shadow:inset 5px 0 0 var(--accent)}
.plnav-item:focus-visible,.draghandle:focus-visible,.plmenu button:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.plpane .detail{margin-top:0}
.plhead{position:sticky;top:0;z-index:8;background:var(--surface);display:flex;align-items:center;gap:.6rem;padding:.5rem 0;margin:0 0 .3rem;border-bottom:1px solid var(--line)}
.pltitle{flex:1 1 auto;min-width:0;margin:0;font-size:1.25rem;line-height:1.25;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.plback{display:none;min-height:44px}
.plplay{min-height:44px;white-space:nowrap}
.plmenuwrap{position:relative;flex:none}
.plmenubtn{min-width:44px;min-height:44px;font-size:1.3rem;line-height:1;padding:.2rem .6rem}
.plmenu{position:absolute;right:0;top:calc(100% + 4px);z-index:20;min-width:11rem;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:.3rem}
.plmenu button{display:block;width:100%;text-align:left;min-height:44px;background:none;border:0;padding:.5rem .8rem;font:inherit;color:var(--ink);border-radius:8px;cursor:pointer}
.plmenu button:hover,.plmenu button:focus-visible{background:var(--surface2)}
.plmenu .danger{color:#b42318}
.plsearch{margin:.5rem 0 .2rem}.plsearch input{width:100%}
.plnote:empty{display:none}
.draghandle{flex:none;align-self:center;min-width:40px;min-height:44px;background:none;border:0;color:var(--muted);font-size:1.3rem;line-height:1;cursor:grab;touch-action:none;border-radius:8px;padding:0 .2rem}
.song.dragging{opacity:.6;box-shadow:0 6px 18px #0003}
.song.drop-before{box-shadow:0 -4px 0 var(--accent)}
.song.drop-after{box-shadow:0 4px 0 var(--accent)}
body.plDragging{user-select:none;-webkit-user-select:none;cursor:grabbing}
.iconbutton:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:720px){
.plwrap{display:block}
.plwrap:not(.showdetail) .plpane{display:none}
.plwrap.showdetail .plnav{display:none}
.plback{display:inline-flex;align-items:center}
#playlistsPanel.detailopen .sectionhead,#playlistsPanel.detailopen .backup-bar,#playlistsPanel.detailopen .small-note{display:none}
.plhead{flex-wrap:wrap}.pltitle{flex:1 1 100%;order:3;font-size:1.15rem}
.plback{order:0}.plplay{order:1;margin-left:auto}.plmenuwrap{order:2}
}
/* ---- Package 1 corrections ---- */
.song.drop-target{outline:4px solid #1d6fe0;outline-offset:-3px;background:#e8f1fd;border-radius:14px}
body.dark .song.drop-target{outline-color:#7fb4ff;background:#243b55}
.iconbutton svg{display:block;margin:auto}
.song-actions .iconbutton{color:var(--bat,var(--ink))}
.iconbutton:disabled{opacity:.35}
.pladd{min-height:44px;white-space:nowrap}
.pl-summary .pladd{flex:none}
.dialog-actions.centered{justify-content:center}
.danger-btn{background:#b42318;color:#fff;border:1px solid #b42318;min-height:44px}
.danger-btn:hover{background:#8f1d13}
body.dark .danger-btn{background:#d6453a;border-color:#d6453a;color:#fff}
#deleteDialog .dialog-actions button,#copyDialog .dialog-actions button{min-height:44px}
#deleteDialog button:focus-visible,#copyDialog button:focus-visible,#copyName:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
#copyName{width:100%;border:1px solid var(--line);border-radius:11px;padding:.85rem;background:var(--surface);color:var(--ink)}
.addbar{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap;background:#e8f1fd;color:#14365d;border:1px solid #1d6fe0;border-left-width:6px;border-radius:12px;padding:.6rem .9rem;margin:.6rem 0;position:sticky;top:0;z-index:9}
body.dark .addbar{background:#243b55;color:#e6f0ff;border-color:#7fb4ff}
.addbar button{min-height:44px}
@media(max-width:720px){.pl-summary .pladd{order:-1;flex:1 1 100%}}
/* ---- Package 1 final corrections ---- */
#copyDialog .dialog-actions{justify-content:center}
#copyDialog .dialog-actions button:disabled{opacity:.5;cursor:not-allowed}
#copyErr{margin:.6rem 0 0;font-size:.95rem}
#copyName[aria-invalid=true]{border-color:#b42318}
.toast.ok{background:#E8F5E9;color:#14532D;border:1px solid #2E7D32;border-left-width:6px}
body.dark .toast.ok{background:#1f3d2b;color:#d8f3e2;border-color:#4caf70}
/* ---- Add Entire Program to Playlist ---- */
.xprogram-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.7rem}
.xprogram-actions button{min-height:44px}
@media(max-width:480px){.xprogram-actions button{flex:1 1 100%}}
.destpick{border:0;margin:.6rem 0 0;padding:0}
.destopt{display:flex;align-items:center;gap:.55rem;margin:.9rem 0 .3rem;font-weight:650;min-height:44px}
.destopt input{width:1.2rem;height:1.2rem;flex:none}
#progName,#progPlaylist{width:100%;border:1px solid var(--line);border-radius:11px;padding:.8rem;background:var(--surface);color:var(--ink);font:inherit}
#progName[aria-invalid=true]{border-color:#b42318}
#progErr{margin:.6rem 0 0;font-size:.95rem}
#programDialog .dialog-actions button,#programAgainDialog .dialog-actions button{min-height:44px}
#programDialog .dialog-actions button:disabled{opacity:.5;cursor:not-allowed}
#programDialog button:focus-visible,#programAgainDialog button:focus-visible,#programDialog input:focus-visible,#programDialog select:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
/* ---- Sticky main navigation (Package 1 of the navigation work). --navH / --playerH are measured in app.js ---- */
html{scroll-padding-top:calc(var(--navH,0px) + .6rem);scroll-padding-bottom:calc(var(--playerH,0px) + .6rem)}
.tabs{position:sticky;top:0;z-index:30;background:var(--bg);padding-top:.35rem}
.tab{min-height:44px}
.plhead{top:var(--navH,0px)}
.addbar{top:var(--navH,0px)}
@media(max-width:620px){.tabs .tab{flex:1 1 auto;text-align:center}}
/* ---- Church Playlists: two panes (Package 2) - reuses the My Playlists pane styles ---- */
#chNav{position:sticky;top:calc(var(--navH,0px) + .5rem);align-self:start;max-height:calc(100vh - var(--navH,0px) - 3.5rem);overflow-y:auto}       /* the column must also fit above the page's bottom space, or at the end of a long page it slides up under the tabs */
@media(min-width:721px){body.player-on #chNav{max-height:calc(100vh - var(--navH,0px) - var(--playerH,0px) - 6rem)}}
.plcopy{min-height:44px;white-space:nowrap}
.chmeta{margin:.3rem 0 .4rem}
.chmeta p{margin:.2rem 0}
.chdesc{overflow-wrap:anywhere}
.plpane .detail .songlist{margin-top:.4rem}
@media(max-width:720px){
#chNav{position:static;max-height:none;overflow:visible}
#churchPanel.detailopen .sectionhead,#churchPanel.detailopen #newListOnlyLabel{display:none}
.plhead .plcopy{order:2}
.plhead .plplay{order:1}
}
/* ---- Package 2 follow-up: church list search, and the phone tab grid (2 columns for 4 or 2 tabs, one row for 3; set by data-n) ---- */
#chNav .chsearch{position:sticky;top:0;z-index:2;background:var(--bg);margin:0 0 .5rem;padding:.1rem 0 .3rem}
@media(max-width:620px){
.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 .15rem;flex-wrap:nowrap}
.tabs[data-n="4"],.tabs[data-n="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.tabs .tab{display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.2;padding:.5rem .25rem;min-height:44px;flex:none}
}
/* ---- Church Playlists search enhancement: sticky list search, sticky recording search (inside the sticky header), and the "Contains" line ---- */
.plnav-item .chwhy{display:block;margin-top:.15rem;font-size:.82rem;opacity:.8;overflow-wrap:anywhere}
.plhead.chhead{flex-wrap:wrap}
.plhead .plsearch{flex:1 1 100%;order:5;margin:.1rem 0 0}
@media(max-width:720px){
#chNav .chsearch{top:var(--navH,0px);z-index:5;padding:.4rem 0 .35rem;margin:0 0 .3rem}
#chListSearch,#chSearch{min-height:44px}
}
@media(min-width:721px){.plhead.chhead .pltitle{flex:1 1 0;min-width:8rem}}
/* ---- Adaptive mobile recording cards: app.js adds .song-stacked to a card when stacking the buttons under the text makes it shorter ---- */
@media(max-width:720px){
#songList .song.song-stacked,#chRows .song.song-stacked{flex-wrap:wrap;align-items:flex-start}
.song.song-stacked .song-info{flex:1 1 0;min-width:0}
.song.song-stacked .song-actions{flex:1 1 100%;justify-content:flex-end}
}
/* ---- Package 2 final corrections: Church recording cards use the full width and Song Library spacing on phones; Copy moves into the ellipsis menu on phones; the jump highlight ---- */
.chmenuwrap{display:none}
.song.chhit{outline:3px solid var(--accent);outline-offset:-3px;background:var(--surface2)}
@media(max-width:720px){
/* the outer card reaches 12px into the page's side margin and keeps its border; its padding gives back exactly that 12px (less the 1px border), so the search, title, count, controls and song cards
   keep the width and position they had (they never move or shrink) and now sit ~12px inside the card edge instead of on it */
#churchDetail{margin-left:-.75rem;margin-right:-.75rem;padding-left:calc(.75rem - 1px);padding-right:calc(.75rem - 1px)}
#chRows .song{margin:0}
.chmenuwrap{display:block}
#chCopy{display:none}
}
#chMenu{min-width:14rem}
/* ---- Package 3: sticky search/sort groups (Song Library, Christmas songs). The offset is the measured main-navigation height, so it follows one or two tab rows ---- */
.stickytools{position:sticky;top:var(--navH,0px);z-index:6;background:var(--bg);padding:.4rem 0 .1rem}
.stickytools .sort-row{margin:.5rem 0 .5rem}
.stickytools .xsearch{margin:0}
/* ---- Package 3: Shuffle beside Play (icon only on phones, icon + word on desktop) ---- */
.plshuffle{display:inline-flex;align-items:center;gap:.4rem;min-height:44px}
.plshuffle svg{flex:none}
.plshuffle:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
@media(max-width:720px){.plshuffle{order:1;min-width:44px;justify-content:center;padding:.5rem .7rem}.plshuffle .shlabel{display:none}}
.plshuffle.enabled{color:var(--accent);background:var(--surface2);border-color:var(--accent)}   /* the player's own active look, plus a visible border */
/* ---- Playback ownership: the bottom player is hidden until something is explicitly played; the bottom clearance and the toast follow its visibility ---- */
body:not(.player-on){padding-bottom:1.5rem}
body:not(.player-on) .toast{bottom:1rem}
/* ---- Phase 5 / Package 4: My Playlists - sticky sidebar, title-first sticky header, sticky expanded search ---- */
/* Sidebar (desktop): sticky under the main tabs, scrolls on its own, clear of the player when it is shown. scrollbar-gutter reserves the scrollbar's width, and the column is that much
   wider (16px), so the playlist cards keep their width and the open playlist moves about 16px to the right. */
#plWrap{grid-template-columns:minmax(226px,306px) minmax(0,1fr)}
#plNav{position:sticky;top:calc(var(--navH,0px) + .5rem);align-self:start;max-height:calc(100vh - var(--navH,0px) - var(--playerH,0px) - 1.5rem);overflow-y:auto;scrollbar-gutter:stable}
/* Header: the title first, on its own row; the controls (Back, Play, Shuffle, the actions menu) on the row below */
#playlistDetail .plhead{flex-wrap:wrap;margin:0;padding:.5rem 0 .4rem}
.plsentinel{height:0;margin:0;padding:0;pointer-events:none}
/* Row 1: the title with the count straight after it (the count wraps below a long title rather than shortening it) */
#playlistDetail .plid{order:-1;flex:1 1 100%;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .7rem}
#playlistDetail .pltitle{flex:0 1 auto;order:0;min-width:0}
#playlistDetail .plcount{flex:0 1 auto;font-size:.92rem}
/* Row 2: Play and Shuffle on the left; Add Songs (desktop) and the menu on the right - all of it stays in the sticky header. */
#playlistDetail .plhead .pladd{margin-left:auto;min-height:44px;font-weight:700}
#playlistDetail .plmenuwrap{margin-left:0}
/* a narrow desktop window: Shuffle is just its icon so that row 2 (Play, Shuffle, Add Songs, the menu) keeps to one row */
@media(min-width:721px) and (max-width:900px){#playlistDetail .plshuffle .shlabel{display:none}}
/* the optional "Show hidden" row (only for playlists with hidden Christmas entries) and, on a phone, the large Add Songs button */
#playlistDetail .pl-summary{margin:.3rem 0 .2rem}
#playlistDetail .pl-summary .pladd{min-height:48px;font-weight:700}
/* The expanded search stays under the sticky header (its offset is the measured header height) */
#playlistDetail .mysearch{position:sticky;top:calc(var(--navH,0px) + var(--plHeadH,0px));z-index:7;background:var(--surface);margin:0;padding:.45rem 0}
#playlistDetail .mysearch input{min-height:44px}
/* A sticky sidebar can only travel inside its grid row. The row ends where the open playlist ends, which at the very bottom of the page is above the clearance for the player, so the
   sidebar would be pushed up under the tabs - and its last cards would end up under the player. So the page's bottom clearance follows the measured player height, the pane extends down by the
   clearance the sidebar needs, and the wrapper cancels the page's own bottom padding (so the page is no longer, and the last recording and the last playlist both end just above the player). */
body.player-on{padding-bottom:calc(var(--playerH,0px) + 4rem)}
@media(min-width:721px){#plPane{padding-bottom:calc(var(--playerH,0px) + 1rem)}#plNav{margin-bottom:calc(var(--playerH,0px) + 1rem)}#plWrap{margin-bottom:calc(-1 * (var(--playerH,0px) + 4rem + 1.4rem))}body:not(.player-on) #plWrap{margin-bottom:-2.9rem}}
@media(max-width:720px){
#plNav{position:static;max-height:none;overflow:visible;scrollbar-gutter:auto}
#playlistDetail .pltitle{font-size:1.15rem}
#playlistDetail .plmenuwrap{margin-left:0}
#playlistDetail .pl-summary .pladd{flex:1 1 100%}
#playlistDetail .plhead.is-stuck .plcount{display:none}
}
/* ---- Phase 5 / Package 5: sorting and custom ordering of the playlists themselves ---- */
.plsortrow{display:flex;align-items:center;gap:.5rem;margin:0 0 .5rem;padding:.1rem 0 .35rem;position:sticky;top:0;z-index:3;background:var(--bg)}
.plsortrow label{color:var(--muted);font-weight:600;font-size:.9rem}
.plsortrow select{flex:1;min-width:0;min-height:40px;border:1px solid var(--line);border-radius:9px;padding:.4rem 1.6rem .4rem .6rem;background:var(--surface);color:var(--ink);cursor:pointer}
.plrow{display:flex;align-items:stretch;gap:.4rem;margin:0 0 .5rem}
.plrow .plnav-item{flex:1 1 auto;min-width:0;margin:0}
.plhandle{flex:none;min-width:36px;padding:0 .2rem;background:var(--surface);border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:1.2rem;line-height:1;cursor:grab;touch-action:none}
.plhandle:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.plrow.dragging{opacity:.6}
.plrow.drop-target .plnav-item{outline:3px solid #1d6fe0;outline-offset:-2px}
@media(max-width:720px){.plsortrow{position:static;background:none}}

/* ---- What's New (Package 6C) ----
   The welcome actions live in their own container, independent of the background (a gradient today; a photograph later), and stay left-aligned.
   Button surfaces are opaque theme colours so they read on any background; the custom properties let a later appearance setting restyle them without touching the layout. */
.welcome-actions{justify-content:flex-start}
.whatsnew-btn{color:var(--wnInk)}
/* Unread dot on the What's New button (a red circle with a white 1 overlapping the upper-right corner, like an app-icon badge). Fixed colours so it reads in light and dark themes. */
.whatsnew-btn.has-unseen{position:relative;overflow:visible}
.wn-dot{position:absolute;top:-9px;right:-9px;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:#d3202f;color:#fff;border:2px solid var(--surface,#fff);font-size:.78rem;font-weight:800;line-height:18px;text-align:center;pointer-events:none;box-sizing:border-box}
body.dark .wn-dot{background:#ff4d5a;color:#fff;border-color:var(--surface,#253541)}
@media(max-width:620px){
.welcome-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.welcome-actions button{min-height:44px;white-space:normal;line-height:1.25}
.welcome-actions .whatsnew-btn{grid-column:1/-1}
}
.whatsnew .sectionhead{margin-bottom:.4rem}
.wnback{margin:0 0 .8rem}
.wncat{margin:1.4rem 0}
.wncat h3{margin:0 0 .6rem}
.wnlist{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}
.wnitem{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;width:100%;text-align:left;min-height:48px;padding:.85rem 1rem;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink)}
.wnitem:hover{border-color:var(--accent)}
.wntitle{font-weight:700}
.wnmsg{color:var(--muted);font-weight:400}

/* ---- Package 6C final corrections ---- */
/* Approved status colours. New and Updated share every metric; only the colours differ. */
:root{--newInk:#176B3A;--newBg:#E6F4EA;--updInk:#245D91;--updBg:#E4EFFB;--wnInk:#18794E}
body.dark{--newInk:#A4EBBC;--newBg:#244B36;--updInk:#A9D5FF;--updBg:#203D56;--wnInk:#86E0A4}
.statuslabel{display:inline-block;flex:none;margin:0;padding:.05rem .55rem;border-radius:999px;font-size:.72rem;font-weight:800;letter-spacing:.05em;line-height:1.5;white-space:nowrap}
.statuslabel.st-new{color:var(--newInk);background:var(--newBg)}
.statuslabel.st-updated{color:var(--updInk);background:var(--updBg)}
/* A title with its badge right after it; the badge wraps below the title (not away from it) when there is no room. */
.titleline{display:flex;flex-wrap:wrap;align-items:center;gap:.15rem .5rem;min-width:0}
.song-info .titleline{display:flex}
.titleline strong,.titleline h2,.titleline h3{min-width:0}
.xprogram .titleline{display:flex}
.plhead .pltitlewrap{flex:1 1 auto;min-width:0}
.pltitlewrap .pltitle{flex:0 1 auto}
@media(max-width:720px){.plhead .pltitlewrap{flex:1 1 100%;order:3}}
@media(min-width:721px){.plhead.chhead .pltitlewrap{flex:1 1 0;min-width:8rem}}
/* Status filters: a separate row from sorting, same on desktop and phone */
.status-row{margin:.2rem 0 .6rem}
.status-row select{max-width:100%;min-height:44px;border:1px solid var(--line);border-radius:9px;padding:.55rem 2rem .55rem .8rem;background:var(--surface);color:var(--ink);cursor:pointer}
.status-row option:disabled{color:var(--muted)}
@media(max-width:620px){.status-row select{width:100%}}
/* "Back to What's New" on an announcement's target: a plain text control, not a competing button */
.wnctx{margin:.2rem 0 .3rem}
.linkbtn{background:none;border:0;padding:.5rem .25rem;min-height:44px;color:var(--accent);font-weight:600;text-decoration:underline;cursor:pointer}

/* ---- Package 6C: final acceptance corrections ---- */
/* No decorative target effect. A heading, row or title that only receives focus from a script (tabindex="-1", so a screen reader is told where we landed) shows no focus
   ring; every real control (buttons, links, fields, selects) keeps its focus indicator. */
[tabindex="-1"]:focus{outline:none}
/* Song Library: sort and status filter on one row (desktop); stacked, status full width, on a phone (unchanged) */
.sortfilter{display:block}
@media(min-width:621px){
.sortfilter{display:flex;flex-wrap:wrap;align-items:center;column-gap:1rem}
.sortfilter .sort-row,.sortfilter .status-row{margin:1rem 0 1.25rem}
}
/* Church Playlists: the status dropdown sits under the directory search, inside the directory column */
#chNav .status-row{margin:.1rem 0 .6rem}
#chNav .status-row select{width:100%}
/* A Church Playlist heading: the title first, its badge immediately after the complete title (never before it, never pushed to the action buttons) */
.plhead.chhead .pltitlewrap .pltitle,.plhead .pltitlewrap .pltitle{flex:0 1 auto;min-width:0;order:0}
.plhead .pltitlewrap{justify-content:flex-start}

/* ===== Package 6C: final mobile navigation and scrolling =====================================================================================================
   Individual Christmas Program (all widths): breadcrumb, full title, actions, a search of THIS program's recordings. The global Christmas search row is not part of that view. */
.xcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:.2rem .3rem;min-height:44px;margin:0 0 .4rem;padding:0;font-size:.95rem}
.xcrumblink{min-height:44px;padding:0 .25rem;margin:0;background:none;border:0;color:var(--accent);text-decoration:underline;font-weight:700;font-size:inherit;cursor:pointer}
.xsep{color:var(--muted);font-weight:700}
.xcur{font-weight:700;overflow-wrap:anywhere}
.xpsearch{margin:.2rem 0 .8rem}
#xProgSearch{width:100%;min-height:44px;border:1px solid var(--line);border-radius:11px;padding:.5rem .85rem;background:var(--surface);color:var(--ink);font-size:1rem}
body.xdetail #xTools{display:none}
.cmp{display:none}
@media(max-width:720px){
 /* browsing views: the normal search / status controls scroll away (the compact bar replaces them); collection details: the main tabs scroll away too */
 #libTools,#xTools{position:static}
 #chNav .chsearch{position:static}
 #churchDetail .plhead,#playlistDetail .plhead,#playlistDetail .mysearch{position:static}
 body.cdetail #mainTabs{position:static}
 html.cdetail{--navH:0px!important}
 /* a playlist's title comes first, above Back / Play / Shuffle / the menu */
 .plhead .pltitlewrap{flex:1 1 100%;order:-1}
 .cmp{display:block;position:fixed;left:0;right:0;z-index:25;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);padding:.3rem max(1rem,env(safe-area-inset-right)) .35rem max(1rem,env(safe-area-inset-left));visibility:hidden}
 .cmp.on{visibility:visible}
 .cmp.cmp-d{padding-top:calc(.3rem + env(safe-area-inset-top,0px))}
 .cmp-title{display:flex;align-items:center;gap:.5rem;min-width:0;margin:.1rem 0 .25rem}
 .cmp-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800;font-size:1.05rem}
 .cmp-title .statuslabel{flex:none}
 .cmp-row{display:flex;align-items:center;gap:.5rem}
 .cmp.cmp-d .cmp-row{justify-content:space-between}
 .cmp.cmp-b .cmp-row{justify-content:flex-start}
 .cmp-back{min-height:44px;flex:0 1 auto;max-width:calc(100% - 56px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .cmp-status{flex:0 1 auto;min-width:0;width:min(13rem,calc(100% - 56px));min-height:44px;border:1px solid var(--line);border-radius:9px;padding:.4rem 1.6rem .4rem .7rem;background:var(--surface);color:var(--ink);font-size:.95rem;cursor:pointer}
 .cmp-search{position:relative;flex:none;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0}
 .cmp-search.has-query::after{content:"";position:absolute;top:7px;right:7px;width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--surface)}
 .cmp-field{margin:.35rem 0 0}
 .cmp-field input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:11px;padding:.5rem .85rem;background:var(--surface);color:var(--ink);font-size:1rem}
 .cmp button:focus-visible,.cmp input:focus-visible,.cmp select:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
}

/* ===== Package 6C final: search presentation, the status ("See What's New") menu, Christmas Songs / Programs order ================================================================
   Order inside the Christmas panel (every width): section buttons, heading (+count, Play all), search / sort tools, the list. */
.srow{display:none}
.sicon{position:relative;flex:none;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);cursor:pointer}
.sicon:focus-visible,.sm-btn:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.sm-btn{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;max-width:100%;padding:.4rem .8rem;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;font-size:.95rem;cursor:pointer;text-align:left}
.sm-btn[hidden]{display:none}
.sm-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sm-mark{flex:none;width:9px;height:9px;border-radius:50%;background:var(--accent)}
.sm-caret{flex:none}
.sm-menu{position:fixed;z-index:70;margin:0;padding:.3rem;list-style:none;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);overflow:auto}
.sm-menu[hidden]{display:none}
.sm-menu li{display:flex;align-items:center;gap:.5rem;min-height:44px;padding:.5rem .8rem;border-radius:8px;cursor:pointer;line-height:1.25}
.sm-menu li::before{content:"";flex:none;width:1.1em}
.sm-menu li[aria-selected=true]{font-weight:700;background:var(--surface2)}
.sm-menu li[aria-selected=true]::before{content:"✓"}
.sm-menu li[aria-disabled=true]{color:var(--muted);opacity:.6;cursor:default}
.sm-menu li:focus-visible{outline:3px solid #1d4ed8;outline-offset:-3px}
.status-row{display:flex;align-items:center;flex-wrap:wrap;gap:.2rem .5rem}
.status-label{font-weight:600;color:var(--muted);font-size:.9rem}
#chNav .status-label{flex:1 1 100%}
@media(max-width:720px){
 .srow{display:flex;align-items:center;gap:.5rem;margin:.2rem 0 .5rem}
 .srow .sm-btn{flex:1 1 auto;max-width:calc(100% - 56px);min-width:0}
 .sfield{display:none}
 html.cmp-open-in .sfield{display:block}
 html.cmp-bar-on .sfield,html.cmp-bar-on .srow{visibility:hidden}
 #songStatusRow,#churchStatusRow{display:none!important}
 #libTools{display:flex;flex-direction:column}
 #libRow{order:1}#libTools .sfield{order:2}#libTools .sortfilter{order:3}
 .plwrap:not(.showdetail) #chNav{display:flex;flex-direction:column}
 #chRow{order:1}#chNav .chsearch{order:2}#churchList{order:3}
 #xTools{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
 #xTools .xsearch{order:3;flex:1 1 100%}
 #xSortRow{order:1;flex:1 1 auto;margin:0}
 #xRow{order:2;margin:0}
 .plhead .srow{flex:1 1 100%;order:4;margin:.1rem 0 0}
 .cmp .sm-btn{flex:1 1 auto;max-width:calc(100% - 56px);min-width:0}
 .cmp-sect{margin:.1rem 0 .15rem;font-weight:800;font-size:1.05rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #cmpStatusBtn{margin:0}
}
#plListField{margin:.2rem 0 .6rem}
#plListField input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:11px;padding:.5rem .85rem;background:var(--surface);color:var(--ink);font-size:1rem}
.status-row .sm-desk{display:none}
@media(min-width:721px){.status-row .sm-desk{display:inline-flex}.status-row .sm-desk[hidden]{display:none}#chNav .status-row .sm-desk{width:100%}}
@media(min-width:721px){.status-row .sm-desk{min-width:15rem;justify-content:space-between}}
/* ===== Desktop only: compact sticky headings in the Christmas views (the phone uses the compact bar instead). Independent of the window HEIGHT: the heading is fixed under the main tabs. ===== */
.xstick{display:none}
.xcrumb .xcb{display:none}
@media(min-width:721px){
 html{--xsH:2.5rem}
 .xstick{display:flex;align-items:center;position:fixed;z-index:7;top:var(--navH,0px);left:var(--xsL,0);width:var(--xsW,100%);box-sizing:border-box;height:var(--xsH);padding:0 .1rem;background:var(--bg);border-bottom:1px solid var(--line);font-weight:800;font-size:1.15rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;visibility:hidden;transition:opacity .12s ease}
 html.xs-on .xstick{opacity:1;visibility:visible}
 body.xdetail .xcrumb{position:sticky;top:var(--navH,0px);z-index:6;background:var(--bg);margin:0 0 .4rem;border-bottom:1px solid transparent}
 body.xdetail .xcrumb.xs-stuck{border-bottom-color:var(--line)}
 body.xdetail .xcrumb.xs-stuck .xcb{display:inline-flex;margin-left:.4rem}
}
@media(min-width:721px){
 #xTools{transition:top .12s ease}
 html.xs-on #xTools{top:calc(var(--navH,0px) + var(--xsH))}
}
/* ===== Package 6D: compact sticky headings for What's New (all widths) and the Song Library (desktop). Fixed under the main tabs, independent of the window height. ===== */
html{--xsH:2.5rem}
.hstick{position:fixed;z-index:7;top:var(--navH,0px);display:flex;align-items:center;box-sizing:border-box;height:var(--xsH);padding:0 .1rem;background:var(--bg);border-bottom:1px solid var(--line);font-weight:800;font-size:1.15rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;visibility:hidden;transition:opacity .12s ease}
html.wn-on #wnStick,html.ls-on #libStick{opacity:1;visibility:visible}
@media(max-width:720px){html{--xsH:2.2rem}.hstick{font-size:1rem}}
@media(min-width:721px){html.ls-on #libTools{top:calc(var(--navH,0px) + var(--xsH));transition:top .12s ease}}

/* ---- Website appearance & customization (Package 1) ----
   Without a site-appearance.json the website is exactly as before: the groups below are display:contents wrappers and the background layer stays hidden.
   Colour roles that a later Light/Dark theme package will turn into tokens: page/surface/ink/muted/accent/line (the :root and body.dark variables above), the hero text on a photograph or
   dark gradient (--hero-ink, --hero-accent below) and the opaque button surfaces. Package 1 does not restyle any of them. */
.ap-wait .welcome,.ap-wait .brand>div{visibility:hidden}
.hg{display:contents}
.church-link{margin:.9rem 0 0}
.church-link a{display:inline-flex;align-items:center;min-height:44px;color:var(--cll,#0b57d0);font-weight:650;text-decoration:underline;text-underline-offset:3px}
/* Ordered content sections: the photograph, the Scripture and the welcome message flow one after another at their natural height (no overlap, no clipping),
   then the action buttons. Computers and phones each carry their own section order (appearance.js puts the sections in that order). */
.welcome.flow{display:flex;flex-direction:column;gap:1.5rem;padding:0;background:none;border:0;box-shadow:none;border-radius:0}
.welcome.flow .hg{display:block;margin:0;min-width:0}
.welcome.flow .hg-visual{align-self:center;width:100%}
.welcome.flow .eyebrow{display:none}
.welcome.flow .hg-scripture{font-size:calc(var(--d-ss,1.5) * 1em);text-align:var(--d-sa,left)}
.welcome.flow h1.verse{margin:0;font-size:1em;color:var(--d-sc,var(--ink))}
.welcome.flow .verse-ref{font-size:.67em}
.welcome.flow .hg-scripture{width:var(--d-sw,100%);margin-left:var(--d-sml,0);margin-right:var(--d-smr,auto)}
.welcome.flow .hg-welcome{width:var(--d-ww,100%);margin-left:var(--d-wml,0);margin-right:var(--d-wmr,auto);text-align:var(--d-wa,left)}
.welcome.flow .hg-welcome{font-size:calc(var(--d-ws,1) * 1em)}
.welcome.flow .hg-welcome p{margin:0;font-size:1em;color:var(--d-wc,var(--muted))}
.welcome.flow .verse-ref{color:var(--d-sc,var(--accent))}
.welcome.flow .hg-actions{margin-top:.25rem}
.welcome.flow .hg-visual+.hg-welcome,.welcome.flow .hg-visual+.hg-scripture{margin-top:.25rem}
.vis{position:relative;overflow:hidden;border-radius:18px;background:#101820;box-shadow:var(--shadow);margin:0 auto;width:100%}
.vis.band{aspect-ratio:calc(100 / var(--d-bh,16));background:none}
.vis.full img{display:block;width:100%;height:auto}
.vis.crop{aspect-ratio:calc(100 / var(--d-ph,42))}
.vis.crop img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:var(--d-ox,50%) var(--d-oy,50%);transform:scale(var(--d-z,1));transform-origin:var(--d-ox,50%) var(--d-oy,50%)}
@media(max-width:720px){
.welcome.flow .hg-scripture{font-size:calc(var(--m-ss,1.15) * 1em);text-align:var(--m-sa,left)}
.welcome.flow h1.verse{color:var(--m-sc,var(--ink))}
.welcome.flow .hg-scripture{width:var(--m-sw,100%);margin-left:var(--m-sml,0);margin-right:var(--m-smr,auto)}
.welcome.flow .hg-welcome{width:var(--m-ww,100%);margin-left:var(--m-wml,0);margin-right:var(--m-wmr,auto);text-align:var(--m-wa,left)}
.welcome.flow .hg-welcome{font-size:calc(var(--m-ws,.95) * 1em)}
.welcome.flow .hg-welcome p{color:var(--m-wc,var(--muted))}
.welcome.flow .verse-ref{color:var(--m-sc,var(--accent))}
.vis.band{aspect-ratio:calc(100 / var(--m-bh,28))}
.vis.crop{aspect-ratio:calc(100 / var(--m-ph,100))}
.vis.crop img{object-position:var(--m-ox,50%) var(--m-oy,50%);transform:scale(var(--m-z,1));transform-origin:var(--m-ox,50%) var(--m-oy,50%)}
.welcome.flow .welcome-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.welcome.flow .welcome-actions button{min-height:44px;white-space:normal;line-height:1.25}
.welcome.flow .welcome-actions .whatsnew-btn{grid-column:1/-1}
}

/* Self-hosted fonts for the Scripture and welcome message (SIL Open Font License 1.1; see fonts/FONT-LICENSES.txt). Only the faces a page actually uses are downloaded. */
@font-face{font-family:'Merriweather';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/merriweather.woff2) format('woff2')}
@font-face{font-family:'Merriweather';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/merriweather-700.woff2) format('woff2')}
@font-face{font-family:'Merriweather';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/merriweather-italic.woff2) format('woff2')}
@font-face{font-family:'Merriweather';font-style:italic;font-weight:700;font-display:swap;src:url(fonts/merriweather-italic-700.woff2) format('woff2')}
@font-face{font-family:'Libre Baskerville';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/librebaskerville.woff2) format('woff2')}
@font-face{font-family:'Libre Baskerville';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/librebaskerville-700.woff2) format('woff2')}
@font-face{font-family:'Libre Baskerville';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/librebaskerville-italic.woff2) format('woff2')}
@font-face{font-family:'Libre Baskerville';font-style:italic;font-weight:700;font-display:swap;src:url(fonts/librebaskerville-italic-700.woff2) format('woff2')}
@font-face{font-family:'Jost';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/jost.woff2) format('woff2')}
@font-face{font-family:'Jost';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/jost-700.woff2) format('woff2')}
@font-face{font-family:'Jost';font-style:italic;font-weight:400;font-display:swap;src:url(fonts/jost-italic.woff2) format('woff2')}
@font-face{font-family:'Jost';font-style:italic;font-weight:700;font-display:swap;src:url(fonts/jost-italic-700.woff2) format('woff2')}
@font-face{font-family:'Dancing Script';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/dancingscript.woff2) format('woff2')}
@font-face{font-family:'Dancing Script';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/dancingscript-700.woff2) format('woff2')}
@font-face{font-family:'Caveat';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/caveat.woff2) format('woff2')}
@font-face{font-family:'Caveat';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/caveat-700.woff2) format('woff2')}
@font-face{font-family:'Allura';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/allura.woff2) format('woff2')}
@font-face{font-family:'Parisienne';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/parisienne.woff2) format('woff2')}
@font-face{font-family:'Sacramento';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/sacramento.woff2) format('woff2')}
@font-face{font-family:'Great Vibes';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/greatvibes.woff2) format('woff2')}
.welcome.flow .hg-scripture{font-family:var(--sff,inherit);font-style:var(--sfi,normal)}
.welcome.flow h1.verse{font-weight:var(--sfb,600)}
.welcome.flow .hg-welcome{font-family:var(--wff,inherit);font-style:var(--wfi,normal);font-weight:var(--wfb,400)}

/* ---- Package 2: homepage action-button colors (only when the pastor chose them), section backgrounds, photo effects ---- */
/* precedence: website-wide button colors (--bab/--bat, set per mode by the theme) > homepage colors (--h?b?/--h?t? with l = Light, d = Dark) > the theme's own */
.welcome-actions #playAll{background:var(--bab,var(--hpbl,var(--btn1bg,var(--accent))));color:var(--bat,var(--hptl,var(--accentText)))}
body.dark .welcome-actions #playAll{background:var(--bab,var(--hpbd,var(--btn1bg,var(--accent))));color:var(--bat,var(--hptd,var(--accentText)))}
.welcome-actions #shuffleAll{background:var(--bab,var(--hsbl,var(--btn2bg,var(--surface))));color:var(--bat,var(--hstl,var(--btn2text,var(--ink))))}
body.dark .welcome-actions #shuffleAll{background:var(--bab,var(--hsbd,var(--btn2bg,var(--surface))));color:var(--bat,var(--hstd,var(--btn2text,var(--ink))))}
.welcome-actions #whatsNewBtn{background:var(--bab,var(--hwbl,var(--btn2bg,var(--surface))));color:var(--bat,var(--hwtl,var(--wnInk)))}
body.dark .welcome-actions #whatsNewBtn{background:var(--bab,var(--hwbd,var(--btn2bg,var(--surface))));color:var(--bat,var(--hwtd,var(--wnInk)))}
.welcome.flow .hg-scripture.bgset{background:var(--sbl,none);padding:1rem 1.25rem;border-radius:14px}
body.dark .welcome.flow .hg-scripture.bgset{background:var(--sbd,none)}
.welcome.flow .hg-welcome.bgset{background:var(--wbl,none);padding:.9rem 1.25rem;border-radius:14px}
body.dark .welcome.flow .hg-welcome.bgset{background:var(--wbd,none)}
/* secondary buttons follow the page's own card/text colors unless a theme sets them; both modes define them so a Light theme can never leak into Dark mode */
:root{--btn1bg:var(--accent);--navInd:var(--accent);--btn2bg:var(--surface);--btn2text:var(--ink)}
body.dark{--btn1bg:var(--accent);--navInd:var(--accent);--btn2bg:var(--surface);--btn2text:var(--ink)}
/* the church website link: a conventional underlined hyperlink in its own color for each mode, independent of the navigation indicator and of the buttons */
body.dark .church-link a{color:var(--cld,#8ab4f8)}
.church-link a:hover{text-decoration-thickness:3px}
.church-link a:focus-visible{outline:3px solid #df9f48;outline-offset:3px;border-radius:3px}

/* ---- visitor notifications (optional; nothing here shows unless the website publishes a notification service) ---- */
.ntfbox{border:1px solid var(--line,#d8d2c4);border-radius:12px;padding:.8rem 1rem;margin:.8rem 0;background:var(--surface,#fff)}
.ntfbox[hidden]{display:none}
.ntfbox .ntf-h{display:block;margin-bottom:.3rem}
.ntfbox .ntf-text{margin:.3rem 0}
.ntfbox .ntf-small{display:block;margin:.3rem 0 .6rem;color:var(--muted,#555);line-height:1.5}
.ntfbox .ntf-error{margin:.5rem 0 0;color:#b42318;font-weight:600}
.ntfbox button{min-height:44px}
dialog.ntfdialog{max-width:min(30rem,calc(100vw - 2rem));border:1px solid var(--line,#d8d2c4);border-radius:14px;padding:1.1rem 1.3rem;background:var(--surface,#fff);color:var(--ink,#1c1b19)}
dialog.invdialog{max-width:min(48rem,calc(100vw - 1.5rem));width:100%;max-height:calc(100vh - 1.5rem);overflow:auto}
.setsections:empty{display:none}
.setsections .ntfbox .primary,.ntfbox a.button-link{display:flex;width:fit-content;max-width:100%;margin-left:auto;margin-right:auto;text-align:center;align-items:center;justify-content:center;min-height:44px;padding:.45rem 1rem;border-radius:10px;text-decoration:none}
.invsteps{margin:.4rem 0 .8rem 1.2rem;padding:0;line-height:1.55}.invsteps li{margin:.25rem 0}
dialog.ntfdialog::backdrop{background:rgba(0,0,0,.45)}
dialog.ntfdialog h2{margin:.1rem 0 .5rem;font-size:1.25rem}
.ntfdialog .ntfbtns{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.8rem}
/* UI-02: the install offer's two buttons are stacked, centred and equal in width (the notification dialogs keep their own row) */
#invOffer .ntfbtns{flex-direction:column;flex-wrap:nowrap;align-items:center;gap:.6rem}
#invOffer .ntfbtns button{width:min(100%,20rem);text-align:center}
.ntfdialog button{min-height:44px}
/* the notification action button is centred in its panel (turn on / turn off); the dialog's own Close button is unchanged */
.ntfbox button{display:block;margin:.7rem auto 0}

/* visitor Settings and its invitation dialog: action buttons and Close are centred (desktop and phone); the invitation's sharing buttons wrap into centred rows */
#ntfSettings>button,#invDlg>button{display:flex;align-items:center;justify-content:center;min-width:8rem;margin:.9rem auto 0}
#invDlg .inv .invacts{justify-content:center}
#invDlg .inv .invacts button{flex:0 1 auto}
@media (max-width:480px){#invDlg .inv textarea{min-height:9rem}}

/* Christmas Music: the status selects (visually hidden) stay inside their own rows, so they can never widen the page on a phone */
#xSongStatusRow,#xProgStatusRow{position:relative}

/* ===== Button standards (23 Nov 2026): selected pill, hover, disabled. Works with the church's own colours (everything is a tint or a darkening of whatever the button already is). ===== */
/* selected pill (Christmas Songs / Christmas Programs): pale tint of the accent colour, a 2px accent outline and dark bold text - never the solid primary look */
.subtab.active{background:var(--surface2);background:color-mix(in srgb,var(--accent) 14%,var(--surface));border:2px solid var(--accent);color:var(--ink);font-weight:800}
/* disabled: muted, no pointer, never reacts to hover */
button:disabled,.iconbutton:disabled,.outline:disabled,.primary:disabled{opacity:.4;cursor:not-allowed;box-shadow:none;filter:none}
/* hover: only where a real pointer exists (never sticks on a phone), never on a disabled or already-selected button */
@media (hover:hover) and (pointer:fine){
  button.primary:not(:disabled):not(.active):not(.enabled):hover,.danger-btn:not(:disabled):hover{filter:brightness(.88)}
  button.outline:not(:disabled):not(.enabled):not([aria-pressed=true]):hover,.iconbutton:not(:disabled):hover,.subtab:not(.active):not(:disabled):hover,.sicon:not(:disabled):hover{box-shadow:inset 0 0 0 100px color-mix(in srgb,var(--accent) 9%,transparent);border-color:#9fb3c3}
  .tab:not(.active):not(:disabled):hover{color:var(--ink);background:var(--surface2)}
  .plnav-item:not([aria-current=true]):hover{background:var(--surface2);border-color:#9fb3c3}
  .song-actions button.outline:not(:disabled):not(.enabled):hover{border-color:#9fb3c3}
  /* primary hover from the button's own colour: a light or middle colour goes one step darker, a very dark one one step lighter (so a near-black button still visibly reacts) */
  @supports (background:lab(from red calc(l - 1) a b)){
    button.primary:not(:disabled):not(.active):not(.enabled):hover{filter:none;background:lab(from var(--bab,var(--btn1bg,var(--accent))) calc(l - 11*clamp(-1,(l - 22)/2,1)) a b)}
    .welcome-actions #playAll:not(:disabled):hover{filter:none;background:lab(from var(--bab,var(--hpbl,var(--btn1bg,var(--accent)))) calc(l - 11*clamp(-1,(l - 22)/2,1)) a b)}
    body.dark .welcome-actions #playAll:not(:disabled):hover{filter:none;background:lab(from var(--bab,var(--hpbd,var(--btn1bg,var(--accent)))) calc(l - 11*clamp(-1,(l - 22)/2,1)) a b)}
  }
}

/* Help (?) button and panel (the church switches it on in the Music Manager) */
#helpBtn{min-width:44px;min-height:44px;font-weight:800;font-size:1.1rem;padding:.4rem .7rem}
.helplist{margin:.6rem 0}
.helptopic{border:1px solid var(--line);border-radius:12px;background:var(--surface);margin:.5rem 0;padding:0}
.helptopic>summary{cursor:pointer;font-weight:700;padding:.8rem 1rem;min-height:44px;list-style-position:inside}
.helptopic[open]>summary{border-bottom:1px solid var(--line)}
.helpbody{padding:.5rem 1rem 1rem}
.helpbody p{margin:.5rem 0;overflow-wrap:anywhere}
.helplinks{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.7rem}
.hlink{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.5rem 1rem;border:1px solid var(--line);border-radius:11px;font-weight:650;text-decoration:none;background:var(--surface);color:var(--ink)}
@media (hover:hover) and (pointer:fine){.hlink:hover{box-shadow:inset 0 0 0 100px color-mix(in srgb,var(--accent) 9%,transparent);border-color:#9fb3c3}}
.hlink:focus-visible,.helptopic>summary:focus-visible{outline:3px solid #df9f48;outline-offset:3px}

/* Visitor accounts (optional): the small link under the header and its panel */
.acctbar{display:flex;justify-content:flex-end;margin:.2rem 0 .3rem}
.acctlink{background:none;border:0;padding:.55rem .3rem;min-height:44px;color:var(--accent);font:inherit;font-weight:650;text-decoration:underline;cursor:pointer;border-radius:8px;overflow-wrap:anywhere;text-align:right}
.acctlink.inline{min-height:44px;padding:.5rem .2rem;text-align:left}
.acctlink:focus-visible{outline:3px solid #df9f48;outline-offset:3px}
@media (hover:hover) and (pointer:fine){.acctlink:hover{text-decoration-thickness:3px}}
dialog.acctdialog{max-width:min(30rem,calc(100vw - 2rem))}
.acctfield{margin:.7rem 0}.acctfield label{display:block;font-weight:700;margin-bottom:.25rem}.acctfield input{width:100%;box-sizing:border-box;font-size:1rem;min-height:44px}
.acctshow{display:flex;align-items:center;gap:.4rem;margin:.4rem 0;min-height:44px}.acctshow input{width:1.2rem;height:1.2rem}
.accttabs{display:flex;gap:.5rem;margin:.2rem 0 .6rem;flex-wrap:wrap}.accttabs button.active{border:2px solid var(--accent);background:var(--surface2);font-weight:800}
.acctsmall{font-size:.92rem;margin:.5rem 0}.acctwarn{color:#9b1c1c;font-weight:650}.acctgood{border-color:#1e7b34}
.acctwho{overflow-wrap:anywhere}
body.dark .acctwarn{color:#ffb4ab}
