#songDialog{width:min(1010px,calc(100% - 28px));padding:24px}
#songDialog #songEditor{height:min(770px,calc(100dvh - 76px));gap:0}
#songEditor>.dialog-head{align-items:flex-start;margin-bottom:0}#songDialogTitle{font-size:27px;line-height:1.2;margin:5px 0 7px}#unifiedSongMeta{margin:0;font-size:11px}
/* A small close mark, with a comfortable invisible touch target. */
#songEditor>.dialog-head>.close{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--forest)}
#songEditor>.dialog-head>.close::before{width:14px;height:14px;flex-basis:14px}
#songEditor>.dialog-head>.close:focus-visible{outline:2px solid var(--line);outline-offset:-8px}
.unified-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex-shrink:0;border-bottom:1px solid var(--soft-line);padding:17px 0;margin:0 0 18px}.unified-label{font-size:13px;font-weight:600;margin-right:auto}.unified-toolbar button{min-height:38px;padding:8px 13px;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--forest);font:500 12px var(--font-body)}.unified-toolbar #studySymbols{margin-left:0}.unified-toolbar button[aria-pressed=true]{background:var(--selected)}
#songEditor .study-editor-body{flex:1;padding-right:3px}#songEditor .study-cue-layout{grid-template-columns:minmax(0,1fr);gap:16px}#songEditor .study-cue-layout.cue-selected{grid-template-columns:minmax(0,1fr) 260px}
#songEditor .study-lyrics{padding:25px 22px;min-height:310px;background:var(--mint);border-color:var(--soft-line);border-radius:12px}#songEditor .study-word{font-size:26px;padding:2px 3px;min-height:40px}#songEditor .study-edit-line{margin-bottom:12px;gap:2px 4px}#songEditor .study-word small{font-size:10px;margin-top:1px;padding-top:1px}#songEditor .study-cue-toolbar{margin-bottom:13px}#songEditor .study-cue-toolbar p{font-size:11px}#songEditor .study-cue-toolbar button{min-height:36px;font-size:11px}
#songEditor .study-inspector{background:var(--white);border-color:var(--soft-line);padding:17px}#songEditor .study-inspector h3{font-size:18px}#songEditor #editLyrics{height:100%;min-height:340px;max-height:440px;border:1px solid var(--soft-line);background:var(--mint);border-radius:12px;padding:25px 22px;font:500 23px/1.8 var(--font-body);color:var(--forest);resize:vertical}
#songEditor .editor-tools,#songEditor .cue-legend,#songEditor #editCuePreview,#songEditor #studyLyricLabel,#songEditor #editChordPanel{display:none!important}.unified-edit-hint{color:var(--sage);font-size:11px;margin:0 0 13px}#songEditor:not([data-cue-mode=lyrics]) .unified-edit-hint{display:none}
#songEditor #editorBackingAction{margin-top:14px}#songEditor #editorBackingAction button{font-size:11px;min-height:38px}#songEditor #studyStatus{color:var(--sage);font-size:10px;margin:10px 0}#songEditor>.actions{border-color:var(--soft-line)}
#unifiedDetailsDialog{width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--soft-line);border-radius:17px;background:var(--white);color:var(--forest);overflow:hidden;box-shadow:0 28px 90px #0004}
#unifiedDetailsDialog[open]{display:flex;flex-direction:column}#unifiedDetailsDialog::backdrop{background:#0b1018a6}
.details-popup-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:23px 24px 17px;border-bottom:1px solid var(--soft-line);flex-shrink:0}.details-popup-head h2{font-size:25px;margin:5px 0 7px}.details-popup-head .hint{font-size:11px;margin:0}.details-popup-head>.icon-button{width:36px;min-width:36px;min-height:36px;height:36px;font-size:22px;border-radius:8px}
.details-popup-body{overflow:auto;min-height:0;padding:20px 24px;overscroll-behavior:contain}.details-popup-footer{display:flex;align-items:center;gap:20px;justify-content:space-between;flex-shrink:0;padding:14px 24px;border-top:1px solid var(--soft-line)}.details-popup-footer small{font-size:10px;line-height:1.5;color:var(--sage);max-width:330px}.details-popup-footer button{min-width:82px;min-height:39px;font-size:12px;border-radius:8px}
#unifiedDetailsDialog .detail-section{padding:18px 0;border-color:var(--soft-line)}#unifiedDetailsDialog .detail-section:first-child{padding-top:0}#unifiedDetailsDialog .detail-section:last-of-type{padding-bottom:0}#unifiedDetailsDialog .detail-heading{margin-bottom:12px}#unifiedDetailsDialog .detail-heading h3{font-size:13px}#unifiedDetailsDialog .detail-heading p{font-size:10px}#unifiedDetailsDialog .detail-fields{gap:11px}#unifiedDetailsDialog .detail-fields>label{font-size:11px}#unifiedDetailsDialog .detail-fields input:not([type=checkbox]),#unifiedDetailsDialog .detail-fields select{font-size:12px;background:var(--mint);border-color:var(--soft-line)}#unifiedDetailsDialog .detail-tags{border-color:var(--soft-line)}#unifiedDetailsDialog .detail-tags summary{padding:11px 12px}#unifiedDetailsDialog .detail-note{font-size:10px}#unifiedDetailsDialog #classificationStatus{margin-top:4px}#unifiedDetailsDialog .public-visible-editor>span:first-child{font-weight:600;font-size:12px}
@media(max-width:760px){#songEditor .study-cue-layout.cue-selected{grid-template-columns:1fr}#songEditor .study-inspector{padding:15px}#songEditor .study-picks{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){#songDialog{padding:17px;width:calc(100% - 18px)}#songDialog #songEditor{height:calc(100dvh - 58px)}#songDialogTitle{font-size:23px}.unified-label{flex-basis:100%;font-size:12px}.unified-toolbar{gap:7px;padding:13px 0;margin-bottom:13px}.unified-toolbar button{font-size:11px;padding:8px 11px;flex:1}.unified-toolbar #studySymbols{flex:0 1 auto}#songEditor .study-lyrics{padding:18px 12px;min-height:270px}#songEditor .study-word{font-size:23px}#songEditor .study-edit-line{margin-bottom:10px}#songEditor .study-cue-toolbar{gap:7px}#songEditor .study-cue-toolbar>div{margin-left:auto}#songEditor #editLyrics{padding:16px 12px;font-size:20px;line-height:1.7;min-height:280px}.details-popup-head{padding:19px 18px 15px}.details-popup-body{padding:16px 18px}.details-popup-footer{padding:12px 18px;gap:12px}#unifiedDetailsDialog .detail-fields{grid-template-columns:1fr}#unifiedDetailsDialog .detail-section:nth-child(2) .detail-fields{grid-template-columns:1fr 1fr}#unifiedDetailsDialog .detail-section:nth-child(2) .detail-fields>label:nth-child(2){grid-column:1/-1;grid-row:2}#unifiedDetailsDialog .detail-section{padding:15px 0}#unifiedDetailsDialog .detail-heading{align-items:center}#songEditor .study-picks{grid-template-columns:1fr 1fr}}

#songEditor .study-cue-layout,#songEditor .study-cue-layout.cue-selected{grid-template-columns:minmax(0,1fr) 270px}#songEditor .study-inspector{position:sticky;top:0;min-height:220px;border-top:3px solid var(--highlight)}#songEditor .study-word{font-size:24px}
@media(max-width:760px){#songEditor .study-cue-layout,#songEditor .study-cue-layout.cue-selected{grid-template-columns:1fr}#songEditor .study-inspector{position:static}}
.mobile-cue-dock[hidden]{display:none!important}
/* Keep lyric context visible alongside the picker on short phone screens. */
@media(max-width:560px) and (max-height:740px){
 #songEditor[data-cue-mode=chords]:has(.mobile-cue-dock:not([hidden])) .dialog-head .eyebrow,
 #songEditor[data-cue-mode=chords]:has(.mobile-cue-dock:not([hidden])) .unified-label,
 #songEditor[data-cue-mode=chords]:has(.mobile-cue-dock:not([hidden])) .study-cue-toolbar{display:none}
 #songEditor[data-cue-mode=chords]:has(.mobile-cue-dock:not([hidden])) .unified-toolbar{padding:8px 0;margin-bottom:8px}
 #songEditor[data-cue-mode=chords]:has(.mobile-cue-dock:not([hidden])) .study-editor-body{min-height:115px}
 #songEditor[data-cue-mode=chords] .mobile-cue-dock{max-height:40%}
}
@media(min-width:761px){
 #songEditor .study-inspector{max-height:var(--cue-inspector-height,100%);min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:8px 66px}
 #songEditor .study-inspector .study-cue-actions{position:sticky;bottom:-17px;margin:15px -17px -17px;padding:10px 17px;background:var(--white);border-top:1px solid var(--soft-line)}
}
@media(max-width:760px){
 #songEditor .mobile-cue-dock{flex:0 1 auto;min-height:0;max-height:50%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding-block:8px 68px;border:1px solid var(--soft-line);border-top:3px solid var(--highlight);border-radius:12px;background:var(--white);margin:8px 0 0}
 #songEditor .mobile-cue-dock .study-inspector{position:static;min-height:0;border:0;border-radius:0;padding:10px 12px 0}
 #songEditor .mobile-cue-dock .study-inspector h3{font-size:15px;line-height:1.3;margin:3px 0 8px}
 #songEditor .mobile-cue-dock .study-inspector .eyebrow{margin:0}
 #songEditor .mobile-cue-dock .study-inspector-head>button{min-width:40px;min-height:40px}
 #songEditor .mobile-cue-dock .study-picks{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 #songEditor .mobile-cue-dock .study-picks button{padding:6px 2px;min-height:40px;font-size:11px}
 #songEditor .mobile-cue-dock .study-more{margin:8px 0 0}
 #songEditor .mobile-cue-dock .study-more summary{display:flex;align-items:center;min-height:40px}
 #songEditor .mobile-cue-dock .study-more input{font-size:16px}
 #songEditor .mobile-cue-dock .hint{margin:5px 0;font-size:10px;line-height:1.4}
 #songEditor .mobile-cue-dock .study-cue-actions{position:sticky;bottom:0;margin:0 -12px;padding:8px 12px;background:var(--white);border-top:1px solid var(--soft-line)}
}

.editor-mode-tabs{display:flex;gap:2px;flex:0 0 auto;padding:2px;border:1px solid var(--soft-line);border-radius:9px}.unified-toolbar .editor-mode-tabs button{border:0;padding:6px 10px;min-height:34px}.unified-toolbar .editor-mode-tabs button[aria-pressed=true]{background:var(--selected);font-weight:600}
@media(max-width:1000px){.unified-toolbar .unified-label{flex-basis:100%}}
