/* Songwriter Suite v7.0 – one stylesheet. Mobile-first, light by default (html.light), dark when the class is removed.
   Contrast: body text and every button label are >= 4.5:1 in both themes (checked in test/contrast.py). */
:root{--bg:#f4f6fb;--card:#fff;--card2:#eef2fa;--text:#111a2e;--muted:#4b5a76;--line:#d5dcea;--acc:#1950e0;--acc2:#0b7a4b;--on-acc:#fff;--warn:#b4530a;--chord:#1747c4;--danger:#b3261e;--shadow:0 1px 2px rgba(16,24,40,.08),0 4px 14px rgba(16,24,40,.06);--navh:62px;--r:14px}
html:not(.light){--bg:#0b1220;--card:#131c2f;--card2:#1b2740;--text:#eaf0ff;--muted:#a3b3d1;--line:#2a3856;--acc:#7aa7ff;--acc2:#58d6a0;--on-acc:#071127;--warn:#ffb15c;--chord:#9bbcff;--danger:#ff8a80;--shadow:0 1px 2px rgba(0,0,0,.4),0 6px 18px rgba(0,0,0,.35)}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;font-size:100%}html.big{font-size:118%}html.noscroll,html.noscroll body{overflow:hidden}
body{margin:0;background:var(--bg);color:var(--text);font:1rem/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;padding-bottom:calc(var(--navh) + env(safe-area-inset-bottom) + 12px)}
.hidden,[hidden]{display:none!important}.sr,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip:focus{position:fixed;top:6px;left:6px;z-index:100;background:var(--acc);color:var(--on-acc);padding:.5rem .8rem;border-radius:8px}
a{color:var(--acc)}h1,h2,h3,h4{line-height:1.2;margin:0 0 .5rem}h2{font-size:1.2rem}h3{font-size:1.05rem}
.ic{width:1.25em;height:1.25em;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.22em;flex:none}
.muted{color:var(--muted)}.small{font-size:.85rem}.center{text-align:center}
button,select,input,textarea{font:inherit;color:inherit}
button,.chip,.cta{cursor:pointer;min-height:44px;padding:.45rem .9rem;border:1px solid var(--line);border-radius:12px;background:var(--card);display:inline-flex;align-items:center;justify-content:center;gap:.4rem;text-decoration:none;-webkit-tap-highlight-color:transparent}
button:hover{background:var(--card2)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--acc);outline-offset:2px}
button.pri,.chip.pri{background:var(--acc);color:var(--on-acc);border-color:var(--acc);font-weight:600}button.pri:hover{filter:brightness(1.06);background:var(--acc)}
.chip{min-height:38px;padding:.25rem .75rem;border-radius:999px;font-size:.92rem}.chip[aria-pressed=true]{background:var(--acc);color:var(--on-acc);border-color:var(--acc)}
.icon-btn{min-width:44px;padding:.4rem;background:transparent;border-color:transparent}.ghost{background:transparent}.danger{color:var(--danger)}
button[disabled]{opacity:.5;cursor:not-allowed}
input,select,textarea{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:.5rem .7rem;min-height:44px;max-width:100%}
input[type=checkbox]{min-height:0;width:1.1rem;height:1.1rem;accent-color:var(--acc)}input[type=range]{min-height:0;padding:0;accent-color:var(--acc)}
.row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.4rem 0}.row.scroll{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.2rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:1rem;margin:.8rem 0;box-shadow:var(--shadow)}
.eyebrow{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700}
.mini{display:inline-flex;align-items:center;gap:.35rem;font-size:.92rem;color:var(--muted)}.mini select,.mini input{min-height:38px;padding:.2rem .5rem;color:var(--text)}
/* header + tabs */
header{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:.6rem;padding:.4rem .8rem;padding-top:calc(.4rem + env(safe-area-inset-top));background:var(--bg);border-bottom:1px solid var(--line)}
header .brand img{display:block;height:30px;width:auto}header h1{font-size:1.05rem;margin:0;font-weight:700;flex:1}header h1 small{font-weight:500;color:var(--muted);font-size:.75rem;margin-left:.2rem}
.hright{display:flex;align-items:center;gap:.1rem}
nav.tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(4,1fr);background:var(--card);border-top:1px solid var(--line);padding:.25rem .4rem calc(.25rem + env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(0,0,0,.06)}
nav.tabs button{flex-direction:column;gap:.1rem;border:0;background:transparent;min-height:50px;font-size:.78rem;font-weight:600;color:var(--muted);border-radius:12px}
nav.tabs button .ic{width:1.5em;height:1.5em}nav.tabs button[aria-selected=true]{color:var(--acc);background:var(--card2)}
.pop{position:absolute;right:.6rem;top:100%;z-index:50;min-width:220px;background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:.4rem;display:flex;flex-direction:column;gap:.15rem}
.pop button,.pop .sw{justify-content:flex-start;border:0;background:transparent;width:100%;text-align:left}.pop button:hover{background:var(--card2)}.sw{display:flex;gap:.5rem;align-items:center;padding:.4rem .6rem;min-height:44px;cursor:pointer}
main{max-width:860px;margin:0 auto;padding:.4rem .8rem 1rem}
footer{max-width:860px;margin:0 auto;padding:1rem .8rem 2rem;color:var(--muted);font-size:.8rem}
.sync{display:inline-grid;place-items:center;width:34px;height:34px;color:var(--acc2)}.sync.busy{animation:pulse 1s infinite}.sync.off{color:var(--muted)}@keyframes pulse{50%{opacity:.35}}
/* songs */
.actions2{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin:.6rem 0}
.cta{flex-direction:row;justify-content:flex-start;text-align:left;gap:.7rem;min-height:72px;padding:.7rem .9rem;border-radius:16px;font-weight:400;background:var(--card);box-shadow:var(--shadow)}
.cta .ic{width:1.9em;height:1.9em}.cta b{display:block;font-size:1.05rem}.cta small{display:block;color:var(--muted);font-size:.8rem;line-height:1.25}
.cta.rec{background:var(--acc);color:var(--on-acc);border-color:var(--acc)}.cta.rec small{color:var(--on-acc);opacity:.88}
.spark{display:flex;align-items:center;gap:.8rem;justify-content:space-between;padding:.7rem 1rem}.spark p{margin:.1rem 0 0}
.songcards{display:grid;gap:.55rem;margin:.6rem 0}
.scard{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;text-align:left;padding:.8rem 1rem;border-radius:14px;min-height:76px;background:var(--card);box-shadow:var(--shadow)}
.scard.cur{border-color:var(--acc)}.scard b{font-size:1.05rem}.scard .pv{color:var(--muted);font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.meta2{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;font-size:.8rem;width:100%;margin-top:.15rem}.meta2 em{font-style:normal;background:var(--card2);border-radius:999px;padding:.05rem .55rem;color:var(--text)}.meta2 .when{margin-left:auto;color:var(--muted)}
.empty{text-align:center}.signup .signup{flex-wrap:wrap}.consent,.emsg{font-size:.8rem;color:var(--muted);margin:.4rem 0 0}.emsg.ok{color:var(--acc2)}.emsg.err{color:var(--danger)}
#rcBox{position:fixed;bottom:0;left:0}.shared-banner{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;background:var(--card2);border:1px solid var(--line);border-radius:12px;padding:.5rem .8rem;margin:.6rem 0}.shared-banner span{flex:1}
/* write */
.wtop{display:flex;align-items:center;gap:.3rem;margin:.2rem 0 .4rem;position:relative}.wtop #title{flex:1;font-size:1.2rem;font-weight:700;border-color:transparent;background:transparent;padding-left:.3rem;min-width:0}.wtop #title:focus{background:var(--card);border-color:var(--line)}
.savestate{font-size:.75rem;color:var(--muted);white-space:nowrap}.savestate[data-state=error]{color:var(--danger);font-weight:700}
#wMenu{right:0;top:100%}.pop b#takeCount{margin-left:auto;color:var(--acc)}
.meta{display:flex;flex-wrap:wrap;gap:.4rem .6rem;align-items:center;margin:.3rem 0 .6rem}.keyctl,.bpmctl{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.keyctl select{border:0;min-width:70px;font-weight:700;background:transparent}.keyctl .icon-btn,.bpmctl .icon-btn{min-width:40px;font-size:1.2rem;font-weight:700}
.bpmctl input{width:64px;border:0;background:transparent;text-align:center;font-weight:700}
.seg{display:flex;background:var(--card2);border-radius:12px;padding:3px;gap:3px;margin:.4rem 0}.seg button{flex:1;border:0;background:transparent;min-height:40px;font-weight:600;color:var(--muted);border-radius:10px}.seg button[aria-selected=true]{background:var(--card);color:var(--text);box-shadow:var(--shadow)}
.sections{display:flex;gap:.4rem;overflow-x:auto;padding:.2rem 0 .5rem}.sections button{min-height:36px;padding:.2rem .7rem;border-radius:999px;font-size:.88rem;white-space:nowrap;color:var(--text)}
#lyrics{width:100%;min-height:34vh;resize:vertical;line-height:1.65;font-size:1.05rem;padding:.8rem;border-radius:14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:2}
.coach{min-height:2.2rem;margin:.5rem 0;padding:.5rem .7rem;background:var(--card);border:1px solid var(--line);border-radius:12px;font-size:.92rem;display:flex;flex-wrap:wrap;gap:.3rem .7rem;align-items:center}
.coach .syl b{font-size:1.15rem;color:var(--acc)}.meter{display:inline-flex;gap:3px;align-items:center}.meter i{width:9px;height:9px;border-radius:50%;display:block}.meter i.s{background:var(--acc)}.meter i.u{background:transparent;border:2px solid var(--muted)}
.tag{border-radius:999px;padding:.05rem .6rem;font-size:.82rem;background:var(--card2)}.tag.ok{background:var(--acc2);color:#fff}html:not(.light) .tag.ok{color:#04210f}.rh{flex-basis:100%;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.chordbar{position:sticky;bottom:calc(var(--navh) + env(safe-area-inset-bottom));z-index:20;display:flex;gap:.35rem;overflow-x:auto;padding:.5rem .3rem;margin:.4rem -.8rem 0;padding-left:.8rem;background:var(--bg);border-top:1px solid var(--line);scrollbar-width:thin;align-items:center}
.chordbar .lbl{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700;flex:none;padding:0 .2rem}
.ch{flex:none;flex-direction:column;gap:0;min-width:54px;min-height:52px;padding:.2rem .6rem;border-radius:12px}.ch b{font-size:1.05rem;color:var(--chord)}.ch small{font-size:.68rem;color:var(--muted);line-height:1}
.ch.best{background:var(--acc);border-color:var(--acc)}.ch.best b,.ch.best small{color:var(--on-acc)}.ch.sug{border-color:var(--acc)}.hearbtn[aria-pressed=false]{opacity:.5}
/* chart */
.ctools{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin:.4rem 0}.ctools select{min-height:38px;padding:.2rem .5rem}
.capohint{background:var(--card2);border-radius:12px;padding:.5rem .8rem;margin:.5rem 0;font-size:.92rem}
.chart{margin:.5rem 0;font-size:1.05rem}.chart .sec{margin:0 0 1rem}.chart h4{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:.9rem 0 .35rem;border-bottom:1px solid var(--line);padding-bottom:.15rem}
.ln{display:flex;flex-wrap:wrap;align-items:flex-end;margin:.15rem 0;line-height:1.35}
.cs{display:inline-flex;flex-direction:column;border-radius:6px}
.chart .c,.rbody .c{font-weight:800;color:var(--chord);font-size:.95em;padding-right:.45em;min-height:1.3em;line-height:1.3}.chart .t,.rbody .t{white-space:pre-wrap}
.cs.on{background:var(--acc);border-radius:6px}.cs.on .c,.cs.on .t{color:var(--on-acc)}.gap{height:.6rem}.cm{color:var(--muted);font-style:italic;margin:.2rem 0;font-size:.9rem}
.diagrams{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}.diagrams figure{margin:0;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.1rem;min-width:62px}.dia{width:62px;height:auto;color:var(--text)}
.diagrams.big .dchord{flex-direction:column;min-height:0;padding:.5rem .6rem;border-radius:14px;gap:.1rem}.diagrams.big .dia{width:76px}.dchord b{color:var(--chord)}
/* rhyme map */
.stats{display:flex;flex-wrap:wrap;gap:.5rem 1rem;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:.6rem .8rem;margin:.4rem 0 .8rem;font-size:.92rem}
.lsec{margin-bottom:1rem}.lsec h4{display:flex;align-items:center;gap:.6rem;font-size:.85rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:.4rem 0}.scheme{font-family:ui-monospace,monospace;letter-spacing:.15em;color:var(--text);background:var(--card2);border-radius:6px;padding:0 .4rem}
.lrow{display:flex;align-items:center;gap:.6rem;padding:.25rem .3rem;border-radius:10px;cursor:pointer;min-height:40px}.lrow:hover{background:var(--card2)}.lrow .txt{flex:1;line-height:1.35}.lrow mark{background:transparent;color:var(--text);font-weight:800;text-decoration:underline;text-decoration-color:var(--acc);text-underline-offset:3px;cursor:pointer}
.pill{flex:none;min-width:2rem;height:2rem;border-radius:999px;display:inline-grid;place-items:center;color:#fff;font-weight:800;font-size:.85rem}.pill.solo{opacity:.55}
.r0{background:#1d4ed8}.r1{background:#047857}.r2{background:#b45309}.r3{background:#7e22ce}.r4{background:#be123c}.r5{background:#0e7490}.r6{background:#4d7c0f}.r7{background:#475569}
.sy{flex:none;min-width:2rem;text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-weight:700}.sy.off{color:var(--danger)}.rep{font-style:normal;font-size:.75rem;color:var(--muted);background:var(--card2);border-radius:999px;padding:0 .4rem}
.chips{display:flex;flex-wrap:wrap;gap:.35rem}
/* catch */
.catch .live{position:relative;border:1px solid var(--line);border-radius:14px;background:var(--bg);overflow:hidden}#trace,#roll{width:100%;height:auto;display:block;aspect-ratio:640/180}#roll{aspect-ratio:640/190;background:var(--bg);border:1px solid var(--line);border-radius:12px}
.nowbox{position:absolute;top:.5rem;right:.8rem;text-align:right;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none}.nowbox b{font-size:2rem;line-height:1;color:var(--text)}.nowbox span{font-size:.8rem}
.micbtn{display:flex;flex-direction:column;gap:.2rem;width:132px;height:132px;border-radius:50%;margin:1rem auto .4rem;background:var(--acc);color:var(--on-acc);border:0;font-weight:700;box-shadow:0 6px 22px rgba(25,80,224,.35)}.micbtn .ic{width:2.6em;height:2.6em}.micbtn:hover{background:var(--acc);filter:brightness(1.07)}
.micbtn.on{background:var(--danger);color:#fff;animation:rec 1.2s infinite}html:not(.light) .micbtn.on{color:#2b0603}@keyframes rec{50%{box-shadow:0 0 0 14px rgba(179,38,30,.18)}}
.prog{display:flex;flex-wrap:wrap;gap:.4rem;margin:.7rem 0}.pc{display:inline-flex;flex-direction:column;align-items:center;min-width:56px;padding:.3rem .7rem;border-radius:12px;background:var(--card2);border:1px solid var(--line)}.pc b{font-size:1.2rem;color:var(--chord)}.pc small{color:var(--muted);font-size:.72rem}.prog.sm .pc{min-width:44px;padding:.15rem .5rem}.prog.sm .pc b{font-size:1rem}
.pick{display:flex;flex-direction:column;gap:.4rem}.pick button{justify-content:flex-start}
/* tools */
details.tool{padding:0}details.tool>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:.6rem;padding:.9rem 1rem;font-weight:700;font-size:1.05rem;min-height:56px}details.tool>summary::-webkit-details-marker{display:none}details.tool>summary::after{content:'›';margin-left:auto;font-size:1.5rem;color:var(--muted);transition:transform .15s}details.tool[open]>summary::after{transform:rotate(90deg)}
details.tool[open]>summary{border-bottom:1px solid var(--line)}details.tool>*:not(summary){margin-left:1rem;margin-right:1rem}details.tool>*:last-child{margin-bottom:1rem}
.tnote{display:flex;align-items:baseline;gap:1rem;margin-top:.8rem}.tnote b{font-size:3rem;line-height:1}.tbar{position:relative;height:14px;border-radius:7px;background:linear-gradient(90deg,var(--warn),var(--acc2) 45%,var(--acc2) 55%,var(--warn));margin:.7rem 0 .3rem}.tbar::after{content:'';position:absolute;left:50%;top:-4px;bottom:-4px;width:2px;background:var(--text)}.tbar i{position:absolute;top:-6px;width:8px;height:26px;margin-left:-4px;background:var(--text);border-radius:4px;left:50%;transition:left .08s;border:2px solid var(--bg)}
details.intune .tnote b{color:var(--acc2)}.tstrings{display:flex;gap:.4rem;margin:.5rem 0}.ts{flex:1;text-align:center;border:1px solid var(--line);border-radius:10px;padding:.3rem 0;font-weight:700;color:var(--muted)}.ts.hit{background:var(--acc);color:var(--on-acc);border-color:var(--acc)}
.metro input{width:84px;font-size:1.3rem;font-weight:700;text-align:center}.dots{display:flex;gap:.5rem;margin:.5rem 0}.dots i{width:22px;height:22px;border-radius:50%;border:2px solid var(--muted)}.dots i.on{background:var(--acc);border-color:var(--acc)}
.kpick{display:grid;grid-template-columns:repeat(6,1fr);gap:.35rem;width:100%}.kb{min-height:44px;padding:.2rem;font-weight:700;border-radius:10px}.kb.sel,.kb[aria-pressed=true]{background:var(--acc);color:var(--on-acc);border-color:var(--acc)}
.prow{display:flex;gap:.6rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:.5rem 0;border-top:1px solid var(--line)}.pb{display:flex;gap:.4rem}
.kfout{margin:.6rem 0}.kfout table{border-collapse:collapse;width:100%;margin-top:.5rem;font-size:.9rem}.kfout th,.kfout td{text-align:left;padding:.3rem .4rem;border-bottom:1px solid var(--line)}.best{font-weight:800;color:var(--acc);font-size:1.3rem}
.range{position:relative;height:12px;background:var(--card2);border-radius:6px;margin:.6rem 0}.range i{position:absolute;top:0;bottom:0;border-radius:6px}.range .room{background:color-mix(in srgb,var(--acc2) 35%,transparent)}.range .mel{background:var(--acc);height:6px;top:3px}
.esv-notice{font-size:.75rem;color:var(--muted);margin:1rem .2rem}
/* overlays */
.overlay{position:fixed;inset:0;z-index:70;background:rgba(5,10,20,.6);display:grid;place-items:center;padding:.8rem}.modal{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:1.1rem;max-width:520px;width:100%;max-height:90vh;overflow:auto;box-shadow:var(--shadow)}.modal.wide{max-width:680px}.modal.narrow{max-width:360px}
.chk{display:flex;gap:.5rem;align-items:flex-start;margin:.5rem 0 .8rem}.how{padding-left:1.2rem}.how li{margin:.4rem 0}.vlist{display:grid;gap:.6rem;margin:.8rem 0}.verse{border:1px solid var(--line);border-radius:12px;padding:.7rem .9rem}.verse p{margin:.3rem 0}
.memo{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.5rem 0;border-top:1px solid var(--line)}.memo audio{flex-basis:100%;height:36px}.ver{display:flex;gap:.5rem;justify-content:space-between;align-items:center;padding:.4rem 0;border-top:1px solid var(--line)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.grid2 select{width:100%}.out{white-space:pre-wrap;background:var(--card2);border-radius:10px;padding:.6rem;font-family:inherit;font-size:.92rem}
button.rec{background:var(--danger);color:#fff;border-color:var(--danger)}
#rehearse{position:fixed;inset:0;z-index:80;background:var(--bg);display:flex;flex-direction:column}
.rbar{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;padding:.5rem .7rem;padding-top:calc(.5rem + env(safe-area-inset-top));border-bottom:1px solid var(--line);background:var(--card)}.rbar b{flex:1;min-width:120px;font-size:1.05rem}
.rbody{flex:1;overflow:auto;padding:1rem 1.2rem 40vh;font-size:var(--rfs,1.5rem);max-width:900px;width:100%;margin:0 auto}.rbody .ln{margin:.35rem 0}.rbody h4{font-size:.55em;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:1.3rem 0 .3rem}.rbody .cm{font-size:.55em}
#toast{position:fixed;left:50%;bottom:calc(var(--navh) + 20px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:var(--text);color:var(--bg);padding:.6rem 1rem;border-radius:12px;opacity:0;pointer-events:none;transition:.2s;z-index:120;max-width:90vw;font-size:.92rem}#toast.show{opacity:1;transform:translate(-50%,0)}
/* Ezoic slot (same behaviour as v6.1: wrapper reserves space so nothing jumps) */
.ez-slot{display:block;width:100%;max-width:728px;margin:1.5rem auto 1.5rem;text-align:center;clear:both;box-sizing:border-box}.ez-slot .ez-lbl{display:block;font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:.35rem}
.ez-slot .ez-res{min-height:280px;display:flex;justify-content:center;align-items:flex-start;border-radius:14px;background:color-mix(in srgb,var(--muted) 7%,transparent);max-width:100%}.ez-slot .ez-ph{max-width:100%}
@media(min-width:768px){.ez-slot .ez-res{min-height:250px}}html.ez-off .ez-slot,html.ez-offline .ez-slot,.ez-slot.ez-empty{display:none}
/* desktop: tabs move into the header */
@media(min-width:820px){body{padding-bottom:2rem}nav.tabs{position:static;display:flex;gap:.2rem;border:0;box-shadow:none;background:transparent;padding:0}nav.tabs button{flex-direction:row;min-height:40px;padding:.3rem .9rem;font-size:.95rem}header{padding:.5rem 1.2rem;gap:1rem}header h1{flex:0 0 auto}nav.tabs{margin-left:auto}.hright{margin-left:.4rem}
 #toast{bottom:24px}.chordbar{bottom:0;margin:.4rem 0 0;padding-left:.3rem}main{padding:.8rem 1.2rem 2rem}.actions2{grid-template-columns:1fr 1fr}#lyrics{min-height:34vh}}
@media(max-width:380px){.actions2{grid-template-columns:1fr}.kpick{grid-template-columns:repeat(4,1fr)}header h1 small{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* print: only the chart */
#printArea{display:none}
@media print{body>*:not(#printArea){display:none!important}#printArea{display:block!important;color:#000;background:#fff;font-size:12pt}#printArea h1{font-size:20pt;margin:0}#printArea .pm{margin:.2rem 0 1rem;color:#333}#printArea .c{color:#000}#printArea .cs.on{background:none}#printArea .pf{margin-top:2rem;font-size:9pt;color:#555}#printArea .dia{width:50px;color:#000}#printArea h4{color:#333;border-color:#999}html,body{background:#fff!important}}

/* no layout shift at boot: below-the-list blocks appear after the list and ad slot are in place */
html:not(.rdy) #signupCard,html:not(.rdy) footer{display:none}
html:not(.light) header .brand img{background:#fff;border-radius:7px;padding:2px 4px;box-sizing:content-box}

/* Install app (PWA) button: compact pill in the header, hidden once installed */
.sml-install{min-height:36px;padding:.2rem .8rem;border-radius:999px;background:var(--acc);color:var(--on-acc);border-color:var(--acc);font-weight:700;font-size:.85rem;white-space:nowrap;flex:none}
.sml-install:hover{background:var(--acc);filter:brightness(1.07)}
.sml-install[hidden]{display:none!important}
@media (display-mode: standalone){.sml-install{display:none!important}}
header h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:440px){header{gap:.4rem;padding-left:.6rem;padding-right:.5rem}header h1{font-size:.95rem}header h1 small,.sml-install .more{display:none}.sml-install{padding:.2rem .65rem;font-size:.8rem}.icon-btn{min-width:40px}}
@media(min-width:820px){.sml-install{margin-left:.2rem}}
#sml-install-help{border:1px solid var(--line);border-radius:16px;padding:1rem 1.1rem;background:var(--card);color:var(--text);box-shadow:var(--shadow);width:min(360px,calc(100vw - 32px))}
html:not(.light) #sml-install-help{color-scheme:dark}html.light #sml-install-help{color-scheme:light}
#sml-install-help::backdrop{background:rgba(0,0,0,.35)}
#sml-install-help h2{margin:0 0 .4rem;font-size:1.05rem}#sml-install-help p{margin:0 0 .7rem;color:var(--text);font-size:.95rem;line-height:1.45}
#sml-install-help .sml-install-help-close{min-height:38px}
@media(max-width:380px){header .brand img{height:26px}html:not(.light) header .brand img{padding:2px 3px}header h1{font-size:.9rem}}
