:root{
 color-scheme:dark;
 --bg:#101010;--paper:#1b1b1b;--ink:#fffaf2;--muted:#ccc7bd;--line:#837b70;
 --orange:#ffab66;--gold:#f4d294;--accent-ink:#20160d;--accent-hover:#ffc28c;
 --button:#2b2925;--button-hover:#39352e;--input:#151515;--placeholder:#bdb7ad;
 --sidebar:#151515;--header:#191816;--meta:#29251e;--footer:#211f1a;--score:#101010;
 --accent-surface:#39291d;--accent-surface-hover:#483321;--accent-text:#ffd3ac;--accent-line:#a47e50;
 --notice-surface:#332c1d;--notice-text:#ffe0a8;--notice-line:#aa8550;
 --warning-surface:#3c2b1e;--warning-text:#ffdbb8;
 --feature-start:#3a2c21;--feature-end:#24211c;
 --toast-bg:#f7ead0;--toast-ink:#241c10;--shadow:#0008;--hover-overlay:#ffffff0d;--link:#ffce9f;
 font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none
}
:root[data-theme="light"]{
 color-scheme:light;
 --bg:#f5f3ee;--paper:#ffffff;--ink:#24211c;--muted:#5d574e;--line:#877e71;
 --orange:#b9490b;--gold:#744509;--accent-ink:#ffffff;--accent-hover:#963706;
 --button:#f1ede6;--button-hover:#e5ded2;--input:#ffffff;--placeholder:#6c6459;
 --sidebar:#ece7de;--header:#f4f0e9;--meta:#eee6d7;--footer:#f4f0e9;--score:#fffdf8;
 --accent-surface:#fce7d3;--accent-surface-hover:#f6d7bb;--accent-text:#7c3609;--accent-line:#a65f2a;
 --notice-surface:#fff0cd;--notice-text:#65430c;--notice-line:#a67b30;
 --warning-surface:#ffeadc;--warning-text:#763a11;
 --feature-start:#fff0df;--feature-end:#f8e9d7;
 --toast-bg:#30271e;--toast-ink:#fffaf0;--shadow:#241b1533;--hover-overlay:#3f290d0a;--link:#8b3907
}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:48px;border:1px solid var(--line);border-radius:12px;background:var(--button);color:var(--ink);padding:12px 18px;font-weight:600}button:hover{border-color:var(--accent-line);background:var(--button-hover)}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--orange);color:var(--accent-ink);border-color:var(--orange)}button.primary:hover{background:var(--accent-hover)}button.small{font-size:13px;padding:9px 13px}button.ghost{background:transparent}input,select{padding:13px;border-radius:10px;background:var(--input);border:1px solid var(--line);color:var(--ink);min-height:48px;max-width:100%}input::placeholder,textarea::placeholder{color:var(--placeholder)}input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1,h2{font-weight:650;letter-spacing:-.045em}h1{font-size:clamp(30px,3vw,42px);margin-bottom:10px}h2{font-size:27px}h3{font-size:18px}.eyebrow{text-transform:uppercase;letter-spacing:1.8px;font-size:10px;font-weight:700;line-height:1.6}
.shell{display:grid;grid-template-columns:216px 1fr;min-height:100dvh}.sidebar{background:var(--sidebar);border-right:1px solid var(--line);padding:30px 17px;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column}.brand{font-weight:750;font-size:28px;letter-spacing:-1.6px}.brand span{color:var(--orange)}.sidebar .eyebrow{color:var(--muted);margin:10px 0 36px}.nav{display:grid;gap:7px}.nav button{border:1px solid transparent;text-align:left;color:var(--muted);background:none;font-weight:550;font-size:13px;padding:13px}.nav button.active{background:var(--accent-surface);color:var(--accent-text);border-color:var(--accent-line)}.nav button span{display:inline-block;width:27px;font-size:18px;color:var(--gold)}.sidebar-foot{margin-top:auto;font-size:11px;line-height:1.9;color:var(--muted)}.tuning{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.tuning strong{color:var(--gold);font-weight:600;letter-spacing:2px}.main{max-width:1380px;width:100%;min-width:0;padding:30px clamp(24px,3vw,48px) 60px;margin:0 auto}.topline{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:30px}.topline>.eyebrow{color:var(--muted)}.status{font-size:11px;color:var(--muted);max-width:300px;line-height:1.5}.dot{display:inline-block;border-radius:50%;width:6px;height:6px;background:var(--gold);margin-right:7px}.subtitle{color:var(--muted);font-size:14px;line-height:1.6;margin-bottom:0}.hero{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.hero-actions{text-align:right}.hero-actions button{white-space:nowrap}.featured{padding:22px 25px;background:linear-gradient(110deg,var(--feature-start),var(--feature-end));border:1px solid var(--accent-line);color:var(--ink);border-radius:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px;position:relative;overflow:hidden}.featured:before{content:'';position:absolute;top:19px;bottom:19px;left:0;width:3px;border-radius:5px;background:var(--orange)}.featured .eyebrow{color:var(--gold)}.featured h2{margin:5px 0 7px;font-size:27px}.featured p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.featured button{background:var(--orange);border-color:var(--orange);color:var(--accent-ink);white-space:nowrap}.featured button:hover{background:var(--accent-hover)}.toolbar{display:flex;gap:14px;align-items:center;margin-bottom:17px}.toolbar input{flex:1;min-width:0;background:var(--input)}.count{font-size:11px;white-space:nowrap;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.song-card{border:1px solid var(--line);border-radius:15px;background:var(--paper);padding:21px;display:flex;flex-direction:column;gap:17px;min-width:0}.song-card .num{font-size:13px;letter-spacing:.05em;color:var(--gold);border:1px solid var(--accent-line);background:var(--accent-surface);border-radius:9px;min-width:34px;height:34px;display:grid;place-items:center;font-variant-numeric:tabular-nums}.card-top{display:flex;justify-content:space-between;gap:12px}.song-card h3{font-size:18px;margin:0 0 7px;letter-spacing:-.4px;line-height:1.3}.song-card p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}.tags{display:flex;flex-wrap:wrap;gap:7px}.tag{border:1px solid var(--line);background:var(--meta);color:var(--muted);border-radius:6px;padding:5px 8px;font-size:10px;font-weight:600;line-height:1.4}.card-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:13px;border-top:1px solid var(--line)}.card-foot>span{font-size:11px;color:var(--muted)}.card-foot>div{display:flex;gap:5px;flex-shrink:0}.card-foot [data-play]{color:var(--accent-text);background:var(--accent-surface);border-color:var(--accent-line)}.panel{padding:25px;border:1px solid var(--line);border-radius:16px;background:var(--paper);margin-bottom:22px}.notice{padding:16px 18px;border:1px solid var(--notice-line);border-radius:10px;background:var(--notice-surface);color:var(--notice-text);font-size:14px;line-height:1.6;margin:16px 0}.notice.warn{background:var(--warning-surface);color:var(--warning-text)}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.spread{justify-content:space-between}.field{display:grid;gap:8px;font-size:13px;color:var(--muted);flex:1;min-width:140px}.field input,.field select{width:100%}.entry{border:1px solid var(--line);padding:20px;border-radius:14px;margin-top:16px;background:var(--paper)}.entry h3{margin:0}.entry .row{margin-bottom:14px}.entry label.check{display:inline-flex;gap:8px;align-items:center;padding:8px 12px 8px 0;min-height:44px;font-size:14px}.entry input[type=checkbox]{min-height:24px;width:22px;accent-color:var(--orange)}.entry .movement{display:flex;gap:7px}.entry .movement button{padding:8px 13px}.entry .fields{display:grid;grid-template-columns:100px 100px 1fr;gap:12px}.entry .fields .field{min-width:0}.help{color:var(--muted);font-size:13px;line-height:1.7}.empty{padding:50px;text-align:center;color:var(--muted)}.loading{padding:50px}.section-choice{padding:10px 0}.upload{border:1px dashed var(--notice-line);padding:28px;border-radius:14px;background:var(--meta);margin:24px 0}.upload input{width:100%;margin:12px 0}.import-results{white-space:pre-line;line-height:1.7;font-size:14px}textarea{font:15px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--input);color:var(--ink);width:100%;resize:vertical}
/* Performance stays fixed around one scrollable score. */
.stage{height:100dvh;background:var(--score);color:var(--ink);display:grid;grid-template-rows:auto auto 1fr auto;overflow:hidden}.stage-header{padding:17px 26px;display:flex;align-items:center;justify-content:space-between;gap:17px;border-bottom:1px solid var(--line);background:var(--header)}.stage-header h1{font-size:27px;margin:0 0 4px}.stage-header p{margin:0;color:var(--muted);font-size:12px}.stage button{background:var(--button);color:var(--ink);border-color:var(--line)}.stage button:hover{background:var(--button-hover)}.stage button.primary{background:var(--orange);color:var(--accent-ink);border-color:var(--orange)}.stage button.primary:hover{background:var(--accent-hover)}.stage-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 26px;background:var(--meta);font-size:12px;color:var(--muted)}.stage-meta strong{color:var(--gold)}.score{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:28px max(24px,calc((100vw - 980px)/2)) 0;scroll-behavior:auto;-webkit-overflow-scrolling:touch}.score h2{font:650 12px -apple-system,BlinkMacSystemFont,sans-serif;text-transform:uppercase;letter-spacing:1.8px;color:var(--gold);border-bottom:1px solid var(--line);padding:0 0 12px;margin:24px 0 18px}.score .lyrics{white-space:pre-wrap;font-size:var(--lyric-size,28px);line-height:1.5;font-weight:450;overflow-wrap:anywhere;margin:4px 0 40px}.score .progression{color:var(--gold);white-space:pre-wrap;font-size:22px;line-height:1.7;font-weight:600;padding:14px 18px;background:var(--meta);border:1px solid var(--notice-line);border-radius:10px}.cue{background:var(--notice-surface);color:var(--notice-text);border:1px solid var(--notice-line);border-radius:10px;padding:16px 20px;font-size:19px;font-weight:600;line-height:1.45;margin:0 0 20px}.stage-footer{min-width:0;background:var(--footer);border-top:1px solid var(--line);padding:15px 24px max(15px,env(safe-area-inset-bottom));display:grid;grid-template-columns:auto minmax(160px,1fr) auto;gap:20px;align-items:center}.scroll-controls{min-width:0;display:flex;align-items:center;gap:14px}#scroll-toggle[aria-pressed=true]{color:var(--gold);border-color:var(--accent-line);background:var(--accent-surface)}.next{min-width:235px;display:flex;flex-direction:column;text-align:left;font-size:20px;padding:15px 22px}.next small{font-size:11px;opacity:.8;font-weight:500;margin-top:5px}.section-nav{max-width:190px;background:var(--button);color:var(--ink);border-color:var(--line)}.stage-note{font-size:12px;line-height:1.5;color:var(--muted);margin-bottom:28px}.end{text-align:center;padding:60px 20px}.end h1{font-size:42px}.end .subtitle{margin-bottom:25px}.stage .text-size{display:flex;gap:5px}.stage .text-size button{padding:8px 12px;min-width:48px}.native-line{margin-bottom:12px;line-height:1.5}.lyric-unit{display:inline-block;position:relative;white-space:pre;vertical-align:bottom;padding-top:1.3em;max-width:100%}.chord{position:absolute;top:0;left:0;color:var(--gold);font-size:.7em;line-height:1.5;font-weight:700;letter-spacing:.03em}.score .native-line:has(.chord){margin-bottom:19px}.score .native-line:not(:has(.chord)) .lyric-unit{padding-top:.2em}.syllable{position:relative;display:inline}.syllable>.chord{top:-1.65em;left:0}
#toast{pointer-events:none;position:fixed;bottom:100px;left:50%;transform:translateX(-50%);z-index:20;background:var(--toast-bg);color:var(--toast-ink);padding:14px 22px;border-radius:12px;box-shadow:0 5px 25px var(--shadow);max-width:90vw;display:none}#toast.show{display:block}body:has(.stage) #toast{bottom:auto;top:190px}
@media(min-width:1400px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.shell{grid-template-columns:185px 1fr}.sidebar{padding:26px 13px}.main{padding:28px 24px}.grid{gap:12px}.song-card{padding:18px}.card-foot{flex-wrap:wrap}.card-foot>span{width:100%}.card-foot>div{margin-left:auto}.featured{padding:21px;flex-wrap:wrap}.stage-footer{gap:12px;grid-template-columns:auto 1fr auto}.scroll-controls{gap:8px}.next{min-width:190px}.stage-header{padding:15px 20px;flex-wrap:wrap}.stage-header h1{font-size:25px}.stage-header>div:first-of-type{min-width:200px}.section-nav{max-width:155px;margin-left:auto}}
@media(max-width:700px){.shell{display:block}.sidebar{height:auto;position:static;padding:19px 20px 12px;border:0;background:var(--bg)}.brand{font-size:25px}.sidebar .eyebrow,.sidebar-foot{display:none}.nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:10;background:var(--sidebar);border-top:1px solid var(--line);padding:9px 12px max(9px,env(safe-area-inset-bottom));gap:6px}.nav button{flex:1;min-height:52px;padding:7px 4px;font-size:11px;text-align:center;border-radius:10px}.nav button span{display:block;width:auto;font-size:19px;line-height:1.2;margin-bottom:4px}.main{padding:8px 20px 110px}.topline{margin-bottom:24px;gap:10px}.topline>.eyebrow{display:none}.status{font-size:10px}.hero{gap:15px;align-items:flex-start}.hero h1{font-size:32px}.hero .subtitle{font-size:12px;max-width:200px}.hero-actions button{font-size:12px;padding:11px 12px}.featured{padding:20px;gap:17px}.featured h2{font-size:25px}.featured button{width:100%;font-size:14px}.grid{grid-template-columns:1fr;gap:12px}.song-card{padding:18px 20px;gap:14px}.card-foot{flex-wrap:nowrap}.card-foot>span{width:auto}.song-card h3{font-size:19px}.toolbar{gap:10px}.toolbar input{font-size:13px}.entry .fields{grid-template-columns:1fr 1fr}.entry .fields .field:last-child{grid-column:1/-1}.panel{padding:20px}.upload{padding:18px}.stage-header{padding:12px;gap:10px}.stage-header h1{font-size:23px}.stage-header>div:first-of-type{min-width:170px;flex:1}.stage-header>button{padding:10px}.stage-header .text-size{flex:0 0 auto}.stage-meta{padding:10px 14px;gap:8px;font-size:11px}.stage-footer{padding:12px 12px max(12px,env(safe-area-inset-bottom));grid-template-columns:1fr 1fr;gap:10px}.stage-footer>.previous{grid-column:1;grid-row:2}.stage-footer>.next{grid-column:2;grid-row:2;min-width:0;font-size:17px}.scroll-controls{grid-column:1/-1;justify-content:space-between}.score{padding-left:14px;padding-right:14px}.score .progression{font-size:19px}.section-nav{max-width:165px;min-width:150px}.stage .lyrics{font-size:var(--lyric-size,26px)}}
@media(max-height:520px) and (min-width:600px){.stage-header{padding:8px 12px;gap:10px;flex-wrap:nowrap}.stage-header h1{font-size:20px}.stage-header p{font-size:10px}.stage-header>div:first-of-type{min-width:140px}.stage-meta{padding:6px 12px;font-size:10px;gap:8px}.stage-footer{padding:8px 12px;gap:10px}.stage .next{min-width:170px;font-size:16px;padding:9px 15px}.stage-footer button{min-height:48px}.score{padding-top:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Compact score: source section names remain in navigation, not in the sheet. */
.score{padding-top:16px}.score section{margin:0}.score .lyrics{margin:0 0 16px}.native-line{margin-bottom:.25em;line-height:1.45}.score .native-line:has(.chord){margin-bottom:.5em}.chord{font-size:max(10px,.7em)}.stage .text-size{align-items:center}.stage .text-size output{font-size:12px;font-variant-numeric:tabular-nums;min-width:18px;text-align:center;color:var(--gold)}.stage-footer .previous{font-size:14px}.feature-actions{display:flex;flex-wrap:wrap;gap:8px}.featured .feature-actions button{flex:1;min-width:165px}.update-notice{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 20px;margin-bottom:20px;border:1px solid var(--notice-line);background:var(--notice-surface);border-radius:14px}.update-notice strong{color:var(--gold);font-size:15px}.update-notice p{font-size:12px;line-height:1.5;color:var(--muted);margin:5px 0 0}.update-notice button{white-space:nowrap}.update-list>div{display:flex;justify-content:space-between;gap:18px;padding:15px 0;border-bottom:1px solid var(--line)}.update-list span{font-size:12px;color:var(--gold)}
@media(max-width:700px){.feature-actions{width:100%}.update-notice{align-items:flex-start;flex-direction:column;gap:12px}.update-list>div{flex-direction:column;gap:5px}.stage-header .text-size{gap:3px}.stage-footer .previous{font-size:13px}}

/* Reordering is confined to the arrangement editor. */
.entry-heading{display:flex;align-items:center;gap:12px;min-width:0;flex:1}.entry-heading h3{overflow-wrap:anywhere}.drag-handle{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab;flex:0 0 48px;font-size:28px;line-height:1;padding:8px}.drag-handle[aria-pressed=true]{cursor:grabbing;color:var(--gold);border-color:var(--orange)}.entry.dragging{opacity:.65;border-color:var(--orange)}.entry.drop-before{box-shadow:0 -5px 0 var(--orange)}.entry.drop-after{box-shadow:0 5px 0 var(--orange)}.reorder-status{font-size:13px;color:var(--gold);line-height:1.6;min-height:1.6em}.entry .movement{flex-wrap:wrap}.entry .row.spread{align-items:flex-start}
@media(max-width:700px){.entry-heading{flex-basis:100%}.entry .movement{margin-left:auto}}

.lyric-unit.spacer{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.chord{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

.import-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.import-review-grid .panel{min-width:0}.source-page{width:100%;height:auto;display:block;background:white}.review-score{background:var(--score);padding:18px;max-height:70vh;overflow:auto;border-radius:10px}.review-score .lyrics{font-size:var(--lyric-size,18px)}#import-progress{display:block;width:100%;height:16px;margin:16px 0;accent-color:var(--orange)}#import-progress[hidden]{display:none}#import-status{line-height:1.6;color:var(--gold)}#draft-save-status{color:var(--gold);margin:12px 0 0}.check{display:flex;gap:10px;align-items:center;font-size:14px;line-height:1.5}.check input{accent-color:var(--orange);width:22px;min-height:24px} @media(max-width:800px){.import-review-grid{grid-template-columns:1fr}.source-page{max-height:70vh;object-fit:contain}.review-score{max-height:55vh}}

.refresh-hint{font-size:11px;color:var(--muted);margin:-12px 0 20px}.refresh-hint:empty{display:none}#pull-refresh{position:fixed;z-index:60;top:0;left:50%;transform:translate(-50%,-120%);max-width:94vw;padding:14px 22px;border:1px solid var(--notice-line);border-top:0;border-radius:0 0 14px 14px;background:var(--notice-surface);color:var(--gold);font-size:13px;line-height:1.5;box-shadow:0 5px 22px var(--shadow);pointer-events:none;transition:transform .15s}#pull-refresh.visible{transform:translate(-50%,0)}html:has(#song-grid),html:has(#arrangement-grid){overscroll-behavior-y:contain}@media(max-width:700px){.nav{gap:3px}.nav button{font-size:10px}.hero>#new-set{font-size:12px;padding:11px 12px}.refresh-hint{margin-top:-10px}}

.advance-status{font-size:11px;color:var(--muted);min-height:1em;white-space:nowrap}.advance-status:empty{display:none}

.score-tools{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.transpose-controls{display:flex;align-items:center;gap:4px}.transpose-controls button{min-width:48px;min-height:48px;padding:8px 12px}.transpose-controls output{min-width:26px;text-align:center;color:var(--gold);font-size:12px;font-variant-numeric:tabular-nums}.transpose-controls #transpose-reset{font-size:12px;min-width:54px}.scroll-controls{flex-wrap:wrap}.advance-status{flex-basis:100%;order:3}
@media(max-width:700px){.stage-header>div:first-of-type{min-width:0;flex:1}.stage-header h1{font-size:20px}.stage-header .section-nav{min-width:105px;max-width:105px;order:2;margin-left:0}.stage-header .score-tools{order:3;flex:0 0 100%;justify-content:space-between;gap:8px}.stage-header>button{font-size:12px}.score-tools .text-size button,.transpose-controls button{min-width:44px;min-height:48px;padding:8px 10px}}
@media(max-height:520px) and (min-width:600px){.stage-header{flex-wrap:wrap}.stage-header>div:first-of-type{min-width:100px}.stage-header .score-tools{gap:8px;flex-wrap:nowrap}.stage-header h1{font-size:18px}.transpose-controls button{padding:8px;min-width:44px}.stage-header .section-nav{max-width:120px;min-width:100px}.advance-status{flex-basis:auto;order:0}}

.instrumental-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:.45em 1.2em;padding:.35em 0}.instrumental-line .chord{position:static;white-space:nowrap}.instrumental-line>span{font-size:.7em}.restore-list>div{padding:12px 0;border-bottom:1px solid var(--line)}.restore-list>div>span{display:block;font-size:13px;margin-top:5px}

.library-filters{display:flex;flex-wrap:wrap;gap:8px;margin:-8px 0 22px}.library-filters button{min-height:44px;padding:9px 15px;font-size:13px}.library-filters button[aria-pressed=true]{background:var(--orange);color:var(--accent-ink);border-color:var(--orange)}.category-choices{display:flex;flex-wrap:wrap;gap:18px;margin-bottom:24px}.count{white-space:nowrap}

/* Reserve the width of long chord names when lyric words wrap. */
.lyric-unit{white-space:pre-wrap;overflow-wrap:anywhere}.syllable{display:inline-block;vertical-align:bottom;max-width:100%}.syllable::after{content:attr(data-chord);display:block;height:0;overflow:hidden;visibility:hidden;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:max(10px,.7em);font-weight:700;letter-spacing:.03em;line-height:0}

/* Library density preference, independent of arrangement grids. */
.library-view{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 22px;font-size:13px;color:var(--muted)}.library-column-choices{display:flex;gap:6px}.library-column-choices button{min-width:44px;min-height:44px;padding:8px 12px}.library-column-choices button[aria-pressed=true]{background:var(--orange);border-color:var(--orange);color:var(--accent-ink)}.library-view .help{font-size:12px;margin:0}.library-view .help:empty{display:none}#song-grid .card-top>div{min-width:0}#song-grid h3,#song-grid .song-card p{overflow-wrap:anywhere}#song-grid .card-foot{flex-wrap:wrap}#song-grid .empty{grid-column:1/-1}#song-grid .num{flex-shrink:0}

#song-grid .card-foot>div{flex-wrap:wrap;min-width:0;flex-shrink:1}#song-grid .tag{max-width:100%;overflow-wrap:anywhere}

/* Title-first cards keep four to six columns useful for quick song selection. */
#song-grid .song-title{display:block;width:100%;min-height:44px;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;line-height:inherit;text-align:left}
#song-grid .song-title:hover span{text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:3px}
#song-grid[data-compact="true"]{gap:10px}
#song-grid[data-compact="true"] .song-card{height:160px;padding:10px;gap:10px}
#song-grid[data-compact="true"] .card-top{flex:1;min-height:0}
#song-grid[data-compact="true"] .card-top>div{width:100%}
#song-grid[data-compact="true"] h3{height:100%;margin:0;font-size:16px;line-height:1.3}
#song-grid[data-compact="true"] .song-title{height:100%;display:flex;align-items:flex-start;min-height:44px}
#song-grid[data-compact="true"] .song-title span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-height:3.9em}
#song-grid[data-compact="true"] .card-top p,#song-grid[data-compact="true"] .num,#song-grid[data-compact="true"] .tags,#song-grid[data-compact="true"] .card-foot>span,#song-grid[data-compact="true"] .card-foot [data-detail],#song-grid[data-compact="true"] .play-arrow{display:none}
#song-grid[data-compact="true"] .card-foot{flex:none;padding:0;margin:0;border:0}
#song-grid[data-compact="true"] .card-foot>div{width:100%;margin:0;flex-wrap:nowrap}
#song-grid[data-compact="true"] .card-foot [data-play]{width:100%;min-width:44px;min-height:44px;padding:8px 4px;font-size:13px;white-space:nowrap}

/* A compact navigation rail returns usable width to tablet library columns. */
.sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:6px}
.sidebar-header .brand{font-size:22px;white-space:nowrap;letter-spacing:-1.3px}
.sidebar .brand-full,.sidebar .brand-short{color:var(--ink)}
.sidebar .brand-short{display:none}
.sidebar-toggle{flex:0 0 44px;min-width:44px;min-height:44px;padding:0;font-size:28px;line-height:1;background:transparent;color:var(--gold)}
.nav button .nav-label{display:inline;width:auto;margin:0;font:inherit;color:inherit}
@media(min-width:701px){
 .shell.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}
 .sidebar-collapsed .sidebar{padding:26px 11px}
 .sidebar-collapsed .sidebar-header{flex-direction:column;gap:12px}
 .sidebar-collapsed .brand-full,.sidebar-collapsed .sidebar>.eyebrow,.sidebar-collapsed .sidebar-foot,.sidebar-collapsed .nav button .nav-label{display:none}
 .sidebar-collapsed .brand-short{display:inline;font-size:25px}
 .sidebar-collapsed .nav{margin-top:24px}
 .sidebar-collapsed .nav button{display:flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;padding:10px}
 .sidebar-collapsed .nav button .nav-icon{width:auto;font-size:22px}
}
@media(max-width:700px){
 .sidebar-header .brand{font-size:25px}
 .sidebar-toggle{display:none}
 .nav button .nav-label{display:block}
}

.featured-collapsible{padding-right:64px}
.featured .toggle-featured{position:absolute;top:8px;right:8px;z-index:1;width:44px;min-width:44px;min-height:44px;padding:0;border-color:transparent;background:transparent;color:var(--gold);font-size:25px;line-height:1}
.featured .toggle-featured:hover{background:var(--hover-overlay);color:var(--ink)}
.featured [hidden]{display:none}
@media(max-width:700px){.featured-collapsible{padding-top:50px;padding-right:20px}}
.featured.featured-collapsed{min-height:56px;padding:12px 64px 12px 20px;margin-bottom:22px;border-radius:12px}
.featured-collapsed:before{top:12px;bottom:12px}
.featured-collapsed .toggle-featured{top:5px}

/* Reveal only the chord names actually recorded in the song. */
.song-shapes{position:relative;min-width:0;max-width:100%}
.song-shapes summary{display:flex;align-items:center;justify-content:space-between;gap:10px;width:fit-content;min-height:44px;padding:8px 12px;border:1px solid var(--accent-line);border-radius:9px;background:var(--accent-surface);color:var(--gold);font-size:13px;font-weight:600;list-style:none;cursor:pointer}
.song-shapes summary::-webkit-details-marker{display:none}
.song-shapes summary::after{content:'⌄';font-size:16px}
.song-shapes[open] summary::after{content:'⌃'}
.song-shapes summary:hover{background:var(--accent-surface-hover);border-color:var(--accent-line)}
.song-shapes summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.shapes-content{padding-top:10px}
.shapes-list{display:flex;flex-wrap:wrap;gap:7px;list-style:none;padding:0;margin:0}
.shapes-list li{padding:6px 9px;border:1px solid var(--notice-line);border-radius:7px;background:var(--meta);color:var(--gold);font-size:14px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.song-shapes .shapes-empty{font-size:13px;line-height:1.5;color:var(--muted);margin:0}
#song-grid .tags{align-items:center}
#song-grid .song-shapes[open]{flex-basis:100%}
#song-grid[data-compact="true"] .song-shapes{display:none}
.song-shapes-detail{margin:20px 0}
.stage-meta{position:relative}
.stage-meta .song-shapes{position:static}
.stage-meta .song-shapes[open] .shapes-content{position:absolute;top:calc(100% + 8px);left:14px;z-index:5;width:280px;max-width:calc(100% - 28px);max-height:45vh;overflow:auto;padding:14px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-surface);box-shadow:0 8px 24px var(--shadow)}

/* Theme controls and shared readable states; layout and score sizes are unchanged. */
body{background:var(--bg);color:var(--ink)}
a,a:visited{color:var(--link);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:var(--gold)}
a:focus-visible,.score:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
input::placeholder,textarea::placeholder{opacity:1}
.review-score{color:var(--ink)}
.next small{opacity:1}
.theme-picker{display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0;color:var(--muted)}
.theme-picker select{min-height:44px;max-width:100%;padding:8px 10px;font-size:13px}
#library-view-note{flex-basis:100%}
@media(max-width:700px){.theme-picker{margin-left:0;flex-basis:100%;justify-content:space-between}}

/* The optional end-of-song hold stays beside the existing scroll controls. */
#countdown-toggle{min-height:44px;padding:8px;font-size:12px;white-space:nowrap}
#countdown-toggle[aria-pressed="true"]{color:var(--gold);background:var(--accent-surface);border-color:var(--accent-line)}

/* Sets share one score: spacing separates songs without a blank viewport. */
.continuous-score{overflow-anchor:none}
.continuous-song{margin:0;padding:22px 0 12px;border-top:1px solid var(--line)}
.continuous-song:first-child{padding-top:0;border-top:0}
.continuous-song-heading{margin:0 0 16px}
.continuous-song-heading .eyebrow{color:var(--muted);margin-bottom:5px}
.score .continuous-song-title{margin:0 0 5px;padding:0;border:0;font-size:26px;line-height:1.2;letter-spacing:-.035em;font-weight:650;text-transform:none;color:var(--ink)}
.continuous-song-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.score .score-section-heading{font-size:12px;font-weight:650;line-height:1.5;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);border-top:1px solid var(--line);padding-top:7px;margin:14px 0 7px}
.continuous-stage .stage-header h1{max-width:34ch}
@media(max-width:700px){
 .scroll-controls{column-gap:8px}
 .scroll-controls #scroll-toggle{font-size:14px;padding:10px}
}

/* Chord fingering diagrams use the same palette as the song view. */
.shapes-list li{padding:0;border:0;background:transparent}
.shapes-list button{min-width:44px;min-height:44px;padding:8px 11px;border:1px solid var(--notice-line);border-radius:8px;background:var(--meta);color:var(--gold);font-size:14px}
.chord-dialog{width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 12px 48px var(--shadow);overflow:auto}
.chord-dialog::backdrop{background:rgb(0 0 0 / .6)}
.chord-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chord-dialog-heading h2{margin:0;font-size:28px;letter-spacing:0}
.chord-dialog-heading button{min-width:44px;min-height:44px;padding:6px 12px}
.chord-dialog .help{margin:12px 0 0;font-size:12px}
.chord-diagram{margin:12px auto 0;max-width:260px;color:var(--ink)}
.chord-diagram svg{display:block;width:100%;height:auto;max-height:45dvh}

/* Settings stays at the bottom of the sidebar and joins the phone navigation. */
@media(min-width:701px){.sidebar .nav{display:flex;flex-direction:column;flex:1;min-height:0}.sidebar .nav .sidebar-foot{margin-top:auto;padding-top:24px}.sidebar .nav [data-nav="settings"]{margin-top:16px}.sidebar-collapsed .nav [data-nav="settings"]{margin-top:auto}}
@media(max-width:700px){.nav button{flex:1 1 0;min-width:0;padding:7px 2px}.nav button .nav-label{font-size:10px;overflow-wrap:normal}.main{padding-bottom:120px}}
.settings-panel{margin-top:24px;max-width:640px}.settings-panel .theme-picker{margin:20px 0 0;display:grid;gap:8px;max-width:320px}.settings-panel .theme-picker select{width:100%}
.more-categories{margin:-6px 0 22px;color:var(--muted);font-size:13px}.more-categories summary{cursor:pointer;min-height:44px;align-content:center;color:var(--ink)}.more-categories[open]{padding:0 16px 4px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.more-categories h3{font-size:12px;color:var(--gold);margin:12px 0}.more-categories .library-filters{margin:0 0 16px}.category-group{padding:0;border:0;margin:0 0 22px}.category-group legend{color:var(--gold);font-size:13px;font-weight:600;margin-bottom:12px}.category-group .category-choices{gap:10px 18px;margin-bottom:0}.category-group .check{min-height:44px}.settings-panel h2{margin-top:0}

/* Choosing a song uses the library without leaving the unsaved arrangement. */
.arrangement-add{margin-top:20px}.arrangement-add .help{margin-bottom:0}.picker-navigation{margin-bottom:24px}.arrangement-picker-grid .song-card{justify-content:space-between}.arrangement-picker-grid .picker-add{min-height:44px}.arrangement-picker-grid .card-foot>div{margin-left:auto}
.filter-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:-10px 0 20px}.filter-hint:empty{display:none}
#song-grid[data-compact="true"] .picker-add{width:100%;min-width:44px;min-height:44px;padding:8px 3px;font-size:12px;white-space:normal;line-height:1.2}
@media(min-width:701px){.sidebar{overflow-y:auto}}

.nav .tuning-button{display:block;width:100%;margin-top:20px;padding:14px 8px;border:1px solid var(--line);border-radius:10px;font-size:11px;line-height:1.8;color:var(--muted)}
.nav .tuning-button:hover{background:var(--button-hover);color:var(--ink)}.nav .tuning-button small{display:block;font:inherit}.nav .tuning-button strong{display:block;letter-spacing:.4px;color:var(--gold)}
.tuning-picker{max-width:100%;margin-top:20px}.tuning-picker select{min-width:0;max-width:100%}.tuning-summary{font-size:14px;line-height:1.6;color:var(--gold)}#tuning-save-status:empty{display:none}
.custom-tuning-form{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}.custom-tuning-form[hidden]{display:none}.custom-tuning-strings{margin:20px 0;padding:0;border:0}.custom-tuning-strings legend{font-size:13px;color:var(--muted);margin-bottom:12px}.custom-tuning-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.custom-tuning-grid .field{min-width:0;font-size:12px}.custom-tuning-grid select{min-width:0;padding:12px 6px}#custom-tuning-status:empty{display:none}
@media(max-width:700px){.custom-tuning-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Half-point speed adjustments stay within easy reach during a performance. */
.speed-controls{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.stage .speed-controls button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:60px;min-height:60px;padding:6px 10px;touch-action:manipulation;user-select:none}
.speed-controls button>span{font-size:26px;line-height:1}.speed-controls button>small{font-size:10px;line-height:1.3}
.speed-readout{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:85px;color:var(--muted);font-size:9px;letter-spacing:.04em}
.speed-readout output{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--gold);letter-spacing:0;white-space:nowrap}
@media(max-width:700px){.speed-controls{margin-left:auto}}

/* Keep end-of-score reading space inside the scrollable content, so controls fit short screens. */
.score::after{content:"";display:block;height:45vh}
