
:root{font-family:system-ui,Arial,sans-serif;color:#edf4fa;background:#0e1219}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#273241;border:1px solid #405166;color:#eef5fa;border-radius:10px;padding:10px 13px}button:disabled{opacity:.4}button.primary{background:#12ab9b;border-color:#12ab9b;color:#001f1f;font-weight:700}button:hover{filter:brightness(1.13)}input,textarea,select{background:#171f2a;border:1px solid #3c5062;color:#fff;border-radius:8px;padding:10px;min-width:0}header{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid #2b3848;background:#131b26}.brand{font-size:20px;font-weight:800}.brand b{color:#39ddc3}.brand small{color:#8298a9;font-size:11px;margin-left:8px}main{display:grid;grid-template-columns:minmax(230px,300px) 1fr;min-height:calc(100dvh - 64px)}aside{border-right:1px solid #2b3848;padding:15px;display:flex;flex-direction:column;gap:10px;max-height:calc(100dvh - 64px)}.row{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.row>*{flex-shrink:0}.grow{flex:1;min-width:0}.full{width:100%}.small{font-size:12px}.muted{color:#91a4b6}.item{display:block;text-align:left;width:100%;margin:4px 0;padding:12px;background:#182330;border:1px solid #293e4f}.item.active{border-color:#2fe0c7;background:#163632}.list{overflow:auto;flex:1}.editor{padding:22px;overflow:auto;max-height:calc(100dvh - 64px)}.editor .toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:13px}.editor .toolbar input{flex:1}.preview{border:1px solid #344356;border-radius:12px;min-height:50vh;background:#121923;padding:24px;overflow-wrap:anywhere;font-size:23px;line-height:1.38;white-space:pre-wrap}.preview p{margin:.35em 0}.preview img{max-width:100%;height:auto}.preview[contenteditable=true]{outline:2px solid #2fe0c7}.help{font-size:13px;color:#92a5b6}.hide{display:none!important}.stage{position:fixed;inset:0;background:#030405;color:#f6f6f6;z-index:10;display:flex;flex-direction:column}.stageHead,.stageFoot{background:#10151c;display:flex;align-items:center;gap:9px;justify-content:space-between;padding:8px 12px}.stageHead{min-height:49px}.stageFoot button{min-width:42px;min-height:44px}.stageReading{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px max(14px,4vw);scrollbar-color:#444 #080808}.stageText{white-space:pre;overflow-wrap:normal;word-break:normal;line-height:1.3;font-size:30px;max-width:100%}.stageText p{margin:.32em 0;white-space:pre;overflow-wrap:normal;word-break:normal;min-height:1.3em}.stageText img{display:block;max-width:100%;width:auto;height:auto;object-fit:contain}.stageText div{white-space:pre}.stageReading{overflow-x:hidden}.preview p:empty:before{content:" "}.preview img{max-width:100%;height:auto}.stageText a{color:#6fe6d7}.stageOptions{background:#17222f;padding:12px;display:grid;gap:9px;border-top:1px solid #405166}.stageOptions label{display:flex;align-items:center;gap:10px}.stageOptions input{flex:1}.stageOptions select{max-width:155px}.stageFoot button.go{background:#13b6a3;color:#002927}.toast{position:fixed;bottom:84px;left:50%;transform:translateX(-50%);background:#30445b;border-radius:12px;padding:10px 18px;z-index:20}.subhead{display:flex;justify-content:space-between;align-items:center;gap:8px}iframe{width:100%;height:68vh;border:0;background:#fff}.hint{color:#a2b2be;font-size:12px;margin:4px 0}.setitem{display:flex;align-items:center;gap:7px;margin:6px 0;border:1px solid #405166;border-radius:10px;padding:6px;cursor:grab;touch-action:pan-y}.setitem.dragover{border-color:#20d3b9;background:#18352f}.setDropZone{min-height:130px;padding:12px;border:2px dashed #405166;border-radius:12px}.setDropZone.dragover{border-color:#20d3b9;background:#142b2b}.songrow{display:flex;align-items:center;gap:5px;width:100%;margin:4px 0}.songrow .item{margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.songrow>button:last-child{padding:11px;font-size:17px}.artistGroup{margin:12px 0 4px;font-size:12px;font-weight:700;color:#62d8c7;letter-spacing:.4px}.setlistPicker{min-width:120px}#listTitle{max-width:250px}@media(max-width:690px){#listArea .toolbar{align-items:stretch}#listTitle{max-width:100%;flex:1}#setlistPicker{max-width:44%}.songrow>button:last-child{min-width:44px}}.setitem span{flex:1}.actions{display:flex;gap:6px;flex-wrap:wrap}@media(max-width:690px){header{padding:9px 12px}.brand{font-size:17px}main{display:flex;flex-direction:column}aside{max-height:none;border-right:0;border-bottom:1px solid #36465a;padding:10px}.list{max-height:185px}.editor{padding:12px;max-height:none}.preview{font-size:20px;min-height:35vh;padding:12px}.stageFoot button{padding:8px}.stageReading{padding:12px}.stageHead{font-size:13px}}
 
.stageHead{flex-wrap:nowrap;min-width:0}.stageHead #stageTitle{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.stageHead .row{flex:0 0 auto;flex-wrap:nowrap;gap:5px}.stageHead button{min-width:38px;white-space:nowrap;padding:7px 10px}.stageReading{touch-action:pan-y;padding:12px 14px}.stageText{margin-inline:auto}.stageText p{margin:.16em 0}.stageFoot{padding-bottom:max(6px,env(safe-area-inset-bottom));}.stageFoot button{min-width:42px}.stageOptions{max-height:55dvh;overflow:auto}.stageOptions label{font-size:13px}.stageOptions input[type=checkbox]{flex:0 0 auto}.setitem{position:relative}.setDropZone.dragover,.setitem.dragover{background:transparent;border-color:#405166}.setitem.insert-before::before,.setitem.insert-after::after{content:"";position:absolute;left:-5px;right:-5px;height:3px;background:#39ddc3;border-radius:8px;box-shadow:0 0 8px #39ddc3;pointer-events:none;z-index:2}.setitem.insert-before::before{top:-5px}.setitem.insert-after::after{bottom:-5px}.setDropZone.insert-empty{border-color:#39ddc3;background:#142b2b}.stage.gestureOnly .stageFoot{display:none}.stage:fullscreen{width:100%;height:100%;background:#030405}.stage:fullscreen .stageHead{padding-top:max(4px,env(safe-area-inset-top))}@media(max-width:690px),(max-height:500px) and (orientation:landscape){.stageHead{padding:4px 7px;min-height:38px;gap:5px}.stageHead #stageTitle{font-size:11px}.stageHead button{font-size:16px;min-width:32px;min-height:32px;padding:3px 7px}.stageFoot{padding:4px 8px;gap:5px}.stageFoot button{min-height:36px;min-width:36px;padding:3px 10px}.stageReading{padding:6px 8px}.stageOptions{padding:7px;gap:5px}}@media(orientation:landscape) and (max-height:500px){.stageText{line-height:1.18}.stageOptions{max-height:40dvh}.stageHead #stageTitle{font-size:11px}}

.stageReading{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.stageHead{padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right))}.stageFoot{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.stageText img{display:block;width:var(--score-width,100%);max-width:100%;height:auto;object-fit:contain;margin-inline:0}.stageHead #headerPlay{color:#39ddc3}.stagePopup{position:fixed;z-index:40;display:flex;gap:6px;background:#192633;border:1px solid #537080;border-radius:12px;padding:7px;box-shadow:0 6px 24px #000b;white-space:nowrap}.stagePopup button{min-width:42px;min-height:42px}.stageOptions label{flex-wrap:wrap}.stageOptions output{min-width:52px}.stage:fullscreen{box-sizing:border-box}.stageText{min-width:0}@media(orientation:landscape) and (max-height:650px){.stageReading{padding-left:max(36px,env(safe-area-inset-left));padding-right:max(36px,env(safe-area-inset-right))}.stageHead,.stageFoot{padding-left:max(36px,env(safe-area-inset-left));padding-right:max(36px,env(safe-area-inset-right))}}@media(max-width:480px){.stageHead .row{gap:3px}.stageHead button{min-width:30px;padding:3px 6px}}
.stage.gestureOnly .stageFoot{display:none!important}.stageReading{flex:1 1 0;min-height:0}.stage.gestureOnly .stageReading{flex:1 1 0}.setitem.note{border-style:dashed;color:#e8c780}.setitem.section{background:#183b39;color:#75f1de;font-weight:750}.setitem.selected{outline:1px solid #54bead}.setitem span{overflow-wrap:anywhere;min-width:0}.stageText img{width:var(--score-width,100%);max-width:100%;height:auto}.stageText{overflow-wrap:normal}.stageText.cue{white-space:pre-wrap;overflow-wrap:anywhere;font-weight:750;color:#e8c780}.stageText img{margin-inline:0}
.preview img{cursor:pointer;max-width:100%;height:auto}.preview img.selectedScore{outline:2px solid #39ddc3;outline-offset:3px}.stageText img[data-score-width]{max-width:100%}.stageText .sectionIntroTitle{color:#39ddc3;font-weight:800;margin-bottom:.6em}.stageText .sectionIntroSong{color:#f5f5f5;font-weight:650}.stageText .sectionIntroTime{font-size:.65em;color:#a1b2c6;margin-top:.7em}.setitem .visibility{font-size:11px;color:#a9bacb;display:block}.sfDialog{background:#172431;color:#eef6ff;border:1px solid #587083;border-radius:14px;padding:18px;width:min(440px,92vw);max-height:90dvh;overflow:auto}.sfDialog::backdrop{background:#000a}.sfDialog textarea{width:100%;min-height:110px;resize:vertical}.sfDialog label{display:flex;align-items:center;gap:9px;margin:12px 0}.sfDialog input[type=checkbox]{width:20px;height:20px}.sfDialog .actions{justify-content:flex-end}
.stageText.sectionIntro{white-space:pre;font-weight:650}.stageText.sectionIntro p:first-child{color:#39ddc3;font-weight:800;margin-bottom:.4em}.stageText.sectionIntro p{margin:.1em 0;white-space:pre}.stageText.cue p{white-space:pre-wrap;overflow-wrap:anywhere}
.danger{color:#ffb2b2!important;border-color:#70454a!important}.songrow .deleteSongSmall{color:#ffb2b2;font-size:13px;padding:8px;min-width:35px;flex:none}.duplicateActions{display:grid;gap:8px;margin-top:12px}.duplicateActions button{text-align:left}.sfDialog input[type=text]{width:100%}.duplicateChoices{display:grid;gap:6px;max-height:28dvh;overflow:auto}.duplicateChoices label{margin:0;padding:8px;border:1px solid #4b6073;border-radius:8px}.duplicateChoices label input{flex:none}
.scorePopover{position:fixed;z-index:40;background:#172431;border:1px solid #587083;border-radius:12px;padding:12px;box-shadow:0 8px 30px #0009;max-width:calc(100vw - 16px);width:max-content;align-items:center;flex-wrap:wrap}.scorePopover label{white-space:nowrap}.preview img{touch-action:pan-y;-webkit-touch-callout:none;user-select:none}.sfDialog .sharePreview{white-space:pre-wrap;max-height:24dvh;overflow:auto;border:1px solid #405166;border-radius:8px;padding:9px;font-size:13px}.sfDialog select{width:100%}

.stageText{-webkit-text-size-adjust:none;text-size-adjust:none}.stageReading.manualOverflow{overflow-x:auto;touch-action:pan-x pan-y}.stageReading.manualOverflow .stageText{margin-left:0}.stageOptions{position:absolute;z-index:11;top:52px;right:12px;bottom:auto;width:min(420px,calc(100% - 24px));max-height:calc(100% - 64px);overflow:auto;background:#17222f;border:1px solid #405166;border-radius:13px;box-shadow:0 12px 35px #0009;padding:12px;gap:8px;grid-template-columns:1fr 1fr}.stageOptions label{font-size:12px;gap:6px;min-width:0;flex-wrap:wrap}.stageOptions label:has(input[type=range]),.stageOptions label:has(input[type=checkbox]),.stageOptionsHead{grid-column:1/-1}.stageOptions input[type=range]{min-width:80px}.stageOptions output{min-width:64px;font-size:11px;text-align:right}.stageOptionsHead{display:flex;justify-content:space-between;align-items:center}.stageOptionsHead button{padding:5px 10px}.scorePopover{width:min(360px,calc(100vw - 16px));display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.scoreField{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 8px}.scoreField label{grid-column:1/-1;display:flex;justify-content:space-between}.scoreField input[type=range]{width:100%;min-width:0;padding:0}.scoreSteps{display:flex;gap:4px}.scoreSteps button{padding:5px 8px}.scorePopover>button{padding:8px 5px}@media(max-width:690px),(orientation:landscape) and (max-height:650px){.stageOptions{top:40px;right:6px;width:min(360px,calc(100% - 12px));max-height:calc(100% - 48px);padding:9px;gap:5px}.scorePopover{max-height:80dvh;overflow:auto}}
.sfHeader{background:linear-gradient(110deg,#102647,#0a1224);border-color:#265c7e}.sfIdentity{display:flex;align-items:center;gap:13px;min-width:0}.sfHub{display:flex;gap:7px;align-items:center;color:#edf8ff;text-decoration:none;font-size:12px;font-weight:900;letter-spacing:.7px;white-space:nowrap}.sfHub b{color:#10e9f2}.sfSeparator{height:30px;border-left:1px solid #36506b}.sfIdentity .brand{display:flex;align-items:baseline;gap:7px;min-width:0}.sfIdentity .brand h1{font-size:22px;line-height:1;margin:0;white-space:nowrap}.sfIdentity .brand small{margin:0;white-space:nowrap}body{background:radial-gradient(ellipse at 55% -10%,#193568 0%,transparent 45%),#080d1b}main{background:#0d1420;grid-template-columns:minmax(230px,300px) minmax(0,1fr)}.editor{min-width:0}button.primary{background:#10e9f2;border-color:#10e9f2;color:#05232b}.sfInfo{max-width:1100px;margin:35px auto 0;padding:0 22px 25px}.sfGuide{background:linear-gradient(135deg,#11233f,#13152f);border:1px solid #265c7e;border-radius:19px;padding:25px;color:#dce8f8}.sfKicker{color:#10e9f2;font-weight:800;font-size:12px;letter-spacing:1.4px}.sfGuide h2{font-size:clamp(22px,3vw,34px);color:#f2f7ff}.sfGuide h3{color:#f2f7ff}.sfGuide p{color:#a4b7d0;line-height:1.65}.sfGuideGrid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sfGuide details{border-top:1px solid #284960;padding:10px 0}.sfGuide summary{cursor:pointer}.sfRelated{display:flex;flex-wrap:wrap;gap:14px;margin-top:20px}.sfRelated a{color:#10e9f2;text-decoration:none}.sfInfo .gplay-footer{border-top:1px solid #244a6b}.sfInfo a:focus-visible,.sfHub:focus-visible{outline:2px solid #10e9f2;outline-offset:3px}@media(max-width:690px){.sfHub span,.sfSeparator,.sfIdentity .brand small{display:none}.sfIdentity{gap:7px}.sfHub img{width:29px;height:29px}.sfIdentity .brand h1{font-size:18px}.sfHeader{gap:8px}.sfHeader .row{flex-wrap:nowrap;gap:5px}.sfHeader button{padding:9px}.sfGuideGrid{grid-template-columns:1fr;gap:0}.sfInfo{padding:0 12px 20px}.sfGuide{padding:18px}}
.batchDialog{width:min(760px,94vw)}#batchRows{max-height:44dvh;overflow:auto}.batchRow{display:grid;grid-template-columns:24px minmax(0,1fr) minmax(90px,32%);gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #405166}.batchRow small{display:block;overflow-wrap:anywhere;color:#91a4b6;font-size:10px}.batchRow input{width:100%;min-width:0;padding:6px}.batchRow input[type=checkbox]{width:20px}.propLink{display:grid;grid-template-columns:1fr auto;gap:5px;margin-bottom:9px}.propLink input{width:100%;min-width:0}.propLink input[type=url]{grid-column:1}.propLink a{color:#39ddc3;font-size:12px;overflow-wrap:anywhere}.propertiesSummary{color:#9db4c9;font-size:13px;margin:6px 0 12px}.propertiesSummary a{color:#39ddc3;margin-right:12px}#propertiesDialog label{justify-content:space-between}#propertiesDialog label input{max-width:65%;min-width:0}
#artistRows{max-height:48dvh;overflow:auto;margin:12px 0}.artistManageRow{display:flex;align-items:center;gap:6px;border-bottom:1px solid #405166;padding:8px 0}.artistManageRow input{flex:1;min-width:0;width:100%}.artistManageRow small{color:#9db4c9;white-space:nowrap}.artistManageRow button{padding:7px}.artistGroup{overflow-wrap:anywhere}#newArtistName{flex:1;min-width:0}
.organizer{width:min(960px,95vw)}.organizerGrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.organizerGrid input{width:100%;min-width:0}.organizerGrid .actions{flex-wrap:nowrap}.organizerGrid .actions input{flex:1}#organizeSongs,#organizeArtists{height:46dvh;overflow:auto;margin:8px 0}.orgSong{display:flex;gap:7px;align-items:center;padding:7px;border-bottom:1px solid #405166;cursor:grab}.orgSong input{width:19px;flex:none}.orgSong span{overflow-wrap:anywhere;min-width:0}.orgSong small{display:block;color:#9db4c9}.orgArtist{width:100%;text-align:left;margin:3px 0}.orgArtist.over{outline:2px solid #39ddc3}.preview.editLines [data-line-type="chords"]{border-left:3px solid #39ddc3;padding-left:6px}.preview.editLines [data-line-type="chords"]:hover{background:#153333}.preview.editLines [data-line-type="lyrics"]{border-left:3px solid #59718a;padding-left:6px}.orgGrip{font-size:22px;cursor:grab;color:#91abbf;flex:none;user-select:none}.orgSong.dragging{opacity:.5}.orgArtist.over{background:#15554d!important;border-color:#39ddc3!important}.orgSong span[draggable=true]{cursor:grab;user-select:none}.backupReview{width:min(900px,94vw)}.backupCompare{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.backupCompare section{min-width:0;border:1px solid #405166;border-radius:8px;padding:10px}.backupCompare select{width:100%;min-width:0}.backupCompare h4{margin:0 0 8px}.backupPreview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:32dvh;overflow:auto;background:#101821;padding:8px;border-radius:6px;font-size:13px}.backupPreview img{max-width:100%;height:auto}.backupMeta{font-size:12px;color:#9db4c9;overflow-wrap:anywhere;white-space:pre-wrap;margin:8px 0}.conflictActions{flex-wrap:wrap}@media(max-width:600px){.backupCompare section{padding:6px}.backupPreview{max-height:24dvh;font-size:11px}.backupCompare h4{font-size:13px}}#headerSetPlay{flex:none;min-width:38px}#fitVertical[aria-pressed="true"]{background:#15554d;border-color:#39ddc3;color:#fff}@media(max-width:690px){.sfHeader{position:sticky;top:0;z-index:20}.sfHeader:has(#headerSetPlay:not(.hide)) #newBtn{display:none}.sfHeader #headerSetPlay{padding:7px 11px}.stageHead .row{gap:3px}.stageHead button{min-width:30px;padding:3px 6px}.stageHead #stageTitle{min-width:0}} .stage{z-index:1000;isolation:isolate}body.stageActive>.sfHeader,body.stageActive>main,body.stageActive>.sfInfo{visibility:hidden;pointer-events:none}body.stageActive>.sfHeader{position:static}#fitVertical{color:#39ddc3}.stageHead .row{flex-shrink:0}@media(max-width:690px){.stageHead button{min-width:36px;min-height:36px}.stageHead #stageTitle{font-size:11px}}.storageStatus{border:1px solid #405166;border-radius:8px;padding:9px;margin-top:8px;display:grid;gap:6px}.storageStatus strong{color:#39ddc3;font-size:12px}.storageStatus small{color:#b4c6d9;font-size:11px}.storageStatus .hint{margin:0;line-height:1.45}.storageStatus strong.saveFailed{color:#ff9999}#dedupeGroups select,#dedupeA,#dedupeB{width:100%;min-width:0}#dedupeGroups{margin-bottom:10px}.timingPanel{margin:8px 0;padding:10px;border:1px solid #405166;border-radius:8px;font-size:13px;display:flex;gap:12px;flex-wrap:wrap;align-items:center}.timingPanel input{padding:5px}.timingPanel #timingSummary{display:grid;gap:3px;color:#b9cadd}.timingPanel strong{color:#39ddc3}.stageClock{font-size:12px;color:#aabacb;font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;margin:0 4px}@media(max-width:690px){.stageClock{font-size:10px;margin:0 2px}.timingPanel{font-size:12px}} 
.stage[data-theme="light"] .stageReading{background:#fff;color:#101010}.stage[data-theme="light"] .stageText{color:#101010}.stage[data-theme="warm"] .stageReading{background:#17120e;color:#ffe1ac}.stage[data-theme="warm"] .stageText{color:#ffe1ac}.stageText{opacity:var(--stage-contrast,100%)}.stageText img{opacity:1}.stage.controlsLocked button:not(#stageLock){pointer-events:none;opacity:.45}.stage.controlsLocked #stageLock{background:#15554d;color:white;border-color:#39ddc3}.stageHead #stageLock{font-size:11px;padding:4px 7px}.defaultsHint{font-size:12px;color:#aabacb;margin:8px 0}.defaultsHint button{margin-left:5px}.stageOptions label:has(#stageContrast){grid-column:1/-1}@media(max-width:690px){.stageHead #stageLock{min-width:34px;padding:3px;font-size:10px}.stageHead .row{gap:2px}.stageHead button{min-width:30px;padding:3px 5px}}

.lineDialog{width:min(900px,94vw)}.lineWorkspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.lineWorkspace form{min-width:0;display:grid;gap:8px;align-content:start}.lineWorkspace form input,.lineWorkspace form select,.lineWorkspace form textarea{max-width:100%;min-width:0}.lineWorkspace form label{flex-wrap:wrap}.lineWorkspace #lineRows{max-height:52dvh;overflow:auto;min-height:100px}.lineRow{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:3px 0;padding:7px;font-size:12px}.lineRow small{display:block;color:#9db4c9}.lineRow.selected{border-color:#39ddc3;background:#153c42}.lineRow[aria-disabled=true]{opacity:.65}#lineSample{white-space:pre-wrap;overflow-wrap:anywhere;max-height:80px;overflow:auto;margin:0}.lineWorkspace textarea{width:100%;min-height:60px}@media(max-width:690px){.lineWorkspace{grid-template-columns:1fr;gap:7px}.lineWorkspace #lineRows{max-height:23dvh}.lineWorkspace form{gap:4px}.lineDialog{max-height:92dvh;overflow:auto}}

.lineGroupTools{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 12px;padding:8px;border:1px solid #405166;border-radius:8px;font-size:12px}.lineGroupTools label{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.lineGroupTools input:not([type=checkbox]){width:130px;min-width:0}.lineGroupTools #lineTotalBars{width:72px}.lineGroupTools button{padding:6px 9px}.lineRowWrap{display:flex;align-items:center;gap:6px}.lineRowWrap input{width:18px;flex:none}.lineRowWrap .lineRow{flex:1;min-width:0}.lineRow[draggable=true]{cursor:grab}.lineDropBefore{box-shadow:0 -3px #39ddc3}.lineDropAfter{box-shadow:0 3px #39ddc3}#lineCount{color:#39ddc3}@media(max-width:690px){.lineGroupTools{gap:4px;padding:5px}.lineGroupTools button{font-size:11px;padding:5px}.lineWorkspace #lineRows{max-height:25dvh}}

#lineDialog[open]{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;box-sizing:border-box;padding:12px;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.lineWorkspaceHead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.lineWorkspaceHead h3{margin:0 0 4px}.lineWorkspaceHead #lineSongTitle{color:#9db4c9;font-size:13px}.lineWorkspaceHead .hint{margin:0;max-width:45%;text-align:right}.lineGroupTools{flex:none;margin:0;gap:6px;padding:7px}.lineWorkspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;overflow:hidden}.lineWorkspace #lineRows{height:100%;max-height:none;min-height:0;overflow:auto;padding:0 5px;box-sizing:border-box}.lineWorkspace #lineForm{display:none;overflow:auto;min-height:0;padding:8px;border:1px solid #405166;border-radius:8px;align-content:start;gap:10px}.lineDialog.inspectRow .lineWorkspace{grid-template-columns:minmax(0,1fr) minmax(240px,330px)}.lineDialog.inspectRow #lineForm{display:grid}.lineInspectorHead{display:flex;align-items:center;justify-content:space-between}.lineWorkspaceFoot{flex:none;margin:0!important;padding:7px 0 env(safe-area-inset-bottom);border-top:1px solid #405166;flex-wrap:wrap}.lineRowWrap{border-bottom:1px solid #344457;padding:3px 0;gap:8px}.lineRowWrap .lineRow{display:grid;grid-template-columns:35px minmax(0,1fr);gap:2px 8px;background:transparent;border:1px solid transparent;border-radius:5px;font-size:15px;padding:6px;min-height:32px;margin:0}.lineRowWrap .lineRow.selected{background:#153c42;border-color:#39ddc3}.lineRowWrap .lineRow>small:last-child{grid-column:2}.lineRowWrap .lineNumber{color:#9db4c9;font-size:11px}.lineTextPreview{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}.lineTextPreview img{display:block;max-width:min(100%,320px);max-height:140px;object-fit:contain}.lineRowWrap[data-kind=chords] .lineTextPreview{color:#8ce3db;font-weight:bold}.lineRowWrap[data-kind=section] .lineTextPreview,.lineRowWrap[data-kind=cue] .lineTextPreview{color:#f9ce8b;font-weight:bold}.lineRowWrap[data-kind=blank] .lineTextPreview{color:#8496a8;font-size:12px}.inlineLineType{width:110px;flex:none;font-size:12px;padding:5px}.lineSectionHeading{border-left:4px solid #39ddc3;background:#153c42;padding:7px 10px;margin-top:8px;font-size:13px;font-weight:bold;color:#a5f3fc}.formBlock{font-size:16px;padding:14px;border-left:5px solid #39ddc3}.lineDialog:not(.hasSelection) #lineGroupApply,.lineDialog:not(.hasSelection) #lineDistribute{opacity:.5}
@media(max-width:690px){#lineDialog[open]{padding:6px;gap:4px}.lineWorkspaceHead .hint{display:none}.lineGroupTools{max-height:30dvh;overflow:auto}.lineWorkspaceFoot button{font-size:11px;padding:7px}.lineDialog.inspectRow .lineWorkspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr)}.lineWorkspace #lineForm{padding:6px;gap:5px}.lineRowWrap{gap:4px}.lineRowWrap .lineRow{font-size:13px;grid-template-columns:25px minmax(0,1fr);gap:2px 3px}.inlineLineType{width:78px;font-size:10px;padding:4px}.lineWorkspaceHead h3{font-size:16px}.lineWorkspace #lineRows{max-height:none}}

/* Override generic dialog widths and flex constraints. */
#lineDialog[open]{width:100vw;max-width:100vw;min-width:0;left:0;right:0;top:0;bottom:0;overflow:hidden}
#lineDialog .lineRowWrap{display:grid;grid-template-columns:22px minmax(0,1fr) 110px;align-items:center;min-width:0;width:100%;box-sizing:border-box}
#lineDialog .lineRowWrap .lineRow{width:100%;min-width:0;max-width:100%;display:grid;grid-template-columns:35px minmax(0,1fr);text-align:left}
#lineDialog .lineRowWrap .inlineLineType{width:110px;max-width:100%;min-width:0;box-sizing:border-box}
#lineDialog .lineTextPreview{display:block;min-width:0;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal}
#lineDialog .lineWorkspace{min-width:0;width:100%;box-sizing:border-box}
#lineDialog .lineWorkspace #lineForm{min-width:0;box-sizing:border-box}
#textSetSource{width:100%;box-sizing:border-box;margin:8px 0}#textSetRows{max-height:42dvh;overflow:auto}.setImportRow{display:grid;gap:5px;padding:8px;border-bottom:1px solid #405166}.setImportRow small{color:#aabacb}.setImportRow select,.setImportRow input{width:100%;box-sizing:border-box}.setImportRow.matched{border-left:3px solid #39ddc3}.setImportRow.conflict{border-left:3px solid #e7b66a}
@media(max-width:690px){#lineDialog .lineRowWrap{grid-template-columns:20px minmax(0,1fr) 78px;gap:4px}#lineDialog .lineRowWrap .lineRow{grid-template-columns:25px minmax(0,1fr)}#lineDialog .lineRowWrap .inlineLineType{width:78px}}

#lineDialog .coloredSection{border-left:4px solid var(--section-color);background:color-mix(in srgb,var(--section-color) 12%,transparent)}
#lineDialog .lineSectionHeading.coloredSection{color:var(--section-color);background:color-mix(in srgb,var(--section-color) 19%,#17232e)}
#lineDialog .lineRowWrap.groupSelected{outline:1px solid #d9faff;outline-offset:-1px;background:color-mix(in srgb,var(--section-color,#39ddc3) 26%,#17232e)}
#lineDialog .lineRowWrap.groupSelected .lineRow{background:transparent}
#lineDialog .lineRowWrap .lineRow.selected{border-color:#a5f3fc}
#lineDialog .formBlock.coloredSection{border-left-color:var(--section-color)}
#lineDialog .formBlock.selected{outline:2px solid #d9faff;outline-offset:-2px}
#lineDialog .lineRowWrap{user-select:none}

#lineDialog .groupLineHint{display:none;font-size:12px;color:#a5f3fc;line-height:1.5;margin:0}
#lineDialog #lineForm.multiRow .singleLineField{display:none}
#lineDialog #lineForm.multiRow .groupLineHint{display:block}
#lineDialog #lineForm.multiRow #lineApply{background:#10dce5;color:#10232b;font-weight:bold}
#lineDialog #lineFeedback{flex:none;color:#a5f3fc;font-size:13px;min-height:0}
#lineDialog #lineFeedback:empty{display:none}
#lineDialog .lineSectionHeading{cursor:pointer}

#pasteDialog .mergeCard{display:grid;gap:7px;border:1px solid #405166;border-left:4px solid #e7b66a;border-radius:8px;padding:10px;margin:8px 0;background:#202c3b}
#pasteDialog .mergeCard[data-status=exact]{border-left-color:#39ddc3}
#pasteDialog .mergeCard label{justify-content:flex-start;gap:8px}
#pasteDialog .mergeCard small{color:#aabacb;font-size:12px}
#pasteDialog .mergeCard input[type=text],#pasteDialog .mergeCard select{width:100%;min-width:0;box-sizing:border-box}
.mergeChordPreview{color:#5eead4;font-weight:bold;white-space:pre-wrap;overflow-wrap:anywhere}
.mergeSongPreview{background:#080d13;color:#f1f5f9;padding:12px;border-radius:8px;max-height:60dvh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.mergeSongPreview img{max-width:100%;height:auto}
#pasteDialog[open]{max-height:94dvh;overflow:auto}
#pasteReviewTools{flex-wrap:wrap}
.storageStatus .hint{color:#f0c78b}

#libraryLoading{position:fixed;inset:0;z-index:99999;background:#101923;display:grid;place-items:center;padding:16px}#libraryLoading.hide{display:none}.loadCard{width:min(440px,100%);padding:24px;background:#17232e;border:1px solid #405166;border-radius:12px;box-sizing:border-box}.loadCard h2{color:#39ddc3;margin:0 0 16px}.loadCard progress{width:100%;height:18px;accent-color:#10dce5}.loadCard small{display:block;margin-top:16px;color:#aabacb}.loadCard button{margin-top:12px}

.setitem .setContentMode{width:140px;max-width:35%;min-width:0;flex:0 1 140px;font-size:12px;padding:5px;box-sizing:border-box}@media(max-width:690px){.setitem .setContentMode{width:95px;flex:0 1 95px;font-size:10px;padding:4px}}

/* Compact workspace; Stage styles intentionally untouched. */
body:not(.stageActive) .sfHeader{padding:8px 14px;min-height:54px;height:auto}
body:not(.stageActive) aside{padding:11px;gap:8px}
body:not(.stageActive) aside .row{gap:6px}
body:not(.stageActive) aside button,body:not(.stageActive) .sfHeader button,body:not(.stageActive) .editor .toolbar button{padding:8px 10px}
body:not(.stageActive) aside .item{padding:9px 11px;margin:3px 0}
body:not(.stageActive) aside input{padding:9px}
body:not(.stageActive) .editor{padding:16px}
.sfModePicker{display:flex;align-items:center;gap:7px;font-size:12px;color:#aabacb}
.sfModePicker select{padding:6px 8px;font-size:13px}
.sfArtistItem{text-align:left}
body[data-interface-mode="simple"] #organizeLibrary,
body[data-interface-mode="simple"] #libraryDefaults,
body[data-interface-mode="simple"] #globalLayers,
body[data-interface-mode="simple"] #manageArtists,
body[data-interface-mode="simple"] #newBtn,
body[data-interface-mode="simple"] #libraryTools,
body[data-interface-mode="simple"] #welcome,
body[data-interface-mode="simple"] #songArea .toolbar>:not(#stageOpen):not(#title):not(#artist):not(#songProperties):not(#edit):not(#save):not(#songAddSetlistTop),
body[data-interface-mode="simple"] #songArea #imageTools,
body[data-interface-mode="simple"] #songArea #selectedImageTools,
body[data-interface-mode="simple"] #songArea #editHelp,
body[data-interface-mode="simple"] #songArea #propertiesSummary,
body[data-interface-mode="simple"] #songArea>.actions,
body[data-interface-mode="simple"] #listArea .actions,
body[data-interface-mode="simple"] #listArea #timingPanel,
body[data-interface-mode="simple"] #listArea .toolbar>:not(#setlistPicker):not(#playList):not(#addSongs):not(#importSetlist),
body[data-interface-mode="simple"] #listArea>.hint,
body[data-interface-mode="advanced"] #libraryTools,
body[data-interface-mode="advanced"] #manageArtists{display:none!important}
@media(max-width:690px){
 body:not(.stageActive) aside{max-height:none}
 body:not(.stageActive) aside>#items{max-height:none;min-height:35dvh;flex:1 1 auto}
 body:not(.stageActive) main{min-height:calc(100dvh - 60px)}
 body[data-interface-mode="simple"] main{display:flex;flex-direction:column}
 body[data-interface-mode="simple"] aside{min-height:calc(100dvh - 75px)}
 body[data-interface-mode="simple"] .editor{padding:8px 12px}
 body[data-interface-mode="simple"] .editor:has(#songArea.hide):has(#listArea.hide){display:none}
 body[data-interface-mode="simple"] .sfInfo{display:none}
}

/* Mobile scroll hotfix: avoid competing viewport and nested scroll constraints. */
@media(max-width:690px){
 html,body{overscroll-behavior-y:contain}
 body:not(.stageActive) main{min-height:0}
 body:not(.stageActive) aside{height:auto;min-height:0;max-height:none;overflow:visible}
 body:not(.stageActive) aside>#items{
   display:block;flex:0 1 auto;min-height:0;max-height:62dvh;
   overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;
   -webkit-overflow-scrolling:touch;touch-action:pan-y;
 }
 body[data-interface-mode="simple"] aside{min-height:0}
 body[data-interface-mode="simple"] main{min-height:0}
 body:not(.stageActive) .editor{max-height:none}
}

/* Mobile workspace: tab content must not be buried under a full-height library. */
@media(max-width:690px){
 body:not(.stageActive) main{display:flex;flex-direction:column;min-height:0}
 body:not(.stageActive) aside{height:auto;min-height:0;max-height:none;overflow:visible}
 body:not(.stageActive) aside>#items{max-height:42dvh;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y}
 body:not(.stageActive) .editor{height:auto;max-height:none;min-height:0;overflow:visible}
 body:not(.stageActive)[data-library-tab="lists"] aside>#items{display:none}
 body:not(.stageActive)[data-library-tab="lists"] .editor{display:block}
 body:not(.stageActive)[data-library-tab="artists"] aside>#items{max-height:48dvh}
 body:not(.stageActive)[data-library-tab="songs"] #songArea:not(.hide){scroll-margin-top:65px}
 body:not(.stageActive)[data-library-tab="lists"] #listArea{scroll-margin-top:65px}
 body[data-interface-mode="simple"] #songArea .toolbar>#stageOpen{display:inline-flex!important}
 body[data-interface-mode="simple"] #listArea .toolbar>#playList{display:inline-flex!important}
}

/* Stage settings: compact bottom sheet leaves the song visible during live adjustments.
   Scoped to mobile only; the stage engine and settings persistence are unchanged. */
@media(max-width:690px){
 .stage #stageOptions:not(.hide){
  position:absolute;top:auto;bottom:max(8px,env(safe-area-inset-bottom));
  left:8px;right:8px;width:auto;
  max-height:min(43dvh,370px);overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
  padding:10px 12px;gap:8px;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  background:rgba(20,32,45,.94);box-shadow:0 5px 22px #000a;
  border-radius:12px;
 }
 .stage #stageOptions .stageOptionsHead{
  position:sticky;top:-10px;z-index:2;
  padding:5px 0;background:#14202d;
 }
 .stage #stageOptions .actions{grid-column:1/-1}
 .stage #stageOptions .actions button{padding:6px 8px;font-size:12px}
 .stage #stageOptions label{font-size:12px}
 .stage #stageOptions label:has(input[type=range]){grid-column:1/-1}
 .stage #stageOptions input[type=range]{touch-action:pan-x}
}
@media(max-width:690px) and (orientation:landscape){
 .stage #stageOptions:not(.hide){left:auto;right:6px;bottom:6px;width:min(340px,55vw);max-height:70dvh}
}

/* Stage font size: precise one-pixel touch controls. */
.stageFontControls{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.stageFontControls>#font{min-width:50px;flex:1}
.stageFontStepper{display:flex;align-items:center;gap:4px;flex:none}
.stageFontStepper button{min-width:35px;min-height:38px;padding:4px 8px;font-size:20px}
.stageFontStepper input{width:58px;min-width:0;flex:none;text-align:center;padding:6px 3px;font-size:16px}
.stageFontStepper span{font-size:12px}
@media(max-width:690px){
 .stage #stageOptions .stageFontLabel{display:flex;flex-wrap:wrap;gap:6px}
 .stage #stageOptions .stageFontControls{flex:1 1 100%}
 .stage #stageOptions .stageFontControls>#font{display:none}
 .stage #stageOptions .stageFontStepper{width:100%;justify-content:center;gap:10px}
 .stage #stageOptions .stageFontStepper button{min-width:48px;min-height:44px}
 .stage #stageOptions .stageFontStepper input{width:74px;min-height:44px}
 .stage #stageOptions .stageFontLabel output{flex:1 1 100%;text-align:center}
}

/* Shared app tools remain reachable in all modes. */
#appSettings{min-width:36px;padding:7px 10px;font-size:19px;line-height:1.2}
#appSettingsDialog #pwaPanel{display:grid;gap:8px;margin:8px 0}
#appSettingsDialog #pwaPanel[hidden]{display:none!important}
.sfImportChoices{display:grid;gap:5px;margin:12px 0}
body[data-interface-mode="simple"] #listArea .toolbar>#importSetlist{display:inline-flex!important}
body[data-interface-mode="simple"] #listArea .toolbar>#playList{display:inline-flex!important}
body[data-interface-mode="simple"] #listArea #setlistPicker{max-width:none;flex:1 1 100%}
body[data-interface-mode="simple"] #items .deleteSongSmall,
body[data-interface-mode="simple"] #entries .setitem>button:not(.setContentMode),
body[data-interface-mode="simple"] #sidebarNewList{display:none!important}
body[data-interface-mode="simple"] #entries .setitem{cursor:pointer}
body[data-interface-mode="simple"] #songArea .toolbar>#title{display:block!important;pointer-events:none;border-color:transparent;background:transparent;font-weight:700;flex:1 1 100%}
body[data-interface-mode="simple"] #songArea .toolbar>#artist{display:block!important;pointer-events:none;border-color:transparent;background:transparent;color:#9db4c9;flex:1 1 100%;max-width:none!important}
@media(max-width:690px){
 .sfHeader .row{flex-wrap:wrap;justify-content:flex-end;flex:0 1 auto}
 .sfHeader .row button{padding:7px 8px;font-size:13px}
 #appSettings{font-size:18px;min-width:34px}
 body:not(.stageActive)[data-library-tab="lists"] #search{display:none}
 body[data-interface-mode="simple"] #listArea #entries{min-height:inherit}
}

/* Keep per-song content layers available in the performance-focused mode. */
body[data-interface-mode="simple"] #entries .setContentMode{flex-shrink:0;min-width:84px;max-width:42%;width:auto;white-space:normal;min-height:38px}
.sfDefaultMode{display:grid;gap:7px;padding:10px;border:1px solid #405166;border-radius:8px;margin:8px 0}
.sfDefaultMode label{font-weight:600}
.sfDefaultMode select{width:100%}
.sfDefaultMode .hint{margin:0}

/* Mobile browsing uses the available viewport, rather than a fixed fraction of it. */
#mobileSongBack{display:none}
#userGuideDialog{max-height:88dvh;overflow-y:auto}
#userGuideDialog .subhead{position:sticky;top:0;background:#17222f;z-index:1}
@media(max-width:690px){
 body:not(.stageActive){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
 body:not(.stageActive)>.sfHeader{flex:none;position:relative;top:auto}
 body:not(.stageActive)>main{flex:1 1 0;min-height:0;height:auto;overflow:hidden;display:flex;flex-direction:column}
 body:not(.stageActive)>main>aside{flex:1 1 0;min-height:0;height:auto;max-height:none;overflow:hidden}
 body:not(.stageActive)>main>aside>#items{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior-y:contain}
 body:not(.stageActive)>main>aside>.libraryTools{max-height:32dvh;overflow:auto}
 body:not(.stageActive)>.sfInfo{display:none}
 body:not(.stageActive):not([data-library-tab="lists"]):not([data-mobile-song-open="true"])>main>.editor{display:none}
 body:not(.stageActive)[data-mobile-song-open="true"]>main>aside{display:none}
 body:not(.stageActive)[data-mobile-song-open="true"]>main>.editor,
 body:not(.stageActive)[data-library-tab="lists"]>main>.editor{display:block;flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior-y:contain}
 body:not(.stageActive)[data-library-tab="lists"]>main>aside{flex:none}
 body:not(.stageActive)[data-mobile-song-open="true"] #mobileSongBack{display:block;margin-bottom:8px}
}

.sfInstallLink{display:block;color:#39ddc3;margin:8px 0}.sfDefaultMode select[data-sf-language]{width:100%}

/* Desktop artist explorer: persistent artist list left, complete metadata cards right. */
.sfArtistDetail{width:100%;max-width:1200px;margin:0 auto}
.sfArtistTitle{display:flex;align-items:baseline;gap:15px;margin:0 0 20px;flex-wrap:wrap}
.sfArtistTitle h2{font-size:clamp(23px,2.4vw,32px);margin:0}
.sfArtistTitle span{color:#89b1b8}
.sfArtistEmpty{color:#9ab2c6;font-size:16px;padding:25px;border:1px dashed #385267;border-radius:12px}
.sfArtistSongCard{border:1px solid #385269;border-radius:14px;background:#14202e;padding:18px;margin-bottom:14px;overflow-wrap:anywhere}
.sfArtistCardTitle{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sfArtistCardTitle h3{font-size:20px;margin:0 0 12px}
.sfArtistCardTitle button{flex:none}
.sfArtistCardMeta{display:flex;gap:8px;flex-wrap:wrap;font-size:13px;color:#dce9f7}
.sfArtistCardMeta span{padding:5px 9px;border:1px solid #40566c;border-radius:7px}
.sfArtistTags{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.sfArtistTags span{background:#164443;color:#87eee0;font-size:12px;padding:4px 9px;border-radius:15px}
.sfArtistNotes{white-space:pre-wrap;color:#d4dfe9;padding:12px;border-left:3px solid #5dc2b9;background:#101c28}
.sfArtistLinks{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}
.sfArtistLinks a{color:#79d8fd;max-width:100%;overflow-wrap:anywhere}
.sfSourceBlock{display:flex;gap:14px;margin-top:13px;padding:12px;background:#0f1d2b;border:1px solid #33495d;border-radius:10px;overflow-wrap:anywhere}
.sfSourceBlock>img{object-fit:contain;align-self:flex-start;width:100px;max-height:100px;border-radius:6px}
.sfSourceBlock>div{min-width:0;flex:1}.sfSourceBlock p{font-size:12px;margin:5px 0;color:#adc8d6}
.sfSourceDescription{white-space:pre-wrap;max-height:150px;overflow:auto}
.sfFetchLink{padding:6px 10px;align-self:start}.sfFetchStatus{display:block;width:100%;color:#9cd3e0}
#propFetchPreview{display:grid;gap:8px;margin-top:10px}
body[data-library-tab="artists"] #artistsBack{display:none}
@media(min-width:691px){
 body[data-library-tab="artists"] #items>.sfArtistItem{margin:4px 0}
 body[data-library-tab="artists"] .editor{display:block!important}
 body[data-library-tab="artists"] .editor>#artistDetail:not(.hide){display:block}
}
@media(max-width:690px){
 body[data-library-tab="artists"] #artistDetail{display:none!important}
 .sfSourceBlock{flex-wrap:wrap}
 .sfSourceBlock>img{width:90px}
}


/* Mobile usability pass: actions follow context and remain fingertip-sized. */
.sfSongThumb{width:40px;height:40px;object-fit:cover;border-radius:7px;flex:none;border:1px solid #405166}
.songrow .item{display:flex;align-items:center;gap:9px;white-space:normal;overflow:hidden;min-width:0}
.songrow .item .sfSongThumb{width:36px;height:36px}
.setitem>.sfSongThumb{width:36px;height:36px}
.sfSongPicker{width:min(570px,96vw);max-height:88dvh}
.sfSongPicker>input{width:100%;box-sizing:border-box}
.sfSongChoices{overflow-y:auto;max-height:min(53dvh,440px);margin:6px 0}
.sfSongChoice{display:flex!important;align-items:center!important;gap:10px!important;padding:8px!important;margin:0!important;border-bottom:1px solid #334b61}
.sfSongChoice input[type=checkbox]{flex:none!important;width:20px;height:20px}
.sfSongChoice span{flex:1;min-width:0;overflow-wrap:anywhere}
.sfSongChoice span strong,.sfSongChoice span small{display:block}
.sfSongChoice span small{font-size:11px;color:#aabacd}
.transposeStepsControl{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:8px 0}
.transposeStepsControl>button{min-width:48px;min-height:44px;font-size:25px;padding:4px 10px}
.transposeStepsControl>output{font-variant-numeric:tabular-nums;font-weight:700;color:#39ddc3;text-align:center;min-width:106px}
.transposeStepsControl .transposeSelectFallback{display:flex;align-items:center;gap:6px;font-size:12px;margin:0!important}
.transposeStepsControl select{width:72px!important;min-width:0}
#transposeDialog .mergeSongPreview{max-height:39dvh;overflow:auto}
body[data-library-tab="artists"][data-artist-drilldown="true"] #artistsBack{display:block}
@media(max-width:690px){
 body:not(.stageActive)>.sfHeader{padding:5px 10px;min-height:48px}
 body:not(.stageActive) .sfHeader .row button{padding:5px 7px;font-size:12px;min-height:32px}
 body:not(.stageActive) aside{gap:6px;padding:7px 9px}
 body:not(.stageActive) aside>.row{gap:5px}
 body:not(.stageActive) aside>.row>button{padding:6px 9px;font-size:13px;min-height:36px}
 body:not(.stageActive) .editor{padding:8px 10px}
 body:not(.stageActive) .editor .toolbar{gap:5px;margin-bottom:8px}
 body:not(.stageActive) .editor .toolbar button{padding:6px 8px;font-size:13px;min-height:34px}
 body:not(.stageActive) .editor .toolbar input{padding:7px 9px;font-size:15px;min-height:36px}
 body:not(.stageActive) .editor .actions{gap:5px}
 body:not(.stageActive) .editor .actions button{padding:7px 9px;font-size:13px}
 body:not(.stageActive) #songArea .toolbar{align-items:center}
 body:not(.stageActive) #songArea .toolbar>#title{flex:1 1 100%;font-weight:700}
 body:not(.stageActive) #songArea .toolbar>#artist{flex:1 1 100%;max-width:none!important}
 body:not(.stageActive) #songArea #preview{padding:12px;font-size:19px}
 body:not(.stageActive) #listArea .toolbar>#setlistPicker{max-width:100%;flex:1 1 100%}
 body:not(.stageActive) #listArea .toolbar>#addSongs{display:inline-flex!important;order:2}
 body:not(.stageActive) #listArea .toolbar>#playList{order:3}
 body:not(.stageActive) #listArea .toolbar>#importSetlist{order:4}
 body:not(.stageActive) #listArea .toolbar>#listTitle{flex:1 1 100%}
 body:not(.stageActive) #listArea .setDropZone{min-height:105px;padding:8px}
 body:not(.stageActive) .setitem{padding:5px;gap:5px;margin:4px 0}
 .sfDialog{padding:11px 13px;width:min(480px,96vw);max-height:min(84dvh,720px);font-size:14px}
 .sfDialog label{gap:7px;margin:7px 0}
 .sfDialog input:not([type=checkbox]),.sfDialog textarea,.sfDialog select{padding:7px;font-size:15px;max-width:100%}
 .sfDialog h3{font-size:18px;margin:5px 0 10px}
 .sfDialog .actions button{padding:7px 10px;font-size:13px}
 #transposeDialog{height:min(78dvh,730px);max-height:none;display:flex;flex-direction:column}
 #transposeDialog:not([open]){display:none}
 #transposeDialog .mergeSongPreview{flex:1;min-height:0;max-height:none;overflow-y:auto}
 #transposeDialog .transposeSelectFallback{display:none}
 #transposeDialog .transposeStepsControl{justify-content:center}
 #transposeDialog .transposeStepsControl>button{min-width:55px}
 #transposeDialog .hint{margin:3px 0}
 body[data-library-tab="artists"][data-artist-drilldown="true"] #artistsBack{display:block!important;position:sticky;top:0;z-index:1;min-height:34px;flex:none;align-self:flex-start}
 body[data-library-tab="artists"][data-artist-drilldown="true"] aside>#items{flex:1 1 0;min-height:0}
 body[data-interface-mode="simple"] #listArea .toolbar>#addSongs{display:inline-flex!important}
 body[data-interface-mode="simple"] #songArea .toolbar>#songProperties,
 body[data-interface-mode="simple"] #songArea .toolbar>#edit{display:inline-flex!important}
 body[data-interface-mode="simple"] #songArea .toolbar>#title{pointer-events:auto;background:#171f2a;border-color:#3c5062}
 body[data-interface-mode="simple"] #songArea .toolbar>#artist{pointer-events:auto;background:#171f2a;border-color:#3c5062}
 body[data-interface-mode="simple"] #songArea #editHelp{display:block!important}
 body[data-interface-mode="simple"] #songArea .toolbar>#save{display:inline-flex!important}
}
body[data-interface-mode="simple"] #songArea .toolbar>#songProperties,
body[data-interface-mode="simple"] #songArea .toolbar>#edit,
body[data-interface-mode="simple"] #songArea .toolbar>#save{display:inline-flex!important}
body[data-interface-mode="simple"] #songArea .toolbar>#title,
body[data-interface-mode="simple"] #songArea .toolbar>#artist{pointer-events:auto!important;background:#171f2a!important;border-color:#3c5062!important}
body[data-interface-mode="simple"] #songArea #editHelp{display:block!important}
body[data-interface-mode="simple"] #listArea .toolbar>#addSongs{display:inline-flex!important}

/* Context-specific navigation: no editing and artist-management actions on unrelated tabs. */
body[data-library-tab="lists"] #manageArtists,
body[data-library-tab="lists"] #organizeLibrary,
body[data-library-tab="lists"] #libraryDefaults,
body[data-library-tab="lists"] #globalLayers,
body[data-library-tab="lists"] #newBtn,
body[data-library-tab="artists"] #organizeLibrary,
body[data-library-tab="artists"] #libraryDefaults,
body[data-library-tab="artists"] #globalLayers,
body[data-library-tab="artists"] #newBtn,
body[data-library-tab="songs"] #manageArtists{display:none!important}
@media(max-width:690px){
 body:not(.stageActive) .sfHeader{gap:6px}
 body:not(.stageActive) .sfHeader .sfIdentity{min-width:0}
 body:not(.stageActive) .sfHeader .row{gap:4px}
 body:not(.stageActive) aside>.row{flex-wrap:wrap}
 body:not(.stageActive) aside>.row>button{font-size:13px}
 body:not(.stageActive) #listArea>.actions{gap:5px}
 body:not(.stageActive) #listArea>.actions>button{padding:6px 9px;font-size:13px;min-height:34px}
 #propertiesDialog,#transposeDialog{width:min(470px,95vw)}
 #propertiesDialog label{align-items:center}
 #propertiesDialog label>input:not([type=checkbox]){flex:1;min-width:0}
 #transposeDialog{top:50%;transform:translateY(-50%);margin-top:0;margin-bottom:0}
}

/* 0.3.27: keep paste import accessible across all three workspace modes. */
@media(max-width:690px){body:not(.stageActive) #pasteChordPro{padding:6px 9px;font-size:12px;min-height:32px}}

/* 0.3.28: compact secondary import action on small screens. */
@media(max-width:690px){body:not(.stageActive) #songFromLink{padding:6px 9px;font-size:12px;min-height:32px}#linkSongDialog{max-width:min(95vw,520px)}#linkSongDialog input{max-width:100%}}

/* StageFlow artist profile header, before the artist's songs. */
.sfArtistProfileCard{display:flex;gap:16px;align-items:flex-start;padding:18px;margin-bottom:16px;border:1px solid #405166;border-radius:14px;background:#14202e}
.sfArtistPhoto{width:140px;height:140px;object-fit:cover;border-radius:12px;flex-shrink:0;border:1px solid #405166}
.sfArtistProfileInfo{min-width:0;flex:1;overflow-wrap:anywhere}
.sfArtistProfileHead{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.sfArtistProfileHead h2{margin:0}
.sfArtistProfileInfo p{margin:7px 0;color:#b9cfdf}
.sfArtistBio{white-space:pre-wrap}
.sfArtistProperties{width:min(600px,95vw);max-height:90dvh;overflow:auto}
.sfArtistProperties form{display:grid;gap:10px}
.sfArtistProperties form label{display:grid;gap:4px}
.sfArtistProperties input,.sfArtistProperties textarea{width:100%;max-width:100%}
@media(max-width:690px){.sfArtistProfileCard{padding:12px;gap:10px}.sfArtistPhoto{width:84px;height:84px}.sfArtistProfileHead h2{font-size:20px}.sfArtistProfileHead button{padding:6px 9px;min-height:32px;font-size:12px}}

/* v0.3.30: metadata source review, artist link rows. */
.sfArtistReferences{border:1px solid #405166;border-radius:10px;padding:12px;display:grid;gap:10px;min-width:0}
.sfArtistLinkRow{display:grid;grid-template-columns:minmax(95px,1fr) minmax(150px,2fr) auto auto;align-items:center;gap:6px;min-width:0}
.sfArtistLinkRow input{min-width:0;width:100%}
.sfArtistLinkRow small{grid-column:1/-1;color:#a5c4d8;overflow-wrap:anywhere}
.sfMetadataConflict{display:grid;gap:5px;padding:10px;margin:8px 0;border:1px solid #425b70;border-radius:10px;background:#152433;overflow-wrap:anywhere}
.sfMetadataConflict small{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
.sfMetadataConflict select{width:100%;max-width:100%}
.sfFetchedSources{margin-top:10px;max-height:38dvh;overflow:auto}
.sfArtistLinks{display:flex;flex-wrap:wrap;gap:12px;margin:9px 0}
@media(max-width:690px){.sfArtistLinkRow{grid-template-columns:1fr auto auto}.sfArtistLinkRow input[type=url]{grid-column:1/-1;grid-row:2}.sfArtistLinkRow small{grid-row:3}}

/* StageFlow v0.3.31: compact discovery interface. */
.sfLyricsSearch{width:min(600px,96vw);max-height:88dvh;overflow:auto}
.sfLyricsSearch label{display:grid;gap:5px;margin:10px 0}
.sfLyricsSearch input{width:100%}
.sfLyricsResult{display:grid;gap:6px;padding:12px;border:1px solid #405166;border-radius:10px;margin:8px 0;background:#14202e}
.sfLyricsResult small{color:#b9cfdf;overflow-wrap:anywhere}
.sfLyricsResult a{width:max-content}
@media(max-width:690px){#songFindLyrics{font-size:12px;padding:6px 9px;min-height:32px}}

/* 0.3.32: ranked, explicitly selected LRCLIB recordings */
.sfLyricsMatch{display:block;color:#95c7dd}
.sfLyricsActions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sfLyricsActions button{min-height:32px;padding:6px 12px}
.sfLyricsResult:has(.sfLyricsActions button:disabled){border-color:#31bfae}
@media(max-width:690px){.sfLyricsActions{justify-content:space-between}.sfLyricsActions button{font-size:12px}}

/* StageFlow v0.3.33 — compact metadata and consent-based streaming embeds */
.sfSongFacts{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:6px 0 10px}
.sfSongFacts span{padding:3px 8px;background:#203448;border:1px solid #37566c;border-radius:7px;font-weight:600;font-size:13px}
.sfCompactSource{position:relative;display:flex;flex-wrap:wrap;gap:13px;align-items:flex-start;padding:12px!important}
.sfCompactSource>img{width:90px!important;height:90px!important;object-fit:cover;border-radius:8px;flex-shrink:0}
.sfSourceInfo{min-width:180px;flex:1}
.sfSourceEssential{margin:5px 0;color:#b6d1e1;font-size:12px}
.sfSourceActions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:7px 0}
.sfSourceActions button{min-height:31px;padding:5px 11px}
.sfSourceMore>summary,.sfAdditionalReferences>summary{cursor:pointer;color:#6fe4e4;margin-top:8px}
.sfSourceMore p{font-size:12px;margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.sfSourceDescription{max-height:300px;overflow:auto}
.sfEmbeddedPlayer{width:100%;flex-basis:100%;margin-top:7px}
.sfEmbeddedPlayer iframe{width:100%;border:0;border-radius:9px;max-height:420px}
.sfAdditionalReferences{padding:8px 0 10px}
.sfAdditionalReferences>a{margin-right:12px;display:inline-block}
.sfLyricsPreview{padding:10px;margin-top:8px;background:#0b1622;border:1px solid #3b5b70;border-radius:9px}
.sfLyricsPreview pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:46dvh;overflow:auto;line-height:1.65;font:inherit;font-size:13px}
@media(max-width:690px){.sfCompactSource>img{width:70px!important;height:70px!important}.sfSourceInfo{min-width:120px}.sfEmbeddedPlayer iframe{max-height:300px}}

/* StageFlow 0.3.34: wide metadata row and compact built-in player */
.sfSongMetaRow{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(220px,.85fr);gap:12px;align-items:start;margin:8px 0}
.sfRecordingPanel{min-width:0}
.sfRecordingPanel>.sfSourceBlock{margin:0!important;min-height:104px}
.sfSongFactsPanel{border:1px solid #38536a;background:#142332;border-radius:11px;padding:13px;min-width:0}
.sfSongFactsPanel>strong{display:block;margin-bottom:10px;color:#d7eff9}
.sfSongFact{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #284255;padding:7px 0;font-size:13px}
.sfSongFact span{color:#a9c2d4}
.sfSongFact strong{font-size:14px}
.sfRecordingPanel .sfEmbeddedPlayer iframe{height:220px!important;min-height:200px;max-height:240px!important;aspect-ratio:auto!important}
#librarySizeStatus{display:block;color:#85cdd5;font-size:12px}
@media(max-width:980px){.sfSongMetaRow{grid-template-columns:minmax(0,1fr)}.sfSongFactsPanel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}.sfSongFactsPanel>strong{grid-column:1/-1}}
@media(max-width:690px){.sfSongFactsPanel{padding:10px}.sfSongFact{font-size:12px}.sfRecordingPanel .sfEmbeddedPlayer iframe{height:205px!important;max-height:205px!important}#analyzeTextLines{padding:6px 9px;font-size:12px;min-height:32px}}

/* StageFlow 0.3.35: manual choice of YouTube recordings */
.sfRecordingSearch{display:grid;gap:9px;margin:8px 0;border-top:1px solid #38536a;padding-top:11px}
.sfRecordingSearch>button{justify-self:start}
.sfRecordingSearch>small{color:#a6c5d4}
#linkSongSearchResults{display:grid;gap:7px;max-height:38dvh;overflow:auto}
.sfRecordingCandidate{display:flex;align-items:center;gap:10px;padding:9px;border:1px solid #37536b;border-radius:9px;background:#122234}
.sfRecordingCandidate>img{width:76px;height:53px;object-fit:cover;border-radius:6px;flex-shrink:0}
.sfRecordingCandidateText{min-width:0;flex:1;display:grid;gap:4px}
.sfRecordingCandidateText strong{font-size:13px;overflow-wrap:anywhere}
.sfRecordingCandidateText small{color:#a9c7d9;font-size:11px}
.sfRecordingCandidate>button{font-size:12px;min-height:33px}
@media(max-width:690px){.sfRecordingCandidate{flex-wrap:wrap}.sfRecordingCandidate>button{margin-left:auto}#songSearchNew{font-size:12px;padding:6px 9px;min-height:32px}}

/* StageFlow 0.3.36: one compact import/creation entry point. */
#legacyImportActions{display:none!important}
.sfImportChooser{width:min(540px,95vw);max-height:90dvh;overflow:auto}
.sfImportChoices{display:grid;gap:9px;margin:14px 0}
.sfImportChoices>button{text-align:left;display:grid;gap:5px;min-height:57px;padding:11px 15px;border:1px solid #435d73;border-radius:10px;background:#172739}
.sfImportChoices>button:hover,.sfImportChoices>button:focus-visible{border-color:#39d8de;background:#1b3547}
.sfImportChoices>button strong{font-size:14px}
.sfImportChoices>button small{font-size:12px;color:#a9c3d4;line-height:1.4}
@media(max-width:690px){#importBtn{min-height:36px}.sfImportChoices>button{min-height:54px;padding:9px 12px}}

/* StageFlow 0.3.37: workspace-first layout, with accessible FAQ/SEO content */
body.sfWorkspaceActive:not(.sfInfoOpen) #stageflowInfoPanel{display:none!important}
body.sfInfoOpen #stageflowInfoPanel{display:block!important}
#stageflowInfoPanel{scroll-margin-top:64px}
#stageflowFaq{min-height:34px;font-size:12px;white-space:nowrap}
.sfImportChoice{border:1px solid #435d73;border-radius:10px;background:#172739;overflow:hidden}
.sfImportChoices>.sfImportChoice>button{width:100%;text-align:left;display:grid;gap:5px;min-height:54px;padding:10px 13px;border:0;background:transparent;border-radius:0}
.sfImportChoices>.sfImportChoice>button:hover,.sfImportChoices>.sfImportChoice>button:focus-visible{background:#1c3648}
.sfImportChoice details{border-top:1px solid #344c60;font-size:12px;padding:5px 13px 9px}
.sfImportChoice details summary{color:#6fe4e4;cursor:pointer;padding:5px 0;font-weight:600}
.sfImportChoice details p{margin:6px 0 2px;color:#c1d2e0;line-height:1.55}
@media(max-width:690px){#stageflowFaq{padding:6px 9px;min-height:32px;font-size:11px}.sfImportChoice details{font-size:12px}}

/* StageFlow song collections: non-destructive actions inside each song row. */
.sfCategoryFilter{display:flex;align-items:stretch;gap:6px;margin:5px 0}
.sfCategoryFilter select{flex:1;min-width:0;margin:0!important}
.sfCategoryFilter>button{min-width:42px;min-height:42px;font-size:21px;padding:5px 10px}
.songrow:has(.sfSongMenu){position:relative;background:#13202b;border:1px solid #354658;border-radius:10px;padding:2px;gap:2px}
.songrow:has(.sfSongMenu)>.item{background:transparent;border:0;text-align:left}
.sfSongMenu{position:relative;flex:none;align-self:stretch}
.sfSongMenu>summary{list-style:none;display:grid;place-items:center;min-width:36px;min-height:40px;height:100%;border-radius:8px;cursor:pointer;color:#c8f4ed;font-size:22px;font-weight:700}
.sfSongMenu>summary::-webkit-details-marker{display:none}
.sfSongMenu[open]>summary,.sfSongMenu>summary:hover{background:#29445a}
.sfSongMenuPanel{position:absolute;right:0;top:100%;z-index:70;width:min(270px,82vw);max-height:50dvh;overflow:auto;padding:10px;background:#142332;border:1px solid #5a7a91;border-radius:10px;box-shadow:0 12px 24px #000a}
.sfSongMenuPanel>strong{display:block;margin-bottom:8px;font-size:12px}
.sfSongMenuOption{display:flex;align-items:center;gap:7px;padding:8px 5px;cursor:pointer;font-size:13px;overflow-wrap:anywhere}
.sfSongMenuOption input{width:18px;height:18px;flex:none;accent-color:#28d4cf}
.sfSongMenuCreate{width:100%;margin-top:5px;text-align:left}
#setSongCategory{width:100%;margin:7px 0}

/* Explicit, cancellable enrichment of existing song and artist references. */
.sfEnrichmentPanel{padding:10px;margin:9px 0;border:1px solid #3d596c;background:#132432;border-radius:10px}
.sfEnrichmentPanel>summary{cursor:pointer;font-weight:700;color:#adf8ed;list-style-position:inside;padding:2px 0}
.sfEnrichmentPanel:not([open]){padding:8px 10px;background:transparent;border-color:#344b5c}
.sfEnrichmentPanel[open]>summary{margin-bottom:8px}
.sfEnrichmentPanel>.hint{margin:3px 0 9px;font-size:11px;line-height:1.5}
.sfEnrichmentPanel .actions{gap:6px}
.sfEnrichmentPanel button{min-height:37px;font-size:12px;flex:1}
#libraryEnrichmentInfo{margin-top:8px}
#libraryEnrichmentInfo[hidden]{display:none!important}
#libraryEnrichmentInfo progress{display:block;width:100%;height:9px;margin:6px 0}
#libraryEnrichmentStatus{display:block;font-size:11px;line-height:1.5;color:#bbd5e3;overflow-wrap:anywhere}

/* Keep a cancellation action within reach above long AI review lists. */
.sfImportDialogHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.sfImportDialogHeading h3{margin:0}
.sfImportDialogHeading button{flex:none}

/* Local batch setlist ZIP package dialogs. */
.sfBatchSetlistChoices{display:flex;flex-direction:column;gap:6px;max-height:min(48vh,390px);overflow:auto;margin:12px 0;padding:3px}
.sfBatchSetlistRow{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #3c5062;border-radius:9px;background:#152331;overflow-wrap:anywhere}
.sfBatchSetlistRow input[type=checkbox]{width:18px;height:18px;flex:none}
.sfBatchSetlistRow span{font-weight:600;flex:1;min-width:0}
.sfBatchSetlistRow small{color:#aac5d7;font-size:12px}
#setlistBatchDialog>label{display:block;margin:10px 0}
#setlistBatchImportDialog .sfBatchSetlistRow{display:block}
@media(max-width:690px){.sfBatchSetlistRow{flex-wrap:wrap}.sfBatchSetlistRow small{margin-left:28px}#batchSetlistsOpen{white-space:normal}}

/* v0.3.46.1: compact, consistent discovery and long-dialog affordances */
.sfLyricsSearch{width:min(720px,96vw);padding:clamp(12px,2vw,22px);max-height:min(92dvh,920px);overflow:auto}
.sfLyricsSearch>.sfImportDialogHeading{position:sticky;top:-1px;z-index:3;background:#172430;padding:4px 0 8px}
.sfLyricsSearch .sfLyricsIntro{margin:3px 0 8px;line-height:1.4}
.sfLyricsSearchInputs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.sfLyricsSearchInputs label{min-width:0;margin:2px 0 5px;gap:3px}
.sfLyricsSearchInputs input{padding:8px 10px;min-height:38px}
.sfLyricsSearchBar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 9px}
.sfLyricsSearchBar button{min-height:38px}
.sfLyricsSearchBar .hint{flex:1;min-width:180px;margin:0}
.sfLyricsResult{gap:5px;padding:10px;margin:7px 0}
.sfLyricsActions{flex-wrap:wrap;gap:6px}
.sfLyricsActions button,.sfLyricsActions a{min-height:34px;padding:6px 9px}
.sfLyricsPreview{min-width:0}
.sfLyricsPreview .sfCopyPreview{margin:4px 0 7px;padding:7px 10px;font-size:12px}
.sfLyricsPreview pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.sfDialog.backupReview .sfImportDialogHeading{position:sticky;top:-1px;z-index:3;background:#172430;padding:4px 0 8px}
@media(max-width:690px){
 .sfLyricsSearch{width:calc(100vw - 16px);max-width:none;padding:12px;max-height:92dvh}
 .sfLyricsSearchInputs{grid-template-columns:1fr;gap:2px}
 .sfLyricsSearchInputs label{margin:2px 0}
 .sfLyricsSearchInputs input{min-height:36px}
 .sfLyricsSearchBar{gap:7px}
 .sfLyricsSearchBar .hint{flex-basis:100%;font-size:11px}
 .sfLyricsSearch .sfImportDialogHeading button{min-height:36px}
 .sfLyricsResult{padding:9px}
}

/* v0.3.46.4 - review-first setlist import dialog */
.sfSetlistImport{width:min(920px,96vw);max-height:min(92dvh,960px);overflow:auto;padding:clamp(12px,2vw,20px)}
.sfSetlistImportHeading{position:sticky;top:-1px;z-index:8;background:#172430;padding:4px 0 10px;border-bottom:1px solid #34485a}
.sfSetlistSource{border:1px solid #3a4e62;border-radius:9px;padding:10px 12px;margin:10px 0;background:#111e2a}
.sfSetlistSource>summary{cursor:pointer;font-weight:650;display:flex;align-items:center;gap:10px;justify-content:space-between}
.sfSetlistSetupHint{font-size:11px;color:#a5bacb;font-weight:400}
.sfSetlistSource:not([open]){padding:9px 12px}
.sfSetlistSource .hint{margin:8px 0;font-size:12px}
.sfSetlistSourceMeta{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:8px 0}
.sfSetlistSourceMeta label{display:flex;gap:9px;align-items:center;margin:0;flex:1;min-width:230px}
.sfSetlistSourceMeta label input{flex:1;min-width:100px}
.sfSetlistSource #textSetSource{width:100%;min-height:86px;margin:4px 0 8px;resize:vertical}
.sfSetlistReviewHeader{position:sticky;top:48px;z-index:6;padding:10px 12px 8px;background:#162633;border:1px solid #3b5666;border-radius:10px;margin:10px 0}
.sfSetlistReviewIntro{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.sfSetlistReviewIntro strong{font-size:15px}
.sfSetlistReviewIntro #textSetSummary{font-size:12px;color:#bbd2e2}
.sfSetlistReviewHeader #textSetEstimate{margin:4px 0 6px;font-size:12px}
.sfSetlistReviewTools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.sfSetlistReviewTools button{font-size:12px;padding:6px 10px;min-height:32px}
.sfSetlistReviewTools button[aria-pressed=true]{border-color:#3fe0d6;background:#14534f;color:#fff}
.sfSetlistReviewTools .hint{font-size:11px;margin:0 0 0 auto}
.sfSetlistImport #textSetRows{max-height:none;overflow:visible;display:grid;gap:6px;margin:8px 0}
.sfSetlistImport .sfSetMatchCard{display:grid;gap:5px;padding:9px 12px;border:1px solid #3c5064;border-left:3px solid #39ddc3;border-radius:9px;background:#142230}
.sfSetlistImport .sfSetMatchCard[hidden]{display:none!important}
.sfSetlistImport .sfSetMatchCard.conflict{border-left-color:#e8b76b}
.sfSetlistImport .sfSetMatchCard.sfSetMatchUnresolved{background:#24252d}
.sfSetMatchHeader{display:flex;align-items:center;gap:9px;min-width:0}
.sfSetMatchNumber{display:grid;place-items:center;flex:none;width:25px;height:25px;border-radius:7px;background:#293b4a;color:#c4d7e4;font-size:11px}
.sfSetMatchTitle{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
.sfSetMatchStatus{font-size:11px;white-space:nowrap;color:#8be6d0;background:#143d3a;border-radius:20px;padding:4px 8px}
.sfSetMatchCard.conflict .sfSetMatchStatus{color:#f5d09a;background:#4a3525}
.sfSetMatchChange{font-size:12px;padding:5px 9px;white-space:nowrap}
.sfSetMatchSelected{font-size:12px;color:#bdd1dd;padding-left:34px;overflow-wrap:anywhere}
.sfSetMatchControls{display:grid;gap:8px;margin:4px 0 0 34px}
.sfSetMatchControls[hidden]{display:none!important}
.sfSetMatchField{display:grid;gap:5px;margin:0;font-size:12px;color:#b4cbdc}
.sfSetMatchField input,.sfSetMatchField select{min-width:0;width:100%}
.sfSetMatchCard .sfSetMatchControls>small{color:#b7d5c8}
.sfSetMatchSection{opacity:.85}
.sfSetlistImportPreferences{border-top:1px solid #395064;padding-top:10px;margin-top:10px}
.sfSetlistImportPreferences>summary{cursor:pointer;font-size:12px;color:#b9d0de}
.sfSetlistImportPreferences>label{display:block;margin:9px 0}
.sfSetlistImportFooter{position:sticky;bottom:-1px;z-index:7;display:flex;justify-content:flex-end;padding:10px 2px 3px;background:#172430;border-top:1px solid #405466}
@media(max-width:690px){
 .sfSetlistImport{width:calc(100vw - 12px);max-width:none;padding:11px;max-height:94dvh}
 .sfSetlistReviewHeader{top:44px;padding:8px 9px}
 .sfSetlistReviewTools .hint{margin-left:0;flex-basis:100%}
 .sfSetMatchTitle{font-size:13px}
 .sfSetMatchHeader{gap:6px}
 .sfSetMatchChange{padding:5px 7px}
 .sfSetlistImport .sfSetMatchCard{padding:8px}
 .sfSetMatchSelected{padding-left:0}
 .sfSetMatchControls{margin-left:0}
 .sfSetlistSourceMeta label{min-width:100%;flex-wrap:wrap}
}

/* Non-destructive corrections inside the duplicate comparison dialog. */
.sfDedupeEditPanel{border:1px solid #466679;border-radius:10px;background:#132633;padding:12px;margin:12px 0}
.sfDedupeEditPanel[hidden]{display:none!important}
.sfDedupeEditPanel>.hint{margin:7px 0 12px}
.sfDedupeEditFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sfDedupeEditFields label{display:grid;gap:5px;min-width:0;font-size:13px}
.sfDedupeEditFields input{width:100%;min-width:0;box-sizing:border-box}
@media(max-width:650px){.sfDedupeEditFields{grid-template-columns:1fr}.sfDedupeEditPanel{padding:9px}}

/* v0.3.46.7 — compact desktop song workspace, mobile-first setlist actions */
@media(min-width:981px){
 #songArea .sfSongWorkspace{display:grid;grid-template-columns:minmax(0,1fr) clamp(260px,28%,370px);gap:12px;align-items:start}
 #songArea .sfSongBody{grid-column:1;grid-row:1;min-width:0;display:flex;flex-direction:column}
 #songArea .sfSongMetaSide{grid-column:2;grid-row:1;min-width:0;max-height:calc(100dvh - 138px);overflow-y:auto;scrollbar-width:thin}
 #songArea .sfSongBody #preview{min-height:calc(100dvh - 215px);max-height:calc(100dvh - 190px);overflow-y:auto}
 #songArea .sfSongBody #pdfbox{min-height:calc(100dvh - 220px)}
 #songArea .sfSongMetaSide .sfSongMetaRow{display:flex;flex-direction:column;gap:8px;margin:0}
 #songArea .sfSongMetaSide .sfRecordingPanel,#songArea .sfSongMetaSide .sfSongFactsPanel{width:100%}
 #songArea .sfSongMetaSide .sfSourceBlock{padding:9px;gap:9px}
 #songArea .sfSongMetaSide .sfSourceBlock>img{width:64px;max-height:70px}
 #songArea .sfSongMetaSide .sfSourceDescription{max-height:96px}
 #songArea .sfSongMetaSide .sfRecordingPanel>.sfSourceBlock{min-height:0}
 #songArea .sfSongMetaSide .sfEmbeddedPlayer iframe{height:184px!important;min-height:160px;max-height:190px!important}
 #songArea .sfSongMetaSide .sfSongFactsPanel{padding:9px}
 #songArea .sfSongMetaSide .sfAdditionalReferences{margin:7px 0}
 #songArea .sfSongFooterActions{margin-top:5px!important}
}
#songArea .sfSongFactsPanel>summary{font-size:13px;font-weight:700;color:#d7eff9;cursor:pointer;list-style-position:inside}
#songArea .sfSongFactsPanel:not([open]){padding:9px 10px}
#songArea .sfSongFactsPanel[open]>summary{margin-bottom:7px}
#songArea .sfSongFactsPanel .sfSongFact{padding:5px 0;font-size:12px}
#songArea .sfSongFactsPanel .sfSongFact strong{font-size:12px}
#songArea .sfSongMetaSide{min-width:0}
#songArea .sfSongWorkspace{min-width:0}
#songArea .sfSongBody{min-width:0}
#songArea .sfSongBody .preview{padding:15px}
#songArea .toolbar{gap:5px;margin-bottom:7px}
#songArea .toolbar button{padding:6px 9px;min-height:34px;line-height:1.15;font-size:12px}
#songArea .toolbar input{padding:6px 8px;min-height:34px;font-size:13px}
#songArea .toolbar #artist{max-width:145px!important}
#songArea .toolbar #title{flex:0 1 180px;min-width:90px;max-width:230px}
#songArea .sfSongBody #editHelp{margin:3px 0 7px;font-size:11px}
.sfSongMenuToSetlist{width:100%;margin:0 0 8px;text-align:left;min-height:37px;font-weight:650;border-color:#26796d;background:#134840}
.sfSongToSetlistDialog{width:min(470px,95vw)}
.sfSongToSetlistDialog label{display:grid;gap:6px;margin:10px 0}
.sfSongToSetlistDialog select,.sfSongToSetlistDialog input{width:100%;box-sizing:border-box}
.sfSongToSetlistDialog .actions{justify-content:flex-end}
body[data-interface-mode="advanced"] #libraryTools{display:block!important}
body[data-interface-mode="advanced"] #libraryTools .libraryToolsBody>.actions>*:not(#importLib):not(#exportLib){display:none!important}
body[data-interface-mode="advanced"] #libraryTools .storageStatus{display:none!important}
body:not([data-interface-mode="expert"]) #libraryEnrichmentPanel{display:none!important}
body[data-interface-mode="simple"] #songArea .sfSongFooterActions{display:flex!important}
body[data-interface-mode="simple"] #songArea .sfSongFooterActions #songJson{display:none!important}
@media(max-width:980px){
 #songArea .sfSongWorkspace{display:flex;flex-direction:column}
 #songArea .sfSongBody{display:contents}
 #songArea .sfSongMetaSide{width:100%;order:3}
 #songArea .sfSongBody #preview,#songArea .sfSongBody #pdfbox{order:1;width:100%;box-sizing:border-box}
 #songArea .sfSongBody #editHelp,#songArea .sfSongBody #imageTools,#songArea .sfSongBody #selectedImageTools{order:0}
 #songArea .sfSongMetaSide .sfSongMetaRow{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:690px){
 #songArea .toolbar{gap:4px}
 #songArea .toolbar button{min-height:36px;padding:7px 8px}
 #songArea .sfSongFooterActions{display:flex;gap:6px}
 #songArea .sfSongFooterActions #addList{flex:1;min-height:42px}
 #songArea .sfSongBody #preview{min-height:38vh}
 #songArea .sfSongMetaSide .sfSongMetaRow{grid-template-columns:1fr}
}

/* Keep setlist action immediately visible in every interface mode. */
body[data-interface-mode="simple"] #songArea .toolbar #songAddSetlistTop{display:inline-flex!important}
#songArea .toolbar #songAddSetlistTop{border-color:#26796d;color:#bcfff0}
.songrow .sfSongMenu{flex:0 0 auto}
.songrow:has(.sfSongMenu)>button.item{min-width:0}
@media(max-width:690px){
 #songArea .toolbar #songAddSetlistTop{min-height:38px;flex:0 0 auto}
 .songrow:has(.sfSongMenu)>button.item{flex:1}
 .songrow:has(.sfSongMenu)>button:not(.item){padding:7px 9px;min-width:36px}
}

/* v0.3.46.8 — denser song list with one-tap favorite alongside song actions */
body:not(.stageActive) aside:has(#items) .songrow{gap:3px;margin:2px 0;min-height:38px}
body:not(.stageActive) aside:has(#items) .songrow .item{padding:3px 4px;min-height:36px;border:1px solid transparent;background:transparent;border-radius:6px;font-size:12px;line-height:1.25;gap:6px}
body:not(.stageActive) aside:has(#items) .songrow .item:hover{background:#1a3040}
body:not(.stageActive) aside:has(#items) .songrow .item.active{border-color:#297b6e;background:#15382f}
body:not(.stageActive) aside:has(#items) .songrow .item .sfSongThumb{width:30px;height:30px;max-height:30px;border-radius:5px}
body:not(.stageActive) aside:has(#items) .songrow .sfQuickFavorite{flex:none;min-width:27px;width:27px;min-height:34px;padding:2px;line-height:1;font-size:20px;color:#c9d9e3;border:1px solid transparent;background:transparent;border-radius:7px}
body:not(.stageActive) aside:has(#items) .songrow .sfQuickFavorite.isFavorite{color:#f8cc64}
body:not(.stageActive) aside:has(#items) .songrow .sfQuickFavorite:hover{background:#29445a}
body:not(.stageActive) aside:has(#items) .songrow .sfQuickFavorite:focus-visible{outline:2px solid #39ddc3}
body:not(.stageActive) aside:has(#items) .songrow .sfSongMenu{align-self:center;height:34px}
body:not(.stageActive) aside:has(#items) .songrow .sfSongMenu>summary{height:34px;min-height:34px;min-width:27px;font-size:20px}
body:not(.stageActive) aside:has(#items) .songrow>button:not(.item):not(.sfQuickFavorite){min-width:27px;min-height:34px;padding:2px 6px;font-size:16px}
body:not(.stageActive) aside:has(#items) .artistGroup{margin:8px 0 2px;font-size:11px}
body:not(.stageActive) aside:has(#items) .sfSongMenuPanel{z-index:90}

/* Show timing and reusable tools live in the unused right rail on desktop. */
@media(min-width:1080px){
 #listArea .sfSetlistWorkspace{display:grid;grid-template-columns:minmax(0,1fr) clamp(250px,23%,330px);gap:12px;align-items:start}
 #listArea .sfSetlistMain{min-width:0}
 #listArea .sfSetlistRight{min-width:0;display:flex;flex-direction:column;gap:9px;max-height:calc(100dvh - 165px);overflow-y:auto;overflow-x:hidden;padding:0;border:0;position:sticky;top:2px}
 #listArea #entries{min-width:0}
 #listArea .sfSetlistRight .timingPanel{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;padding:11px;font-size:12px}
 #listArea .sfSetlistRight .timingPanel.hide{display:none!important}
 #listArea .sfSetlistRight #timingSummary{gap:6px;line-height:1.4}
 #listArea .sfSetlistRight #timingSummary strong{line-height:1.5}
 #listArea .sfSetlistRight .sfSetlistSideTools{display:flex;flex-direction:column;gap:7px;padding:10px;border:1px solid #34495c;border-radius:9px;background:#142330}
 #listArea .sfSetlistRight .sfSetlistSideTools button{width:100%;text-align:left}
 #listArea .sfSetlistRight .sfSetlistSideTools .hint{margin:0}
}
.sfSetlistRightTitle,.sfSetlistSideTools>strong{display:block;font-size:13px;color:#bfeee7}
#listArea .sfSetlistRight .timingPanel .hint{font-size:11px;line-height:1.35;margin:0;color:#93aabb}
#listArea .sfSetlistSideTools{display:none}
@media(min-width:1080px){#listArea .sfSetlistRight .sfSetlistSideTools{display:flex}}
@media(max-width:1079px){
 #listArea .sfSetlistWorkspace{display:flex;flex-direction:column}
 #listArea .sfSetlistMain{width:100%;min-width:0}
 #listArea .sfSetlistRight{width:100%;padding:0;border:0;max-height:none;min-height:0;display:block;overflow:visible}
 #listArea .sfSetlistRight .timingPanel{margin:7px 0}
 #listArea .sfSetlistRight .sfSetlistSideTools{display:none}
}
body[data-interface-mode="simple"] #listArea .sfSetlistRight{display:none!important}
@media(max-width:690px){
 body:not(.stageActive) aside:has(#items) .songrow .item .sfSongThumb{width:30px;height:30px}
 body:not(.stageActive) aside:has(#items) .songrow .sfQuickFavorite{width:33px;min-width:33px;min-height:38px}
 body:not(.stageActive) aside:has(#items) .songrow .sfSongMenu>summary{min-width:33px;min-height:38px}
 body:not(.stageActive) aside:has(#items) .songrow .item{min-height:40px}
}

/* v0.3.47.0 — compact, independently collapsible Song View rehearsal tools */
.sfSongMetaSide .sfRehearsalTools{display:flex;flex-direction:column;gap:7px;margin-top:9px;min-width:0}
.sfSongMetaSide .sfRehearsalSection{display:block;min-width:0;border:1px solid #38546a;border-radius:9px;background:#142331;overflow:hidden}
.sfSongMetaSide .sfRehearsalSection>summary{display:flex;gap:7px;align-items:center;padding:9px 11px;cursor:pointer;font-size:13px;font-weight:700;list-style-position:inside;color:#d6edfa}
.sfSongMetaSide .sfRehearsalSection>summary::marker{color:#64dfcb}
.sfSongMetaSide .sfRehearsalSection[open]>summary{border-bottom:1px solid #324d61;background:#1c3042}
.sfRehearsalSummaryTag{margin-left:auto;font-size:10px;line-height:1.3;color:#91bbca;font-weight:400;white-space:nowrap}
.sfRehearsalInner{display:grid;gap:9px;padding:11px}
.sfRehearsalHint{font-size:11px;line-height:1.4;color:#9db6c6;margin:0}
.sfMetroFields{display:grid;grid-template-columns:minmax(62px,1.1fr) minmax(51px,.65fr) minmax(82px,1.15fr) minmax(94px,1.3fr);gap:6px}
.sfMetroFields label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:11px;color:#a9c6d7}
.sfMetroFields input,.sfMetroFields select{width:100%;min-width:0;min-height:33px;padding:5px;font-size:12px}
.sfMetroBeats{display:flex;align-items:center;justify-content:space-between;gap:3px;width:100%;min-height:40px;overflow:hidden}
.sfMetroBeats .sfBeatGroup{display:flex;align-items:center;justify-content:space-around;gap:1px;min-width:0;flex:1 1 0;border-right:1px solid rgba(146,170,185,.15);height:35px}
.sfMetroBeats .sfBeatGroup:last-child{border-right:0}
.sfMetroBeats .sfBeat{display:block;flex:0 1 auto;border-radius:50%;width:clamp(5px,1.3vw,12px);height:clamp(5px,1.3vw,12px);background:#506c80;transition:background .05s linear,box-shadow .05s linear,transform .05s linear}
.sfMetroBeats .sfBeat.mainBeat{width:clamp(9px,2vw,17px);height:clamp(9px,2vw,17px);background:#c28d40}
.sfMetroBeats .sfBeat.downbeat{background:#e3ba67}
.sfMetroBeats[data-subdivision="2"] .sfBeat.subBeat,.sfMetroBeats[data-subdivision="3"] .sfBeat.subBeat{width:clamp(6px,1.5vw,11px);height:clamp(6px,1.5vw,11px)}
.sfMetroBeats[data-subdivision="4"] .sfBeat.subBeat{width:clamp(4px,1.05vw,8px);height:clamp(4px,1.05vw,8px)}
.sfMetroBeats .sfBeat.active{background:#22e6ca;box-shadow:0 0 0 3px rgba(34,230,202,.21),0 0 10px rgba(34,230,202,.65);transform:scale(1.16)}
@media(max-width:690px){.sfMetroFields{grid-template-columns:repeat(2,minmax(0,1fr))}.sfMetroBeats{gap:1px}.sfMetroBeats .sfBeatGroup{gap:0}.sfMetroBeats .sfBeat{max-width:75%}}
.sfRehearsalActions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.sfRehearsalActions button{font-size:12px;padding:7px 9px;min-height:33px;line-height:1.2;flex:1 1 auto}
.sfMetroVolume{display:flex;align-items:center;gap:8px;color:#afc5d0;font-size:11px}
.sfMetroVolume input{flex:1;width:100%;accent-color:#27ccb7}
.sfTunerReading{display:flex;align-items:center;gap:12px}
.sfTunerReading strong{font-size:34px;line-height:1;min-width:65px;color:#bdf7e8}
.sfTunerReading>div{display:grid;gap:4px}
.sfTunerReading span{font-size:13px;color:#d4e7ee}
.sfTunerReading small{font-size:11px;color:#9ab9c9}
.sfTunerGauge{height:35px;border:1px solid #3a5165;border-radius:8px;background:linear-gradient(90deg,#394e61 0%,#1b3441 37%,#174f46 47%,#174f46 53%,#1b3441 63%,#394e61 100%);position:relative;display:flex;justify-content:space-between;align-items:center;padding:0 9px;color:#b3cbd8}
.sfTunerCenter{position:absolute;left:50%;top:1px;bottom:1px;width:1px;background:#7ee7c9}
.sfTunerNeedle{position:absolute;top:3px;bottom:3px;left:50%;width:3px;border-radius:3px;background:#f1db58;transform:translateX(-50%);box-shadow:0 0 4px #f1db58}
.sfPitchHeader{display:flex;align-items:center;justify-content:space-between;gap:6px}
.sfPitchHeader strong{font-size:18px;color:#e4f1f9}
.sfPitchHeader span{font-size:10px;color:#90abb9}
.sfRehearsalInner #rehearsalPitchCanvas{display:block;width:100%;height:390px;max-height:min(58dvh,440px);border:1px solid #334659;border-radius:7px;object-fit:fill;background:#090e14}
#songArea .sfSongMetaSide .sfRehearsalTools .sfRehearsalSection summary{user-select:none}
@media(max-width:980px){
 #songArea .sfSongMetaSide .sfRehearsalTools{margin:8px 0 0;width:100%}
 .sfRehearsalInner #rehearsalPitchCanvas{height:min(62dvh,520px);max-height:520px}
}
@media(max-width:690px){
 .sfRehearsalInner{padding:9px}
 .sfRehearsalInner #rehearsalPitchCanvas{height:58dvh;max-height:530px}
 .sfRehearsalSummaryTag{font-size:10px}
}

/* Shared Song View font-size preference: line height scales naturally with em units. */
:root{--sf-song-editor-size:20px}
#songArea #preview{font-size:var(--sf-song-editor-size)!important;line-height:1.4}
#lineDialog .lineRow{font-size:var(--sf-song-editor-size)!important;line-height:1.4;padding:.45em .55em}
#lineDialog #lineSample{font-size:var(--sf-song-editor-size);line-height:1.4;max-height:6em}
#appSettingsDialog #songEditorFont{width:100%;accent-color:#39ddc3}
#appSettingsDialog #songEditorFontValue{font-variant-numeric:tabular-nums;color:#39ddc3;margin-left:8px}

/* v0.3.47.3: visible backup warning without hiding the music workspace. */
.sfLossWarning{background:#30151b;border:2px solid #f04b59;color:#ffe7e9;padding:9px;border-radius:8px;display:grid;gap:5px;font-size:12px;line-height:1.3;flex:none}
.sfLossWarning strong{font-weight:900;color:#ff5364;font-size:clamp(14px,1.15vw,17px);line-height:1.2}
.sfLossWarning button{justify-self:start;min-height:30px;padding:5px 10px;border-color:#e95767;color:#fff;background:#64202b;font-weight:700}
#stageflowInfoPanel .sfLossWarning{margin:10px 0 15px}
#appSettingsDialog .sfLossWarning{margin-bottom:12px}
#rehearsalTools .sfMetroFields{display:grid;grid-template-columns:minmax(56px,1.15fr) minmax(42px,.8fr) minmax(55px,.9fr) minmax(55px,.9fr);gap:4px}
#rehearsalTools .sfMetroFields label{min-width:0;font-size:10px;gap:2px}
#rehearsalTools .sfMetroFields input{font-size:12px;padding:3px 3px;min-height:29px;height:29px}
#rehearsalTools .sfMetroFields select[hidden]{display:none!important}
.sfMetroStepper{display:flex;align-items:center;justify-content:space-between;width:100%;height:29px;border:1px solid #3c5062;background:#171f2a;border-radius:6px;overflow:hidden}
.sfMetroStepper button{flex:0 0 17px;min-width:0;padding:0;height:27px;border:0;border-radius:0;background:#243441;font-size:13px}
.sfMetroStepper output{min-width:0;font-size:11px;text-align:center;font-variant-numeric:tabular-nums}
#rehearsalAudio .sfAudioItem{display:flex;align-items:center;gap:5px;flex-wrap:wrap;border:1px solid #31495d;padding:5px;border-radius:6px;margin:4px 0}
#rehearsalAudio .sfAudioItem span{font-size:11px;flex:1 0 100%;overflow-wrap:anywhere}
#rehearsalAudio .sfAudioItem audio{flex:1;min-width:120px;width:65%;height:34px}
#rehearsalAudio .sfAudioItem button{padding:4px 8px;min-height:30px}
@media(max-width:690px){#rehearsalTools .sfMetroFields{grid-template-columns:minmax(56px,1.15fr) minmax(42px,.8fr) minmax(55px,.9fr) minmax(55px,.9fr)}.sfLossWarning{font-size:11px}}

/* StageFlow 0.3.47.4 compact library and configuration-first controls */
body:not(.stageActive) main>aside{gap:5px;padding:8px}
body:not(.stageActive) main>aside>.row{gap:4px}
body:not(.stageActive) main>aside>.row>button{padding:6px 8px;min-height:32px;font-size:12px}
body:not(.stageActive) main>aside #libraryView,
body:not(.stageActive) main>aside #libraryCategory,
body:not(.stageActive) main>aside #search{min-height:32px;height:34px;padding:5px 8px;font-size:12px}
body:not(.stageActive) main>aside .sfCategoryFilter{margin:0;gap:4px;align-items:center}
body:not(.stageActive) main>aside .sfCategoryFilter>button{min-height:32px;min-width:34px;padding:3px 5px;font-size:15px}
body:not(.stageActive) main>aside .sfLossWarning{padding:6px 8px;gap:3px;font-size:10px}
body:not(.stageActive) main>aside .sfLossWarning strong{font-size:12px}
body:not(.stageActive) main>aside .sfLossWarning button{min-height:26px;padding:3px 8px;font-size:11px}
.sfHeaderMode{display:flex;align-items:center}
.sfHeaderMode .sfModePicker{gap:4px}
.sfHeaderMode .sfModePicker label{font-size:11px}
.sfHeaderMode .sfModePicker select{font-size:12px;max-width:125px;padding:5px}
.sfCategoryCover,.sfSetCover{width:32px;height:32px;border-radius:5px;object-fit:cover;flex:none}
.sfCategoryCover[hidden],.sfSetCover[hidden]{display:none}
.sfCategoryManagerRows{display:grid;gap:6px;max-height:55dvh;overflow:auto}
.sfCategoryManagerRow{display:flex;gap:5px;align-items:center;padding:5px;border-bottom:1px solid #364455;flex-wrap:wrap}
.sfCategoryManagerRow img{width:42px;height:42px;object-fit:cover;border-radius:5px}
.sfCategoryManagerRow img[hidden]{display:none}
.sfCategoryManagerRow strong{flex:1;min-width:85px}
.sfCategoryManagerRow button{font-size:11px;padding:5px}
.sfAdvancedSettings{border:1px solid #39495b;padding:8px;border-radius:8px;margin:8px 0}
.sfAdvancedSettings summary{cursor:pointer;font-weight:700}
.sfAdvancedSettings label{display:flex;flex-direction:column;gap:3px;margin:8px 0;font-size:12px}
.sfAdvancedSettings .sfSyntaxSetting{flex-direction:row;align-items:center}
body.sfSyntaxEnabled #songArea #preview [data-line-type="chords"],
body.sfSyntaxEnabled #songArea #preview [data-kind="chords"]{color:#77e2d5}
body.sfSyntaxEnabled #songArea #preview [data-line-type="section"],
body.sfSyntaxEnabled #songArea #preview [data-kind="section"]{color:#e0ae73;font-weight:700}
@media(max-width:690px){
 .sfHeaderMode .sfModePicker label{display:none}
 .sfHeaderMode .sfModePicker select{max-width:85px;font-size:10px;padding:3px}
 body:not(.stageActive) main>aside{padding:7px;gap:4px}
 body:not(.stageActive) main>aside .sfLossWarning{padding:6px}
 body:not(.stageActive) main>aside .sfLossWarning strong{font-size:12px}
}

/* Moved settings remain reachable in every library tab and interface mode. */
body[data-interface-mode="simple"] #appSettingsDialog #libraryDefaults,
body[data-interface-mode="simple"] #appSettingsDialog #globalLayers,
body[data-library-tab="lists"] #appSettingsDialog #libraryDefaults,
body[data-library-tab="lists"] #appSettingsDialog #globalLayers,
body[data-library-tab="artists"] #appSettingsDialog #libraryDefaults,
body[data-library-tab="artists"] #appSettingsDialog #globalLayers{display:inline-flex!important}

/* StageFlow 0.3.47.5: session-only dismissal of backup reminder. */
main>aside>.sfLossWarning{position:relative;padding-right:34px!important}
main>aside>.sfLossWarning .sfBackupDismiss{position:absolute;right:5px;top:5px;display:grid;place-items:center;
 width:21px;min-width:21px;height:21px;min-height:21px;padding:0!important;
 font-size:13px!important;border-radius:6px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.25)}
body.sfBackupReminderHidden main>aside>.sfLossWarning{display:none!important}
/* Eight-octave keyboard guide: clear piano keys and scrolling/panning. */
.sfPitchNavigation{display:flex;align-items:center;gap:5px;justify-content:space-between}
.sfPitchNavigation button{padding:5px 7px;min-height:28px;font-size:11px}
.sfPitchNavigation output{font-size:10px;color:#b8d0df;font-variant-numeric:tabular-nums;text-align:center}
#rehearsalPitchCanvas{touch-action:none;cursor:ns-resize;background:#09111a}
.sfKeyboardControls{display:flex;align-items:end;gap:6px;flex-wrap:wrap}
.sfKeyboardControls label{display:flex;flex-direction:column;gap:3px;flex:1;min-width:95px;font-size:11px}
.sfKeyboardControls select{font-size:12px;padding:5px}
.sfKeyboardControls button{font-size:11px;padding:7px}
.sfKeyboardControls output{font-size:11px;white-space:nowrap;align-self:center}
.sfPianoKeyboard{position:relative;display:flex;width:100%;height:128px;overflow:hidden;border:1px solid #486374;
 border-radius:6px;touch-action:none;user-select:none;background:#111920}
.sfPianoKey{border-radius:0!important;touch-action:none;user-select:none;margin:0!important}
.sfPianoKey.white{position:relative;flex:1 1 0;min-width:0;border:1px solid #61717b!important;
 background:linear-gradient(#f0f2ef,#c8d1d7);color:#233d4c;padding:0 1px 7px;
 display:flex;align-items:flex-end;justify-content:center}
.sfPianoKey.white span{font-size:8px;white-space:nowrap;overflow:hidden;max-width:100%}
.sfPianoKey.black{position:absolute;z-index:2;top:0;height:61%;width:4.2%;padding:0;
 border:1px solid #05090c!important;background:linear-gradient(#41505a,#090d11);box-shadow:1px 2px 4px #0009}
.sfPianoKey.white.pressed{background:#63d8cb!important}
.sfPianoKey.black.pressed{background:#29a9a7!important}
.sfAudioMeter{display:flex;align-items:center;gap:6px;min-height:26px;opacity:.77}
.sfAudioMeter.recording{opacity:1}
.sfAudioMeterTrack{position:relative;flex:1;min-width:0;height:8px;border:1px solid #536677;border-radius:3px;
 background:linear-gradient(to right,#1d9e6e 0% 70%,#e7ad22 70% 99%,#df414a 99% 100%);overflow:visible}
.sfAudioMeterTrack>div{position:absolute;inset:0 auto 0 0;width:0%;background:rgba(203,250,239,.46);
 border-right:2px solid white;transition:width .07s linear}
.sfAudioMeter.clip .sfAudioMeterTrack{box-shadow:0 0 0 1px #ff3944,0 0 7px #ff3944}
.sfAudioMeter output{min-width:58px;text-align:right;font-size:10px;color:#b5d7df;font-variant-numeric:tabular-nums}
.sfAudioMarker{position:absolute;top:9px;font-size:8px;line-height:1.2;color:#aec2ce;transform:translateX(-50%)}
.sfAudioMarker.m40{left:33.333%}.sfAudioMarker.m18{left:70%}.sfAudioMarker.m6{left:90%}.sfAudioMarker.m0{left:100%;transform:translateX(-100%)}
.sfDrumToolbar{display:flex;align-items:end;gap:5px;flex-wrap:wrap}
.sfDrumToolbar label{display:flex;flex-direction:column;gap:3px;font-size:10px}
.sfDrumToolbar select{padding:5px}
.sfDrumToolbar button{font-size:11px;padding:6px}
.sfDrumGrid{display:grid;gap:5px;overflow-x:auto;padding:6px 1px 10px}
.sfDrumRow{display:grid;grid-template-columns:65px repeat(var(--drum-steps),minmax(12px,1fr));gap:2px;align-items:center;min-width:max-content}
.sfDrumRow>span{font-size:9px;color:#b5ccd9;white-space:nowrap}
.sfDrumRow>button{width:100%;height:22px;min-width:12px;min-height:22px;padding:0;border-radius:4px;
 background:#182938;border-color:#3a5162}
.sfDrumRow>button.main{border-left:2px solid #8ca3b2}
.sfDrumRow>button.active{background:#12c3b3;border-color:#51f7e0;box-shadow:inset 0 0 0 2px #287877}
@media(max-width:690px){.sfPianoKeyboard{height:115px}.sfPianoKey.white span{font-size:7px}
 .sfPitchNavigation button{padding:4px 5px;font-size:10px}}

/* StageFlow 0.3.47.7: all two initial loss warnings are dismissible together. */
body.sfBackupReminderHidden #welcome>.sfLossWarning,
body.sfBackupReminderHidden main>aside>.sfLossWarning{display:none!important}
#welcome>.sfLossWarning{position:relative;padding-right:34px!important}
#welcome>.sfLossWarning .sfBackupDismiss{position:absolute;right:5px;top:5px;display:grid;place-items:center;
 width:21px;min-width:21px;height:21px;min-height:21px;padding:0!important;font-size:13px!important;
 border-radius:6px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.25)}
.sfQuickTools{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap;padding:2px 4px;
 border:1px solid #355367;background:#142330;border-radius:8px}
.sfQuickTools button{min-width:32px;min-height:30px;padding:4px 6px;font-size:18px;
 border-radius:6px;border:1px solid transparent;background:transparent}
.sfQuickTools button:hover,.sfQuickTools button:focus-visible{border-color:#16d9d2;background:#254859}
.sfSongLayerTools{border:1px solid #355064;border-radius:9px;background:#132231;margin:7px 0;padding:7px}
.sfSongLayerActions{display:flex;gap:6px;flex-wrap:wrap}
.sfSongLayerActions button{font-size:12px;padding:6px 9px;min-height:32px}
#songLayerPanels{display:grid;gap:4px}
#songLayerPanels>.sfRehearsalSection{margin-top:5px;max-width:none;width:100%}
#songLayerPanels .sfDrumGrid{width:100%}
.sfChordControls{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.sfChordControls label{display:flex;flex:1;min-width:100px;flex-direction:column;gap:3px;font-size:11px}
.sfChordControls input{width:100%;padding:7px}
.sfChordControls button{min-height:33px;padding:7px}
.sfChordDetected{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}
.sfChordDetected button{padding:6px 10px;min-height:30px;color:#c5ffe7;border:1px solid #43876e;background:#193a36}
.sfSongToolDialog{width:min(95vw,720px);max-height:88dvh;overflow:auto;padding:12px;border-radius:12px;
 background:#101c28;color:#eaf6fa;border:1px solid #45647b}
.sfSongToolDialog::backdrop{background:rgba(0,5,14,.76)}
.sfToolDialogTop{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.sfToolDialogTop button{min-height:29px;padding:5px 10px}
.sfSongToolDialog #songToolMount>.sfRehearsalSection{width:100%;max-width:none}
.sfSongToolDialog #songToolMount>.sfRehearsalSection>summary{display:none}
.sfSongToolDialog #songToolMount>.sfRehearsalSection[open] .sfRehearsalInner{display:block}
#pitchFollow[aria-pressed="true"]{background:#146e65;border-color:#30ddcb;color:#eafffc;font-weight:800}
#pitchFollow[aria-pressed="false"]{background:#2b3547;border-color:#5f758b;color:#adbecd}
@media(max-width:690px){.sfQuickTools{gap:1px}.sfQuickTools button{font-size:16px;min-width:28px;padding:3px}
 .sfSongLayerTools{padding:5px}.sfSongToolDialog{padding:8px;width:96vw}}

.sfSongFormOverview{margin:6px 0;border:1px solid #35495c;border-radius:7px}
.sfSongFormTimeline{display:flex;gap:5px;align-items:stretch;overflow-x:auto;padding:8px 0;min-height:58px}
.sfSongFormBlock{flex:1 1 auto;min-width:75px;max-width:40%;display:flex;flex-direction:column;gap:4px;
 justify-content:center;padding:9px;background:#203c4a;border:1px solid #3e8e95;border-radius:7px;
 text-align:left;cursor:pointer}
.sfSongFormBlock:nth-child(3n + 2){background:#353046;border-color:#9371ac}
.sfSongFormBlock:nth-child(3n){background:#393329;border-color:#a08457}
.sfSongFormBlock strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfSongFormBlock small{font-size:10px;line-height:1.2;color:#c7cdd0}

/* 0.3.47.8: gentle first-run introduction before showing the editing workspace. */
body:not(.sfHasSongs) .sfLossWarning{display:none!important}
body.sfFirstIntro main{display:none!important}
body.sfFirstIntro #stageflowInfoPanel{display:block!important;padding-top:20px}
body.sfFirstIntro #stageflowInfoPanel .sfInfo{max-width:980px;margin:0 auto}
.sfIntroStart{display:none;padding:20px 22px;margin:0 0 18px;border:1px solid #315a6c;
 border-radius:12px;background:#122633;gap:12px}
body.sfFirstIntro .sfIntroStart{display:grid}
.sfIntroStart p{font-size:16px;line-height:1.55;margin:0}
.sfIntroStart button{justify-self:start;padding:12px 25px;font-size:16px;font-weight:750}
body.sfFirstIntro #stageflowFaq{pointer-events:none;opacity:.6}
/* Advanced is intentionally a calmer songwriting surface. Experimental
   content layers remain available in Expert, and stored layers are preserved. */
body:not([data-interface-mode="expert"]) #songLayers,
body:not([data-interface-mode="expert"]) .sfSongLayerActions,
body:not([data-interface-mode="expert"]) #songFormOverview,
body:not([data-interface-mode="expert"]) #songLayerPanels{display:none!important}
#songPartPanel label,#songTabPanel label{display:flex;flex-direction:column;gap:4px;font-size:12px}
.sfPartActions{display:flex;flex-wrap:wrap;align-items:end;gap:6px}
.sfPartActions select{min-width:148px;min-height:34px}
.sfPartActions button{padding:7px 9px;font-size:12px}
#sfTabText{width:100%;min-height:200px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
 white-space:pre;overflow:auto;tab-size:4;font-size:12px;line-height:1.5}
#sfTabTuning{max-width:280px}
@media(max-width:690px){
 .sfIntroStart{margin:0 7px 12px;padding:14px}
 .sfIntroStart p{font-size:14px}
}

/* StageFlow 0.3.47.9 — selected setlist song, expert bar grid and artist catalog. */
body[data-interface-mode="simple"] #listArea .toolbar>#sfQuickSetlistExport,
body[data-interface-mode="simple"] #listArea .toolbar>#sfQuickSetlistPrint{display:inline-flex!important}
#sfQuickSetlistExport,#sfQuickSetlistPrint{min-height:34px;padding:7px 10px}
body[data-interface-mode="simple"] #listArea .sfSetlistRight{display:block!important}
body[data-interface-mode="simple"] #listArea .sfSetlistRight #timingPanel,
body[data-interface-mode="simple"] #listArea .sfSetlistRight .sfSetlistSideTools{display:none!important}
.sfSetlistSongInspector{min-width:0;padding:11px;border:1px solid #3d5a69;background:#142533;border-radius:9px;display:grid;gap:9px}
.sfSetlistInspectorHeading{display:flex;align-items:center;gap:9px;min-width:0}
.sfSetlistInspectorHeading>.sfSongThumb{width:48px;height:48px;flex:none;object-fit:cover}
.sfSetlistInspectorHeading>div{display:grid;gap:2px;min-width:0}
.sfSetlistInspectorHeading strong{overflow-wrap:anywhere}
.sfSetlistInspectorHeading small{color:#9eb7c5}
.sfSetlistInspectorMeta{display:flex;flex-wrap:wrap;gap:5px}
.sfSetlistInspectorMeta span{border:1px solid #375467;padding:3px 6px;font-size:11px;border-radius:5px}
.sfSetlistInspectorPreview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;
 font-size:12px;line-height:1.55;margin:0;padding:9px;border:1px solid #334b5d;border-radius:7px;background:#101c28;
 font-family:inherit}
.sfSetlistSongInspector>button{justify-self:start;font-size:12px;padding:6px 10px}
.sfArtistCatalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;margin-top:16px}
.sfArtistCatalogCard{min-height:82px;text-align:left;display:flex;align-items:center;gap:10px;padding:10px;
 border:1px solid #3d5569;border-radius:10px;background:#182a3a;color:#e8f7fa}
.sfArtistCatalogCard:hover{border-color:#3dd8bc;background:#1b3745}
.sfArtistCatalogCard>img,.sfArtistCatalogInitial{width:55px;height:55px;border-radius:7px;object-fit:cover;flex:none}
.sfArtistCatalogInitial{display:grid;place-items:center;background:#275564;font-size:18px;font-weight:800;color:#d8fff9}
.sfArtistCatalogCard>span:last-child{display:grid;gap:5px;min-width:0}
.sfArtistCatalogCard strong{overflow-wrap:anywhere;font-size:13px}
.sfArtistCatalogCard small{color:#9db9c6;font-size:11px}
.sfTimelineAdvanced{margin-top:13px;padding:10px;border:1px solid #34536a;border-radius:9px;background:#101f2d}
.sfTimelineAdvanced h4{margin:0 0 7px;font-size:14px}
.sfTimelineControls{display:flex;align-items:end;gap:6px;flex-wrap:wrap;margin:9px 0}
.sfTimelineControls label{display:flex;flex-direction:column;gap:3px;font-size:11px;min-width:75px}
.sfTimelineControls input,.sfTimelineControls select{min-height:32px;max-width:125px;padding:5px;font-size:12px}
.sfTimelineControls button{min-height:32px;font-size:12px;padding:7px}
.sfTimelineGrid{border:1px solid #375065;border-radius:7px;overflow:auto;max-height:440px;min-width:0}
.sfTimelineGrid:before{content:"BAR    FORM / SECTION                 LYRICS       DRUMS         METER     BPM      KEY";
 display:block;white-space:pre;font:10px ui-monospace,monospace;letter-spacing:.03em;
 padding:7px;background:#244054;color:#c4e5ed;position:sticky;top:0;z-index:1;overflow:hidden}
.sfTimelineBar{display:grid;grid-template-columns:35px minmax(110px,2fr) minmax(55px,1fr) minmax(55px,1fr) 50px 45px 45px;
 gap:4px;align-items:center;min-width:430px;min-height:31px;padding:3px 6px;border-bottom:1px solid #294154;
 font-size:11px;color:#bbd5df;cursor:pointer}
.sfTimelineBar:nth-child(odd){background:#132736}.sfTimelineBar:hover{background:#1c4550}
.sfTimelineBarNumber{font-weight:800;color:#65ead9}
.sfTimelineEmptyCell{color:#527183}
@media(min-width:1080px){body[data-interface-mode="simple"] #listArea .sfSetlistWorkspace{
 display:grid;grid-template-columns:minmax(0,1fr) clamp(250px,24%,350px)}}
@media(max-width:1079px){body[data-interface-mode="simple"] #listArea .sfSetlistRight{padding:0;border:0;margin-top:10px}}
@media(max-width:690px){.sfTimelineAdvanced{padding:6px}.sfTimelineControls label{min-width:65px}
 .sfArtistCatalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .sfArtistCatalogCard{min-height:66px;padding:6px;gap:5px}.sfArtistCatalogCard>img,.sfArtistCatalogInitial{width:39px;height:39px}
}

/* StageFlow 0.3.48.0 — dedicated, bar-based song arrangement editor. */
.sfFormWorkspaceDialog{width:min(98vw,1700px);max-width:1700px;height:min(94dvh,1050px);max-height:94dvh;
 margin:auto;padding:0;border:1px solid #3d6172;border-radius:12px;background:#0d1926;color:#e9f5f9;
 box-shadow:0 20px 80px #000b}
.sfFormWorkspaceDialog::backdrop{background:#02070dd9}
.sfFormWorkspaceHead{position:sticky;top:0;z-index:8;display:flex;align-items:center;justify-content:space-between;
 gap:12px;border-bottom:1px solid #416072;background:#152b39;padding:11px 16px}
.sfFormWorkspaceHead strong{font-size:17px}
.sfFormWorkspaceHead p{margin:3px 0 0}
.sfFormWorkspaceHead button{padding:8px 14px;font-weight:750}
.sfFormWorkspaceLayout{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:10px;padding:11px;height:calc(100% - 77px);overflow:hidden}
.sfFormWorkspaceMain{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto}
.sfFormWorkspaceMain .sfTimelineAdvanced{margin:0;padding:10px;background:#101e2c}
.sfFormWorkspaceMain .sfTimelineAdvanced>h4{font-size:16px}
.sfFormWorkspaceMain .sfTimelineControls{gap:7px}
.sfFormWorkspaceMain .sfTimelineControls label{min-width:88px}
.sfFormWorkspaceMain .sfTimelineControls input,.sfFormWorkspaceMain .sfTimelineControls select{max-width:140px}
.sfFormWorkspacePalette{min-width:0;padding:10px 8px;background:#142737;border:1px solid #375468;border-radius:9px;
 overflow-y:auto}
.sfFormWorkspacePalette>strong{font-size:13px;color:#e1f4ff}
.sfFormWorkspacePalette p{font-size:10px}
#sfFormPalette{display:grid;gap:5px;margin:10px 0}
.sfRolePaletteBlock{text-align:left;min-height:35px;padding:7px 9px;font-size:12px;font-weight:750;
 color:#d6f9f4;background:#224d57;border:1px solid #3b8590;border-radius:6px;cursor:grab}
.sfRolePaletteBlock:active{cursor:grabbing}
.sfFormWorkspaceAssign{display:flex;flex-wrap:wrap;align-items:end;gap:8px;border:1px solid #37586d;
 border-radius:8px;padding:9px;background:#162a38}
.sfFormWorkspaceAssign label{display:flex;flex-direction:column;gap:4px;font-size:11px;min-width:95px}
.sfFormWorkspaceAssign select,.sfFormWorkspaceAssign input{font-size:12px;min-height:34px;max-width:190px}
.sfFormWorkspaceAssign select[multiple]{max-width:250px;min-width:170px;min-height:89px}
.sfFormWorkspaceAssign button{font-size:12px;min-height:34px;padding:7px 10px}
#sfTimelineGrid.sfTimelineGrid{width:100%;max-height:50dvh;overflow:auto;border:1px solid #345569;border-radius:7px}
#sfTimelineGrid.sfTimelineGrid:before{display:none!important}
.sfArrangeGridHeader,.sfArrangeBar{display:grid;align-items:stretch;gap:3px;width:max-content;min-width:100%;
 padding:3px 5px;font-size:11px}
.sfArrangeGridHeader{grid-template-columns:40px minmax(125px,1.3fr) repeat(var(--sf-track-count),minmax(98px,1fr)) 62px 62px 65px;
 background:#244050;color:#d6eff5;font-weight:800;position:sticky;top:0;z-index:5;min-height:35px;
 border-bottom:1px solid #557282}
.sfArrangeGridHeader span{display:flex;align-items:center;white-space:nowrap}
.sfArrangeBar{border-bottom:1px solid #253d4d;min-height:34px}
.sfArrangeBar:nth-child(odd){background:#112434}
.sfArrangeBar.sfBarSelected{background:#234f56}
.sfArrangeBarNo{width:35px;min-height:27px;border:0;background:#183b45;color:#7ef5db;font-size:12px;
 font-weight:800;border-radius:4px;padding:0}
.sfArrangeBar.sfBarSelected .sfArrangeBarNo{background:#2fae9e;color:#091f26}
.sfArrangeCell{display:flex;align-items:center;gap:1px;min-width:0;min-height:28px;border:1px solid #31495b;
 border-radius:4px;background:#152837;padding:1px;cursor:pointer}
.sfArrangeForm{background:#143440}
.sfSectionSpan{display:flex;flex:1;align-items:center;justify-content:flex-start;min-width:0;overflow:hidden;
 padding:4px 5px;white-space:nowrap;text-overflow:ellipsis;font-size:11px;font-weight:750;
 background:#286f74;color:#e1fffa;border:1px solid #369b9a;border-radius:4px}
.sfSectionSpan:not(.sfSectionHead){color:transparent;background:#1d535d;border-color:transparent;
 font-size:0}
.sfArrangementItem{min-width:0;width:100%;padding:4px 5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
 background:#28445e;color:#dbf3ff;border:1px solid #3f7590;border-radius:4px;font-size:10px;text-align:left}
.sfArrangementItem:not(.sfArrangementItemStart){font-size:12px;text-align:center;color:#84bbd1}
.sfArrangeState{padding:6px 3px;font-size:11px;color:#9db7c6;white-space:nowrap}
.sfArrangeEvent{font-weight:800;color:#f2db84}
@media(max-width:750px){.sfFormWorkspaceLayout{grid-template-columns:minmax(0,1fr);height:calc(100% - 74px);
 overflow:auto}.sfFormWorkspacePalette{order:-1;overflow:visible;padding:6px}
 #sfFormPalette{display:flex;flex-wrap:wrap;gap:4px}
 .sfRolePaletteBlock{font-size:10px;min-height:30px;padding:5px 7px}
 .sfFormWorkspaceMain{overflow:visible}.sfFormWorkspaceHead{padding:8px}
 .sfFormWorkspaceHead strong{font-size:13px}
 .sfFormWorkspaceDialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
 #sfTimelineGrid.sfTimelineGrid{max-height:48dvh}
}

/* v0.3.48.1: color-coded arrangement blocks and explicit edit affordances */
.sfSectionSpan,.sfRolePaletteBlock{--role-bg:#295c7c;--role-edge:#4b9ac0;--role-ink:#e9f8ff;
 background:var(--role-bg)!important;border-color:var(--role-edge)!important;color:var(--role-ink)!important}
.sfSectionSpan:not(.sfSectionHead){color:transparent!important;opacity:.75}
.sfSectionSpan.sfSectionSelected{outline:2px solid #f2efd1!important;outline-offset:-2px;filter:brightness(1.20)}
.sfSectionSpan{cursor:grab!important}
.sfSectionSpan:active{cursor:grabbing!important}
[data-section-role="start"]{--role-bg:#384b64;--role-edge:#8797af;--role-ink:#f3f6ff}
[data-section-role="count-in"]{--role-bg:#615039;--role-edge:#b79566;--role-ink:#fff1d8}
[data-section-role="intro"]{--role-bg:#23566b;--role-edge:#3898ad;--role-ink:#e5fbff}
[data-section-role="verse"]{--role-bg:#225e4b;--role-edge:#3da886;--role-ink:#e4fff3}
[data-section-role="pre-chorus"]{--role-bg:#5b4f82;--role-edge:#917bc7;--role-ink:#f5efff}
[data-section-role="chorus"]{--role-bg:#705032;--role-edge:#d09e57;--role-ink:#fff4d9}
[data-section-role="bridge"]{--role-bg:#623e72;--role-edge:#af6bc1;--role-ink:#fae9ff}
[data-section-role="solo"]{--role-bg:#633e46;--role-edge:#ca677d;--role-ink:#fff0f0}
[data-section-role="instrumental"]{--role-bg:#375c80;--role-edge:#6ba9d0;--role-ink:#edf8ff}
[data-section-role="break"]{--role-bg:#654d41;--role-edge:#af8672;--role-ink:#fff2eb}
[data-section-role="ending"]{--role-bg:#61583c;--role-edge:#ac9e61;--role-ink:#fff9dc}
[data-section-role="outro"]{--role-bg:#3f5865;--role-edge:#719bad;--role-ink:#edfaff}
.sfRippleLabel{display:flex!important;flex-direction:row!important;align-items:center;gap:5px;font-size:11px;min-width:auto!important}
.sfRippleLabel input{width:17px;min-width:17px;min-height:17px;max-width:17px;accent-color:#31d4b8}
#sfTimelineUpdateSection{background:#216358;border-color:#45bda2;color:#f4fffc}
#sfTimelineRemoveSection,#sfTimelineRemoveEvent{background:#52353c;border-color:#a15c6b;color:#ffe9ec}
#sfTimelineUpdateSection:disabled,#sfTimelineRemoveSection:disabled{opacity:.43}
.sfArrangeEventButton{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.sfArrangeEventButton:hover{color:#fff3b1}
.sfFormWorkspaceAssign::before{content:"Assign lyrics/chords: select one or more source lines, choose their track and the bar range below. One line needs at least one bar. Multiple TAB parts can be placed in separate lanes.";
 display:block;width:100%;font-size:11px;color:#a8d4dc;line-height:1.4}

/* StageFlow 0.3.48.2 — continuous music-form blocks, one per bar. */
.sfArrangeForm.sfSolidSection{
 --role-bg:var(--section-user-color);
 background:var(--role-bg)!important;
 margin-top:-3px;margin-bottom:-4px;padding:0!important;
 min-height:34px;border:0!important;border-radius:0!important;
 box-shadow:inset 0 -1px 0 rgba(239,255,255,.15);
 position:relative;z-index:1
}
.sfArrangeForm.sfSolidSectionFirst{border-radius:6px 6px 0 0!important;box-shadow:inset 0 2px 0 rgba(246,255,255,.28),inset 0 -1px 0 rgba(239,255,255,.15)}
.sfArrangeForm.sfSolidSectionLast{border-radius:0 0 6px 6px!important;box-shadow:inset 0 -2px 0 rgba(246,255,255,.25),inset 0 -1px 0 rgba(239,255,255,.14)}
.sfArrangeForm.sfSolidSectionFirst.sfSolidSectionLast{border-radius:6px!important}
.sfArrangeForm.sfSolidSectionSelected{outline:2px solid #f5f5d7;outline-offset:-2px;z-index:2}
.sfSolidSectionButton{
 width:100%;height:100%;min-height:31px;display:flex;align-items:center;text-align:left;
 background:transparent!important;color:#f9ffff!important;border:0!important;border-radius:0!important;
 box-shadow:none!important;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;
 text-overflow:ellipsis;padding:4px 7px!important;cursor:grab
}
.sfSolidSectionButton:active{cursor:grabbing}
.sfSolidSection:not(.sfSolidSectionFirst) .sfSolidSectionButton{font-size:0;color:transparent}
.sfFormSaveControls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.sfFormSaveControls button{padding:7px 11px}
#sfFormDirtyIndicator{font-size:11px;color:#9bd1c1;white-space:nowrap;margin-right:6px}
#sfFormDirtyIndicator.sfIsDirty{color:#f3c77c;font-weight:800}
#sfTimelineSectionColor{width:42px;height:32px;min-width:42px;padding:2px;cursor:pointer}
#sfTimelineSectionNumber{width:70px}
#sfTimelineResetColor{font-size:11px;padding:5px}
@media(max-width:690px){.sfFormSaveControls{gap:4px}.sfFormSaveControls button{font-size:11px;padding:5px 7px}
 #sfFormDirtyIndicator{width:100%;font-size:10px}}

/* StageFlow 0.3.48.3: private, opt-in cloud sync preparation, not a backup. */
.sfCloudSettings{border:1px solid #37586b;border-radius:9px;padding:12px;margin:12px 0;
 background:#142532;color:#d9e9f2;display:grid;gap:8px}
.sfCloudSettings strong{font-size:14px}
.sfCloudSettings .hint{margin:0;font-size:11px;line-height:1.5}
.sfCloudSettings .actions{display:flex;flex-wrap:wrap;gap:6px}
.sfCloudSettings .actions button{font-size:12px;min-height:32px;padding:6px 9px}
.sfCloudSettings .actions button:disabled{opacity:.45;cursor:not-allowed}
#sfCloudSyncStatus{color:#8ddde0}

/* StageFlow 0.3.48.4 — prevent mobile setlist rows / inspector / controls overlapping.
   Respect the single-column flow and let long labels wrap instead of forcing min-content widths. */
@media(max-width:690px){
 body:not(.stageActive) #listArea{min-width:0;width:100%;overflow-x:clip}
 body:not(.stageActive) #listArea .toolbar{display:flex;flex-wrap:wrap;align-items:stretch;align-content:start;gap:6px;height:auto;min-height:0}
 body:not(.stageActive) #listArea .toolbar>*{position:relative;min-width:0;max-width:100%;box-sizing:border-box;flex-shrink:0}
 body:not(.stageActive) #listArea .toolbar>#setlistPicker,
 body:not(.stageActive) #listArea .toolbar>#listTitle{flex:1 1 100%;width:100%;max-width:100%;order:0}
 body:not(.stageActive) #listArea .toolbar>button{flex:0 1 auto;min-height:36px;white-space:normal;overflow-wrap:anywhere}
 body:not(.stageActive) #listArea .sfSetlistWorkspace{display:flex;flex-direction:column;gap:10px;min-width:0;overflow:visible}
 body:not(.stageActive) #listArea .sfSetlistMain,
 body:not(.stageActive) #listArea .sfSetlistRight,
 body:not(.stageActive) #listArea .sfSetlistSongInspector{width:100%;min-width:0;max-width:100%;position:static;box-sizing:border-box}
 body:not(.stageActive) #listArea #entries{height:auto;min-height:105px;max-height:none;min-width:0;overflow:visible}
 body:not(.stageActive) #listArea #entries .setitem{display:flex;flex-wrap:wrap;align-items:center;gap:5px;width:100%;height:auto;min-height:39px;box-sizing:border-box}
 body:not(.stageActive) #listArea #entries .setitem>span{flex:1 1 130px;min-width:0;overflow-wrap:anywhere;white-space:normal}
 body:not(.stageActive) #listArea #entries .setitem>button,
 body:not(.stageActive) #listArea #entries .setitem>select{max-width:100%;height:auto;position:static}
 body:not(.stageActive) #listArea .sfSetlistSongInspector{display:grid;gap:9px;overflow-wrap:anywhere}
 body:not(.stageActive) #listArea .sfSetlistInspectorHeading{min-width:0}
 body:not(.stageActive) #listArea .sfSetlistInspectorHeading>div{min-width:0;overflow-wrap:anywhere}
 body:not(.stageActive) #listArea .sfSetlistInspectorPreview{max-width:100%;overflow:auto}
}
.sfAdvancedSettings>#sfCloudSettings{margin:8px 0}

/* StageFlow 0.3.48.5 — cloud comparison action remains visible on narrow screens. */
@media(max-width:690px){#sfGoogleSettings .actions{display:flex;flex-wrap:wrap;gap:6px}#sfGoogleSettings .actions button{max-width:100%;flex:1 1 auto;white-space:normal}}

/* StageFlow 0.3.48.6 — advanced settings as full editor workspace, not another small popup. */
#sfAdvancedWorkspace[hidden]{display:none!important}
body.sfAdvancedWorkspaceOpen:not(.stageActive) .editor{display:block!important;min-width:0;overflow:auto}
body.sfAdvancedWorkspaceOpen:not(.stageActive) .editor > :not(#sfAdvancedWorkspace){display:none!important}
body.sfAdvancedWorkspaceOpen:not(.stageActive) #sfAdvancedWorkspace{display:block!important;min-width:0}
.sfAdvancedWorkspace{padding:16px;max-width:1250px;margin:0 auto;color:#e1eef8}
.sfAdvancedWorkspaceHead{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:9px}
.sfAdvancedWorkspaceHead h2{margin:0;font-size:22px}
.sfAdvancedWorkspaceHead button{min-height:36px}
.sfAdvancedColumns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;margin-top:12px}
.sfAdvancedColumns>div{min-width:0;border:1px solid #354e64;border-radius:12px;background:#101e2c;padding:12px;display:flex;flex-direction:column;gap:10px}
.sfAdvancedColumns h3{font-size:16px;margin:0}
.sfAdvancedWorkspace #libraryTools,.sfAdvancedWorkspace #libraryEnrichmentPanel{display:block!important;min-width:0;max-height:none!important;overflow:visible!important}
.sfAdvancedWorkspace #libraryTools .libraryToolsBody{max-height:none!important;overflow:visible!important}
.sfAdvancedWorkspace #libraryTools .libraryToolsBody>.actions>*,
body[data-interface-mode="advanced"] .sfAdvancedWorkspace #libraryTools .libraryToolsBody>.actions>*{display:inline-flex!important}
.sfAdvancedWorkspace #libraryTools .storageStatus{display:block!important}
.sfAdvancedWorkspace #libraryEnrichmentPanel{display:block!important}
.sfAdvancedWorkspace #sfGoogleSettings{width:100%;box-sizing:border-box}
.sfAdvancedWorkspace #sfCloudSettings{margin:0}
.sfBackupPreferences,.sfNamedArchive{border:1px solid #3a5367;background:#142431;border-radius:9px;padding:12px;display:grid;gap:8px;min-width:0}
.sfBackupPreferences h4{margin:0;font-size:14px}
.sfBackupPreferences label{display:flex;flex-wrap:wrap;gap:9px;align-items:center;font-size:13px}
.sfBackupPreferences input[type=number]{width:72px}
.sfNamedArchive input,.sfNamedArchive select{width:100%;min-width:0;box-sizing:border-box}
.sfNamedArchive button{justify-self:start;max-width:100%;white-space:normal}
#sfHeaderMetro,#sfHeaderTuner,#sfHeaderTools{min-height:34px;font-size:12px;padding:6px 8px;min-width:0}
#sfHeaderTools{max-width:120px;background:#14283a;color:#e5f5fa;border:1px solid #38536a;border-radius:7px}
@media(max-width:800px){
 .sfAdvancedColumns{grid-template-columns:minmax(0,1fr)}
 body.sfAdvancedWorkspaceOpen:not(.stageActive)>main>aside{display:none!important}
 body.sfAdvancedWorkspaceOpen:not(.stageActive)>main>.editor{display:block!important;flex:1 1 0;min-height:0;overflow-y:auto}
 .sfAdvancedWorkspace{padding:9px}
 #sfHeaderMetro,#sfHeaderTuner{font-size:11px;min-height:32px;padding:5px}
 #sfHeaderTools{font-size:11px;max-width:90px;min-height:32px;padding:5px}
}
.sfDrumToolbar output{min-width:66px;display:inline-flex;align-items:center;justify-content:center;color:#95eddf;font-size:12px;font-weight:700}

.sfLocalBackupActions{display:flex;flex-wrap:wrap;gap:8px}.sfLocalBackupActions select{flex:1 1 200px}.sfLocalBackupActions button{flex:0 1 auto}

.sfSessionDialog{width:min(1450px,98vw);max-width:98vw;height:min(94dvh,1100px);max-height:94dvh;background:#0d1724;color:#eaf4fc;border:1px solid #426075;border-radius:14px;padding:0;overflow:auto}
.sfSessionDialog::backdrop{background:#000c}.sfSessionHeader{position:sticky;top:0;z-index:4;background:#122737;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 20px;border-bottom:1px solid #406073;height:auto}
.sfSessionHeader h2{margin:0;font-size:21px}.sfSessionHeader p{margin:3px 0;color:#adc1d1;font-size:12px}
.sfSessionToolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;padding:9px 16px;border-bottom:1px solid #2e4558}
.sfSessionToolbar label{font-size:12px;display:flex;flex-direction:column;gap:3px;min-width:100px;flex:1 1 150px}
.sfSessionToolbar label input,.sfSessionToolbar label select{width:100%;max-width:250px}
.sfSessionFileButton input{font-size:12px}
.sfSessionDialog>#sfSessionStatus{padding:0 18px}
.sfSessionLayout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:14px;padding:16px}
.sfSessionLayout h3{font-size:17px}.sfSessionLayout h3 span{font-size:12px;font-weight:normal;color:#aac5cf}
.sfSessionLayout aside{min-height:100%;height:auto;max-height:none;position:static;border:1px solid #3b5669;border-radius:12px;padding:14px;overflow-y:auto}
.sfSessionRow{background:#172638;border:1px solid #354c63;display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:9px;margin:5px 0;border-radius:9px}
.sfSessionRow.selected{border-color:#08dad0}.sfSessionRow>button{padding:6px 9px}.sfSessionRowInfo{flex:1;min-width:160px;display:grid;gap:4px}
.sfSessionRowInfo small{color:#a1b7c8}.sfSessionChips{display:flex;flex-wrap:wrap;gap:5px}.sfSessionChips span{font-size:11px;padding:3px 7px;background:#1c4b50;border-radius:12px;color:#d3fff4}
.sfSessionLyrics{white-space:pre-wrap;overflow-wrap:anywhere;max-height:42dvh;overflow:auto;padding:12px;background:#101c2b}
.sfSessionLinks{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.sfSessionLinks a{color:#64dfda}
#sfSessionDetails iframe{width:100%;aspect-ratio:16/9;border:0}
#sfSessionDetails details{padding:9px;border:1px solid #466176;border-radius:7px;margin:7px 0}
@media(max-width:790px){.sfSessionLayout{grid-template-columns:1fr}.sfSessionDialog{width:100vw;max-width:100vw;height:96dvh;max-height:96dvh}.sfSessionHeader{padding:9px;flex-wrap:wrap}.sfSessionLayout aside{min-height:160px}}

/* Guest Sessions are preparation tools in every interface mode, including Simple. */
body[data-interface-mode="simple"] #listArea .toolbar>#sfSessionOpen{display:inline-flex!important;align-items:center}

/* StageFlow Session: reusable readable platform links and full-height unassigned library. */
.sfSessionCatalog{display:flex;flex-direction:column;gap:8px;max-height:min(75dvh,920px)!important;overflow:hidden!important;min-height:220px!important}
.sfSessionCatalog>h3,.sfSessionCatalog>.hint{margin:4px 0}
.sfSessionCatalog label{display:flex;flex-direction:column;gap:4px;flex:none}
.sfSessionCatalog input,.sfSessionCatalog select{width:100%}
.sfSessionCatalog #sfSessionAvailable{flex:1 1 auto;min-height:130px;overflow-y:auto;overscroll-behavior:contain}
.sfAvailableRow{cursor:grab}.sfAvailableRow button{padding:7px 9px}
.sfSessionList:empty{min-height:80px;border:1px dashed #456174;border-radius:9px}
.sfSessionShareField{display:flex;gap:12px;align-items:center;padding:0 16px;color:#90dcda}
.sfSessionShareField input{width:100%;margin-top:6px}
.sfSessionShareField input[hidden]{display:none}
.sfStreamBadges,.sfStreamLinks{display:flex;flex-wrap:wrap;gap:6px;margin:3px 0}
.sfStreamBadge{display:inline-flex;align-items:center;gap:3px;padding:4px 7px;border-radius:6px;background:#28405a;color:#d9f4ff!important;text-decoration:none;font-size:12px;border:1px solid #52718c;white-space:nowrap;cursor:pointer}
.sfStreamBadge[data-platform="youtube"],.sfStreamBadge[data-platform="youtube-music"]{background:#4d222e;border-color:#b84055}
.sfStreamBadge[data-platform="spotify"]{background:#1c4433;border-color:#398656}
.sfStreamBadge[data-platform="apple-music"]{background:#493246;border-color:#a05f8c}
.sfStreamBadge:hover{filter:brightness(1.22);text-decoration:underline}
.sfSessionSongDialog{background:#101d2d;color:#f3fbff;width:min(720px,96vw);max-width:96vw;max-height:90dvh;padding:14px;border:1px solid #4b667a;border-radius:14px;overflow:auto}
.sfSessionSongDialog::backdrop{background:#000b}
.sfSessionSongHeading{display:flex;align-items:center;justify-content:space-between;gap:15px;position:sticky;top:-14px;padding:12px 3px;background:#101d2d}
.sfSessionSongDialogContent details,#sfSessionSongDialogContent details{border:1px solid #40576c;border-radius:8px;padding:10px;margin:8px 0}
#sfSessionSongDialogContent .sfStreamBadge{font-size:14px;padding:9px}
#sfSessionSongDialogContent pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:790px){.sfSessionCatalog{max-height:55dvh!important}.sfSessionDialog .sfSessionLayout{gap:20px}.sfSessionSongDialog{max-height:85dvh}}

/* Session v2: dense main repertoire, independent sidebar with available and reserve songs. */
@media(min-width:791px){
 .sfSessionDialog[open]{display:flex;flex-direction:column;overflow:hidden;height:97dvh;max-height:97dvh}
 .sfSessionDialog>.sfSessionHeader{flex:0 0 auto;min-height:45px;padding:7px 14px}
 .sfSessionDialog>.sfSessionToolbar{flex:0 0 auto;padding:5px 12px;gap:6px}
 .sfSessionDialog>.sfSessionToolbar label{min-width:85px;flex:1 1 125px}
 .sfSessionDialog>.sfSessionToolbar button,.sfSessionDialog>.sfSessionToolbar input,.sfSessionDialog>.sfSessionToolbar select{padding:5px 7px;min-height:28px;font-size:12px}
 .sfSessionDialog>#sfSessionStatus{flex:0 0 auto;margin:3px 0;padding:0 12px;font-size:11px;line-height:1.4}
 .sfSessionDialog>.sfSessionShareField{flex:none;margin:0;padding:0 12px;font-size:11px}
 .sfSessionDialog>.sfSessionLayout{flex:1 1 0;min-height:0;overflow:hidden;padding:6px 12px 10px;gap:10px;grid-template-columns:minmax(0,1.46fr) minmax(340px,.82fr)}
 .sfSessionLayout>section{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
 .sfSessionLayout>section>h3{font-size:15px;margin:2px 0 5px}
 .sfSessionLayout>section>.hint{font-size:11px;line-height:1.4;margin:0 0 6px}
 .sfSessionLayout>section>#sfSessionMain{display:grid;gap:3px}
 .sfSessionLayout #sfSessionMain>.sfSessionRow{display:flex;flex-wrap:nowrap;gap:4px;min-height:29px;margin:0;padding:3px 6px;border-radius:6px}
 .sfSessionLayout #sfSessionMain>.sfSessionRow>button{min-width:25px;height:24px;font-size:12px;padding:1px 4px;flex:none}
 .sfSessionLayout #sfSessionMain>.sfSessionRow>.sfSessionRowInfo{display:grid;align-items:center;grid-template-columns:minmax(115px,1.3fr) minmax(75px,.85fr) minmax(125px,1fr) auto;gap:5px;min-width:0;flex:1 1 0}
 .sfSessionLayout #sfSessionMain .sfSessionRowInfo strong{font-size:12px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .sfSessionLayout #sfSessionMain .sfSessionRowInfo small{font-size:10px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .sfSessionLayout #sfSessionMain .sfSessionChips{display:flex;flex-wrap:nowrap;white-space:nowrap;gap:3px;min-width:0;overflow:hidden}
 .sfSessionLayout #sfSessionMain .sfSessionChips span{font-size:10px;padding:2px 4px}
 .sfSessionLayout #sfSessionMain .sfStreamBadges{display:flex;flex-wrap:nowrap;gap:3px;min-width:0;margin:0}
 .sfSessionLayout #sfSessionMain .sfStreamBadge{font-size:10px;padding:2px 4px}
 .sfSessionLayout .sfSessionCatalog{min-height:0!important;height:auto;max-height:none!important;align-self:stretch;overflow-y:auto!important;overscroll-behavior:contain;padding:8px;gap:5px}
 .sfSessionLayout .sfSessionCatalog>h3{font-size:15px;margin:0}
 .sfSessionLayout .sfSessionCatalog>.hint{font-size:11px;margin:0}
 .sfSessionLayout .sfSessionCatalog>label{font-size:11px;gap:2px}
 .sfSessionLayout .sfSessionCatalog>label input,.sfSessionLayout .sfSessionCatalog>label select{padding:5px}
 .sfSessionLayout .sfSessionCatalog>#sfSessionAvailable{flex:0 0 auto;min-height:100px;max-height:min(29dvh,320px);overflow-y:auto}
 .sfSessionSidebarAlternatives{flex:1 0 auto;border-top:1px solid #39566a;margin-top:6px;padding-top:6px;min-height:120px}
 .sfSessionSidebarAlternatives h3{font-size:14px;margin:2px 0 4px}
 .sfSessionSidebarAlternatives>.hint{font-size:11px;margin:0 0 6px}
 .sfSessionSidebarAlternatives #sfSessionAlternatives{display:grid;gap:3px;min-height:55px}
 .sfSessionSidebarAlternatives .sfSessionRow,.sfAvailableRow{margin:0 0 3px;padding:5px 6px;gap:5px}
 .sfSessionSidebarAlternatives .sfSessionRowInfo,.sfAvailableRow .sfSessionRowInfo{min-width:120px;flex:1 1 130px;gap:3px}
 .sfSessionSidebarAlternatives .sfSessionRowInfo strong,.sfAvailableRow .sfSessionRowInfo strong{font-size:12px}
 .sfSessionSidebarAlternatives .sfSessionRowInfo small,.sfAvailableRow .sfSessionRowInfo small{font-size:10px}
 .sfSessionSidebarAlternatives .sfSessionRow>button,.sfAvailableRow>button{padding:4px 6px;font-size:11px}
}
.sfSessionExtraTools{border-bottom:1px solid #2e4558;flex:none}
.sfSessionExtraTools>summary{padding:5px 14px;font-size:12px;color:#9ad9d2;cursor:pointer}
.sfSessionExtraTools[open]>summary{border-bottom:1px solid #2e4558}
.sfSessionExtraTools .sfSessionToolbar{padding:7px 12px}
@media(max-width:790px){
 .sfSessionLayout .sfSessionCatalog{height:auto!important;max-height:none!important;overflow:visible!important}
 .sfSessionLayout .sfSessionCatalog>#sfSessionAvailable{height:auto;max-height:40dvh;overflow-y:auto;flex:none}
 .sfSessionSidebarAlternatives{border-top:1px solid #39566a;margin-top:10px;padding-top:10px}
 .sfSessionLayout #sfSessionMain>.sfSessionRow{gap:5px;margin:3px 0;padding:7px}
 .sfSessionLayout #sfSessionMain .sfSessionRowInfo{flex:1 1 170px}
 .sfSessionLayout #sfSessionMain .sfSessionRowInfo strong{font-size:13px}
 .sfSessionLayout #sfSessionMain .sfSessionRowInfo small{font-size:11px}
}

/* Account cloud status: shown only when a supported cloud provider is connected.
   Green is a recent verified match, not a continuous sync promise. */
.sfSyncIndicatorWrap{position:relative;display:inline-flex;align-items:center}
#sfSyncIndicator{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;padding:0;border-radius:50%;border:1px solid #65798a;font-weight:900;font-size:19px;line-height:1;background:#273543}
#sfSyncIndicator[hidden],#sfSyncIndicatorInfo[hidden]{display:none!important}
#sfSyncIndicator[data-state=green]{color:#88f3b5;background:#164637;border-color:#3dbd79}
#sfSyncIndicator[data-state=yellow]{color:#ffe68b;background:#524624;border-color:#d0a744}
#sfSyncIndicator[data-state=red]{color:#ff9da4;background:#55252c;border-color:#de6674}
#sfSyncIndicatorInfo{position:absolute;right:0;top:calc(100% + 7px);z-index:2100;width:min(320px,86vw);white-space:pre-line;overflow-wrap:anywhere;padding:11px 13px;border-radius:10px;border:1px solid #57758b;background:#162738;color:#e7f5fa;font-size:12px;line-height:1.45;box-shadow:0 8px 22px #0009;pointer-events:none}

/* 0.3.49.20: the verified-cloud status lives beside the brand, not among
   performance actions. The language picker is a fixed two-letter square. */
.sfHeader .sfIdentity{flex:0 0 auto}
.sfHeader .sfIdentity .sfSyncIndicatorWrap{margin-left:1px;flex:none}
.sfHeader .sfIdentity #sfSyncIndicator{width:28px;height:28px;min-width:28px;font-size:17px}
.sfHeader .sfIdentity #sfSyncIndicatorInfo{left:0;right:auto}
.sfHeaderLanguage{display:inline-flex;flex:none;align-items:center;position:relative}
.sfHeaderLanguage select{
 appearance:none;-webkit-appearance:none;
 display:block;width:36px;min-width:36px;height:34px;min-height:34px;
 padding:0!important;text-align:center;text-align-last:center;
 background:#172c41;border:1px solid #547086;border-radius:7px;
 color:#e4faff;font-size:11px;font-weight:800;letter-spacing:.3px;cursor:pointer
}
.sfHeaderLanguage select:focus-visible{outline:2px solid #10e9f2;outline-offset:2px}
.sfHeaderLanguage select option{font-size:13px;background:#172c41;color:#fff}
.sfVisuallyHidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:690px){
 .sfHeader .sfIdentity .sfSyncIndicatorWrap{margin-left:0}
 .sfHeader .sfIdentity #sfSyncIndicator{width:25px;height:25px;min-width:25px;font-size:15px}
 .sfHeaderLanguage select{width:33px;min-width:33px;height:32px;min-height:32px;font-size:10px}
}

/* 0.3.49.21: welcome page is useful even for returning users with a song library. */
.sfWelcomeHome{width:min(1100px,100%);margin:0 auto;padding:clamp(8px,1.4vw,22px) 0 28px}
.sfWelcomeHero{padding:clamp(14px,2.4vw,28px);background:linear-gradient(125deg,#112a3b,#122139 67%,#172341);border:1px solid #2a5367;border-radius:17px}
.sfWelcomeEyebrow{font-size:11px;font-weight:800;letter-spacing:1.8px;color:#42e1d7}
.sfWelcomeHero h2{font-size:clamp(23px,3vw,37px);margin:10px 0;color:#f0f8ff}
.sfWelcomeHero p{max-width:780px;color:#b6c9db;font-size:clamp(13px,1.4vw,16px);line-height:1.65;margin:0 0 18px}
.sfWelcomeActions{display:flex;gap:9px;flex-wrap:wrap}
.sfWelcomeActions button{min-height:39px}
.sfWelcomeGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.sfWelcomeCard{background:#142332;border:1px solid #2c4658;border-radius:13px;padding:18px;min-width:0}
.sfWelcomeCardIcon{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;border-radius:9px;color:#2ce8e1;background:#153e4a;font-size:22px}
.sfWelcomeCard h3{font-size:15px;margin:12px 0 8px;color:#f1f7ff}
.sfWelcomeCard p{font-size:13px;line-height:1.55;color:#adc0d0;margin:0}
.sfWelcomeFootnote{margin:14px 3px 0;color:#9eb6c9;font-size:12px;line-height:1.5}
@media(max-width:1000px){.sfWelcomeGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.sfWelcomeGrid{grid-template-columns:1fr;gap:9px}.sfWelcomeHero{padding:17px}.sfWelcomeCard{padding:14px}.sfWelcomeActions button{flex:1 1 130px}}

/* Drum lane-specific sound picker and velocity edit; keep grid scrollable. */
.sfDrumRow{grid-template-columns:65px 145px repeat(var(--drum-steps),minmax(12px,1fr))}
.sfDrumRow>.sfDrumLaneSample{min-width:0;width:142px;max-width:142px;font-size:10px;min-height:25px;padding:2px 4px;text-overflow:ellipsis}
#drumVelocity{width:120px;vertical-align:middle}
#drumSelectedHit{display:inline-block;max-width:140px;white-space:nowrap}
@media(max-width:690px){.sfDrumRow{grid-template-columns:60px 110px repeat(var(--drum-steps),minmax(15px,1fr))}.sfDrumRow>.sfDrumLaneSample{width:108px;max-width:108px}}

/* Drum kit designer: per-lane imported audio, volume and step controls. */
.sfDrumRow{grid-template-columns:65px 140px 54px repeat(var(--drum-steps),minmax(12px,1fr))}
.sfDrumRow>.sfDrumLaneSample{width:138px;max-width:138px}
.sfDrumRow>.sfDrumLaneGain{width:52px;min-width:52px;padding:3px 2px;text-align:center;font-size:11px}
@media(max-width:690px){.sfDrumRow{grid-template-columns:60px 105px 45px repeat(var(--drum-steps),minmax(15px,1fr))}.sfDrumRow>.sfDrumLaneSample{width:103px;max-width:103px}.sfDrumRow>.sfDrumLaneGain{width:43px;min-width:43px}}


/* Curated opt-in song catalog and independent setlist categories */
.sfSampleDialog{width:min(740px,94vw);max-width:94vw;max-height:86dvh}
.sfSampleCatalogRows{max-height:58dvh;overflow:auto;display:grid;gap:16px;margin:12px 0}
.sfSampleCollection{border:1px solid #425c6b;border-radius:12px;padding:12px;background:#101d29}
.sfSampleCollection h4{margin:0 0 10px;color:#58e5d9}
.sfSampleSong{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #344756;padding:6px 0}
.sfSampleSong span{font-size:13px;overflow-wrap:anywhere}
.sfSampleSong button{flex:none;font-size:12px;padding:6px 9px}
#setlistCategoryFilter{max-width:185px}#setlistCategoryTags{min-width:150px}
.sfStageTabPart{margin:1em 0;padding:10px;border:1px solid #466178;border-radius:8px;max-width:100%;background:rgba(10,20,31,.45);overflow:hidden}
.sfStageTabHeading{display:block;font-size:clamp(13px,.55em,19px);color:#71e5db;margin-bottom:7px}
.sfStageTabNotation{display:block;white-space:pre;overflow-x:auto;overscroll-behavior-x:contain;max-width:100%;touch-action:pan-x pan-y;font-family:ui-monospace,SFMono-Regular,Consolas,Monaco,monospace;font-size:clamp(11px,.52em,18px);line-height:1.32;letter-spacing:0;tab-size:4;margin:0;padding-bottom:5px;user-select:text;-webkit-user-select:text}
.stage[data-theme="light"] .sfStageTabPart{background:#f1f6fa;color:#101c2b}
.stage[data-theme="warm"] .sfStageTabPart{background:#281e17;color:#ffe5b7}
@media(max-width:690px){.sfSampleDialog{padding:12px}.sfSampleSong{align-items:flex-start}.sfSampleSong button{font-size:11px}}


/* Mobile setlists: two-row primary toolbar, optional secondary controls. */
#sfMobileSetlistNew,#sfMobileSetlistMore{display:none}
.sfSongPickerSelectBar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.sfSongPickerSelectBar #setSongCount{margin:0 auto 0 0}
.sfSongPickerSelectBar button{padding:5px 8px;font-size:12px}
@media(max-width:690px){
 body:not(.stageActive)[data-library-tab="lists"] aside>#libraryView,
 body:not(.stageActive)[data-library-tab="lists"] aside>.sfCategoryFilter,
 body:not(.stageActive)[data-library-tab="lists"] aside>#search,
 body:not(.stageActive)[data-library-tab="lists"] aside>#librarySizeStatus,
 body:not(.stageActive)[data-library-tab="lists"] aside>#items,
 body:not(.stageActive)[data-library-tab="lists"] aside>#libraryEnrichmentPanel,
 body:not(.stageActive)[data-library-tab="lists"] aside>#libraryTools,
 body:not(.stageActive)[data-library-tab="lists"] aside>#sidebarNewList{display:none!important}
 body:not(.stageActive)[data-library-tab="lists"] aside{padding-block:6px}
 body:not(.stageActive)[data-library-tab="lists"] aside>.row{margin:0}
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar{
  display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;
  align-items:stretch;margin-bottom:8px;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar> :not(#setlistPicker):not(#setlistCategoryFilter):not(#addSongs):not(#playList):not(#sfMobileSetlistNew):not(#sfMobileSetlistMore){display:none!important}
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#setlistCategoryFilter{
  display:block!important;grid-column:span 5;grid-row:1;order:1;max-width:none;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#setlistPicker{
  display:block!important;grid-column:span 7;grid-row:1;order:2;min-width:0;max-width:none;flex:none;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#addSongs{
  display:block!important;grid-column:span 4;grid-row:2;order:3;min-width:0;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#playList{
  display:block!important;grid-column:span 3;grid-row:2;order:4;min-width:0;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#sfMobileSetlistNew{
  display:block!important;grid-column:span 2;grid-row:2;order:5;min-width:0;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#sfMobileSetlistMore{
  display:block!important;grid-column:span 3;grid-row:2;order:6;min-width:0;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>button,
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>select{
  padding:6px 5px;min-height:36px;font-size:12px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;
 }
 body:not(.stageActive)[data-library-tab="lists"] #listArea>.actions,
 body:not(.stageActive)[data-library-tab="lists"] #listArea>.hint,
 body:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar+.actions{
  display:none!important
 }
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>
  :not(#setlistPicker):not(#setlistCategoryFilter):not(#addSongs):not(#playList):not(#sfMobileSetlistNew):not(#sfMobileSetlistMore):not(#setlistCoverInput):not(#setlistFile){
  display:block!important;grid-column:span 6;grid-row:auto;order:10;max-width:none!important;width:100%;
 }
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>#setlistCoverPreview{display:none!important}
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea>.actions,
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar+.actions{
  display:flex!important;flex-wrap:wrap
 }
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea #listTitle,
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea #setlistCategoryTags{
  grid-column:span 12
 }
 #setSongDialog.sfSongPicker{width:min(96vw,540px);max-height:90dvh}
 #setSongDialog .sfSongChoices{min-height:0;max-height:55dvh;overflow:auto}
}


/* Three stable song-control zones: metadata, stage actions, text editing. */
.sfSongHeaderZones{display:grid;gap:7px;margin:0 0 9px}
.sfSongTopRow{display:flex;align-items:start;justify-content:space-between;gap:10px;min-width:0}
.sfSongIdentity{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sfSongIdentity #title{flex:2 1 220px;min-width:125px;max-width:none}
.sfSongIdentity #artist{flex:1 1 150px;max-width:none!important;min-width:100px}
.sfSongPrimaryActions{display:flex;flex:none;gap:6px;align-items:center}
.sfSongEditRow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sfSongEditRow>button,.sfSongEditRow>details>summary{font-size:12px;padding:7px 10px;min-height:36px}
.sfSongToolDropdown{position:relative}
.sfSongToolDropdown>summary{border:1px solid #405166;border-radius:8px;background:#273241;cursor:pointer;list-style:none;display:flex;align-items:center;gap:7px;white-space:nowrap}
.sfSongToolDropdown>summary::after{content:"▾";opacity:.8}
.sfSongToolDropdown>summary::-webkit-details-marker{display:none}
.sfSongToolDropdown[open]>summary{border-color:#4ba7a6;background:#1d3e47}
.sfSongDropdownActions,.sfSongToolDropdown .sfQuickTools{display:flex;flex-direction:column;gap:5px;padding:8px;background:#152535;border:1px solid #405166;border-radius:9px;position:absolute;z-index:40;top:calc(100% + 3px);right:0;min-width:170px;box-shadow:0 12px 28px #0008}
.sfSongDropdownActions button,.sfSongToolDropdown .sfQuickTools button{width:100%;text-align:left;font-size:12px;padding:8px}
.sfSongMoreActions .danger{margin-top:6px;border-top:2px solid #8a3f45;color:#ffbbbb}
#songArea .sfSongLayerTools{border:0;background:transparent;padding:0;margin:6px 0}
#songArea .sfSongMetaSide .sfRehearsalSection,
#songArea .sfSongMetaSide .sfSongFactsPanel,
#songArea .sfSongMetaSide .sfAdditionalReferences{background:#142331;border:1px solid #38546a;border-radius:9px;margin:5px 0;overflow:hidden}
#songArea .sfSongMetaSide details>summary{padding:10px 12px!important;min-height:35px;cursor:pointer;color:#d6edfa;font-size:13px;font-weight:650;line-height:1.35}
#songArea .sfSongMetaSide details[open]>summary{border-bottom:1px solid #324d61;background:#1c3042}
#songArea .sfSongMetaSide .sfSongFactsPanel:not([open]){padding:0!important}
#songArea .sfSongMetaSide .sfAdditionalReferences{padding:0}
#songArea .sfSongMetaSide .sfAdditionalReferences[open]{padding-bottom:8px}
#songArea .sfSongMetaSide .sfSongMetaRow{gap:6px}
#songArea .sfSongMetaSide .sfRecordingPanel{margin-bottom:3px}
body:not(.sfAdvancedWorkspaceOpen) aside>#libraryTools,
body:not(.sfAdvancedWorkspaceOpen) aside>#libraryEnrichmentPanel{display:none!important}
/* Settings are independent of the selected Simple / Advanced / Expert workspace. */
#appSettingsDialog #libraryDefaults,#appSettingsDialog #globalLayers,
#sfAdvancedWorkspace #libraryDefaults,#sfAdvancedWorkspace #globalLayers,
#sfAdvancedWorkspace #libraryTools,#sfAdvancedWorkspace #libraryEnrichmentPanel{display:revert!important}
@media(max-width:980px){
 .sfSongTopRow{flex-wrap:wrap}
 .sfSongIdentity{flex:1 1 100%}
 .sfSongPrimaryActions{flex:1 1 100%;justify-content:flex-start}
}
@media(max-width:690px){
 .sfSongHeaderZones{gap:6px}
 .sfSongTopRow .sfSongIdentity{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
 .sfSongIdentity #title,.sfSongIdentity #artist{grid-column:1;min-width:0;width:100%}
 .sfSongIdentity #songProperties{grid-column:2;grid-row:1 / span 2;align-self:stretch}
 .sfSongPrimaryActions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
 .sfSongPrimaryActions button{font-size:12px;padding:7px 6px;white-space:nowrap}
 .sfSongEditRow{gap:5px}
 .sfSongEditRow>button,.sfSongEditRow>details>summary{font-size:11px;padding:6px}
 .sfSongToolDropdown .sfQuickTools,.sfSongDropdownActions{left:auto;right:0;max-width:90vw}
}


/* Setlist: single expandable action panel, no duplicate title/category inputs. */
#listArea>.toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#listArea>.toolbar>#setlistCategoryFilter{flex:0 1 175px;max-width:175px}
#listArea>.toolbar>#setlistPicker{flex:1 1 220px;max-width:none;min-width:160px}
#listArea>.toolbar>.sfSetlistExtraMenu{display:block!important;position:relative;flex:none;min-width:0}
.sfSetlistExtraMenu>summary{padding:9px 12px;border:1px solid #405166;background:#273241;border-radius:9px;cursor:pointer;white-space:nowrap;list-style:none}
.sfSetlistExtraMenu>summary::-webkit-details-marker{display:none}
.sfSetlistExtraMenu>summary::after{content:" ▾";opacity:.8}
.sfSetlistExtraActions{position:absolute;z-index:35;right:0;top:calc(100% + 4px);width:min(330px,85vw);max-height:min(68dvh,560px);overflow-y:auto;overscroll-behavior:contain;padding:10px;display:grid;gap:11px;background:#142332;border:1px solid #496477;border-radius:10px;box-shadow:0 12px 24px #0009}
.sfSetlistActionGroup{display:grid;gap:6px}
.sfSetlistActionGroup+ .sfSetlistActionGroup{border-top:1px solid #344b5c;padding-top:9px}
.sfSetlistActionGroup>strong{color:#88dfd4;font-size:12px}
.sfSetlistActionGroup>button,.sfSetlistActionGroup>input{display:block!important;min-width:0;max-width:none!important;width:100%;font-size:12px;text-align:left}
body[data-interface-mode="simple"] #listArea .sfSetlistExtraMenu .sfSetlistActionGroup>button,
body[data-interface-mode="advanced"] #listArea .sfSetlistExtraMenu .sfSetlistActionGroup>button{display:block!important}
@media(max-width:690px){
 body:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>.sfSetlistExtraMenu{display:none!important}
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>.sfSetlistExtraMenu{display:block!important;grid-column:span 12;grid-row:auto;order:11;width:100%}
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>.sfSetlistExtraMenu>summary{text-align:center}
 body.sfMobileSetlistMoreOpen:not(.stageActive)[data-library-tab="lists"] #listArea .toolbar>.sfSetlistExtraMenu>.sfSetlistExtraActions{position:static;width:100%;max-height:none;box-shadow:none}
 #listArea .sfSetlistExtraMenu .sfSetlistActionGroup button{white-space:normal;min-height:35px}
}


body[data-interface-mode="simple"] #listArea>.toolbar>.sfSetlistExtraMenu,
body[data-interface-mode="advanced"] #listArea>.toolbar>.sfSetlistExtraMenu{display:block!important}
body[data-interface-mode="simple"] #songArea .sfSongEditRow>#proEditor,
body[data-interface-mode="simple"] #songArea .sfSongEditRow>#mergeChordPro,
body[data-interface-mode="simple"] #songArea .sfSongEditRow>#undoChordMerge,
body[data-interface-mode="simple"] #songArea .sfSongEditRow>#transposeSong{display:none!important}
#songArea .sfSongFooterActions #addList{display:none!important}
@media(max-width:690px){
 body[data-interface-mode="simple"]:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar>.sfSetlistExtraMenu,
 body[data-interface-mode="advanced"]:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar>.sfSetlistExtraMenu{display:none!important}
 body.sfMobileSetlistMoreOpen[data-interface-mode="simple"]:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar>.sfSetlistExtraMenu,
 body.sfMobileSetlistMoreOpen[data-interface-mode="advanced"]:not(.stageActive)[data-library-tab="lists"] #listArea>.toolbar>.sfSetlistExtraMenu{display:block!important}
}


body[data-interface-mode="simple"] #listArea>.toolbar>#setlistCategoryFilter,
body[data-interface-mode="advanced"] #listArea>.toolbar>#setlistCategoryFilter{display:block!important}


/* Unified song editor modes: the mode toolbar works in ALL interface levels. */
#songArea>.sfSongLayerTools{display:none!important}
#songArea>.sfSongModeNavigation{display:flex!important;gap:5px;overflow-x:auto;padding:7px 2px 9px;margin:4px 0 8px;scrollbar-width:thin;align-items:stretch}
.sfSongModeNavigation .sfSongModeButton{display:flex;flex:none;align-items:stretch;border:1px solid #375368;border-radius:8px;overflow:hidden;background:#1a2d3b}
.sfSongModeNavigation button{font-size:12px;border:0;border-radius:0;padding:7px 10px;white-space:nowrap;min-height:35px}
.sfSongModeNavigation .sfSongModePick{background:transparent}
.sfSongModeNavigation .sfSongModeMove{padding:4px;font-size:10px;color:#9fb8c7;border-left:1px solid #375368;background:#1d3142}
.sfSongModeNavigation .sfSongModeMove:disabled{opacity:.3}
.sfSongModeNavigation button.active,.sfSongModeNavigation button[aria-pressed=true]{background:#128e87;color:#fff;font-weight:700}
.sfUnifiedEditorHost{display:grid;gap:10px;padding:6px 0;min-width:0;min-height:350px}
.sfUnifiedEditorHost[hidden]{display:none!important}
#songArea .sfModeWorkArea #preview,
#songArea .sfModeWorkArea #pdfbox,
#songArea .sfModeWorkArea #editHelp,
#songArea .sfModeWorkArea #imageTools{display:none!important}
.sfUnifiedEditorHost>.sfRehearsalSection,
.sfUnifiedEditorHost>.sfSongEditorPanel{display:block!important;min-width:0;width:100%;max-width:none}
.sfUnifiedEditorHost>.sfSongEditorPanel{padding:12px;background:#122333;border:1px solid #3f5c6e;border-radius:10px}
.sfUnifiedEditorHost>.sfRehearsalSection>summary{display:none}
.sfUnifiedEditorHost>.sfRehearsalSection>.sfRehearsalInner{padding:14px}
#sfMusicSheetEditor .sfSheetForm{display:grid;grid-template-columns:minmax(110px,1fr) minmax(180px,2fr) auto;gap:6px}
#sfMusicSheetEditor .sfSheetRow{padding:11px 0;border-bottom:1px solid #3b5365;display:grid;gap:8px}
#sfMusicSheetEditor .sfSheetRow .actions{display:flex;gap:7px;flex-wrap:wrap}
#sfMusicSheetEditor .sfSheetPreview{width:100%;height:480px;max-width:100%;border:1px solid #405c6e;border-radius:6px;background:#fff}
#sfMusicSheetEditor .sfSheetPreview[hidden]{display:none}
.sfLegacyModes{display:flex;gap:6px;flex-wrap:wrap;order:-1}
.sfLegacyModes button.active{background:#137f77;color:white}
#sfLegacyChordMapper .sfChordMappingSettings{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
#sfLegacyChordMapper input[type=number]{width:80px}
#sfLegacyChordMapper .sfChordBarGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(35px,1fr));gap:4px;margin:12px 0}
#sfLegacyChordMapper .sfChordBar{padding:5px;font-size:12px;background:#1b3445}
#sfLegacyChordMapper .sfChordBar.sfHasChords{border-color:#24bfa7;background:#254e50}
#sfLegacyChordMapper .sfChordBar.sfChordBarSelected{outline:2px solid #5ce5cf}
.sfLegacyChordRows{display:grid;gap:5px}
.sfLegacyChordRow{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:7px;border:1px solid #335268;border-radius:6px}
.sfLegacyChordRow code{flex:1;min-width:140px;white-space:pre-wrap}
.sfLegacyChordRow small{color:#9bc0d0}
.sfFormWorkspaceDialog.sfInlineFormEditor[open]{position:relative;inset:auto;display:block;width:100%;max-width:100%;height:auto;max-height:none;min-height:500px;margin:0;box-shadow:none}
.sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceLayout{height:auto;min-height:490px;max-height:none;overflow:visible}
.sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceMain{overflow:visible}
.lineDialog.sfInlineLineEditor[open]{position:relative;inset:auto;width:100%;max-width:100%;max-height:none;margin:12px 0;box-shadow:none;display:block}
@media(max-width:900px){.sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceLayout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:690px){#songArea>.sfSongModeNavigation{margin:1px -5px 7px;padding:5px;gap:4px}#sfMusicSheetEditor .sfSheetForm{grid-template-columns:1fr}#sfMusicSheetEditor .sfSheetPreview{height:320px}.sfUnifiedEditorHost{min-height:210px}}


/* v0.3.49.49: stage-first navigation and editor UI compactness */
body.sfHasSongs .sfWelcomeHome{display:none!important}
#songArea .sfSongHeaderZones{display:flex;flex-direction:row;align-items:center;margin-bottom:4px}
#songArea .sfSongTopRow{width:100%}
#songArea .sfSongTopRow .sfSongPrimaryActions{margin-left:auto}
#songArea .sfSongTopRow .sfSongIdentity{display:none!important}
#songArea .sfSongEditRow #edit,#songArea .sfSongEditRow #proEditor,
#songArea .sfSongEditRow #mergeChordPro,#songArea .sfSongEditRow .sfSongToolDropdown:has(.sfQuickTools){display:none!important}
#songArea .sfSongEditRow{gap:5px;margin:0}
#songArea .sfSongEditRow button,#songArea .sfSongEditRow summary{font-size:12px;padding:6px 8px;min-height:30px}
#songArea #propertiesSummary .sfSongIdentity{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:5px;background:#142331;border:1px solid #37546a;border-radius:8px;padding:8px;margin:7px 0}
#songArea #propertiesSummary .sfSongIdentity input{font-size:12px;min-height:30px;padding:5px 7px;max-width:none!important;width:100%;grid-column:1}
#songArea #propertiesSummary .sfSongIdentity #title{font-size:13px;font-weight:700}
#songArea #propertiesSummary .sfSongIdentity #artist{font-size:12px;color:#b8c9d5}
#songArea #propertiesSummary .sfSongIdentity #songProperties{grid-column:2;grid-row:1 / span 2;font-size:11px;padding:6px;align-self:stretch}
#songArea>.sfSongModeNavigation{gap:4px;margin:0 0 5px;padding:2px;min-height:0}
#songArea .sfSongModeButton{border-radius:6px;position:relative;gap:0;align-items:center}
#songArea .sfSongModePick,#songArea .sfSongModePreview{padding:5px 8px;min-height:28px;font-size:11px}
#songArea .sfModeDragHandle{font-size:12px;color:#8bb5c5;padding:0 5px;border-left:1px solid #476579;cursor:grab;pointer-events:none}
#songArea .sfSongModeMove{display:none!important}
#songArea .sfSongModeButton:active{cursor:grabbing}
#songArea .sfLegacyModes{display:flex;align-items:center;align-self:start;width:100%;flex-wrap:wrap;gap:4px;order:0}
#songArea .sfLegacyModes button{min-height:27px!important;height:27px!important;min-width:0!important;width:auto!important;padding:3px 8px!important;font-size:11px!important;flex:none!important}
#songArea .sfLegacyModes .sfLegacyMigrate{margin-left:auto}
#songArea .sfLegacyModes .sfLegacyMigrate[hidden]{display:none!important}
#songArea #sfUnifiedEditorHost:has(.sfLegacyModes){display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:0;padding:0}
#songArea #sfUnifiedEditorHost:has(.sfLegacyModes)>.hint{margin:0 0 4px}
#songArea .sfUnifiedEditorHost>.sfRehearsalSection{border-radius:7px}
#songArea .sfUnifiedEditorHost>#rehearsalDrums>summary,
#songArea .sfUnifiedEditorHost>#songChordPanel>summary{display:list-item!important;padding:8px!important}
#songArea .sfUnifiedEditorHost>#rehearsalDrums:not([open]) .sfRehearsalInner,
#songArea .sfUnifiedEditorHost>#songChordPanel:not([open]) .sfRehearsalInner{display:none!important}
#songArea .sfUnifiedEditorHost>#sfCanonicalGrid{display:block!important;width:100%;padding:8px;background:#111f2d;border:1px solid #395365;border-radius:9px}
#songArea .sfCanonicalBarTop{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px;font-size:12px}
#songArea .sfCanonicalBarTop label{display:flex;align-items:center;gap:5px;font-size:11px}
#songArea .sfCanonicalBarTop select{min-height:25px;padding:3px 6px;font-size:11px}
#songArea .sfCanonicalGridScroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid #36536a;border-radius:7px;scrollbar-width:thin}
#songArea .sfCanonicalTimeline{position:relative;min-width:0}
#songArea .sfCanonicalBarHeaders{display:grid;height:27px}
#songArea .sfCanonicalBarHeading{font-size:10px;padding:5px;border-right:1px solid #537189;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#203548}
#songArea .sfCanonicalLane{position:relative;background:#0c1926}
#songArea .sfCanonicalGrid:has(.sfRhythmNoteGrid) .sfCanonicalLane{background:repeating-linear-gradient(to bottom,#102435 0,#102435 13px,#23425a 14px,#102435 15px)}
#songArea .sfCanonicalBarCell{position:absolute;top:0;bottom:0;border-right:2px solid #57778a;background-image:linear-gradient(to right,transparent calc(100% - 1px),#30485a 100%)}
#songArea .sfCanonicalClip{position:absolute;display:flex;align-items:center;justify-content:center;min-width:14px;height:35px;max-width:100%;border:1px solid #53d7bf;border-radius:5px;background:#175f5b;color:#f1ffff;font-weight:700;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:grab;z-index:2;padding-right:9px}
#songArea .sfCanonicalClip.sfRestClip{background:#493e58;border-color:#a98cbe;color:#eee0f5}
#songArea .sfCanonicalClip.selected{outline:2px solid #f7d674;outline-offset:1px}
#songArea .sfCanonicalResize{position:absolute;top:0;right:0;bottom:0;width:10px;background:#ffffff22;cursor:ew-resize;display:flex;align-items:center;justify-content:center}
#songArea .sfCanonicalPalette{display:grid;gap:5px;margin-top:8px}
#songArea .sfChordPaletteRow{display:flex;gap:3px;align-items:center;flex-wrap:wrap}
#songArea .sfChordPaletteRow>strong{width:92px;flex:none;color:#97bfcc;font-size:11px}
#songArea .sfCanonicalPaletteItem{font-size:11px;min-height:26px;padding:4px 7px;border-radius:5px;cursor:grab}
#songArea .sfCanonicalPaletteItem{user-select:none;-webkit-user-select:none;touch-action:pan-y}
.sfPaletteDragGhost{position:fixed;z-index:100000;pointer-events:none;padding:6px 10px;border:1px solid #3ff6c9;border-radius:6px;background:#143e4a;color:#f1ffff;box-shadow:0 4px 18px #0009;font-size:12px;white-space:nowrap}
#songArea .sfMidiHeader{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
#songArea .sfMidiHeader button{padding:6px 10px;font-size:12px}

#songArea .sfChordCustom{justify-self:start;padding:4px 8px;min-height:26px;font-size:11px}
#songArea .sfGrooveCategories,#songArea .sfGroovePalette{display:flex;gap:5px;flex-wrap:wrap}
#songArea .sfGrooveCategories button{font-size:11px;padding:4px 8px}
#songArea .sfGrooveCategories button.active{border-color:#2cb5a6}
#songArea .sfPatternClipEditor{display:grid;gap:8px;padding:10px;border:1px solid #42677c;border-radius:8px;background:#192d3d}
#songArea .sfPatternClipEditor strong{font-size:13px}
#songArea .sfPatternClipEditor button{font-size:11px;padding:4px}
#songArea .sfRhythmNoteGrid{display:grid;gap:3px;overflow-x:auto}
#songArea .sfRhythmNoteRow{display:flex;gap:6px;align-items:center;min-width:max-content}
#songArea .sfRhythmNoteRow strong{font-size:10px;flex:0 0 65px}
#songArea .sfRhythmSteps{display:grid;gap:2px;align-items:center}
#songArea .sfRhythmStep{min-width:16px;height:18px;border-radius:2px;padding:0;background:#203c50;border:1px solid #436176}
#songArea .sfRhythmStep.active{background:#36d5bd}
#songArea .sfRhythmStep.barStart{border-left:2px solid #bddce5}
#songArea .sfInlineLineEditor{font-size:12px;padding:5px}
#songArea .sfInlineLineEditor .lineWorkspaceHead{padding:5px 0;gap:4px}
#songArea .sfInlineLineEditor .lineWorkspaceHead h3{font-size:13px;margin:0}
#songArea .sfInlineLineEditor .lineWorkspace{grid-template-columns:minmax(0,1fr);gap:5px}
#songArea .sfInlineLineEditor .lineRowWrap{min-height:0!important;display:grid;grid-template-columns:18px minmax(0,1fr) 92px;gap:3px;align-items:center;padding:1px 0!important;margin:0!important}
#songArea .sfInlineLineEditor #lineRows{max-height:65vh;overflow:auto}
#songArea .sfInlineLineEditor .lineRow{position:relative;font-size:14px;line-height:1.35;min-height:0!important;margin:0!important;padding:2px 6px!important;border-radius:4px}
#songArea .sfInlineLineEditor .lineTextPreview{position:relative;z-index:2;display:block;padding-right:60px;white-space:pre-wrap}
#songArea .sfInlineLineEditor .lineNumber{display:none!important}
#songArea .sfInlineLineEditor .lineRow>small:last-child{position:absolute;right:5px;top:50%;transform:translateY(-50%);z-index:0;opacity:.3;font-size:10px;pointer-events:none}
#songArea .sfInlineLineEditor .inlineLineType{font-size:10px;padding:2px 3px;min-height:25px}
#songArea .sfInlineLineEditor .lineWorkspaceFoot{gap:4px}
#songArea .sfInlineLineEditor .lineWorkspaceFoot button{font-size:11px;padding:4px 7px}
@media(max-width:690px){
 #songArea .sfSongTopRow{flex-wrap:nowrap}
 #songArea #propertiesSummary .sfSongIdentity{gap:3px}
 #songArea .sfChordPaletteRow>strong{width:100%;font-size:10px}
 #songArea .sfCanonicalPaletteItem{font-size:10px;padding:3px 5px}
 #songArea .sfInlineLineEditor .lineRowWrap{grid-template-columns:16px minmax(0,1fr) 70px}
 #songArea .sfInlineLineEditor .lineTextPreview{padding-right:30px}
}


/* Compact six-voice arrangement blocks: separate from full drum machine. */
#songArea .sfCanonicalGrid.sfRhythmMode .sfCanonicalLane{background:repeating-linear-gradient(to bottom,#132b3b 0px,#132b3b 13px,#2e5064 14px,#112334 15px)}
#songArea .sfCanonicalGrid .sfRhythmMiniClip{height:74px;top:7px!important;padding:3px 10px 3px 3px;background:#17485b;border-color:#41acdc;align-items:stretch}
#songArea .sfRhythmClipMini{display:grid;grid-template-rows:repeat(6,1fr);width:100%;gap:1px;align-items:center}
#songArea .sfRhythmClipVoice{display:flex;align-items:center;justify-content:space-around;gap:1px;min-width:0}
#songArea .sfRhythmMiniHit{height:3px;min-width:2px;width:7%;border-radius:2px;background:#537184}
#songArea .sfRhythmMiniHit.hit{background:#4de2c1}
#songArea .sfModeDragHandle{touch-action:none;user-select:none}
#songArea .sfSongModeButton.sfReorderingMode{outline:2px solid #58e7d8;background:#1e5556}
#songArea .sfCanonicalGridArmed{font-size:11px}
#songArea #sfCanonicalGridArmed{margin:2px 0;font-size:11px;color:#81dfd0}


#songArea .sfCanonicalWindowNav{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-left:auto}
#songArea .sfCanonicalWindowNav button{min-height:25px;font-size:10px;padding:3px 5px}
#songArea .sfCanonicalWindowNav label{font-size:10px}
#songArea .sfCanonicalWindowNav input{width:60px;font-size:11px;min-height:24px;padding:3px 4px}
#songArea .sfCanonicalWindowNav .hint{font-size:10px;white-space:nowrap}

/* Scores and inline Text row editor — v0.3.49.54 */
#sfMusicSheetEditor .sfSheetUploads{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #35566b;border-radius:9px;margin:12px 0;background:#112738}
#sfMusicSheetEditor .sfSheetUploads input[type=file]{width:100%;max-width:100%;min-width:0}
#sfMusicSheetEditor .sfSheetUploads .hint{line-height:1.45}
#songArea .sfUnifiedEditorHost .lineDialog.sfInlineLineEditor[open]{position:relative;inset:auto;margin:2px 0;max-height:none;overflow:visible;min-height:260px;transform:none;width:100%;max-width:100%;box-shadow:none}
#songArea .sfUnifiedEditorHost .lineDialog.sfInlineLineEditor .lineWorkspace{min-width:0}
#songArea .sfUnifiedEditorHost .lineDialog.sfInlineLineEditor .lineWorkspace #lineRows{max-height:58dvh}
#songArea .sfLegacyModes{position:relative;z-index:1;padding:4px 0 9px;border-bottom:1px solid #35566b}
@media(max-width:690px){#songArea .sfUnifiedEditorHost .lineDialog.sfInlineLineEditor .lineWorkspace #lineRows{max-height:35dvh}}

/* StageFlow canonical form and interaction clarity v0.3.49.55 */
#songArea .sfCanonicalFormStrip{height:27px;position:relative;display:block;white-space:nowrap;background:#0d2332}
#songArea .sfCanonicalFormSegment{position:absolute;top:2px;height:23px;padding:3px 8px;box-sizing:border-box;background:color-mix(in srgb,var(--sf-form-color),#0b2030 35%);border:1px solid var(--sf-form-color);border-radius:4px;color:#fff;font-size:11px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#songArea .sfCanonicalBarHeading{border-top:2px solid var(--sf-form-color,#324a5d)}
#songArea .sfCanonicalDropTarget{position:absolute;top:0;bottom:0;z-index:4;pointer-events:none;box-sizing:border-box;background:#38f1ca38;border:2px solid #3ff6c9;box-shadow:0 0 0 2px #0b1925,0 0 16px #3ff6c988}
#songArea .sfCanonicalDropTarget[hidden]{display:none!important}
#songArea .sfCanonicalClip.sfClipDragging{opacity:.55}
#songArea .sfCanonicalClip.sfClipResizing{outline:2px dashed #fdd674;outline-offset:2px;opacity:.86;z-index:5}
#songArea .sfCanonicalResize{width:18px;background:#ffffff24;z-index:3;touch-action:none}
#songArea .sfChordInspector{display:flex;align-items:end;flex-wrap:wrap;gap:6px;padding:9px 8px;margin-bottom:8px;border:1px solid #34586a;background:#172c3b;border-radius:8px}
#songArea .sfChordInspector .sfChordField{display:flex;flex-direction:column;gap:3px;font-size:10px;min-width:65px}
#songArea .sfChordInspector .sfChordField:first-child{min-width:105px;flex:1 1 120px}
#songArea .sfChordInspector input{box-sizing:border-box;width:76px;min-width:0;max-width:100%;padding:6px;font-size:12px}
#songArea .sfChordInspector .sfChordField:first-child input{width:100%}
#songArea .sfChordInspector .hint{margin:0}
#songArea .sfRhythmTopActions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;position:relative;z-index:2}
#songArea .sfRhythmTopActions button{min-height:34px}
#songArea.sfRhythmWide .sfSongMetaSide{display:none!important}
@media(min-width:981px){#songArea.sfRhythmWide .sfSongWorkspace{grid-template-columns:minmax(0,1fr)!important}#songArea.sfRhythmWide .sfSongBody{grid-column:1}}
#songArea .sfCanonicalGridScroll{max-width:100%;min-width:0}
#songArea .sfRhythmNoteGrid{max-width:100%;overflow-x:auto}
#songArea .sfPatternClipEditor{min-width:0;max-width:100%;overflow-x:auto}

#songArea .sfChordContextMenu{position:fixed;display:flex;flex-direction:column;min-width:176px;gap:3px;padding:7px;background:#14283a;border:1px solid #4f7485;border-radius:9px;box-shadow:0 15px 35px #0009;z-index:5000}
#songArea .sfChordContextMenu button{background:#20394c;color:#edf7ff;text-align:left;padding:9px 10px;font-size:12px;border:1px solid transparent;border-radius:5px}
#songArea .sfChordContextMenu button:hover,#songArea .sfChordContextMenu button:focus-visible{background:#215b63;border-color:#4de0bf}
.sfChordContextMenu{position:fixed;display:flex;flex-direction:column;min-width:176px;gap:3px;padding:7px;background:#14283a;border:1px solid #4f7485;border-radius:9px;box-shadow:0 15px 35px #0009;z-index:5000}
.sfChordContextMenu button{background:#20394c;color:#edf7ff;text-align:left;padding:9px 10px;font-size:12px;border:1px solid transparent;border-radius:5px}
.sfChordContextMenu button:hover,.sfChordContextMenu button:focus-visible{background:#215b63;border-color:#4de0bf}

/* v0.3.49.57 — single-row desktop actions, aligned metadata, compact setlist entries */
@media(min-width:981px){
 #songArea .sfSongHeaderZones{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  gap:6px!important;min-width:0;max-width:100%;width:100%;overflow-x:auto;overflow-y:visible;
  scrollbar-width:thin;padding:1px 0 5px;margin-bottom:5px
 }
 #songArea .sfSongTopRow{display:contents!important}
 #songArea .sfSongEditRow{display:flex!important;flex:0 0 auto;flex-wrap:nowrap!important;order:1;gap:5px;min-width:max-content}
 #songArea .sfSongPrimaryActions{display:flex!important;flex:0 0 auto;order:2;margin-left:auto!important;gap:5px;white-space:nowrap}
 #songArea .sfSongEditRow>button,#songArea .sfSongEditRow>details>summary,
 #songArea .sfSongPrimaryActions>button{min-height:33px!important;height:33px!important;padding:5px 9px!important;font-size:12px!important;white-space:nowrap}
 #songArea .sfSongEditRow .sfSongToolDropdown{flex:0 0 auto}
 #songArea .sfSongWorkspace{grid-template-columns:minmax(0,1fr) clamp(278px,24%,350px)!important;gap:12px!important}
 #songArea .sfSongMetaSide{width:100%;box-sizing:border-box;min-width:0}
 #songArea .sfSongMetaSide>*{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
 #songArea .sfSongMetaSide .sfSongMetaRow,#songArea .sfSongMetaSide .sfSourceBlock{width:100%;min-width:0;box-sizing:border-box}
 #songArea .sfSongMetaSide input,#songArea .sfSongMetaSide select{max-width:100%;min-width:0;box-sizing:border-box}
}
@media(min-width:981px) and (max-width:1180px){
 #songArea .sfSongHeaderZones{gap:3px!important}
 #songArea .sfSongEditRow>button,#songArea .sfSongEditRow>details>summary,
 #songArea .sfSongPrimaryActions>button{padding:4px 6px!important;font-size:11px!important}
}
/* Two pixels of vertical padding per song row. Preserve controls' usable tap target. */
body:not(.stageActive) #listArea #entries .setitem{
 padding:2px 6px!important;margin:2px 0!important;gap:5px!important;
 min-height:0!important;height:auto!important;align-items:center!important;flex-wrap:nowrap!important
}
body:not(.stageActive) #listArea #entries .setitem>.sfSongThumb{width:30px!important;height:30px!important;min-width:30px;flex:0 0 30px;object-fit:cover}
body:not(.stageActive) #listArea #entries .setitem>span{
 flex:1 1 auto;min-width:0!important;font-size:13px!important;
 line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis
}
body:not(.stageActive) #listArea #entries .setitem>span .visibility{
 display:block;font-size:10px!important;line-height:1.05!important;margin:1px 0 0!important
}
body:not(.stageActive) #listArea #entries .setitem>button{
 height:30px!important;min-height:30px!important;padding:3px 7px!important;flex:0 0 auto
}
body:not(.stageActive) #listArea #entries .setitem>.setContentMode{height:27px!important;min-height:27px!important}
#listArea>.toolbar>#saveList{display:inline-flex!important;align-items:center;justify-content:center;flex:none;min-width:76px}
@media(max-width:690px){
 body:not(.stageActive) #listArea #entries .setitem{gap:3px!important;padding:2px 4px!important;flex-wrap:wrap!important}
 body:not(.stageActive) #listArea #entries .setitem>.sfSongThumb{width:26px!important;height:26px!important;min-width:26px;flex:0 0 26px}
 body:not(.stageActive) #listArea #entries .setitem>button{min-width:30px;padding:2px 5px!important}
}

/* StageFlow v0.3.49.58 — inline row-to-form grouping, never vertical one-letter wrapping */
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor[open]{
 position:relative!important;inset:auto!important;left:auto!important;right:auto!important;
 top:auto!important;bottom:auto!important;transform:none!important;
 display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;
 max-width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;
 margin:0!important;padding:10px!important;overflow:visible!important;box-sizing:border-box!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineWorkspace{
 display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;
 overflow:visible!important;height:auto!important;min-height:0!important;flex:0 1 auto!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows{
 display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
 max-height:min(60dvh,850px)!important;height:auto!important;overflow-x:hidden!important;
 overflow-y:auto!important;box-sizing:border-box!important;padding:2px 4px!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap{
 display:grid!important;grid-template-columns:22px minmax(0,1fr) 100px!important;
 align-items:center!important;width:100%!important;max-width:100%!important;min-width:0!important;
 gap:6px!important;box-sizing:border-box!important;margin:0!important;
 padding:2px 6px!important;border-bottom:1px solid #345268
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap .lineRow{
 display:flex!important;align-items:center!important;min-width:0!important;width:100%!important;
 max-width:100%!important;flex:1 1 auto!important;gap:6px!important;box-sizing:border-box!important;
 text-align:left!important;white-space:normal!important;word-break:normal!important;
 overflow:hidden!important;padding:5px 8px!important;min-height:28px!important;
 grid-template-columns:none!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineTextPreview{
 display:block!important;position:static!important;min-width:0!important;flex:1 1 auto!important;
 padding:0!important;max-width:100%!important;box-sizing:border-box!important;
 white-space:pre-wrap!important;overflow-wrap:break-word!important;word-break:normal!important;
 font-size:14px!important;line-height:1.4!important;letter-spacing:normal!important;
 writing-mode:horizontal-tb!important;text-orientation:mixed!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .inlineLineType{
 width:100px!important;min-width:0!important;max-width:100px!important;justify-self:end;
 box-sizing:border-box!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap.sfLineFormGroup{
 border-left:4px solid var(--section-color,#3b6c7b)!important;
 border-right:1px solid var(--section-color,#3b6c7b)!important;
 background:color-mix(in srgb,var(--section-color,#3b6c7b) 33%,#14283a)!important;
 border-bottom:1px solid color-mix(in srgb,var(--section-color,#3b6c7b) 60%,#14283a)!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap.sfLineFormGroup.sfLineGroupStart{
 border-top:2px solid var(--section-color,#3b6c7b)!important;
 border-radius:7px 7px 0 0
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap.sfLineFormGroup.sfLineGroupEnd{
 border-bottom:2px solid var(--section-color,#3b6c7b)!important;
 border-radius:0 0 7px 7px;margin-bottom:5px!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap.groupSelected{
 outline:2px solid #a2f4e9!important;outline-offset:-2px!important;
 background:color-mix(in srgb,var(--section-color,#259787) 48%,#152d3b)!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineSectionHeading{
 margin:3px 0 0!important;padding:4px 9px!important;font-size:12px!important;
 border-left:5px solid var(--section-color,#3b6c7b)!important;
 color:#edfaff!important;background:var(--section-color,#3b6c7b)!important;
 border-radius:5px 5px 0 0
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineGroupTools{
 display:flex;gap:6px!important;align-items:center!important;min-width:0!important;
 padding:6px!important;flex-wrap:wrap!important
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .sfLineAssignLabel{
 display:flex;align-items:center;gap:6px;font-weight:700
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRolePicker{
 width:175px!important;min-width:145px!important;max-width:220px!important;
 font-size:12px;box-sizing:border-box
}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineView,
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineUp,
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineDown,
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineTotalBars,
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineCountAll,
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineDistribute{display:none!important}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineGroupTools label:has(#lineView),
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineGroupTools label:has(#lineTotalBars),
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineGroupTools label:has(#lineCountAll){display:none!important}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineWorkspace #lineForm{display:none!important}
#songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineWorkspaceHead .hint{max-width:65%;text-align:right}
@media(max-width:690px){
 #songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineRowWrap{grid-template-columns:20px minmax(0,1fr) 78px!important;gap:3px!important;padding:2px!important}
 #songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .inlineLineType{width:78px!important;max-width:78px!important}
 #songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor #lineRows .lineTextPreview{font-size:12px!important}
 #songArea #sfUnifiedEditorHost #lineDialog.sfInlineLineEditor .lineWorkspaceHead .hint{display:none!important}
}

/* StageFlow v0.3.49.59 — use full desktop width for one row of Song View tools. */
@media(min-width:981px){
 #songArea .sfSongHeaderZones{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  justify-content:flex-start!important;align-items:center!important;
  overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:thin;
  width:100%!important;max-width:100%!important;gap:6px!important;min-height:39px;
 }
 #songArea .sfSongTopRow{display:contents!important}
 #songArea .sfSongEditRow{order:1!important;flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;gap:5px!important;min-width:max-content!important}
 #songArea .sfSongHeaderZones>.sfSongModeNavigation{
  order:2!important;flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;
  gap:3px!important;min-width:max-content!important;max-width:none!important;width:auto!important;
  margin:0!important;padding:0!important;border:0!important
 }
 #songArea .sfSongHeaderZones>.sfSongModeNavigation>*{flex:0 0 auto!important}
 #songArea .sfSongPrimaryActions{order:3!important;margin-left:auto!important;flex:0 0 auto!important;white-space:nowrap!important}
}
@media(max-width:980px){
 #songArea .sfSongHeaderZones>.sfSongModeNavigation{order:3;width:100%;min-width:0}
 #songArea .sfSongHeaderZones{flex-wrap:wrap!important;overflow:visible!important}
}
/* Sheet music as an independent stage content layer. */
#stage .stageReading:has(#sfStageSheets:not([hidden])){display:flex;flex-direction:column;min-height:0}
#stage .stageReading .sfStageSheetTextHidden{display:none!important}
#stage #sfStageSheets[hidden]{display:none!important}
#stage #sfStageSheets{
 display:flex;flex:1 1 auto;min-height:0;min-width:0;width:100%;height:100%;flex-direction:column;
 overflow:hidden;box-sizing:border-box;padding:0;margin:0;background:#0d1723
}
#stage #sfStageSheets .sfStageSheetToolbar{
 display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:8px;
 padding:5px 9px;background:#182a3b;color:#e1f5fa;font-size:12px
}
#stage #sfStageSheets .sfStageSheetToolbar label{display:flex;align-items:center;gap:6px;min-width:0}
#stage #sfStageSheetSelect{max-width:min(55vw,400px);min-width:90px;height:32px;font-size:12px}
#stage #sfStageSheetSource{color:#76e8d7;font-size:12px}
#stage #sfStageSheetStatus{font-size:11px;opacity:.8}
#stage #sfStageSheetFrame{width:100%;flex:1 1 auto;min-height:360px;border:0;background:#fff}
#stage #sfStageSheetToggle.active,#stage #sfStageSheetToggle[aria-pressed=true]{
 border-color:#4ce2c4;background:#145d58;color:white
}

@media(min-width:1400px){
 /* No clipping of Export/More dropdowns when all toolbar controls already fit. */
 #songArea .sfSongHeaderZones{overflow:visible!important}
}

/* v0.3.49.61 unified section editing and chord / rhythm ergonomics */
.sfFormQuickWorkspace{padding:10px 8px;border:1px solid #36566a;border-radius:8px;margin:5px 0 8px;min-width:0;overflow:hidden;background:#102335}
.sfFormQuickToolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:7px;padding-bottom:9px}
.sfFormQuickToolbar>strong{font-size:13px;flex:0 0 auto;align-self:center}
.sfFormQuickToolbar>.hint{flex:1 1 180px;align-self:center}
.sfFormQuickField{display:flex;flex-direction:column;gap:3px;font-size:11px;font-weight:600;min-width:0!important}
.sfFormQuickField input{width:65px!important;box-sizing:border-box;padding:7px!important;min-width:0!important}
.sfFormQuickField select{width:132px!important;max-width:132px!important;box-sizing:border-box;padding:7px!important}
.sfFormQuickScroll{max-width:100%;width:100%;min-width:0;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;border:1px solid #355367;border-radius:7px}
.sfFormQuickTimeline{display:block;position:relative;min-width:0}
.sfFormQuickRuler{display:flex;height:27px;background:#1d3546}
.sfFormQuickBar{flex:0 0 65px!important;min-width:65px!important;height:27px!important;padding:4px!important;border:0!important;border-right:1px solid #557184!important;border-radius:0!important;text-align:left;font-size:10px}
.sfFormQuickBar.selected{background:#23636b!important;outline:2px solid #62ead4;outline-offset:-2px}
.sfFormQuickBand{height:64px;background:repeating-linear-gradient(to right,transparent 0px,transparent 63px,#39596e 64px,#39596e 65px),#11283a;position:relative}
.sfFormQuickBlock{position:absolute;top:8px;height:48px;padding:9px 18px 8px 9px;box-sizing:border-box;border:1px solid var(--part-color,#3b6c7b);border-radius:7px;background:color-mix(in srgb,var(--part-color,#3b6c7b) 80%,#101e2c);color:#fff;font-size:12px;font-weight:700;cursor:grab;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;user-select:none}
.sfFormQuickBlock.selected{outline:2px solid #ffe092;outline-offset:2px}
.sfFormQuickBlock.resizing{outline:2px dashed #ffe092}
.sfFormQuickResize{position:absolute;right:0;top:0;bottom:0;width:17px;display:flex;align-items:center;justify-content:center;background:#ffffff29;cursor:ew-resize;touch-action:none}
.sfFormQuickTarget{position:absolute;top:0;bottom:0;width:65px;box-sizing:border-box;border:2px solid #68f4d0;background:#4ff1d42d;pointer-events:none;z-index:2}
.sfFormQuickTarget[hidden]{display:none!important}
.sfFormAdvancedDetails{border:1px solid #35526a;border-radius:8px;padding:5px 7px;min-width:0}
.sfFormAdvancedDetails>summary{padding:8px 10px;cursor:pointer;font-weight:600}
.sfFormAdvancedDetails:not([open]) .sfTimelineAdvanced{display:none!important}
#songArea .sfChordInspector{display:flex!important;flex-wrap:wrap!important;align-items:flex-end!important;width:100%!important;box-sizing:border-box!important;overflow:visible!important}
#songArea .sfChordInspector .sfChordField{display:flex!important;flex-direction:column!important;flex:0 0 78px!important;min-width:0!important;max-width:92px!important}
#songArea .sfChordInspector .sfChordField:first-of-type{flex:1 1 170px!important;max-width:none!important}
#songArea .sfChordInspector input{width:100%!important;max-width:100%!important;min-width:0!important}
#songArea .sfChordInspector button{flex:0 0 auto!important;align-self:flex-end}
#songArea .sfChordCustomForm{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#songArea .sfChordCustomForm input{width:min(270px,60vw)!important;max-width:100%;min-width:110px}
#songArea .sfRhythmLoopMark{position:absolute;left:4px;bottom:0;font-size:9px;line-height:1;opacity:.85;pointer-events:none;background:#102b38a8}
#songArea .sfCanonicalGridScroll{width:100%;max-width:100%;overflow-x:auto!important;overflow-y:hidden!important}
#songArea .sfCanonicalTimeline{max-width:none}
#songArea .sfPatternClipEditor{overflow:visible;max-width:100%;min-width:0}
#songArea .sfRhythmNoteGrid{width:100%;max-width:100%;overflow-x:auto!important}
#songArea .sfRhythmTopActions{max-width:100%;flex-wrap:wrap}

/* v0.3.49.61: panel visibility is a workspace preference across every Song View mode */
#songArea .sfEditorPanelToggles{order:0;display:flex;flex:0 0 auto;align-items:center;gap:4px}
#songArea .sfEditorPanelToggle{font-size:11px!important;white-space:nowrap;min-height:32px;padding:5px 8px!important;border-color:#3f6771;color:#afe9e2}
#songArea .sfEditorPanelToggle[aria-pressed=true]{background:#19645f;border-color:#4bdeca;color:#fff}
#songArea .sfSongWorkspace{min-width:0}
@media(min-width:691px){
 body.sfLeftCollapsed:not(.sfSongEditorActive):has(#songArea:not(.hide)) main{grid-template-columns:minmax(0,1fr)!important}
 body.sfLeftCollapsed:not(.sfSongEditorActive):has(#songArea:not(.hide)) main>aside:first-child{display:none!important}
 body.sfRightCollapsed #songArea .sfSongMetaSide{display:none!important}
 body.sfRightCollapsed #songArea .sfSongWorkspace{grid-template-columns:minmax(0,1fr)!important}
 body.sfRightCollapsed #songArea .sfSongBody{grid-column:1!important}
}
@media(min-width:981px){
 #songArea .sfSongHeaderZones>.sfEditorPanelToggles{order:0!important}
}
@media(max-width:980px){
 #songArea .sfEditorPanelToggles{flex:0 0 auto}
}
#sfMusicSheetEditor{display:block!important;min-width:0;width:100%;max-width:100%;box-sizing:border-box}
#sfMusicSheetEditor[hidden]{display:none!important}
#sfMusicSheetEditor .sfScoreReadingToolbar{
 display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 6px;
 background:#142c3a;border:1px solid #355669;border-radius:6px;padding:7px
}
#sfMusicSheetEditor .sfScoreReadingToolbar select{min-width:min(280px,100%);max-width:min(85vw,600px);flex:1 1 220px}
#sfMusicSheetEditor .sfSheetReadingFrame{
 display:block;box-sizing:border-box;width:100%;height:calc(100dvh - 220px);
 min-height:480px;max-height:1050px;border:1px solid #3d5b6f;border-radius:6px;background:white
}
#sfMusicSheetEditor .sfSheetReadingFrame[hidden]{display:none!important}
#sfPropertySheetManager{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%}
#sfPropertySheetManager .sfSheetForm{display:grid;grid-template-columns:minmax(100px,1fr) minmax(150px,2fr) auto;gap:6px;min-width:0}
#sfPropertySheetManager .sfSheetRow{border:1px solid #39556b;border-radius:8px;padding:9px;display:grid;gap:6px}
#sfPropertySheetManager .sfSheetRow .actions{display:flex;flex-wrap:wrap;gap:5px}
#sfPropertySheetManager .sfSheetUploads{margin:0}
.sfDrumAuditionRow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:5px 6px;background:#163345;border:1px solid #34576b;border-radius:6px}
.sfDrumAuditionRow button{background:#176a64;color:white;border-color:#49bdaa}
@media(max-width:690px){
 #sfMusicSheetEditor .sfSheetReadingFrame{height:calc(100dvh - 165px);min-height:350px}
 #sfPropertySheetManager .sfSheetForm{grid-template-columns:minmax(0,1fr)}
}

/* StageFlow v0.3.49.65 — Expert recovery vault and visible chord/rhythm tools */
body:not([data-interface-mode="expert"]) #sfTrashOpen{display:none!important}
.sfTrashDialog{width:min(960px,96vw);max-height:90dvh;overflow-y:auto}
.sfTrashDialog .subhead{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sfTrashSettings{display:flex;align-items:end;gap:8px;flex-wrap:wrap;background:#132b3b;border:1px solid #38556a;border-radius:8px;padding:10px;margin:10px 0}
.sfTrashSettings label{display:flex;flex-direction:column;gap:5px;font-size:12px;min-width:100px}
.sfTrashSettings input{width:90px;box-sizing:border-box;min-height:34px}
.sfTrashEntries{display:flex;flex-direction:column;gap:6px;max-height:44dvh;overflow-y:auto;overscroll-behavior:contain;margin:8px 0}
.sfTrashEntry{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:9px 10px;background:#182b3b;border:1px solid #36556a;border-radius:8px}
.sfTrashEntry strong{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
.sfTrashEntry small{flex:1 1 190px;color:#abc1d0;font-size:11px}
.sfTrashEntry .actions{display:flex;gap:5px;flex-wrap:wrap}
.sfTrashEntry button{min-height:31px;font-size:12px;padding:5px 9px}
.sfCloudHistory{margin-top:12px;border:1px solid #35556a;border-radius:8px;padding:10px}
.sfCloudHistory>summary{font-weight:700;cursor:pointer}
#songArea .sfChordInspector{
 position:sticky;top:0;z-index:12;box-sizing:border-box;
 display:flex!important;align-items:flex-end!important;flex-wrap:wrap!important;
 gap:5px!important;min-height:51px;max-width:100%;padding:6px 7px!important;
 background:#152d3c!important;border:1px solid #36596c!important;
}
#songArea .sfChordInspector .sfChordField{
 flex:0 1 70px!important;max-width:80px!important;
 font-size:11px!important;white-space:nowrap;
}
#songArea .sfChordInspector .sfChordField:first-of-type{flex:1 1 120px!important;max-width:250px!important}
#songArea .sfChordInspector input{min-height:32px!important;height:32px!important;padding:5px 6px!important}
#songArea .sfChordInspector button{min-height:32px!important;height:32px!important;padding:5px 8px!important;font-size:11px!important}
#songArea .sfPatternClipEditor{max-width:100%!important;box-sizing:border-box;overflow:hidden!important}
#songArea .sfPatternClipEditor .sfRhythmNoteGrid{max-width:100%!important;overflow-x:auto!important}
@media(max-width:690px){.sfTrashSettings label{flex:1 1 115px}.sfTrashEntry .actions{width:100%}}

/* v0.3.49.67: contain song editing surfaces inside the available viewport.
   Internal timelines scroll; their wide contents never widen the page. */
#songArea, #sfUnifiedEditorHost, #sfCanonicalGrid, #sfFormWorkspace, .sfSongWorkbenchPanel {min-width:0;max-width:100%}
#songArea .sfCanonicalGridScroll {display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto!important;overscroll-behavior-x:contain}
#songArea .sfCanonicalTimeline {max-width:none}
#songArea .sfGridZoomControl {display:inline-flex;align-items:center;gap:5px;font-size:11px}
#songArea .sfGridZoomControl input {width:110px;max-width:22vw;accent-color:#5adfc8}
#songArea .sfRhythmPatternBars {min-width:0;overflow:hidden;align-self:stretch;align-items:stretch}
#songArea .sfRhythmPatternBars .sfRhythmClipMini {width:100%;height:100%;padding:2px 1px}
.sfFormWorkspaceDialog, .sfFormWorkspaceMain, .sfFormQuickScroll, .sfArrangeGrid {min-width:0;max-width:100%}
.sfArrangeGrid {overflow-x:auto;overscroll-behavior-x:contain}
.sfArrangeGridHeader,.sfArrangeBar {box-sizing:border-box}

/* v0.3.49.68: PDF scores are real scrolling StageFlow pages, not native browser toolbars. */
#stage .stageReading:has(#sfStageScoreCanvas .sfStageScorePages){display:block;overflow-y:auto!important;padding:0!important}
#stage #sfStageSheets:has(.sfStageScorePages){display:block;height:auto;min-height:100%;overflow:visible;flex:0 0 auto}
#stage #sfStageSheetFrame[hidden]{display:none!important}
#stage #sfStageScoreCanvas{width:100%;max-width:100%;min-width:0}
#stage #sfStageScoreCanvas:empty{display:none}
#stage .sfStageScorePages{display:grid;gap:14px;width:min(100%,1500px);max-width:100%;margin:0 auto;padding:12px 10px 48px;box-sizing:border-box;background:#252525}
#stage .sfStageScorePage{display:flex;align-items:flex-start;justify-content:center;width:100%;max-width:100%;overflow:hidden;background:#fff;color:#1c2933;box-shadow:0 1px 9px #0008}
#stage .sfStageScorePage canvas{max-width:100%;height:auto}
#stage #sfStageSheetSave{font-size:11px;min-height:31px;padding:5px 10px;background:#164b48;color:#d6fff6}
#stage #sfStageSheetSave[hidden]{display:none!important}
#stage #sfStageSheets .sfStageSheetToolbar{position:sticky;top:0;z-index:4}

/* StageFlow v0.3.49.70: vertical song form is the principal editing surface. */
.sfFormPrimaryMatrix{width:100%;min-width:0;overflow:auto;max-height:min(58dvh,750px);border:1px solid #395669;border-radius:8px;background:#102131}
.sfFormPrimaryMatrix #sfTimelineGrid{min-width:0;width:100%;max-width:none;overflow:visible}
.sfFormQuickWorkspace{margin:0 0 6px;padding:6px 8px}
.sfFormQuickToolbar{align-items:center;padding:2px 0;gap:5px}
.sfFormQuickToolbar>.hint{flex:0 1 140px;font-size:10px}
.sfFormQuickToolbar .sfFormQuickField{font-size:10px;gap:1px}
.sfFormQuickToolbar .sfFormQuickField input[type="text"]{width:160px!important}
.sfFormQuickToolbar button{min-height:30px;padding:5px 7px;font-size:11px}
.sfFormHorizontalOption{margin-top:4px;font-size:11px}
.sfFormHorizontalOption>summary{cursor:pointer;color:#9dc8d5}
.sfFormAdvancedDetails{margin-top:8px}
.sfFormPrimaryMatrix .sfArrangeGridHeader{position:sticky;top:0;z-index:8}
.sfFormPrimaryMatrix .sfArrangeBar{min-height:34px}
#stage .sfStageArrangement{max-width:100%;margin:12px 0 20px;background:#132535;border:1px solid #315366;border-radius:8px;overflow:hidden;font-size:13px}
#stage .sfStageArrangementHead{padding:8px 12px;color:#8be6d5;font-size:13px;font-weight:700}
#stage .sfStageArrangementMatrix{max-height:60dvh;overflow:auto;scrollbar-width:thin}
#stage .sfStageArrangementRow{display:grid;align-items:stretch;min-width:max-content;min-height:33px;border-top:1px solid #345069}
#stage .sfStageArrangementRow>span:first-child{padding:7px 8px;background:#223b50;color:#a5c7d9;font-weight:700}
#stage .sfStageArrangementHeader{position:sticky;top:0;z-index:1;background:#213c50}
#stage .sfStageArrangementHeader strong{padding:7px;border-right:1px solid #3b5665;font-size:11px}
#stage .sfStageArrangementCell{min-width:115px;padding:3px 4px;border-right:1px solid #2e475a}
#stage .sfStageArrangementClip{display:block;padding:4px 6px;border:1px solid #4d7087;border-radius:5px;background:#29445c;color:#edf7ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#stage #sfStageMetro[aria-pressed=true]{color:#112e29;background:#55ebc6;border-color:#55ebc6}
#stage #sfStageMetro{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px;padding:6px 9px}
@media(min-width:1450px){
 #stage .stageHead{gap:7px;padding:5px 9px}
 #stage .stageHead #stageTitle{flex:0 1 310px;max-width:310px;min-width:120px}
 #stage .stageHead #stageForm:not([hidden]){display:flex;flex:1 1 380px;max-width:min(46vw,760px);min-width:150px;max-height:44px;height:auto;min-height:0;padding:0 4px;border:0;background:transparent;align-items:center;overflow:hidden}
 #stage .stageHead #stageForm .songFormHead{display:none!important}
 #stage .stageHead #stageForm #stageFormBlocks{display:flex!important;flex:1;gap:3px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;white-space:nowrap;max-height:43px;scrollbar-width:thin;align-items:center}
 #stage .stageHead #stageForm .songFormBlock{flex:0 0 auto;min-width:63px;max-width:155px;max-height:35px;min-height:30px;padding:4px 8px;font-size:11px}
 #stage .stageHead #stageForm .songFormBlock small{display:none}
 #stage .stageHead>.row{flex:0 0 auto}
}
@media(max-width:1449px){
 #stage #stageForm{width:100%;max-width:100%}
 #stage #sfStageMetro{font-size:10px;padding:6px}
}

#stage .sfStageRhythmMini{display:grid;grid-template-rows:repeat(6,5px);gap:2px;margin:3px 1px 0}
#stage .sfStageRhythmVoice{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}
#stage .sfStageRhythmVoice i{display:block;background:#415e70;border-radius:2px}
#stage .sfStageRhythmVoice i.hit{background:#55dfbc}
#stage .sfStageArrangementCell:has(.sfStageRhythmMini){background:#1c3447}

/* Canonical matrix owns its own header. Suppress the old hard-coded pseudo header. */
.sfFormPrimaryMatrix .sfTimelineGrid:before{display:none!important;content:none!important}
.sfFormPrimaryMatrix .sfTimelineGrid{max-height:none;overflow:visible;border:0;border-radius:0}
.sfFormPrimaryMatrix{scrollbar-width:thin;overscroll-behavior:contain}
#stage .sfStageArrangement{white-space:normal;line-height:1.25}
#stage .sfStageArrangementRow{width:max-content;min-width:100%;box-sizing:border-box}

/* Unified native score reading in song editor: fixed viewport, internal scrolling. */
#sfMusicSheetEditor .sfSongScoreCanvas{display:block;width:100%;max-width:100%;max-height:min(78dvh,950px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;border:1px solid #365267;border-radius:7px;background:#282b30}
#sfMusicSheetEditor .sfSongScoreCanvas:empty{display:none}
#sfMusicSheetEditor .sfStageScorePages{display:grid;gap:12px;padding:10px;max-width:100%;width:100%;box-sizing:border-box}
#sfMusicSheetEditor .sfStageScorePage{display:block;background:white;box-shadow:0 2px 8px #0008;max-width:100%;overflow:hidden}
#sfMusicSheetEditor .sfStageScorePage canvas{display:block;width:100%;height:auto}

/* v0.3.49.74 - genuine rotated form timeline: a SINGLE pointer-driven block per section.
   Part tracks are visual-only; only form blocks and time/key state columns are interactive. */
.sfFormAdvancedDetails[hidden]{display:none!important}
.sfFormQuickWorkspace .sfFormReadOnlyHint{font-size:11px;color:#95b8c8;margin:4px 2px 2px}
.sfVFormTools{display:flex;align-items:end;flex-wrap:wrap;gap:7px}
.sfVFormTools .sfFormQuickField input[type=text]{width:150px!important}
.sfVFormTools .sfFormQuickField input[type=checkbox]{height:20px;width:20px!important}
.sfVFormTools .sfFormQuickField{flex:0 0 auto}
.sfVFormRoot{width:100%;max-width:100%;max-height:min(72dvh,840px);overflow:auto;position:relative;min-width:0;isolation:isolate;background:#102332;border:1px solid #355b70;border-radius:8px;overscroll-behavior:contain;scrollbar-width:thin}
.sfVFormHeader,.sfVFormRow{display:grid;align-items:stretch;min-width:100%;box-sizing:border-box;column-gap:3px;padding:0 4px}
.sfVFormHeader{height:36px;position:sticky;top:0;z-index:12;background:#254458;color:#e5f9ff;border-bottom:1px solid #59788c;width:max-content}
.sfVFormHeader strong{font-size:11px;white-space:nowrap;align-content:center;padding:0 4px}
.sfVFormBody{position:relative;width:100%;min-width:690px}
.sfVFormRow{height:38px;min-height:38px;max-height:38px;border-bottom:1px solid #29475b}
.sfVFormBarNo{align-self:center;min-width:0;width:100%;height:29px;border-radius:4px;padding:0;background:#29435b;border:0;color:#d8ecff;font-size:11px;font-weight:800}
.sfVFormBlank{cursor:crosshair;min-width:0;background:#183246}
.sfVFormRow.dropTarget .sfVFormBlank{background:#3f8d89;outline:2px solid #6dffda;outline-offset:-2px}
.sfVFormReadOnly{display:flex;min-width:0;align-items:center;padding:2px 3px;pointer-events:none;border:1px solid #365368;border-radius:3px;background:#142b3c;overflow:hidden}
.sfVFormPart{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;width:100%;padding:4px 5px;color:#deedf8;background:#32495d;border-radius:3px}
.sfVFormState{border:0;background:transparent;color:#aec9db;padding:3px;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.sfVFormState:hover,.sfVFormState.changed{background:#27536b;color:#e8fff9}
.sfVFormState.sfVFormStateDifferent{background:rgba(69,133,154,.15);color:#dfedf7}
.sfVFormState.sfVFormStateDifferent.sfVFormState-key{background:rgba(127,111,168,.19)}
.sfVFormState.sfVFormStateDifferent.sfVFormState-tempo{background:rgba(129,150,75,.18)}
.sfVFormState.sfVFormStateDifferent.sfVFormState-meter{background:rgba(67,139,173,.18)}
.sfVFormState.changed{box-shadow:inset 2px 0 0 rgba(128,213,205,.76);font-weight:650}
.sfVFormState.sfVFormStateDifferent.changed{box-shadow:inset 2px 0 0 rgba(128,213,205,.85)}
.sfVFormState:focus-visible{outline:2px solid #80d5cd;outline-offset:-2px}
.sfVFormBlock{position:absolute;z-index:4;left:calc(42px + 7px);width:calc((100% - 42px - 167px - 7px) * 0.16);min-width:120px;max-width:190px;padding:7px 20px 6px 8px;background:var(--sf-section-color,#335a6d);border:1px solid #89aaba;border-radius:6px;color:white;font-size:11px;font-weight:700;cursor:grab;touch-action:none;user-select:none;white-space:normal;overflow:hidden;box-shadow:0 2px 5px #0005}
.sfVFormBlock.selected{outline:2px solid #79f0dd;outline-offset:-1px;z-index:6}
.sfVFormBlock.dragging{opacity:.82;box-shadow:0 0 15px #53f6d988;cursor:grabbing;z-index:11}
/* Form editing controls: the body moves, top/bottom resize, gear opens properties.
   Do not use a dots-button in the middle: it looks like a drag handle. */
.sfVFormBlock .sfVFormMore{position:absolute;top:13px;right:3px;z-index:5;width:24px;height:24px;min-width:24px;min-height:24px;margin:0;padding:0;border:1px solid #b0c4cd66;border-radius:6px;background:#19384ba8;color:#f4ffff;display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1;cursor:pointer}
.sfVFormBlock .sfVFormMore:hover{background:#31586c}
.sfVFormResize{position:absolute;bottom:0;left:0;right:0;height:17px;background:#b0ebdb44;border-top:2px solid #b0f9e6a0;display:flex;justify-content:center;align-items:center;cursor:ns-resize;font-size:13px;line-height:1;touch-action:none;z-index:6;user-select:none}
.sfVFormResize:hover,.sfVFormResize:active{background:#9df6da88;border-top-color:#ddfff6}
/* Leading-edge form section trim: separate from the draggable body and
   trailing-edge grip. Works with both pointer and touch input. */
.sfVFormResizeTop{
 position:absolute;top:0;left:0;right:0;height:12px;
 display:flex;align-items:flex-start;justify-content:center;
 font-size:9px;line-height:9px;color:#e8fffb;
 cursor:ns-resize;touch-action:none;z-index:6;user-select:none;
 background:linear-gradient(to bottom,#bff9ee66,transparent);
 border-top:2px solid #d6f9f5af;border-radius:5px 5px 0 0;
}
.sfVFormResizeTop:hover,.sfVFormResizeTop:active{
 background:#bff9ee66;border-top-color:#bfffee;
}
.sfVFormResizeTop:focus-visible{outline:2px solid #bfffee;outline-offset:-2px}

@media(max-width:900px){.sfVFormRoot{max-height:60dvh}.sfVFormBody{width:max-content;min-width:100%}.sfVFormBlock{min-width:125px}}

/* The form editor must not offer write controls for unrelated musical tracks. */
#sfFormWorkspaceDialog .sfFormWorkspaceAssign{display:none!important}
#sfFormWorkspaceDialog .sfFormPrimaryMatrix .sfVFormReadOnly button{pointer-events:none!important}
.sfVFormHeader{width:100%;min-width:690px}
.sfVFormRow{width:100%}
.sfVFormRoot .sfVFormBlock{padding-bottom:17px}
.sfVFormRoot .sfVFormResize{border-radius:0 0 5px 5px}

/* StageFlow 0.3.49.77: compact per-reference actions; no stacks of oversized buttons. */
#sfPropertySheetManager .sfSheetRow{padding:7px 8px!important;gap:4px!important}
#sfPropertySheetManager .sfSheetRow>strong{font-size:12px;line-height:1.3;font-weight:650}
#sfPropertySheetManager .sfSheetRow .actions{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
#sfPropertySheetManager .sfSheetRow .actions>button,
#sfPropertySheetManager .sfScoreRowMore button,
#sfPropertySheetManager .sfScoreRowMore>summary{
 font-size:11px!important;line-height:1.2!important;font-weight:500!important;
 min-height:27px!important;height:auto!important;padding:5px 8px!important;
 margin:0!important;border-radius:6px!important;width:auto!important;
 min-width:0!important;white-space:nowrap
}
#sfPropertySheetManager .sfScorePrimaryOption{display:inline-flex;align-items:center;gap:3px;font-size:10px;white-space:nowrap;margin-right:3px}
#sfPropertySheetManager .sfScorePrimaryOption input{width:13px;height:13px;margin:0;accent-color:#44d9c4}
#sfPropertySheetManager .sfScoreRowMore{position:relative;display:inline-block}
#sfPropertySheetManager .sfScoreRowMore>summary{list-style:none;cursor:pointer;border:1px solid #456078;background:#27394e;display:flex;align-items:center}
#sfPropertySheetManager .sfScoreRowMore>summary::-webkit-details-marker{display:none}
#sfPropertySheetManager .sfScoreRowMore[open]{flex-basis:100%}
#sfPropertySheetManager .sfScoreRowMore[open]>summary{width:max-content}
#sfPropertySheetManager .sfScoreRowMore[open]>button{margin:4px 4px 0 0!important}
#sfPropertySheetManager .sfSheetRow .hint{font-size:10px}
#sfPropertySheetManager .sfSheetRow .actions>button:disabled{opacity:.6}
#propLinks .sfReferenceRole{min-width:108px;width:130px;max-width:100%;font-size:11px;padding:4px 5px}
#propLinks .propLink button{min-width:0!important;padding:4px 7px!important;font-size:11px!important}
#propLinks .propLink{gap:4px!important}
@media(max-width:690px){
 #sfPropertySheetManager .sfSheetRow .actions{gap:3px}
 #sfPropertySheetManager .sfSheetRow .actions>button{font-size:10px!important;padding:4px 6px!important}
 #propLinks .sfReferenceRole{width:100%}
}

/* v0.3.49.78: explicit, accessible end of song and room to scroll to it. */
.sfVFormRoot{height:min(70dvh,820px)!important;max-height:none!important;overflow-y:scroll!important;overflow-x:auto!important;scrollbar-gutter:stable;scrollbar-width:auto}
.sfVFormRoot::-webkit-scrollbar{width:12px;height:10px}
.sfVFormRoot::-webkit-scrollbar-thumb{background:#527b90;border-radius:8px;border:2px solid #102332}
.sfVFormRoot::-webkit-scrollbar-track{background:#162f40}
.sfVFormEnd{height:50px;min-height:50px;display:flex;align-items:center;justify-content:center;position:relative;background:#173b42;border-top:2px solid #43d6c1;color:#9be9d9;font-size:12px;font-weight:750;letter-spacing:.05em}
.sfFormTimelineFooter{padding:7px 8px;color:#a4d5ce;font-size:11px;text-align:right}
.sfVFormTools .sfFormQuickField input[type=color]{width:39px!important;height:30px!important;padding:1px!important;cursor:pointer}
.sfVFormTools .sfFormQuickField input[type=number]{max-width:74px}
.sfVFormTools button{font-size:11px!important}
@media(max-width:700px){.sfVFormRoot{height:min(60dvh,650px)!important}}

/* v0.3.49.79 – compact linked-score controls (25% smaller than prior cards). */
#sfPropertySheetManager .sfSheetRow .actions>button,
#sfPropertySheetManager .sfScoreRowMore>summary,
#sfPropertySheetManager .sfScoreRowMore button,
#sfMusicSheetEditor .sfScoreReadingToolbar>button{
 font-size:10px!important;min-height:22px!important;
 padding:3px 6px!important;line-height:1.15!important;
 border-radius:4px!important;max-width:100%;box-sizing:border-box
}
#sfPropertySheetManager .sfSheetRow{padding:5px 7px!important;gap:3px!important}
#sfPropertySheetManager .sfSheetRow .actions{gap:3px!important}
#sfPropertySheetManager .sfSheetRow .actions>button{flex:0 0 auto!important}
#sfMusicSheetEditor .sfScoreReadingToolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
#sfMusicSheetEditor .sfScoreReadingToolbar>select{flex:1 1 180px;min-width:120px}
#sfMusicSheetEditor .sfScoreReadingToolbar>button[hidden]{display:none!important}
#sfMusicSheetEditor .sfScoreReadingToolbar>button{flex:0 0 auto}
#sfMidiLayer{min-width:0;max-width:100%;padding:10px;box-sizing:border-box}
#sfMidiLayer[hidden]{display:none!important}
#sfMidiLayer .sfMidiHeader{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
#sfMidiLayer .sfMidiHeader small{color:#9ebcc6}
#sfMidiLayer input[type=file]{max-width:100%;font-size:12px}
#sfMidiLayer .sfMidiSources{display:grid;gap:4px;margin:9px 0}
#sfMidiLayer .sfMidiSource{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px;border:1px solid #39566c;border-radius:5px;font-size:12px}
#sfMidiLayer .sfMidiSource span{overflow-wrap:anywhere;min-width:0}
#sfMidiLayer button{font-size:11px;min-height:27px;padding:4px 8px;white-space:nowrap}
#sfMidiLayer .sfMidiControls{display:flex;gap:5px;flex-wrap:wrap;align-items:end;margin-top:10px}
#sfMidiLayer .sfMidiControls>select{min-width:140px;max-width:100%;flex:1 1 230px}
#sfMidiLayer .sfMidiControls label{font-size:10px;display:flex;align-items:center;gap:4px}
#sfMidiLayer .sfMidiControls input[type=number]{width:65px;min-width:0}
#sfMidiLayer .sfMidiStatus{padding:6px;color:#a1cfe4;font-size:12px}
@media(max-width:650px){#sfMidiLayer .sfMidiControls>select{width:100%;flex-basis:100%}}

#sfMidiLayer .sfMidiClips{display:grid;gap:4px;margin-top:9px}
#sfMidiLayer .sfMidiClip{display:flex;align-items:center;gap:5px;border:1px solid #36556d;border-radius:5px;padding:4px 6px}
#sfMidiLayer .sfMidiClip>span{min-width:0;flex:1;overflow-wrap:anywhere;font-size:11px}
#sfMidiLayer .sfMidiClip button{flex:0 0 auto}

/* v0.3.49.82: legacy Android and 320px-class first-run recovery.
   No modern :has(), dvh, color-mix or container queries required for primary actions. */
.sfCompactStart{display:none;min-width:0;margin:6px;padding:10px;border:1px solid #3b7d85;border-radius:9px;background:#132737;color:#e8f6fc}
.sfCompactStart[hidden]{display:none!important}
.sfCompactStart strong{font-size:14px;color:#7af3df}
.sfCompactStart p{font-size:12px;line-height:1.35;margin:4px 0 9px}
.sfCompactStartActions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sfCompactStartActions button{min-width:0;white-space:normal;min-height:36px;font-size:12px;line-height:1.2;padding:7px 5px}
.sfCompactStart small{display:block;min-height:0;font-size:11px;color:#b8d7e5;margin-top:4px}
.sfCompactStart small:empty{display:none}
@media(max-width:690px){
 body:not(.stageActive) main{display:flex;flex-direction:column;min-width:0;overflow-x:hidden}
 body:not(.stageActive) .sfCompactStart:not([hidden]){display:block;flex:0 0 auto;order:0}
 body:not(.stageActive) main>aside{order:1;min-width:0}
 body:not(.stageActive) main>.editor{order:2;min-width:0}
 body[data-interface-mode="simple"]:not(.sfHasSongs) #welcome{display:block!important}
 body[data-interface-mode="simple"]:not(.sfHasSongs) .editor{display:block!important}
 body[data-interface-mode="simple"]:not(.sfHasSongs) .sfWelcomeHome{display:block!important}
 body:not(.stageActive) .sfWelcomeHome{max-width:100%;overflow-wrap:anywhere}
 body:not(.stageActive) .sfWelcomeHero{max-width:100%;min-width:0}
 body:not(.stageActive) .sfWelcomeActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body:not(.stageActive) .sfWelcomeActions button{min-width:0;font-size:11px;min-height:34px;padding:5px 7px;white-space:normal}
 body:not(.stageActive) aside>#items{max-height:40vh;max-height:40dvh}
}
@media(max-width:380px){
 body:not(.stageActive) .sfHeader{display:flex;flex-direction:column;gap:5px;align-items:stretch;padding:6px 8px!important;min-width:0}
 body:not(.stageActive) .sfHeader .sfIdentity{width:100%;min-width:0;justify-content:flex-start;gap:7px}
 body:not(.stageActive) .sfHeader .sfHub{display:none}
 body:not(.stageActive) .sfHeader .sfSeparator{display:none}
 body:not(.stageActive) .sfHeader .brand h1{font-size:18px}
 body:not(.stageActive) .sfHeader .brand small{font-size:9px}
 body:not(.stageActive) .sfHeader>.row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0;width:100%}
 body:not(.stageActive) .sfHeader>.row>*{min-width:0;max-width:100%;width:auto;box-sizing:border-box}
 body:not(.stageActive) .sfHeader>.row #importBtn{grid-column:span 2;font-size:11px}
 body:not(.stageActive) .sfHeader>.row #stageflowFaq{grid-column:span 2;font-size:10px}
 body:not(.stageActive) .sfHeader>.row .sfHeaderMode{grid-column:span 2}
 body:not(.stageActive) .sfHeader .sfModePicker{width:100%}
 body:not(.stageActive) .sfHeader .sfModePicker select{width:100%;max-width:100%;min-width:0}
 body:not(.stageActive) .sfHeader #sfHeaderTools{font-size:10px;width:100%;min-width:0}
 body:not(.stageActive) .sfHeader button{min-height:30px;padding:5px 4px!important;font-size:10px;white-space:normal;line-height:1.15}
 body:not(.stageActive) .sfHeader .sfHeaderLanguage select{width:100%;max-width:100%}
 body:not(.stageActive) #welcome .sfWelcomeHero{padding:11px;border-radius:8px}
 body:not(.stageActive) .sfWelcomeHero h2{font-size:21px}
 body:not(.stageActive) .sfWelcomeHero p{font-size:12px;line-height:1.4}
 body:not(.stageActive) .sfWelcomeGrid{display:block}
 body:not(.stageActive) .sfWelcomeCard{margin:6px 0}
 body:not(.stageActive) aside{padding:5px 7px}
 body:not(.stageActive) aside>.row{flex-wrap:wrap;gap:3px}
 body:not(.stageActive) aside>.row button{padding:5px 6px!important;font-size:11px}
}

/* StageFlow next: responsive one-line Form inspector and canonical song-level settings. */
.sfFormQuickWorkspace{padding:4px 6px!important;margin-bottom:4px}
.sfFormQuickWorkspace .sfVFormTools{display:grid;grid-template-columns:1fr;gap:3px;min-width:0}
.sfFormQuickWorkspace .sfVFormOneRow{display:flex;align-items:end;gap:5px;flex-wrap:nowrap;min-width:0;overflow-x:auto;padding-bottom:3px}
.sfVFormOneRow>strong{align-self:center;white-space:nowrap;font-size:12px;flex:0 0 auto}
.sfVFormOneRow>.sfFormQuickField{flex:0 0 auto}
.sfVFormOneRow .sfFormQuickField input[type=number]{width:57px!important;max-width:65px}
.sfVFormOneRow .sfFormQuickField input[type=text]{width:135px!important;max-width:150px}
.sfVFormOneRow .sfFormQuickField input[type=color]{width:34px!important;height:25px!important}
.sfVFormOneRow button{min-height:26px!important;padding:4px 7px!important;white-space:nowrap}
.sfVFormOneRow label[hidden],.sfVFormOneRow button[hidden]{display:none!important}
.sfVFormGlobal{width:100%;border-bottom:1px solid #345365;padding-bottom:3px;font-size:11px}
.sfVFormGlobal>summary{font-size:12px;color:#8fe7db;font-weight:750;padding:5px 8px;cursor:pointer;min-height:30px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sfVFormGlobalBody{display:flex;gap:5px;align-items:end;flex-wrap:wrap;padding:4px 6px}
.sfVFormGlobalBody .sfFormQuickField{min-width:0;font-size:10px}
.sfVFormGlobalBody input[type=number]{width:65px;max-width:75px}
.sfVFormGlobalBody button{font-size:11px;padding:5px 7px;min-height:28px}
.sfFormQuickWorkspace .sfFormReadOnlyHint{margin:1px;font-size:10px;color:#81a6b7}
@media(max-width:850px){.sfVFormOneRow{flex-wrap:wrap!important}.sfVFormGlobal>summary{white-space:normal}}
/* MIDI bar-lane editor: tracks, clips, and a compact source shelf. */
#sfMidiLayer .sfMidiWorkspace{min-width:0;border:1px solid #34586b;border-radius:8px;padding:7px;margin:8px 0;background:#122738}
#sfMidiLayer .sfMidiTimelineTitle{font-size:12px;font-weight:700;color:#a5ded7;padding:5px}
#sfMidiLayer .sfMidiTimelineTools{display:flex;justify-content:flex-end;gap:5px}
#sfMidiLayer .sfMidiTimelineViewport{overflow-x:auto;overflow-y:hidden;max-width:100%;border:1px solid #456176;border-radius:6px}
#sfMidiLayer .sfMidiTimelineGrid{min-height:96px;position:relative}
#sfMidiLayer .sfMidiBarHeaders{height:27px;position:relative;background:#223d52}
#sfMidiLayer .sfMidiBarHeader{position:absolute;top:0;bottom:0;box-sizing:border-box;border-right:1px solid #416078;padding:5px;font-size:10px;font-weight:700;color:#b9d9e7}
#sfMidiLayer .sfMidiTrackRow{display:flex;min-height:56px;position:relative}
#sfMidiLayer .sfMidiTrackCaption{position:absolute;top:2px;left:3px;z-index:3;font-size:9px;color:#9cb7c7;pointer-events:none}
#sfMidiLayer .sfMidiTimelineLane{position:relative;height:57px;background:#122a3d}
#sfMidiLayer .sfMidiBarCell{position:absolute;top:0;bottom:0;border-right:1px solid #3c596d}
#sfMidiLayer .sfMidiTimelineClip{position:absolute;top:18px;height:32px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #72c9d0;border-radius:5px;background:#25617a;padding:4px 11px 4px 5px;text-align:left;font-size:10px!important;min-height:27px!important;touch-action:pan-y;cursor:grab}
#sfMidiLayer .sfMidiTimelineClip.selected{outline:2px solid #7df2dc;background:#337b82}
#sfMidiLayer .sfMidiClipGrip{position:absolute;right:0;top:0;height:100%;width:10px;background:#ffffff30;cursor:ew-resize;text-align:center;line-height:28px}
#sfMidiLayer .sfMidiAssetShelf{margin-top:8px;border-top:1px solid #365467;padding-top:6px}
#sfMidiLayer .sfMidiAssetShelf>strong{font-size:11px}
#sfMidiLayer .sfMidiAssets{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
#sfMidiLayer .sfMidiAsset{display:flex;align-items:center;gap:5px;max-width:210px;padding:4px 7px;border-radius:5px;border:1px solid #51718a;background:#243d55;cursor:grab;font-size:10px;overflow-wrap:anywhere}
#sfMidiLayer .sfMidiAsset button{padding:2px 5px;min-height:22px}
#sfMidiLayer .sfMidiClipInspector{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:7px 0;padding:7px;border:1px solid #406d76;border-radius:7px}
#sfMidiLayer .sfMidiClipInspector label{font-size:10px;display:flex;align-items:center;gap:3px}
#sfMidiLayer .sfMidiClipInspector input[type=number]{width:55px;max-width:65px;font-size:11px}
#sfMidiLayer .sfMidiClipInspector select{font-size:11px;padding:3px}
#sfMidiLayer .sfMidiCollections{display:flex;gap:5px;flex-wrap:wrap;align-items:center;border:1px solid #345466;border-radius:7px;padding:7px;margin:7px 0}
#sfMidiLayer .sfMidiCollections>strong{width:100%;font-size:11px;color:#9bdfdb}
#sfMidiLayer .sfMidiCollections>small{width:100%;font-size:10px;color:#9eafc7}
#sfMidiLayer .sfMidiCollections input,#sfMidiLayer .sfMidiCollections select{max-width:170px;min-width:80px;padding:4px;font-size:11px}
#sfMidiLayer .sfMidiCollections button{min-height:26px!important}
@media(max-width:650px){#sfMidiLayer .sfMidiCollections>*{max-width:100%}}
/* Native score markup: relative coordinates remain valid at every viewer zoom. */
.sfSongScoreCanvas .sfStageScorePage{position:relative}
.sfScoreAnnotationLayer{position:absolute;inset:0;z-index:2;pointer-events:none}
.sfScoreAnnotation{position:absolute;z-index:3;box-sizing:border-box;border:2px solid #54e7cc;background:#43c9bb20;pointer-events:none}
.sfScoreAnnotation span{display:inline-block;max-width:100%;padding:2px 4px;background:#082c30bb;color:#e8fffc;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sfScoreSelecting{border-style:dashed!important;background:#30efcf33!important}
.sfSongScoreCanvas.sfScoreMarkMode .sfStageScorePage{cursor:crosshair;touch-action:none}
.sfScoreMarkControls{display:flex;flex-wrap:wrap;gap:4px;align-items:center;width:100%;padding:6px 1px 3px}
.sfScoreMarkControls label{display:flex;gap:4px;align-items:center;font-size:10px}
.sfScoreMarkControls input[type=number]{width:55px;min-width:0;font-size:11px}
.sfScoreMarkControls select{max-width:190px;min-width:80px;font-size:11px}
.sfScoreMarkControls button[aria-pressed=true]{background:#286d69;border-color:#57daca}
.sfScoreMarkControls small{font-size:10px;color:#9aafc2}
.sfScoreMarkStatus{font-size:10px;color:#9bdfce}
.sfScoreRegionList{display:flex;flex-wrap:wrap;gap:4px;width:100%}
.sfScoreRegionItem{display:flex;align-items:center;gap:5px;padding:3px 5px;border:1px solid #3c5a72;border-radius:5px;font-size:10px}
.sfScoreRegionItem button{min-height:20px;padding:1px 5px;font-size:10px}

/* Desktop drum workspace should prioritize grid, not giant full-width commands. */
@media(min-width:900px){
 #songArea .sfPatternClipEditor{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:7px!important}
 #songArea .sfPatternClipEditor>strong{font-size:12px;flex:0 0 auto}
 #songArea .sfPatternClipEditor>label{flex:0 0 auto;font-size:11px}
 #songArea .sfPatternClipEditor>button{flex:0 0 auto!important;width:auto!important;min-height:26px!important;padding:4px 9px!important;font-size:11px!important}
 #songArea .sfPatternClipEditor .sfRhythmNoteGrid{flex:0 0 100%;min-width:0;margin-top:4px;padding:0}
 #songArea .sfRhythmNoteRow{gap:4px}
 #songArea .sfRhythmNoteRow strong{flex-basis:66px;font-size:10px}
 #songArea .sfRhythmStep{height:15px!important;min-width:13px!important}
 #songArea .sfRhythmTopActions{gap:4px}
 #songArea .sfRhythmTopActions button{min-height:25px!important;padding:3px 7px!important;font-size:11px!important}
 #songArea #rehearsalDrums .sfRehearsalInner{padding:4px!important}
 #songArea #rehearsalDrums .sfDrumToolbar{gap:3px}
 #songArea #rehearsalDrums .sfDrumToolbar button{min-height:25px!important;padding:3px 7px!important}
 #songArea #rehearsalDrums .sfDrumRow>button{height:18px!important;min-height:18px!important}
}

/* Shared song-position cursor in the canonical vertical Song Form. */
.sfVFormRow.sfPlayheadRow{background:color-mix(in srgb,#ffba4a 12%,transparent)!important;box-shadow:inset 0 2px 0 #ffba4a}

/* Disconnected cloud state: compact caption and interactive sign-in popover. */
.sfSyncIndicatorWrap #sfSyncLoginCaption{font-size:10px;white-space:nowrap;color:#a9b6c5;margin-left:5px}
.sfSyncIndicatorWrap #sfSyncLoginCaption[hidden]{display:none!important}
#sfSyncIndicatorInfo{pointer-events:auto}
#sfSyncIndicatorInfo .sfSyncLoginAction{display:block;min-height:32px;margin-top:9px;width:100%;padding:6px 10px;background:#0fcada;color:#041c28;border:1px solid #15deea;border-radius:7px;font-weight:700;cursor:pointer}

/* Shared Song Form strip for all bar-based editors. Text editor deliberately omits it. */
.sfSharedFormRibbon{height:25px;position:relative;background:#142e3e;border-bottom:1px solid #4b6c7f;overflow:hidden}
.sfSharedFormPart{position:absolute;top:1px;bottom:1px;box-sizing:border-box;background:color-mix(in srgb,var(--sf-form-color) 52%,#142635);border-top:3px solid var(--sf-form-color);border-left:1px solid #b5d7e155;border-right:1px solid #0c1724;padding:2px 5px;font-size:11px;font-weight:700;color:#e2f4fd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfScoreTimelinePaging{display:flex;align-items:center;gap:5px;padding:4px}
.sfScoreTimelineViewport{max-width:100%;overflow-x:auto;border:1px solid #456176;border-radius:6px}
.sfScoreTimelineGrid{position:relative;min-height:100px}
.sfScoreBarTicks{display:flex;height:29px;align-items:stretch;background:#1c3447}
.sfScoreBarTicks button{box-sizing:border-box;flex:none;border-radius:0;border-right:1px solid #506879;background:transparent;text-align:left;padding:4px 6px;font-size:11px;min-height:26px}
.sfScoreBarTicks button.sfPlayheadBar{color:#ffdb8e;border-left:2px solid #ffbd5c}
.sfScoreClipRail{position:relative;height:56px;background:repeating-linear-gradient(to right,#192d3b 0,#192d3b 67px,#496072 67px,#496072 68px)}
.sfScoreTimelineClip{position:absolute;top:11px;min-height:32px;height:33px;box-sizing:border-box;z-index:2;padding:6px 15px 5px 6px;border:1px solid #65d9d2;border-radius:5px;background:#205a67;color:#e8ffff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:grab;touch-action:pan-y;font-size:11px;user-select:none}
.sfScoreTimelineClip.selected{outline:2px solid #f8ce78;outline-offset:1px;background:#267786}
.sfScoreClipGrip{position:absolute;right:0;top:0;height:100%;width:13px;background:#ffffff36;text-align:center;line-height:28px;cursor:ew-resize;touch-action:none}
.sfScoreClipInspector{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:7px 0}
.sfScoreClipInspector label{display:flex;align-items:center;gap:4px;font-size:11px}
.sfScoreClipInspector input[type=text]{min-width:125px;max-width:220px;padding:5px}
.sfScoreClipInspector input[type=number]{width:66px;padding:4px;font-size:11px}
.sfScoreClipInspector button{min-height:29px}
.sfScoreRegionItem{cursor:pointer}
.sfScoreRegionItem:hover{border-color:#5bbbbb}
.sfMidiTimelineTitle{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.sfMidiTimelineTitle button{padding:3px 9px;min-height:27px}
#sfMidiLayer .sfMidiClipInspector input[type=text]{min-width:110px;max-width:210px;padding:5px}
.sfSongModeSeparator{display:inline-flex;align-items:center;justify-content:center;flex:none;font-size:18px;line-height:25px;color:#50798c;user-select:none;margin:0 2px}
.sfSongModePick.active,.sfSongModePick[data-active-editor=true]{background:#176675!important;border-color:#21e1db!important;color:#efffff!important;box-shadow:inset 0 -3px 0 #19f3dc,0 0 0 1px #15cacb45!important;font-weight:800}

/* Score page-turn cues: lightweight, non-destructive annotations over PDF.js pages. */
.sfScoreTurnPalette{display:inline-flex;align-items:center;padding:6px 10px;border:1px dashed #e1b56c;border-radius:6px;background:#403320;color:#ffde9c;font-size:11px;font-weight:700;cursor:grab;user-select:none;touch-action:manipulation}
.sfScoreTurnMode .sfStageScorePage{cursor:crosshair;touch-action:manipulation}
.sfScoreTurnOverlay{position:absolute;inset:0;z-index:5;pointer-events:none}
.sfScoreTurnPin{position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:flex-start;min-height:25px;padding:3px 8px;transform:translateY(-50%);background:#9a6724cc;color:#fff6db;border:1px dashed #ffe1a1;border-left:5px solid #ffce6b;border-radius:4px;box-sizing:border-box;font-size:11px;font-weight:800;cursor:ns-resize;pointer-events:auto;touch-action:none;text-align:left}
.sfScoreTurnPin:hover,.sfScoreTurnPin:focus-visible{background:#b47d31}
.sfScoreTurnRow{border-color:#9e793d;background:#3b3020}
.sfScoreTurnRow input[type=number]{width:55px;min-width:45px;padding:3px;font-size:11px}

/* v0.3.49.92: editor takes the full workspace. Repertoire opens as a drawer,
   never as a full-width block stacked above the active editor. */
body:not(.stageActive).sfSongEditorActive>main{position:relative;min-width:0}
body:not(.stageActive).sfSongEditorActive>main>aside{display:none!important}
body:not(.stageActive).sfSongEditorActive>main>.editor{grid-column:1/-1;flex:1 1 auto;min-width:0;width:100%;max-width:100%;min-height:0}
body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>aside{
 display:flex!important;position:fixed;z-index:1900;
 top:clamp(52px,8vh,90px);left:8px;bottom:8px;
 width:min(320px,calc(100vw - 16px));min-width:0;max-width:calc(100vw - 16px);
 max-height:none!important;overflow-y:auto;
 background:#101f2d;border:1px solid #52718a;border-radius:10px;
 box-shadow:0 12px 40px #000b;padding:9px;flex-direction:column;
}
body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>aside>#items{flex:1 1 auto;min-height:90px;max-height:none;overflow-y:auto}
@media(max-width:690px){
 body:not(.stageActive).sfSongEditorActive>main>.editor{display:block!important;order:2;flex:1 1 auto;max-height:none;overflow-y:auto}
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>aside{order:3}
}
.sfScoreAnnotation.selected{border:3px solid #ffd27b!important;background:#ffcc5540!important;box-shadow:0 0 0 2px #112d38,0 0 12px #ffbd5577}
.sfScoreRegionItem.selected{border-color:#ffd27b!important;background:#3a392a!important}
.sfScoreRegionItem[draggable=true]{cursor:grab}
.sfScoreTimelineClip.selected{outline:2px solid #ffd27b!important}

/* The sidebar hide state is independent of viewport width and of :has() support.
   The hidden library never reserves a row/column above Song View. */
body:not(.stageActive).sfLeftCollapsed:not(.sfEditorLibraryOpen)>main>aside:first-of-type{display:none!important}
body:not(.stageActive).sfLeftCollapsed:not(.sfSongEditorActive)>main{grid-template-columns:minmax(0,1fr)!important}
body:not(.stageActive).sfLeftCollapsed>main>.editor{min-width:0;width:100%;max-width:100%}
body:not(.stageActive).sfSongEditorActive:not(.sfEditorLibraryOpen)>main>aside:first-of-type{display:none!important}
body:not(.stageActive).sfSongEditorActive>main{grid-template-columns:minmax(0,1fr)!important}

/* v0.3.49.94: score-first workspace — one compact header, mapping on demand.
   Keep zoom on the page wrapper so percentage-based annotations stay aligned. */
#sfMusicSheetEditor .sfScoreReadingToolbar{gap:5px;align-items:center;padding:5px 7px;margin-bottom:4px}
#sfMusicSheetEditor .sfScoreReadingToolbar>select{flex:1 1 210px}
#sfMusicSheetEditor .sfScoreZoomControl{display:inline-flex;gap:5px;align-items:center;white-space:nowrap;font-size:11px}
#sfMusicSheetEditor .sfScoreZoomControl select{width:78px;min-width:70px;padding:5px 6px;min-height:29px;font-size:12px}
#sfMusicSheetEditor .sfScoreMappingToggle{flex:0 0 auto;min-height:29px;padding:5px 10px;font-size:12px;font-weight:700}
#sfMusicSheetEditor .sfScoreMarkControls[hidden],
#sfMusicSheetEditor .sfScoreTimelinePanel[hidden],
#sfMusicSheetEditor .sfScoreRegionList[hidden]{display:none!important}
#sfMusicSheetEditor .sfSongScoreCanvas{overflow-x:auto;max-height:min(87vh,1200px);max-height:min(87dvh,1200px)}
#sfMusicSheetEditor .sfStageScorePages{width:var(--sf-score-zoom,50%);max-width:none!important;min-width:0;margin:0 auto;padding:4px;gap:6px}
#sfMusicSheetEditor .sfStageScorePage{width:100%;max-width:none}
#sfMusicSheetEditor .sfStageScorePage canvas{width:100%!important;height:auto!important}
@media(max-width:690px){
 #sfMusicSheetEditor .sfScoreReadingToolbar{gap:3px;flex-wrap:wrap}
 #sfMusicSheetEditor .sfStageScorePages{margin:0}
}
/* Chrome / Android 8.1 fallback — do not leave the mobile flex layout at 0px.
   The modern dynamic viewport layout remains unchanged when supported. */
@media(max-width:690px){
 body:not(.stageActive){height:100vh;height:100dvh}
 body:not(.stageActive)>main>aside>.libraryTools{max-height:32vh;max-height:32dvh}
 body:not(.stageActive) aside>#items{max-height:40vh;max-height:40dvh}
}
@supports not (height:100dvh){
 @media(max-width:690px){
  body:not(.stageActive){height:auto!important;min-height:100vh!important;overflow-x:hidden!important;overflow-y:auto!important}
  body:not(.stageActive)>main{flex:1 0 auto!important;min-height:1px!important;height:auto!important;overflow:visible!important}
  body:not(.stageActive)>main>aside,
  body:not(.stageActive)>main>.editor{flex:1 0 auto!important;height:auto!important;max-height:none!important;overflow:visible!important}
  body:not(.stageActive)>main>aside>#items{max-height:50vh;overflow-y:auto!important}
 }
}

/* v0.3.49.95 — dock Library back into the editor layout instead of a detached overlay. */
@media(min-width:691px){
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main{
  display:grid!important;grid-template-columns:minmax(235px,290px) minmax(0,1fr)!important;
  align-items:stretch;gap:8px;min-width:0
 }
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>aside{
  display:flex!important;position:relative!important;inset:auto!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;box-shadow:none!important;border-radius:0!important;
  max-height:100%!important;min-height:0!important;overflow-y:auto!important;
  grid-column:1;grid-row:1;z-index:auto!important;order:0
 }
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>.editor{
  display:block!important;grid-column:2!important;grid-row:1;width:100%!important;
  min-width:0!important;max-width:100%!important;order:0
 }
}
@media(max-width:690px){
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>aside{
  position:relative!important;inset:auto!important;
  width:100%!important;max-width:100%!important;min-height:0!important;
  height:auto!important;max-height:min(38vh,320px)!important;
  overflow-y:auto!important;box-shadow:none!important;border-radius:6px!important;order:1
 }
 body:not(.stageActive).sfSongEditorActive.sfEditorLibraryOpen>main>.editor{order:2}
}
/* Score editing: tools and source chips are always one slim row each;
   only advanced settings and the timeline need expansion. */
#sfMusicSheetEditor .sfScoreReadingToolbar{padding:2px 3px!important;margin:0 0 2px!important;gap:4px!important;min-height:28px}
#sfMusicSheetEditor .sfScoreReadingToolbar>select{min-height:27px!important;height:27px!important;padding:3px 7px!important}
#sfMusicSheetEditor .sfScoreReadingToolbar>button{min-height:25px!important;height:25px!important;padding:2px 6px!important}
#sfMusicSheetEditor .sfScoreZoomControl select{min-height:26px!important;height:26px!important;padding:2px 5px!important}
#sfMusicSheetEditor .sfScoreQuickTools{display:flex;align-items:center;gap:3px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;min-height:28px;padding:1px 0}
#sfMusicSheetEditor .sfScoreQuickTools button{flex:none;min-height:26px;height:26px;padding:2px 7px!important;border-radius:5px;font-size:11px}
#sfMusicSheetEditor .sfScoreQuickTools .sfScoreTurnPalette{flex:none;padding:3px 7px;font-size:10px;min-height:25px;border-radius:5px}
#sfMusicSheetEditor .sfScoreQuickTools .sfScoreMappingToggle{margin-left:auto}
#sfMusicSheetEditor .sfScoreCompactControls{min-width:0}
#sfMusicSheetEditor .sfScoreMarkControls{display:flex;align-items:center;gap:4px!important;flex-wrap:nowrap;overflow-x:auto;margin:0!important;padding:2px 0!important;min-height:28px}
#sfMusicSheetEditor .sfScoreMarkControls label{flex:none;gap:3px;font-size:10px}
#sfMusicSheetEditor .sfScoreMarkControls input[type=number]{min-height:24px;height:24px;width:45px;padding:1px 3px;font-size:11px}
#sfMusicSheetEditor .sfScoreMarkControls select{min-height:24px;height:24px;min-width:70px;max-width:160px;padding:2px 4px;font-size:11px}
#sfMusicSheetEditor .sfScoreMarkControls .sfScoreMarkStatus:empty{display:none}
#sfMusicSheetEditor .sfScoreMarkControls small{display:none}
#sfMusicSheetEditor .sfScoreRegionList{display:flex;align-items:center;flex-wrap:nowrap!important;gap:3px!important;overflow-x:auto;overflow-y:hidden;min-height:24px;max-height:28px;padding:1px 0!important;scrollbar-width:thin}
#sfMusicSheetEditor .sfScoreRegionItem{display:inline-flex;flex:none;max-width:230px;height:22px;min-height:22px;padding:0 4px!important;gap:4px;font-size:10px;white-space:nowrap;overflow:hidden}
#sfMusicSheetEditor .sfScoreRegionItem>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#sfMusicSheetEditor .sfScoreRegionItem>button{height:17px!important;min-height:17px!important;width:17px!important;padding:0!important;line-height:14px;font-size:11px}
#sfMusicSheetEditor .sfScoreRegionItem input[type=number]{width:46px;height:19px;padding:1px 2px}
#sfMusicSheetEditor .sfScoreTimelinePanel{margin:2px 0!important;padding:4px!important}
#sfMusicSheetEditor .sfScoreTimelinePanel>strong{font-size:11px}
#sfMusicSheetEditor .sfStageScorePages{gap:3px!important;padding:2px!important}

#sfMusicSheetEditor .sfScoreQuickTools,
#sfMusicSheetEditor .sfScoreCompactControls,
#sfMusicSheetEditor .sfScoreTimelinePanel{
 flex:0 0 100%;width:100%;max-width:100%;box-sizing:border-box;min-width:0
}
#sfMusicSheetEditor .sfScoreReadingToolbar>small.hint{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* PDF annotation toolbar: source clips directly after controls; wrap only as required. */
#sfMusicSheetEditor .sfScoreQuickTools{
 display:flex!important;flex-wrap:wrap!important;align-items:center!important;
 gap:3px!important;overflow:visible!important;height:auto!important;
 min-height:27px!important;padding:1px 0!important
}
#sfMusicSheetEditor .sfScoreQuickTools>.sfScoreRegionList{
 display:contents!important
}
#sfMusicSheetEditor .sfScoreQuickTools>.sfScoreRegionItem{flex:0 0 auto}
#sfMusicSheetEditor .sfScoreQuickTools>.sfScoreMappingToggle{
 margin-left:auto!important;flex:0 0 auto
}
#sfMusicSheetEditor .sfScoreRegionItem{
 flex:0 0 auto!important;max-width:min(225px,80vw)!important;
 min-height:22px!important;height:22px!important
}
#sfMusicSheetEditor .sfScoreCompactControls{padding:0!important}
#sfMusicSheetEditor .sfScoreTimelinePanel{overflow-x:auto;overflow-y:hidden}
#sfMusicSheetEditor .sfScoreTimelinePanel>strong{font-size:10px}
#sfMusicSheetEditor .sfScoreTimelinePanel .sfScoreTimelinePaging{padding:1px!important;gap:3px!important}
#sfMusicSheetEditor .sfScoreTimelinePanel .sfScoreTimelinePaging button{
 min-height:22px!important;padding:1px 6px!important;font-size:11px!important
}

/* Score workspace: opt-in two-pane layout, PDF full height on left,
   controls and Song Form timeline scroll independently on right. */
#sfMusicSheetEditor .sfScoreZoomControl{display:inline-flex;align-items:center;gap:3px}
#sfMusicSheetEditor .sfScoreZoomExact{
 width:57px!important;min-width:46px!important;max-width:65px;
 height:26px!important;min-height:26px!important;box-sizing:border-box;
 padding:2px 4px!important;font-size:12px;text-align:right
}
#sfMusicSheetEditor .sfScoreWorkspaceToggle{
 min-height:26px!important;height:26px!important;
 padding:2px 8px!important;white-space:nowrap;font-size:11px
}
#sfMusicSheetEditor .sfScoreWorkspaceToggle[aria-pressed="true"]{
 border-color:#46d6cb!important;background:#205967!important;color:#e9fffd
}
#sfMusicSheetEditor .sfScoreWorkspace{
 display:flex;flex-direction:column;min-width:0;max-width:100%;gap:3px
}
#sfMusicSheetEditor .sfScoreMappingHost{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
#sfMusicSheetEditor .sfScoreWorkspace>.sfSongScoreCanvas{min-width:0}
@media(min-width:900px){
 #sfMusicSheetEditor .sfScoreWorkspace.sfScoreSideWorkspace{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,35%);
  grid-template-areas:"pdf controls";gap:8px;align-items:stretch;
  height:calc(100vh - 205px);height:calc(100dvh - 205px);
  min-height:400px;max-height:none
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace>.sfSongScoreCanvas{
  grid-area:pdf;min-height:0;max-height:none!important;
  width:100%;height:100%;overflow-y:auto;overscroll-behavior:contain
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace>.sfScoreMappingHost{
  grid-area:controls;min-height:0;max-height:100%;overflow-y:auto;overflow-x:hidden;
  border:1px solid #365267;border-radius:7px;padding:5px;
  background:#142c3a;
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace .sfScoreQuickTools{
  justify-content:flex-start;align-content:flex-start
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace .sfScoreQuickTools>.sfScoreRegionList{
  display:flex!important;flex:1 0 100%;flex-wrap:wrap!important;
  overflow:visible!important;max-height:none!important;
  height:auto!important;align-items:flex-start
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace .sfScoreQuickTools>.sfScoreMappingToggle{
  margin-left:0!important
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace .sfScoreTimelinePanel{
  width:100%!important;max-width:100%!important;min-width:0;
  overflow-x:auto!important;margin-top:5px!important
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace .sfScoreTimelineViewport{
  width:100%;max-width:100%;overflow-x:auto
 }
}
@media(max-width:899px){
 #sfMusicSheetEditor .sfScoreWorkspace.sfScoreSideWorkspace{
  display:flex;flex-direction:column;gap:4px;height:auto;max-height:none
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace>.sfSongScoreCanvas{
  order:0;max-height:72vh!important;max-height:72dvh!important
 }
 #sfMusicSheetEditor .sfScoreSideWorkspace>.sfScoreMappingHost{
  order:1;max-height:40vh;overflow-y:auto
 }
}

/* StageFlow 0.3.49.104: full-width streaming playback, compact bar grid and Scope. */
.sfSourceBlock.sfCompactSource{display:flex;flex-wrap:wrap;align-items:flex-start;min-width:0}
.sfSourceBlock.sfCompactSource>.sfEmbeddedPlayer{order:10;display:block;flex:0 0 100%;width:100%;min-width:0;margin:8px 0 0}
.sfSourceBlock.sfCompactSource>.sfEmbeddedPlayer iframe,
.sfRecordingPanel .sfEmbeddedPlayer iframe,
#songArea .sfSongMetaSide .sfEmbeddedPlayer iframe{
 display:block;width:100%!important;height:auto!important;min-height:0!important;
 max-height:none!important;aspect-ratio:16/9!important;border-radius:8px
}
.sfVFormRoot .sfVFormRow{height:var(--sf-form-row-height,38px)!important;min-height:var(--sf-form-row-height,38px)!important;max-height:var(--sf-form-row-height,38px)!important}
.sfVFormRoot .sfVFormRow:nth-child(even){background:rgba(83,133,156,.055)}
.sfVFormRoot .sfVFormRow:nth-child(odd){background:rgba(14,42,60,.12)}
.sfVFormRoot .sfVFormBlock{background:color-mix(in srgb,var(--sf-section-color,#335a6d) 84%,transparent)!important;
 backdrop-filter:none;box-shadow:inset 0 -1px rgba(222,248,255,.15),0 2px 4px #0004}
.sfVFormRoot .sfVFormBarCount{display:block;font-size:10px;font-weight:600;color:#e3f1f7bb;margin-top:2px}
.sfVFormRoot .sfVFormBlock{line-height:1.2}
.sfFormViewTools{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;padding:3px 0}
.sfFormViewTools button{min-height:27px;font-size:11px;padding:3px 10px}
.sfFormZoomLabel{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:#bcd7e4}
.sfFormZoomLabel input{width:132px;accent-color:#42d9c6}
.sfFormZoomLabel output{min-width:40px;text-align:right}
.sfFormWorkspaceDialog.sfFormScopeMode{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
.sfFormScopeMode .sfFormWorkspaceLayout{grid-template-columns:minmax(0,1fr)!important;padding:5px!important}
.sfFormScopeMode .sfFormWorkspacePalette{display:none!important}
.sfFormScopeMode .sfFormWorkspaceMain{max-height:100%;min-height:0}
.sfFormScopeMode .sfVFormRoot{height:calc(100dvh - 220px)!important;max-height:none!important}
@media(max-width:700px){.sfFormScopeMode .sfVFormRoot{height:calc(100dvh - 190px)!important}}

/* Stage performance: compact 2px beat diagnostics beneath the form strip. */
#stage .sfStageBeatDots{height:6px;display:flex;align-items:center;justify-content:space-around;width:100%;padding:0 7px;box-sizing:border-box;gap:2px}
#stage .sfStageBeatDots[hidden]{display:none!important}
#stage .sfStageBeatDot{display:block;width:2px;height:2px;max-width:2px;flex:0 0 2px;border-radius:50%;background:#678291;opacity:.55}
#stage .sfStageBeatDot.active{background:#00e5cf;opacity:1;box-shadow:0 0 5px 1px #00e5cf8a}
#stage .sfStageChordColor [data-line-type="chords"]{color:#8bdbff}
#stage .sfStageChordColor.sfStageChordPulse [data-line-type="chords"]{color:#ffe28e;text-shadow:0 0 2px #ffe28e80}

/* Keep diagnostic dots directly BELOW section pills in the desktop Stage header. */
@media(min-width:1450px){
 #stage .stageHead #stageForm:not([hidden]){flex-direction:column;align-items:stretch;justify-content:center;max-height:50px;min-height:0;overflow:visible}
 #stage .stageHead #stageForm #stageFormBlocks{flex:0 1 auto;width:100%;max-height:37px;min-height:30px}
 #stage .stageHead #stageForm .sfStageBeatDots{flex:0 0 6px;width:100%}
}

/* Non-destructive legacy chord sequence migration. */
.sfLegacyChordSequencePanel{margin:9px 0;padding:9px;border:1px solid #476a7d;border-radius:8px;background:#142e3c}
.sfLegacyChordSequencePanel>summary{font-weight:700;cursor:pointer;color:#83e4d7}
.sfLegacyChordSequencePanel>.actions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.sfLegacyChordSequencePreview{margin-top:8px}
.sfLegacySequenceRows{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:4px;max-height:250px;overflow-y:auto;padding:5px;background:#0b1e2b;border-radius:7px}
.sfLegacySequenceRow{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;padding:4px 7px;background:#1b3648;border-radius:5px}
.sfLegacySequenceRow span{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfLegacySequenceRow input[type=number]{width:62px;max-width:62px;min-width:50px;padding:5px;font-size:12px}

/* Cloud snapshots contain score metadata, not the device-local PDF blob. */
.sfScoreRow.sfScoreMissingLocal,.sfSheetRow.sfScoreMissingLocal{border-color:#b88642!important}
.sfScoreMissingLocal small[role=status]{color:#f0b578}

/* Song Form Chords playhead: independent of legacy lyric/chord HTML. */
#stage .sfStageActiveChord{display:inline-flex;align-items:center;justify-content:center;
 margin-inline:7px;min-width:46px;max-width:100px;min-height:25px;padding:3px 10px;
 color:#aec9dc;border:1px solid #4a6375;background:#1b2e40;border-radius:7px;
 font-weight:800;font-size:13px;letter-spacing:.02em;white-space:nowrap;flex:none}
#stage .sfStageActiveChord[hidden]{display:none!important}
#stage .sfStageActiveChord.sfStageChordLive{color:#081921;background:#6de0ff;
 border-color:#9bf0ff;box-shadow:0 0 0 1px #277e90,0 0 10px #39cae42c}


/* v0.3.49.111 — mobile song view: compact primary actions and horizontal modes.
   Avoid layout re-parenting or modifying the Stage view itself. */
#mobileSongLayers{display:none}
@media(max-width:980px){
 #songArea .sfSongHeaderZones{display:flex!important;flex-direction:column!important;
  width:100%!important;min-width:0!important;max-width:100%!important;gap:7px!important}
 #songArea .sfSongTopRow{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important}
 #songArea .sfSongTopRow .sfSongPrimaryActions{width:100%!important;min-width:0!important;display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
 #songArea .sfSongPrimaryActions>#stageOpen{grid-column:span 1}
 #songArea .sfSongPrimaryActions>#mobileSongLayers{display:inline-flex!important;align-items:center;justify-content:center!important;
  border:1px solid #3c6879!important;background:#1b3545!important;white-space:nowrap!important}
 #songArea .sfSongPrimaryActions>button{min-width:0!important;max-width:100%!important;overflow:hidden;text-overflow:ellipsis;
  font-size:12px!important;padding:7px 3px!important;min-height:39px!important}
 #songArea .sfSongHeaderZones>.sfSongModeNavigation,
 #songArea>.sfSongModeNavigation{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;flex-direction:row!important;
  align-items:center!important;justify-content:flex-start!important;gap:5px!important;
  width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;touch-action:pan-x!important;
  padding:5px 1px 8px!important;margin:0!important}
 #songArea .sfSongModeNavigation>.sfSongModeButton{display:inline-flex!important;flex:0 0 auto!important;
  min-width:max-content!important;width:auto!important;max-width:none!important;min-height:36px!important;
  flex-direction:row!important;align-items:stretch!important;white-space:nowrap!important}
 #songArea .sfSongModeNavigation .sfSongModePick,#songArea .sfSongModeNavigation .sfSongModePreview,
 #songArea .sfSongModeNavigation .sfSongModeMove{flex:0 0 auto!important;width:auto!important;
  white-space:nowrap!important;padding:7px 9px!important;min-height:36px!important}
 #songArea .sfSongEditRow{display:flex!important;flex-flow:row wrap!important;gap:5px!important}
}
@media(max-width:690px){
 #songArea .sfSongPrimaryActions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #songArea .sfSongPrimaryActions>#stageOpen,#songArea .sfSongPrimaryActions>#mobileSongLayers,
 #songArea .sfSongPrimaryActions>#save,#songArea .sfSongPrimaryActions>#songAddSetlistTop{
  grid-column:auto!important;display:inline-flex!important}
 #songArea .sfSongEditRow{display:flex!important;align-items:center;max-width:100%;min-width:0}
 #songArea .sfSongEditRow>#songLayers{display:none!important}
 #songArea .sfSongEditRow>.sfSongToolDropdown{flex:0 0 auto}
 #songArea .sfSongEditRow>button,#songArea .sfSongEditRow>details>summary{min-height:34px!important}
}
/* Simple mode must not hide the dedicated mobile layers entry. */
@media(max-width:980px){
 body[data-interface-mode="simple"] #songArea .sfSongPrimaryActions>#mobileSongLayers{display:inline-flex!important}
}


/* v0.3.49.112: performance strip uses the complete width; NO nested horizontal scroll. */
#stage #stageForm:not([hidden]){min-width:0!important;overflow:hidden!important;max-height:none!important}
#stage #stageForm #stageFormBlocks{display:flex!important;align-items:stretch!important;
 width:100%!important;max-width:100%!important;min-width:0!important;
 height:auto!important;overflow:hidden!important;scrollbar-width:none!important;
 flex-wrap:nowrap!important;gap:2px!important;padding:2px!important}
#stage #stageForm #stageFormBlocks::-webkit-scrollbar{display:none!important}
#stage #stageForm .songFormBlock{flex:var(--part-weight,4) 1 0%!important;box-sizing:border-box!important;
 width:0!important;min-width:0!important;max-width:none!important;overflow:hidden!important;
 border-radius:5px!important;white-space:nowrap!important;text-overflow:clip!important;
 border:1px solid color-mix(in srgb,var(--part-color,#728c9a) 85%,white)!important;
 background:color-mix(in srgb,var(--part-color,#728c9a) 78%,#0c202c)!important}
#stage #stageForm .songFormBlock.active{outline:2px solid #e5ffff!important;outline-offset:-2px;filter:brightness(1.3)}
#stage #stageForm[data-mode="compact"]{padding:2px 7px!important}
#stage #stageForm[data-mode="compact"] .songFormHead{display:none!important}
#stage #stageForm[data-mode="compact"] #stageFormBlocks{height:14px!important;max-height:14px!important}
#stage #stageForm[data-mode="compact"] .songFormBlock{
 height:10px!important;min-height:10px!important;max-height:10px!important;
 padding:0!important;line-height:0!important;font-size:0!important}
#stage #stageForm[data-mode="compact"] .songFormBlock>*{display:none!important}
#stage #stageForm[data-mode="detailed"] #stageFormBlocks{height:34px!important;max-height:34px!important}
#stage #stageForm[data-mode="detailed"] .songFormBlock{height:30px!important;min-height:30px!important;max-height:30px!important;
 padding:4px 6px!important;font-size:10px!important;line-height:1.2!important}
#stage #stageForm[data-mode="detailed"] .songFormBlock>span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#stage #stageForm[data-mode="detailed"] .songFormBlock>small{display:none!important}
#stage #stageForm[data-mode="detailed"] .songFormHead{display:none!important}
#stage.sfStagePlaying #sfStageSheetToggle{display:none!important}
/* A metronome is visible independently of Song Form, with a very soft background pulse. */
#stage .sfStageBeatDots{display:flex;align-items:center;justify-content:center;gap:14px;
 width:100%;height:16px;min-height:16px;padding:2px 0;background:#0b1921;flex:none}
#stage .sfStageBeatDots[hidden]{display:none!important}
#stage .sfStageBeatDot{display:block;width:6px!important;height:6px!important;min-width:6px;
 max-width:6px!important;flex:0 0 6px!important;border-radius:50%;background:#547e90;opacity:.65}
#stage .sfStageBeatDot.active{background:#4cf2dd;opacity:1;box-shadow:0 0 0 3px #35eadc38,0 0 12px #25d9edb3}
#stage .stageReading{position:relative;isolation:isolate}
#stage .stageReading::before{content:"";position:absolute;inset:12% 12%;border-radius:50%;pointer-events:none;
 z-index:0;background:radial-gradient(ellipse at center,#38d7e5 0%,#278baa 24%,transparent 70%);
 opacity:0;transition:opacity .12s ease-out}
#stage .stageReading.sfStageAmbientPulse::before{opacity:.075}
#stage .stageReading>.stageText,#stage .stageReading>#sfStageSheets,#stage .stageReading>#stagePdf{
 position:relative;z-index:1}
@media(min-width:1450px){
 #stage .stageHead #stageForm:not([hidden]){flex:1 1 300px!important;max-width:min(46vw,760px)!important;
  padding:0!important;align-items:stretch!important;justify-content:center!important}
 #stage .stageHead #stageForm #stageFormBlocks{height:auto!important;min-height:0!important}
}
@media(max-width:1449px){
 #stage #stageForm{width:100%;max-width:100%;border-radius:0!important}
 #stage #stageForm[data-mode="compact"]{height:18px;min-height:18px}
 #stage #stageForm[data-mode="detailed"]{height:38px;min-height:38px}
}
@media(prefers-reduced-motion:reduce){
 #stage .stageReading::before{transition:none}
}

/* Keep the three reviewed Legacy chord import modes discoverable in Chords. */
.sfChordMigrationToolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border:1px solid #3b6571;border-radius:9px;background:#132e38}
.sfChordMigrationToggle{font-weight:700;min-height:40px;background:#1b6a69;color:#f1ffff;border-color:#39bdb5}
.sfChordMigrationToolbar small{font-size:11px;color:#aec5d2}
#sfLegacyChordMapper .sfLegacyChordSequencePanel{padding:9px;border:1px solid #406677;border-radius:8px;margin:10px 0}
#sfLegacyChordMapper .sfLegacyChordSequencePanel>summary{cursor:pointer;font-weight:700}
@media(max-width:690px){.sfChordMigrationToolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}.sfChordMigrationToggle{width:100%;text-align:center}.sfChordMigrationToolbar small{display:block;text-align:center}.sfLegacyChordSequencePanel label{max-width:100%;box-sizing:border-box}.sfLegacySequenceRow{display:flex;flex-wrap:wrap;gap:5px;align-items:center}.sfSongHeaderZones{gap:5px}#songArea .sfSongPrimaryActions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:5px}#songArea .sfSongPrimaryActions>button{min-width:0;padding:9px 3px;font-size:12px}#songArea .sfSongEditRow{justify-content:flex-start;gap:5px}#songArea .sfSongModeNavigation{margin:3px 0 6px}}

/* Automatic chord migration: narrow screens and opt-in advanced controls. */
.sfChordMigrationAdvanced,.sfLegacyManualMapping{margin:9px 0;border:1px solid #365666;border-radius:8px;padding:8px}
.sfChordMigrationAdvanced>summary,.sfLegacyManualMapping>summary{cursor:pointer;font-weight:600;color:#b4d3e3}
.sfChordMigrationAdvanced>label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.sfLegacyChordSequencePanel select{max-width:100%;width:auto;min-width:0;box-sizing:border-box;white-space:normal}
.sfLegacyChordSequencePanel>label{display:block;margin-top:7px}
#sfLegacyChordMapper{min-width:0;max-width:100%;scroll-margin-top:8px}
#sfLegacyChordMapper .sfLegacyChordSequencePanel{max-width:100%;min-width:0;overflow-x:hidden}
@media(max-width:690px){.sfChordMigrationToggle{font-size:13px;min-height:36px;padding:7px 9px}.sfChordMigrationToolbar{padding:5px}.sfLegacyChordSequencePanel select{width:100%}.sfLegacySequenceRows{grid-template-columns:1fr}.sfLegacySequenceRow{justify-content:flex-start}}

/* Chord importer: deliberate full-replacement action, readable on mobile. */
#sfLegacyChordMapper .sfLegacyReplaceOption{display:flex;align-items:center;gap:8px;margin:9px 0 3px;font-weight:700;line-height:1.35;cursor:pointer}
#sfLegacyChordMapper .sfLegacyReplaceOption input{width:19px;height:19px;min-width:19px;accent-color:#14c8c8}
#sfLegacyChordMapper .sfLegacyChordSequencePanel .actions button{white-space:normal;min-height:38px}
@media(max-width:690px){#sfLegacyChordMapper .sfLegacyChordSequencePanel>.actions{display:grid;grid-template-columns:1fr}#sfLegacyChordMapper .sfLegacyChordSequencePanel>.actions button{width:100%}}

/* Stage v0.3.49.120: one active chord; canonical Song Form overrides Legacy.
   Legacy is a fallback only and never receives whole-row beat flashes. */
#stage .sfStageChordColor.sfStageChordPulse [data-line-type="chords"]{
 color:#8bdbff;text-shadow:none
}
#stage .sfStageLegacyChordToken{color:#a4bbce;transition:color 90ms ease,background 90ms ease}
#stage .sfStageLegacyChordToken.sfStageLegacyChordActive{
 color:#071e27;background:#71e4ff;border-radius:3px;padding:0 2px;
 box-shadow:0 0 7px #3be5e75e;font-weight:800
}
#stage .stageHead #sfStageActiveChord{flex:0 0 auto;font-variant-numeric:tabular-nums}

/* Stage chord experiments: canonical chord rows aligned to mapped lyrics. */
#stage .sfStageMappedChordRow{display:flex;flex-wrap:wrap;gap:.65em;align-items:baseline;
 padding:.12em .35em .06em;margin:.2em 0 .02em;border-left:2px solid #258795;
 font-family:inherit;font-size:.9em;font-weight:700;line-height:1.35}
#stage .sfStageMappedChord{color:#7daec6;padding:.04em .22em;border-radius:.18em;
 transition:background .1s ease,color .1s ease}
#stage .sfStageMappedChord.active{color:#061c24;background:#77e9ff;
 box-shadow:0 0 .35em #56cfe782}
#stage .sfStageActiveChord.sfStageChordTrio{display:inline-flex;gap:4px;align-items:center;
 max-width:min(45vw,260px);min-width:95px;padding:3px 5px;white-space:nowrap}
#stage .sfStageChordContextItem{display:inline-block;max-width:92px;overflow:hidden;
 text-overflow:ellipsis;border-radius:4px;color:#b2ccda;padding:3px 5px;opacity:.72}
#stage .sfStageChordContextItem.active{background:#6de0ff;color:#081921;font-weight:900;opacity:1}
#stage #sfStageActiveChord.sfStageChordTrio.sfStageChordLive{background:#1b2e40;color:#aec9dc}
@media(max-width:700px){#stage .sfStageActiveChord.sfStageChordTrio{max-width:48vw;gap:2px}
 #stage .sfStageChordContextItem{padding:2px 3px;max-width:55px;font-size:11px}
 #stage .sfStageMappedChordRow{gap:.45em}}

/* Music-score stage safety: distinguish playable offline files from mere links. */
#stage #sfStageScoreReady:not([hidden]){display:block;padding:6px 12px;font-size:12px;line-height:1.35;background:#243947;color:#d9eaf4;border-bottom:1px solid #426578}
#stage #sfStageScoreReady.missing{background:#452a27;color:#ffe5da;border-bottom-color:#ab5e43;font-weight:700}
#stage #sfStageScoreReady[hidden]{display:none!important}

/* Chord arrangement v0.3.49.128: explicit zoom, insert cursor, custom library. */
#sfCanonicalGrid .sfGridZoomControl{display:inline-flex;gap:8px;align-items:center}
#sfCanonicalGrid .sfGridZoomControl button{font-size:20px;min-width:36px;min-height:34px;line-height:1}
#sfCanonicalGrid .sfCanonicalPlayheadPosition{font-weight:700;color:#73deed;padding:4px 6px}
#sfCanonicalGrid .sfGridPlayheadBar{background:rgba(30,218,213,.24);outline:1px solid #34d8e4;outline-offset:-1px;cursor:crosshair}
#sfCanonicalGrid .sfCanonicalClip.selected{outline:2px solid #69ebff;outline-offset:0;box-shadow:0 0 0 2px rgba(28,221,237,.27)}
#sfCanonicalGrid .sfChordCustomCollection{display:flex;flex-direction:column;gap:8px;margin-top:12px;padding:10px;border:1px solid rgba(137,194,216,.3);border-radius:10px}
#sfCanonicalGrid .sfChordCustomHeader{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#sfCanonicalGrid .sfChordCustomHeader input{width:160px;max-width:100%;flex:1;min-width:120px}
#sfCanonicalGrid .sfChordCustomGroup{display:flex;flex-wrap:wrap;gap:6px}
#sfCanonicalGrid .sfChordCustomItem{display:inline-flex;align-items:center;border-radius:7px;border:1px solid rgba(149,202,217,.28)}
#sfCanonicalGrid .sfChordCustomItem>.sfCanonicalPaletteItem{border:0}
#sfCanonicalGrid .sfChordCustomItem>button:last-child{padding:3px 6px;min-width:26px}
#sfCanonicalGrid .sfChordCustomCollection select{max-width:240px}

/* Compact Custom chord quality row: matches major/minor/seventh palette footprint. */
#songArea #sfCanonicalGrid .sfChordCustomRow{display:flex;gap:3px;align-items:center;flex-wrap:nowrap;min-height:29px;padding:0;border:0;margin:0;position:relative}
#songArea #sfCanonicalGrid .sfChordCustomRow>strong{width:92px;flex:0 0 92px;font-size:11px}
#songArea #sfCanonicalGrid .sfChordCustomInline{display:flex;align-items:center;gap:3px;overflow:auto;flex:1;min-width:0;scrollbar-width:thin}
#songArea #sfCanonicalGrid .sfChordCustomEmpty{min-width:37px;height:27px;flex:0 0 37px;border-style:dashed;font-size:16px;padding:2px 5px}
#songArea #sfCanonicalGrid .sfChordCustomEntry{width:105px;min-width:84px;height:27px;font-size:12px;padding:2px 6px}
#songArea #sfCanonicalGrid .sfChordCustomInlineItem{display:inline-flex;flex:0 0 auto;align-items:center}
#songArea #sfCanonicalGrid .sfChordCustomInlineItem>.sfCanonicalPaletteItem{max-width:115px;min-width:32px;text-overflow:ellipsis;overflow:hidden}
#songArea #sfCanonicalGrid .sfChordCustomRemove{font-size:11px;min-height:26px;min-width:18px;padding:1px 3px;opacity:.7}
#songArea #sfCanonicalGrid .sfChordCustomCollectionsMenu{flex:0 0 auto;margin-left:4px;font-size:11px;position:relative}
#songArea #sfCanonicalGrid .sfChordCustomCollectionsMenu summary{cursor:pointer;padding:2px 4px}
#songArea #sfCanonicalGrid .sfChordCustomCollectionsMenu select{max-width:155px;font-size:11px}
#songArea #sfCanonicalGrid .sfClipLinkedToForm{border-bottom:3px solid #53d5aa}
@media(max-width:700px){
 #songArea #sfCanonicalGrid .sfChordCustomRow>strong{width:56px;flex-basis:56px;font-size:10px}
 #songArea #sfCanonicalGrid .sfChordCustomCollectionsMenu summary{font-size:10px}
}

/* Song Form membership is explicit: linked chord clips use their section's own color. */
#songArea #sfCanonicalGrid .sfCanonicalClip.sfClipLinkedToForm{background:color-mix(in srgb,var(--sf-linked-color) 75%,#111c2b);border-color:var(--sf-linked-color);border-bottom:3px solid var(--sf-linked-color);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sf-linked-color) 70%,white)}

/* Preserve legacy chord-row spacing and order in Stage View. When the musician
   selects Legacy, the timeline must not replace these source HTML chord lines. */
#stage #stageText[data-stage-chord-source="legacy"] [data-line-type="chords"]{
 white-space:pre-wrap;tab-size:4;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}
#stage #stageText[data-stage-chord-source="legacy"] [data-line-type="chords"] strong{
 white-space:inherit;font-family:inherit;
}

/* Floating Chords stage layer: visually behind the musician's lyric content.
   It is decorative, cannot capture touches, and is clipped to the reading pane. */
#stage #stageReading{position:relative;isolation:isolate}
#stage #stageText{position:relative;z-index:2}
#stage #sfStageChordRiver{position:sticky;top:49%;height:0;z-index:1;
 pointer-events:none;overflow:visible;font-size:clamp(32px,6.8vw,112px);
 font-weight:850;white-space:nowrap;line-height:1;opacity:.18;
 color:#7be6f0;text-shadow:0 0 .3em #17d5df;user-select:none}
#stage #sfStageChordRiver[hidden]{display:none!important}
#stage #sfStageChordRiverInner{position:absolute;top:0;left:12%;
 display:flex;align-items:center;gap:1.1em;will-change:transform}
#stage .sfStageFloatingChord{opacity:.43}
#stage .sfStageFloatingChord.active{opacity:1}
#stage[data-theme="light"] #sfStageChordRiver{color:#116575;text-shadow:none;opacity:.14}
@media(max-width:700px){#stage #sfStageChordRiver{font-size:clamp(30px,10vw,70px)}
 #stage #sfStageChordRiverInner{left:7%;gap:.7em}}
@media(prefers-reduced-motion:reduce){#stage #sfStageChordRiverInner{transition:none}}

/* Stage timed chords: place each chord at its musical position in its lyric
   line instead of packing all chord labels into a generic flex row. */
#stage .sfStageMappedChordRow{position:relative;display:block;width:100%;max-width:100%;
 min-height:1.48em;white-space:nowrap;overflow:visible;box-sizing:border-box;
 padding:.08em 0;margin:.17em 0 .015em;border-left:0}
#stage .sfStageMappedChord{position:absolute;top:.05em;display:inline-block;
 transform:none;font-size:1em;font-weight:750;line-height:1.2;
 color:#70b9d3;background:transparent;padding:0 .14em;white-space:nowrap}
#stage .sfStageMappedChord.active{color:#ffffff;background:#197c91;
 box-shadow:none;border-radius:.16em}
#stage .stageReading.sfStageChordGlow .sfStageMappedChord.active{
 background:#27acbf;color:#071821;text-shadow:0 0 .24em #c4faff;
 box-shadow:0 0 .46em #28d8fa8a}
@media(max-width:700px){#stage .sfStageMappedChordRow{min-height:1.4em}}

/* Stage lyric chord ruler: stronger bar edges, very subtle beat strokes. */
#stage .sfStageMappedChordRow{min-height:1.74em;padding-bottom:.27em;margin-bottom:.09em}
#stage .sfStageChordBeatGrid{position:absolute;left:0;right:0;bottom:.02em;height:.32em;
 pointer-events:none;border-bottom:0}
#stage .sfStageBeatMark{position:absolute;bottom:0;width:1px;height:.20em;
 background:#b9cbd04a;opacity:.5;transition:opacity 160ms ease-out}
#stage .sfStageBeatMark.bar{height:.33em;width:1px;background:#b3d7dd9c}
#stage .sfStageBeatMark.sfStageBeatLit{opacity:1;transition:opacity 45ms ease-in}
@media(prefers-reduced-motion:reduce){#stage .sfStageBeatMark{transition:none}}
#stage .sfStageMappedChord{z-index:1;color:#77b4cb;transition:color 90ms linear,background 90ms linear,box-shadow 90ms linear}
#stage .sfStageMappedChord.active{color:#19130a!important;background:#ffc857!important;
 border-radius:.22em;box-shadow:0 0 0 2px #ffe49a99!important;
 font-weight:900}
#stage .stageReading.sfStageChordGlow .sfStageMappedChord.active{
 color:#140b02!important;background:#ffac30!important;
 box-shadow:0 0 .22em #ffdf83,0 0 .65em #ff9f19,0 0 1.2em #f5b73577!important;
 text-shadow:0 0 .08em white}
#stage .stageReading.sfStageChordGlow .sfStageMappedChord.active{animation:sfChordActivePulse 1.1s ease-in-out infinite alternate}
@keyframes sfChordActivePulse{from{filter:brightness(1)}to{filter:brightness(1.3)}}
@media(prefers-reduced-motion:reduce){#stage .stageReading.sfStageChordGlow .sfStageMappedChord.active{animation:none}}

/* Entire-song Stage chord layout: lyric-free Intro/Solo/Outro/Break blocks.
   Keep grid compact and unmistakably separate from vocal phrases. */
#stage .sfStageInstrumentChordRow{
 width:min(100%,70ch);max-width:100%;
 min-height:2.7em;margin:.56em 0 .32em;padding-top:1.1em;
 border-left:2px solid #4394a34a;position:relative;
}
#stage .sfStageInstrumentChordRow .sfStageInstrumentLabel{
 position:absolute;top:0;left:.35em;font-size:.58em;font-weight:650;
 letter-spacing:.02em;color:#86aab8;opacity:.75;white-space:nowrap;
}
#stage .sfStageInstrumentChordRow .sfStageMappedChord{top:1.16em}
#stage .sfStageInstrumentChordRow .sfStageChordBeatGrid{bottom:.06em}

/* Stage performance: gentle lyric-line focus from the shared musical clock.
   Chords and beat rulers keep their own contrast; only mapped lyrics change. */
#stage #stageText.sfStageLyricFollow [data-line-type="lyrics"][data-sf-stage-begin]{
 opacity:.78;transition:opacity 180ms ease-out,color 180ms ease-out;
}
#stage #stageText.sfStageLyricFollow [data-line-type="lyrics"][data-sf-stage-begin].sfStageLyricCurrent{
 opacity:1;color:var(--sf-stage-current-lyric,#f3fbff);
}
#stage[data-theme="light"] #stageText.sfStageLyricFollow [data-line-type="lyrics"][data-sf-stage-begin].sfStageLyricCurrent{
 color:#071725;
}
#stage[data-theme="warm"] #stageText.sfStageLyricFollow [data-line-type="lyrics"][data-sf-stage-begin].sfStageLyricCurrent{
 color:#fff0ce;
}
@media(prefers-reduced-motion:reduce){
 #stage #stageText.sfStageLyricFollow [data-line-type="lyrics"][data-sf-stage-begin]{transition:none}
}

/* Stage lyric-first layout (v155): wrap only semantic lyrics, preserve legacy
   chord HTML and TAB spacing. The bar grid and chord labels share one scale. */
#stage #stageText.sfStageLyricsWrap p[data-line-type="lyrics"]{
 white-space:pre-wrap!important;overflow-wrap:break-word!important;word-break:normal!important;
 max-width:100%;box-sizing:border-box;
}
#stage #stageText .sfStageChordTrack{
 position:relative;display:block;width:100%;height:1.52em;
 transform-origin:0 0;will-change:transform;
}
#stage #stageText .sfStageMappedChordRow{
 max-width:100%;box-sizing:border-box;
}
#stage #stageText .sfStageInstrumentChordRow .sfStageChordTrack .sfStageMappedChord{
 top:.05em;
}

/* Leading-edge Ripple: keep unsafe-edit messages visible, not buried below a long grid. */
#sfFormWorkspaceDialog .sfRippleAlert:not([hidden]){
 position:sticky;top:0;z-index:25;display:block;
 margin:5px 0;padding:9px 12px;border:1px solid #e5aa77;border-radius:7px;
 background:#51352c;color:#fff0dc;font-size:12px;font-weight:700;line-height:1.4;
 box-shadow:0 3px 12px #0007;
}
#sfFormWorkspaceDialog .sfRippleAlert[hidden]{display:none!important}
#sfFormWorkspaceDialog .sfRippleStep{border-color:#5d98a5;white-space:nowrap}

/* v0.3.49.194 — mobile song workspace: editor navigation must never scroll away. */
@media(max-width:980px){
 body.sfSongEditorActive #songArea .sfSongHeaderZones{
  position:sticky!important;top:0!important;z-index:40!important;
  background:#0d1929!important;border:1px solid #315269!important;
  border-radius:7px;padding:5px!important;margin:0 0 6px!important;
  min-width:0!important;max-width:100%!important;
 }
 body.sfSongEditorActive #songArea .sfSongEditRow{display:none!important}
 body.sfSongEditorActive #songArea .sfSongModeNavigation{
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
  overflow-y:hidden!important;overscroll-behavior-x:contain;
  width:100%!important;min-width:0!important;max-width:100%!important;
  scrollbar-width:thin;gap:4px!important;-webkit-overflow-scrolling:touch;
 }
 body.sfSongEditorActive #songArea .sfSongModeButton,
 body.sfSongEditorActive #songArea .sfSongModeNavigation button{
  flex:0 0 auto!important;white-space:nowrap!important
 }
 body.sfSongEditorActive #songArea .sfEditorPanelToggles{display:flex;flex-wrap:nowrap;gap:4px}
 body.sfSongEditorActive #songArea .sfSongHeaderZones #mobileSongBack{
  display:inline-flex!important;width:fit-content!important;min-height:30px!important;
  padding:4px 9px!important;margin:0!important;align-items:center;white-space:nowrap
 }
 body.sfSongEditorActive #songArea .sfSongTopRow .sfSongPrimaryActions{gap:4px!important}
}
/* Compact toolbars leave the actual MIDI / chord editor visible on first entry. */
@media(max-width:750px){
 #sfFormWorkspaceDialog.sfInlineFormEditor[open]{min-height:0!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceHead{
  display:flex!important;align-items:center!important;gap:4px!important;
  margin:0!important;padding:4px 6px!important;min-height:0!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceHead>div:first-child{display:none!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormSaveControls{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:4px!important;flex-wrap:nowrap!important;overflow-x:auto!important;
  scrollbar-width:thin;min-width:0!important;width:100%!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormSaveControls>*{
  flex:0 0 auto!important;white-space:nowrap!important;font-size:11px!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormSaveControls button{
  min-height:28px!important;padding:4px 7px!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceLayout,
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspaceMain{
  min-height:0!important;padding:4px!important;margin:0!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormViewTools{
  padding:2px 4px!important;margin:2px 0!important;min-height:28px!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormQuickWorkspace{margin:0!important;padding:2px!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfVFormOneRow{
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
  overflow-y:hidden!important;gap:4px!important;min-width:0!important;
  width:100%!important;max-width:100%!important;padding:3px 2px!important;
  scrollbar-width:thin;-webkit-overflow-scrolling:touch
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfVFormOneRow>*{flex:0 0 auto!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormReadOnlyHint{display:none!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfVFormRoot{
  height:58dvh!important;min-height:300px!important;max-height:65dvh!important;
  overflow:auto!important;overscroll-behavior:contain
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormWorkspacePalette{display:none!important}
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormTransportBar{
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;
  gap:4px!important;margin:3px 0!important;padding:3px!important;
  min-height:35px!important;scrollbar-width:thin!important;align-items:center!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormTransportBar>*{
  flex:0 0 auto!important;white-space:nowrap!important;margin:0!important
 }
 #sfFormWorkspaceDialog.sfInlineFormEditor .sfFormTransportBar button{
  padding:4px 7px!important;min-height:29px!important;font-size:11px!important
 }
 #songArea .sfCanonicalBarTop,
 #sfMidiLayer .sfMidiHeader,
 #sfMidiLayer .sfMidiControls,
 #sfMidiLayer .sfMidiTimelineTools{
  flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
  scrollbar-width:thin;overscroll-behavior-x:contain
 }
 #songArea .sfCanonicalBarTop>*,
 #sfMidiLayer .sfMidiHeader>*,
 #sfMidiLayer .sfMidiControls>*,
 #sfMidiLayer .sfMidiTimelineTools>*{flex:0 0 auto!important}
}

/* StageFlow v0.3.49.196 — Form ownership is visual, never inferred from position.
   Unlinked full-song media deliberately keeps its original appearance. */
.sfVFormRoot .sfVFormPart.sfVFormLinkedPart{
 box-shadow:inset 0 0 0 2px var(--sf-linked-color,#65c9be)!important;
 border-radius:4px!important;
}
.sfVFormRoot .sfVFormState.sfVFormLinkedState{
 box-shadow:inset 0 0 0 2px var(--sf-linked-color,#65c9be)!important;
 border-radius:5px!important;
}
/* Odd numbered bars should be a touch lighter, with original accent intact. */
.sfVFormRoot .sfVFormRow:nth-child(odd){background:rgba(99,156,179,.105)!important}
.sfVFormRoot .sfVFormRow:nth-child(even){background:rgba(20,47,65,.055)!important}
.sfVFormRoot .sfVFormRow:nth-child(odd) .sfVFormReadOnly{background:#1a3547!important}
.sfVFormRoot .sfVFormRow:nth-child(odd) .sfVFormBlank{background:#213e51!important}
.sfVFormRoot .sfVFormRow.sfPlayheadRow{background:color-mix(in srgb,#ffba4a 12%,transparent)!important}
/* The block itself still owns move/resize interactions; this overlay cannot
   intercept touches, dragging or the top/bottom grips. */
.sfVFormRoot .sfVFormPinnedInfo{
 position:absolute;top:12px;left:6px;right:29px;z-index:3;
 min-height:24px;max-height:34px;overflow:hidden;
 display:flex;flex-direction:column;gap:1px;line-height:1.12;
 pointer-events:none;user-select:none;will-change:transform;
 text-shadow:0 1px 2px #0009;
}
.sfVFormRoot .sfVFormPinnedTitle{
 font-size:11px;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.sfVFormRoot .sfVFormPinnedInfo .sfVFormBarCount{
 display:block!important;margin:0!important;font-size:10px;font-weight:650;color:#effffe;
}

/* v0.3.49.197 — restore compact Form inspector geometry. Avoid inherited
   flex alignment/stretch leaving a large empty stripe above the grid. */
#sfFormWorkspaceDialog .sfFormQuickWorkspace{
 height:auto!important;min-height:0!important;margin:2px 0 4px!important;
 padding:4px 6px!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormTools{
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;
 grid-auto-rows:max-content!important;align-content:start!important;
 align-items:start!important;gap:2px!important;min-height:0!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormGlobal{
 height:auto!important;min-height:0!important;margin:0!important;
 padding:0!important;align-self:start!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormGlobal>summary{
 height:auto!important;min-height:24px!important;padding:3px 5px!important;
 line-height:1.3!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormOneRow{
 height:auto!important;min-height:0!important;margin:0!important;
 padding:1px 2px 3px!important;align-items:flex-end!important;
 align-self:start!important;gap:4px!important;scrollbar-width:thin;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormOneRow>strong{
 align-self:flex-end!important;margin:0 4px 5px 0!important;
}
/* Half-height transport in desktop Form; mobile keeps useful touch targets. */
#sfFormWorkspaceDialog .sfFormTransportBar{
 display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
 gap:5px!important;min-height:0!important;height:auto!important;
 margin:3px 0!important;padding:3px 6px!important;
 overflow-x:auto!important;overflow-y:hidden!important;
 border-radius:6px!important;font-size:10px!important;
}
#sfFormWorkspaceDialog .sfFormTransportBar>button{
 min-width:0!important;min-height:22px!important;height:22px!important;
 padding:2px 7px!important;font-size:10px!important;line-height:1.15!important;
}
#sfFormWorkspaceDialog .sfFormTransportBar label{
 display:inline-flex!important;align-items:center!important;gap:3px!important;
 margin:0!important;font-size:10px!important;white-space:nowrap!important;
}
#sfFormWorkspaceDialog .sfFormTransportBar input[type=checkbox]{
 width:12px!important;height:12px!important;min-width:12px!important;
 margin:0!important;
}
#sfFormWorkspaceDialog .sfFormTransportBar>span{
 font-size:10px!important;white-space:nowrap!important;
}
@media(max-width:750px){
 #sfFormWorkspaceDialog .sfFormTransportBar>button{
  min-height:26px!important;height:26px!important;padding:3px 8px!important
 }
 #sfFormWorkspaceDialog .sfFormTransportBar input[type=checkbox]{
  width:14px!important;height:14px!important
 }
}
/* A 160-bar page can represent every bar up to the supported 2000; controls
   are outside the matrix and never cover its movable blocks. */
.sfVFormRoot .sfVFormPager{
 position:sticky;top:0;z-index:15;display:flex;align-items:center;gap:7px;
 min-height:27px;padding:2px 6px;background:#1d394b;border-bottom:1px solid #4d7083;
 color:#d7f0ee;font-size:10px;white-space:nowrap;
}
.sfVFormRoot .sfVFormPager>button{
 min-height:22px;padding:2px 7px;font-size:10px;
}
.sfVFormRoot .sfVFormPager>input{
 width:58px;min-width:0;height:22px;padding:2px 4px;font-size:10px;
}
.sfVFormRoot .sfVFormHeader{top:27px!important}
.sfVFormRoot .sfVFormResizeTop[hidden],
.sfVFormRoot .sfVFormResize[hidden]{display:none!important}

/* v0.3.49.198: Timeline details and Form inspector are sibling rows.
   No grid item can stretch the inspector away from its heading. */
#sfFormWorkspaceDialog .sfFormQuickWorkspace{
 display:flex!important;flex-direction:column!important;
 align-items:stretch!important;justify-content:flex-start!important;
 gap:2px!important;height:auto!important;min-height:0!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace>.sfVFormGlobal{
 display:block;flex:0 0 auto!important;align-self:stretch!important;
 min-height:0!important;height:auto!important;margin:0!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace>.sfVFormTools{
 display:block!important;flex:0 0 auto!important;
 min-height:0!important;height:auto!important;
 margin:0!important;padding:0!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace>.sfVFormTools>.sfVFormOneRow{
 display:flex!important;flex-wrap:nowrap!important;
 align-items:flex-end!important;justify-content:flex-start!important;
 width:100%!important;min-height:0!important;height:auto!important;
 margin:0!important;padding:2px 1px!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace>.sfFormReadOnlyHint{
 flex:0 0 auto!important;margin:0!important;padding:1px 0!important;
}

/* v0.3.49.201: instructional copy is never a narrow flex item in Form actions. */
#sfFormWorkspaceDialog .sfVFormOneRow>.hint{
 display:none!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace>.sfFormReadOnlyHint{
 display:block!important;white-space:normal!important;
 overflow-wrap:break-word!important;width:100%!important;
 min-width:0!important;margin:2px 0 0!important;
 font-size:10px!important;line-height:1.35!important;
}
#sfFormWorkspaceDialog .sfFormMobileLibrary{display:none}
@media(max-width:980px){
 #sfFormWorkspaceDialog .sfFormWorkspaceHead{
  position:sticky!important;top:0!important;z-index:60!important;
  background:#152b39!important;
 }
 #sfFormWorkspaceDialog .sfFormMobileLibrary{
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:0 0 auto!important;min-height:35px!important;padding:5px 9px!important;
  font-size:12px!important;white-space:nowrap!important;
 }
 #sfFormWorkspaceDialog .sfFormSaveControls{min-width:0!important;overflow-x:auto!important}
}

/* v0.3.49.202: compact Form controls, no hidden overflowing section toolbar. */
#sfFormWorkspaceDialog .sfFormTransportBar {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;flex-wrap:wrap!important;overflow:visible!important;row-gap:4px!important}
#sfFormWorkspaceDialog .sfFormTransportBar>button:first-child{background:#174f49!important;border-color:#338b79!important;color:#ddfff3!important}
#sfFormWorkspaceDialog .sfFormTransportBar>button:nth-child(2){background:#162435!important;border-color:#3b5165!important;color:#cad9e5!important}
#sfFormWorkspaceDialog .sfFormTransportBar>button:hover:first-child{background:#21665c!important}
#sfFormWorkspaceDialog .sfFormTransportBar>button:hover:nth-child(2){background:#203447!important}
#sfFormWorkspaceDialog .sfFormTransportBar>.sfFormZoomLabel{margin-left:8px!important;flex:0 1 auto!important}
#sfFormWorkspaceDialog .sfFormTransportBar>.sfFormZoomLabel input{width:clamp(70px,10vw,132px)!important}
#sfFormWorkspaceDialog .sfFormTransportBar>button[title*="Form editor"]{margin-left:auto!important;min-height:25px!important;font-size:11px!important;padding:3px 9px!important}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormOneRow,
#sfFormWorkspaceDialog.sfInlineFormEditor .sfVFormOneRow{
 display:flex!important;flex-wrap:wrap!important;overflow-x:visible!important;overflow-y:visible!important;
 width:100%!important;max-width:100%!important;box-sizing:border-box!important;
 height:auto!important;gap:4px 6px!important;scrollbar-width:none!important;
}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormOneRow>*{flex:0 0 auto!important;max-width:100%!important}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormTools{min-width:0!important;max-width:100%!important}
#sfFormWorkspaceDialog .sfFormQuickWorkspace{overflow:visible!important}
#sfFormWorkspaceDialog .sfFormQuickWorkspace .sfVFormOneRow .sfFormQuickField input[type=text]{max-width:min(150px,40vw)!important}
@media(max-width:750px){
 #sfFormWorkspaceDialog .sfFormTransportBar>.sfFormZoomLabel{margin-left:0!important}
 #sfFormWorkspaceDialog .sfFormTransportBar>button[title*="Form editor"]{margin-left:0!important}
}
/* Play/Stop visual language shared across StageFlow's named transport controls. */
button:is([id$="Play"],[id$="PreviewPlay"],[id="drumPlayLoop"],[id="songChordPlay"]){background:#174f49!important;border-color:#338b79!important;color:#ddfff3!important}
button:is([id$="Play"],[id$="PreviewPlay"],[id="drumPlayLoop"],[id="songChordPlay"]):hover{background:#21665c!important}
button:is([id$="Stop"],[id="drumStop"]){background:#162435!important;border-color:#3b5165!important;color:#cad9e5!important}
button:is([id$="Stop"],[id="drumStop"]):hover{background:#203447!important}


/* .264: palette grows vertically instead of scrolling a single cramped row. */
#songArea #sfCanonicalGrid .sfChordCustomRow{
 align-items:flex-start;flex-wrap:wrap;min-height:32px;overflow:visible;
}
#songArea #sfCanonicalGrid .sfChordCustomRow>strong{
 padding-top:7px;
}
#songArea #sfCanonicalGrid .sfChordCustomInline{
 display:flex;flex-wrap:wrap;align-items:center;align-content:flex-start;
 gap:5px;flex:1 1 250px;min-width:0;max-width:100%;
 overflow:visible;white-space:normal;
}
#songArea #sfCanonicalGrid .sfChordCustomInlineItem{
 display:inline-flex;flex:0 0 auto;align-items:center;max-width:100%;
}
#songArea #sfCanonicalGrid .sfChordCustomCollectionsMenu{
 flex:1 1 190px;min-width:0;
}
#songArea #sfCanonicalGrid .sfChordPaletteOptions{
 padding:4px 9px;min-width:34px;min-height:28px;
 border:1px solid #426778;border-radius:6px;
}
#songArea #sfCanonicalGrid .sfChordPaletteFeedback{
 flex:1 1 100%;font-size:11px;
}
@media(max-width:690px){
 #songArea #sfCanonicalGrid .sfChordCustomInline{flex-basis:calc(100% - 65px)}
 #songArea #sfCanonicalGrid .sfChordPaletteOptions{min-height:40px;min-width:40px}
}
/* Development-channel UX: suppress repeated onboarding backup banners.
   Keep help/settings guidance, backup actions and all destructive-action guards. */
main>aside>.sfLossWarning,
#welcome>.sfLossWarning{display:none!important}


/* Compact spreadsheet import cards: only ambiguities expand by default. */
.sfSetlistImport .sfSetMatchCard{padding:5px 8px;gap:2px}
.sfSetlistImport .sfSetMatchCard.sfSetMatchAutoCreate{border-left-color:#39ddc3;background:#142230}
.sfSetlistImport .sfSetMatchCard.sfSetMatchAutoCreate .sfSetMatchStatus{background:#123e38;color:#8be6d0}
.sfSetlistImport .sfSetMatchCard .sfSetMatchHeader{min-height:28px;gap:7px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchNumber{width:21px;height:21px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchTitle{font-size:13px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchChange{padding:3px 7px;font-size:11px;min-height:24px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchSelected[hidden]{display:none!important}
.sfSetlistImport .sfSetMatchCard .sfSetMatchSelected{padding-left:28px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchControls{margin:2px 0 2px 28px;gap:5px}
.sfSetlistImport .sfSetMatchCard .sfSetMatchControls[hidden]{display:none!important}
@media(max-width:690px){.sfSetlistImport .sfSetMatchCard .sfSetMatchControls{margin-left:0}.sfSetlistImport .sfSetMatchCard .sfSetMatchSelected{padding-left:0}}


/* Compact, progressive setlist XLSX export selection. */
.sfTransferXlsxFields[hidden]{display:none!important}
.sfTransferXlsxFields{margin:7px 0;padding:8px;border:1px solid #3a5261;border-radius:8px}
.sfTransferXlsxHead{display:flex;justify-content:flex-end;gap:5px;margin-bottom:6px}
.sfTransferXlsxHead button{font-size:.75rem;min-height:27px;padding:3px 8px}
.sfTransferXlsxOptions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 10px}
.sfTransferXlsxOptions label{display:flex;align-items:center;gap:6px;padding:3px 4px;margin:0;font-size:.78rem;cursor:pointer}
.sfTransferXlsxOptions input{flex:none}
@media(max-width:540px){.sfTransferXlsxOptions{grid-template-columns:1fr}}


/* StageFlow Classic: destructive setlist row controls appear only after row selection on touch devices. */
@media(max-width:690px){
 body:not(.stageActive) #listArea #entries .setitem:not(.selected)>.sfSetRowRemove{display:none!important}
 body:not(.stageActive) #listArea #entries .setitem>.sfSetRowRemove{flex:0 0 30px;max-width:30px;min-height:30px}
}

/* Provider-linked files: compact and legible in song and setlist inspectors. */
.sfDriveFileLinks{display:grid;gap:5px;margin:6px 0;min-width:0}
.sfDriveFileRow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;padding:5px 0;border-top:1px solid #3b4e5c}
.sfDriveFileRow>span{flex:1 1 160px;min-width:0;overflow-wrap:anywhere;font-size:12px}
.sfDriveFileRow>a,.sfDriveFileRow>button{font-size:12px;max-width:100%}
.sfDriveFileRow>iframe{flex:1 0 100%;max-width:100%}

/* Song Properties: predictable compact two-column layout, no oversized blank rows. */
#propertiesDialog{width:min(720px,calc(100vw - 20px));max-height:min(92dvh,900px);padding:0;overflow:hidden}
#propertiesDialog #propertiesForm{max-height:min(92dvh,900px);overflow-y:auto;display:flex;flex-direction:column;gap:7px;padding:16px 18px 0;scrollbar-gutter:stable}
#propertiesDialog #propertiesForm>h3{margin:0 0 4px;font-size:18px}
#propertiesDialog #propertiesForm>h4{margin:10px 0 0;font-size:14px;border-top:1px solid #345064;padding-top:12px}
#propertiesDialog #propertiesForm>label{margin:0;min-height:35px;display:grid;grid-template-columns:minmax(120px,.72fr) minmax(0,1.4fr);align-items:center;gap:12px;font-size:13px}
#propertiesDialog #propertiesForm>label>input:not([type=checkbox]),#propertiesDialog #propertiesForm>label>select{width:100%;max-width:none;min-height:34px;padding:6px 9px}
#propertiesDialog #propertiesForm>label:has(input[type=checkbox]){display:flex;justify-content:flex-start;flex-direction:row-reverse;gap:10px;min-height:25px}
#propertiesDialog #propertiesForm>label:has(input[type=checkbox]) input{max-width:none;width:16px;height:16px;flex:none}
#propertiesDialog #propertiesForm>label[for=propNotes]{display:block;margin:6px 0 -3px}
#propertiesDialog #propNotes{min-height:65px;max-height:140px;margin:0}
#propertiesDialog #propDefaults{margin:0 0 2px;font-size:11px}
#propertiesDialog #propertiesForm>.hint{margin:0;font-size:11px;line-height:1.4}
#propertiesDialog #propLinks{display:grid;gap:7px}
#propertiesDialog #propLinks .propLink{display:grid;grid-template-columns:minmax(110px,.75fr) minmax(0,1.65fr) minmax(136px,.85fr) 33px;gap:5px;margin:0;align-items:center}
#propertiesDialog #propLinks .propLink>input{width:100%;max-width:none;min-height:33px;padding:5px 8px;grid-column:auto}
#propertiesDialog #propLinks .propLink>input[type=url]{grid-column:auto}
#propertiesDialog #propLinks .propLink>select{max-width:100%;width:100%;height:33px;min-height:33px;font-size:11px;padding:5px}
#propertiesDialog #propLinks .propLink>button{min-height:31px;padding:5px}
#propertiesDialog #propLinks .propLink>button:not(.sfFetchLink){grid-column:4;grid-row:1}
#propertiesDialog #propLinks .propLink>.sfFetchLink{grid-column:3;grid-row:2}
#propertiesDialog #propLinks .propLink>.sfFetchStatus{grid-column:1 / 3;grid-row:2;min-height:14px;font-size:11px;overflow-wrap:anywhere}
#propertiesDialog #propertiesForm>.actions{position:sticky;bottom:0;z-index:1;background:#172431;border-top:1px solid #375366;padding:11px 0;margin-top:6px}
#rehearsalAudio .sfDriveFileRow{display:flex;flex-wrap:wrap;gap:6px}
#rehearsalAudio .sfDriveFileRow>span{flex:1 0 100%;font-weight:600}
#rehearsalAudio .sfDriveFileRow>iframe{height:194px!important;max-height:194px}
#rehearsalAudio .sfAudioWaveformHost{flex:1 0 100%;min-width:0}
#rehearsalAudio .sfAudioWaveform{display:block;max-width:100%;height:72px;cursor:crosshair;border:1px solid #37566a;border-radius:7px;background:#101e2d}
@media(max-width:560px){
 #propertiesDialog #propertiesForm{padding:12px 10px 0;gap:6px}
 #propertiesDialog #propertiesForm>label{grid-template-columns:minmax(90px,.8fr) minmax(0,1.3fr);gap:7px;font-size:12px}
 #propertiesDialog #propLinks .propLink{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 30px;gap:5px}
 #propertiesDialog #propLinks .propLink>input:first-child{grid-column:1/3}
 #propertiesDialog #propLinks .propLink>input[type=url]{grid-column:1/3}
 #propertiesDialog #propLinks .propLink>select{grid-column:1/3}
 #propertiesDialog #propLinks .propLink>button:not(.sfFetchLink){grid-column:3;grid-row:1}
 #propertiesDialog #propLinks .propLink>.sfFetchLink{grid-column:3;grid-row:3}
 #propertiesDialog #propLinks .propLink>.sfFetchStatus{grid-column:1/3;grid-row:4}
}

/* Compact desktop baseline (1920 × 1080 QA): reduce dialog and audio controls ~20–25%.
   Mobile retains accessible touch targets and layout. */
@media (min-width:800px){
 #propertiesDialog{width:min(570px,calc(100vw - 24px))}
 #propertiesDialog #propertiesForm{gap:4px;padding:11px 12px 0}
 #propertiesDialog #propertiesForm>h3{font-size:15px;margin:0 0 2px}
 #propertiesDialog #propertiesForm>h4{font-size:12px;margin:7px 0 0;padding-top:7px}
 #propertiesDialog #propertiesForm>label{min-height:27px;font-size:12px;gap:8px;grid-template-columns:minmax(110px,.78fr) minmax(0,1.45fr)}
 #propertiesDialog #propertiesForm>label>input:not([type=checkbox]),
 #propertiesDialog #propertiesForm>label>select{min-height:27px;height:29px;padding:4px 7px;font-size:12px}
 #propertiesDialog #propertiesForm>label:has(input[type=checkbox]){min-height:21px;font-size:11px}
 #propertiesDialog #propertiesForm>label:has(input[type=checkbox]) input{width:14px;height:14px}
 #propertiesDialog #propNotes{min-height:46px;max-height:110px;padding:6px 8px;font-size:12px}
 #propertiesDialog #propLinks{gap:4px}
 #propertiesDialog #propLinks .propLink{grid-template-columns:minmax(90px,.68fr) minmax(0,1.65fr) minmax(115px,.9fr) 26px;gap:4px}
 #propertiesDialog #propLinks .propLink>input,
 #propertiesDialog #propLinks .propLink>select{min-height:27px;height:28px;padding:3px 6px;font-size:11px}
 #propertiesDialog #propLinks .propLink>button{min-height:26px;height:27px;padding:3px 5px;font-size:11px;border-radius:6px}
 #propertiesDialog #propertiesForm>.actions{padding:7px 0;margin-top:4px;gap:5px}
 #propertiesDialog #propertiesForm>.actions button{min-height:30px;padding:5px 10px;font-size:12px}
 #rehearsalAudio .sfRehearsalInner{padding:8px}
 #rehearsalAudio .sfRehearsalHint{font-size:11px;line-height:1.35;margin:3px 0}
 #rehearsalAudio .sfRehearsalActions{gap:5px}
 #rehearsalAudio .sfRehearsalActions button,
 #rehearsalAudio .sfDriveFileRow button,
 #rehearsalAudio .sfDriveFileRow a{font-size:11px;padding:5px 7px;min-height:28px;min-width:0;border-radius:6px}
 #rehearsalAudio .sfDriveFileRow{gap:4px;padding:4px 0}
 #rehearsalAudio .sfDriveFileRow>span{font-size:11px}
 #rehearsalAudio .sfDriveFileRow>iframe{height:156px!important;max-height:156px}
 #rehearsalAudio .sfAudioItem audio{height:28px}
 #rehearsalAudio .sfAudioItem button{min-height:27px;padding:3px 6px;font-size:11px}
}
#rehearsalAudio .sfDriveDownload{display:inline-flex;align-items:center;border:1px solid #426579;background:#23394b;color:#a3f4ec;text-decoration:none;border-radius:7px}
#rehearsalAudio .sfDriveDownload:hover{filter:brightness(1.12)}
@media(max-width:799px){
 #rehearsalAudio .sfDriveFileRow a,#rehearsalAudio .sfDriveFileRow button{min-height:38px;padding:8px}
}

/* 0.3.49.289: compact native audio / Google Drive player — avoid embedded provider chrome. */
#rehearsalAudio .sfDriveInlinePreview{padding:5px 0 1px;border-top:1px solid #304659;display:grid;gap:4px;background:transparent;color:#aec3d1}
#rehearsalAudio .sfDriveInlinePreview audio{display:block;width:100%;max-width:100%;height:30px;border-radius:4px}
#rehearsalAudio .sfDriveInlinePreview .hint{font-size:10px;line-height:1.25;color:#8298aa}
#rehearsalAudio .sfDriveFileRow .sfDriveInlinePreview{min-width:0}
#rehearsalAudio .sfAudioItem{border-radius:3px;padding:4px;gap:4px}
#rehearsalAudio .sfAudioItem audio{height:30px;min-width:100px}
#rehearsalAudio .sfAudioWaveformHost .sfAudioWaveform,
#rehearsalAudio .sfDriveInlinePreview .sfAudioWaveform{height:72px;border-radius:3px;border:1px solid #28485b;background:#101e2d}

/* .290: single add-link control and lightweight kind chooser in Song Properties. */
#propertiesDialog #propAddLink{font-size:12px;min-height:30px;align-self:flex-start}
#propertiesDialog .sfAddLinkMenu{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:4px;padding:7px;margin:3px 0 8px;border:1px solid #355066;border-radius:4px;background:#132435}
#propertiesDialog .sfAddLinkMenu[hidden]{display:none}
#propertiesDialog .sfAddLinkMenu button{text-align:left;font-size:11px;padding:6px 8px;min-height:29px;border-radius:3px}
#propertiesDialog .sfPropertiesScoreFiles{border-top:1px solid #355066;margin-top:8px;padding-top:6px}
#propertiesDialog .sfPropertiesScoreFiles summary{cursor:pointer;font-size:12px;font-weight:600;padding:6px 3px}
#propertiesDialog .sfPropertiesScoreFiles:not([open]){padding-bottom:5px}
#propertiesDialog #propLinks:not(:empty){margin-top:7px}

/* .291: Hard-minimal one-button dropdown; no persistent option-grid footprint. */
#propertiesDialog .sfLinkAddControl{position:relative;display:inline-block;max-width:100%;align-self:flex-start}
#propertiesDialog .sfLinkAddControl .sfAddLinkMenu{position:absolute;z-index:50;top:calc(100% + 3px);left:0;width:min(244px,calc(96vw - 36px));max-width:none;display:flex;flex-direction:column;gap:1px;padding:4px;margin:0;background:#142635;border:1px solid #39576c;border-radius:4px;box-shadow:0 5px 16px #0008}
#propertiesDialog .sfLinkAddControl .sfAddLinkMenu[hidden]{display:none}
#propertiesDialog .sfLinkAddControl .sfAddLinkMenu button{width:100%;min-height:27px;padding:5px 8px;text-align:left;font-size:11px;border:0;background:transparent;border-radius:2px}
#propertiesDialog .sfLinkAddControl .sfAddLinkMenu button:hover,
#propertiesDialog .sfLinkAddControl .sfAddLinkMenu button:focus-visible{background:#25485b;outline-color:#36bdc2}
