/* The app chrome owns fixed space; only lyrics scroll as their font grows. */
body{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.app-header{flex:0 0 auto}
.workspace{flex:1 1 0;display:grid;grid-template-rows:minmax(0,1fr);height:auto;min-height:0;overflow:hidden}
.sidebar{min-height:0;overflow:auto;overscroll-behavior:contain}
main{height:100%;min-height:0;min-width:0;margin:0 auto;overflow:hidden}
.song-top,.song-tools,.number-legend,.stage-heading,.transport,.bottom-hint{flex:0 0 auto}
.song-heading{min-width:0}
.song-heading h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.song-tools{display:flex;flex-wrap:wrap}
.stage{flex:1 1 0;min-height:0;min-width:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
body .stage .lyric-card{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.lyric-card:focus-visible{outline:3px solid #76acff;outline-offset:-3px}

/* Every word carries a chord row above its lyric row, including after wrapping. */
.lyric-line{align-items:flex-start}
.lyric-word{display:inline-flex;align-items:flex-start;min-width:0;max-width:100%}
.lyric-piece{display:inline-flex;flex-direction:column;align-items:stretch;align-self:flex-start;min-width:0;max-width:100%}
.lyric-piece>.chord{display:block;flex:none;order:0;white-space:nowrap}
.lyric-piece>.lyric-text{display:block;order:1;white-space:pre;overflow-wrap:normal;word-break:normal;hyphens:none}

.transport{flex-wrap:wrap;position:static}
.timing{gap:10px;flex:none}
.timing .tap-tempo{display:inline-flex;width:auto;min-width:112px;min-height:36px;padding:8px 11px;font-size:12px;touch-action:manipulation;user-select:none}
.tap-control{display:flex;flex-direction:column;align-items:center;gap:4px}
.tap-dot{display:block;width:7px;height:7px;flex:none;background:var(--blue);border-radius:50%}
.tap-tempo.tapped{background:var(--blue);color:var(--surface);border-color:var(--blue)}
.tap-tempo.tapped .tap-dot{background:currentColor}
.tap-hint{font-size:9px;line-height:1.25;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.timing>button.icon-only{display:inline-flex}
.always-new{flex:none}
.instrumental-progression{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px;font-size:calc(var(--lyric-size)*.8);font-weight:750;line-height:1.3;padding:2px 0}
body .stage .instrumental-card{align-self:start;min-height:0;max-height:100%;height:auto;padding-bottom:22px}
.instrumental-card .card-top{margin-bottom:12px}.instrumental-card h2{margin-bottom:15px}
.analysis-section .instrumental-progression{font-size:20px;gap:10px 17px}
.section-kind-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;font-size:10px;color:var(--muted)}
.section-kind-label select{font-size:11px;padding:5px 9px;min-height:30px;max-width:150px}
.structure-reason,.source-note{font-size:10px;line-height:1.6;color:var(--muted);margin:8px 0 13px}
.source-note a{display:block;margin-top:5px;text-decoration:underline}
.pdf-dialog{width:650px}.pdf-content{padding:18px 25px}.pdf-content>p{font-size:12px;line-height:1.6;color:var(--muted)}#pdfFileName{font-weight:650;color:var(--text);overflow-wrap:anywhere}.pdf-preview{display:flex;justify-content:center;padding:12px;background:var(--subtle);border-radius:10px;margin:15px 0}.pdf-preview canvas{max-width:100%;height:auto;box-shadow:0 3px 16px #0002}.pdf-content .settings-row{align-items:end}.pdf-content .settings-row label{min-width:0}#pdfPasswordRow{display:flex;align-items:end;gap:10px;margin-top:14px}#pdfPasswordRow label{font-size:12px}#pdfPasswordRow input{display:block;margin-top:6px}
.header-actions{flex-wrap:wrap}
@media(max-width:1250px){
  .transport{gap:12px}
  .countdown{order:3;flex-basis:100%;padding:0}
  .play-controls{flex:1}
  .timing{border:0;padding-left:0}
}
@media(max-width:740px){
  .workspace{grid-template-columns:minmax(0,1fr)}
  .sidebar{position:absolute;bottom:0}
  .stage{display:block;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
  body .stage .lyric-card{min-height:300px;overflow:visible;margin-bottom:16px}
  .stage .lyric-card:last-child{margin-bottom:0}
  .transport{margin-top:12px;row-gap:10px;padding:11px 12px}
  .play-controls{flex:1 0 100%}
  .timing{flex:1 0 100%;justify-content:space-between}
  .timing small{display:inline}
  .tap-control{flex-direction:row;gap:8px}
  .timing .tap-tempo{min-width:107px;padding:8px}
  .tap-hint{max-width:70px;white-space:normal}
  .countdown{flex:1 0 100%}
  .bottom-hint{padding-top:5px}
  .app-header{column-gap:8px}.brand{font-size:24px}
  .header-actions{gap:2px;flex:1;justify-content:flex-end}
  .header-actions .always-new{width:auto;padding-inline:8px;min-width:82px;font-size:10px}
  .header-actions .always-new>span{display:inline}
  .app-header .app-name{display:none}
}
@media(max-height:540px){
  .app-header{min-height:48px;padding-block:7px}
  .app-name,.song-heading>.eyebrow,.song-heading>p,.bottom-hint{display:none}
  main{padding-top:10px;padding-bottom:8px}
  .song-top{margin-bottom:8px}
  .song-heading h1{font-size:21px;margin-bottom:0}
  .song-tools{padding-block:6px;margin-bottom:8px}
  .stage-heading{margin-bottom:6px}
  .transport{margin-top:8px;padding-block:9px}
}
body .stage .lyric-card.instrumental-card{min-height:0}

/* Readable chord labels; only numeric symbols carry the teaching colors. */
body .chord,body.dark .chord{color:var(--text);font-size:.84em;font-weight:800;line-height:1.4;min-height:1.4em}
body .chord.number{font-size:.76em}
.number-circle{color:var(--number-ink,#fff);margin-bottom:.08em;line-height:1;box-shadow:inset 0 0 0 1px #0002}
.instrumental-progression{color:var(--text);font-size:var(--lyric-size)}
.number-legend{gap:10px 22px;font-size:21px;line-height:1.4;padding:0 0 14px;max-height:110px;overflow:auto}
.number-legend>span{gap:9px}
.number-legend .number-circle{width:1.65em;height:1.65em;font-size:20px}
.number-legend strong{font-weight:750}
.editor-key{display:flex!important;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px!important}
.editor-key select{flex:1;min-width:165px}
.color-settings{margin:16px 0}
.map-item input[type=color]:disabled{opacity:1;cursor:default}

/* Arrangement controls also work without dragging (touch and keyboard). */
.arrangement-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;padding:0 8px 10px;color:var(--muted);font-size:10px}
.arrangement-tools button{font-size:10px;padding:3px 5px;min-height:28px;gap:4px}
.arrangement-tools svg{width:13px;height:13px}
.section-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;border-radius:9px;border:1px solid transparent}
.section-row .section-button{padding-inline:8px;gap:7px;min-width:0;cursor:grab}
.section-row .section-label{white-space:normal;line-height:1.3}
.section-row .section-button.active:after{display:none}
.section-menu-toggle{font-size:23px;min-height:44px;min-width:30px;padding:2px}
.section-menu{grid-column:1/-1;display:flex;flex-direction:column;gap:2px;background:var(--subtle);border:1px solid var(--border);border-radius:8px;padding:5px;margin-top:4px}
.section-menu button{text-align:left;justify-content:flex-start;font-size:12px;min-height:38px;padding:6px 10px}
.section-menu svg{width:15px;height:15px}
.section-row.drop-target{border-color:var(--blue);background:var(--blue-soft)}
.section-row.dragging{opacity:.4}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Larger everyday controls, including the text inside each selector. */
button{font-size:15px;min-height:44px}
select,input{font-size:16px;min-height:44px}
.song-tools{gap:18px 26px;padding-block:12px;margin-bottom:16px}
.tool-group{gap:10px}
.tool-label{display:inline;font-size:15px;color:var(--text);font-weight:600}
.stepper{height:44px}
.stepper button{width:42px;min-width:42px;min-height:42px;font-size:17px}
.stepper output{font-size:17px;min-width:40px}
.stepper #keyLabel{font-size:19px;min-width:56px}
.stepper svg{width:18px;height:18px}
.reset-transpose{min-height:40px;width:30px}
#displayMode{font-size:16px;min-height:44px;padding:9px 28px 9px 12px;max-width:230px}
.help-button{font-size:14px;min-height:44px}
.header-actions button{font-size:15px;min-height:44px}
.stage-heading{font-size:13px;margin-bottom:10px}
.section-button{font-size:15px;min-height:55px}
.section-button .section-number{font-size:13px}
.sidebar-label{font-size:12px}
.arrangement-tools{font-size:12px}
.arrangement-tools button{font-size:12px;min-height:36px}
.section-menu button{font-size:14px;min-height:44px}
.song-heading>p{font-size:14px}
.timing label>span,.timing small{font-size:12px}
.timing input{font-size:17px;min-height:40px;width:58px}
.timing .tap-tempo{font-size:14px;min-height:40px}
.tap-hint{font-size:11px}
.countdown-label{font-size:13px}
.bottom-hint{font-size:12px}
.source-side label,.settings-row label{font-size:14px}
.source-side textarea{font-size:15px}
.field-help,.source-side details,.settings-section p,.help-content p,.pdf-content>p,.library-help{font-size:14px}
.analysis-title h3,.settings-section h3{font-size:17px}
.analysis-section h4{font-size:15px}
.analysis-section h4 small,.structure-reason,.source-note{font-size:12px}
.section-kind-label{font-size:13px}
.section-kind-label select{font-size:14px;min-height:40px;max-width:180px}
.checkbox,.help-content ol{font-size:15px}
.map-item label{font-size:13px}
.map-item input[type=text]{font-size:16px;min-height:40px}
@media(max-width:740px){
  .song-tools{gap:10px 14px;margin-bottom:10px;padding-block:10px}
  .tool-label{display:inline;font-size:14px}
  .font-control{margin-left:0}
  .stepper button{width:36px;min-width:36px}
  .stepper #keyLabel{min-width:48px}
  #displayMode{font-size:16px;max-width:195px}
  .song-actions button{min-height:44px}
  .header-actions .always-new{font-size:13px}
  .header-actions button{min-height:40px}
  .bottom-hint{display:none}
  .song-heading h1{font-size:26px}
}

/* Fullscreen dedicates the viewport to lyrics and a single compact transport. */
.exit-fullscreen{display:none}
body.focus-screen .app-header,body.focus-screen .sidebar,body.focus-screen .song-top,body.focus-screen .song-tools,body.focus-screen .number-legend,body.focus-screen .stage-heading,body.focus-screen .bottom-hint,body.focus-screen .timing{display:none!important}
body.focus-screen .workspace{grid-template-columns:minmax(0,1fr);height:auto;min-height:0}
body.focus-screen main{max-width:none;width:100%;padding:10px 14px 6px}
body.focus-screen .stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:18px;overflow:hidden}
body.focus-screen .stage .lyric-card{min-height:0;height:100%;max-height:100%;overflow:auto;margin:0;border:0;border-radius:0;box-shadow:none;padding:8px 12px 12px;background:transparent}
body.focus-screen .stage .lyric-card.instrumental-card{height:auto}
body.focus-screen .card-top{display:none}
body.focus-screen .lyric-card h2{font-size:14px;line-height:1.3;margin:0 0 12px;color:var(--muted)}
body.focus-screen .lyrics{font-size:var(--lyric-size)}
body.focus-screen .transport{margin:6px 0 0;padding:5px 0 0;border:0;border-top:1px solid var(--border);box-shadow:none;border-radius:0;background:transparent;flex-wrap:nowrap;gap:12px;position:static}
body.focus-screen .play-controls{flex:0 1 auto;gap:5px}
body.focus-screen .play-button{min-width:140px;flex:0 1 auto}
body.focus-screen .play-controls button{min-height:40px}
body.focus-screen .countdown{flex:1 1 160px;max-width:340px;min-width:55px;order:0;padding:0}
body.focus-screen .countdown-label{margin-bottom:5px}
body.focus-screen .countdown-label output{font-size:18px}
body.focus-screen .exit-fullscreen{display:inline-flex;flex:none;margin-left:auto;min-height:40px}
@media(max-width:640px){
  .number-legend{font-size:20px;gap:8px 15px}
  body.focus-screen main{padding:6px 7px 5px}
  body.focus-screen .stage{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:12px}
  body.focus-screen .stage .lyric-card{padding:5px 7px 8px}
  body.focus-screen .transport{gap:6px}
  body.focus-screen .play-button{min-width:44px;width:44px;padding:8px}
  body.focus-screen .play-button span,body.focus-screen .exit-fullscreen span,body.focus-screen .countdown-label>span,body.focus-screen #restart{display:none}
  body.focus-screen .play-controls .icon-only{width:44px;min-width:44px}
  body.focus-screen .countdown{max-width:130px}
  body.focus-screen .countdown-label{justify-content:flex-end}
  body.focus-screen .exit-fullscreen{width:44px;padding:8px}
}
@media(max-width:640px) and (orientation:landscape){
  body.focus-screen .stage{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
}

.tempo-dialog{width:560px}
.tempo-content{padding:20px 28px 24px;text-align:center}
.tempo-content>p{font-size:16px;line-height:1.6;margin:0 auto 16px;max-width:420px}
.tempo-reading{display:flex;align-items:baseline;justify-content:center;gap:12px;margin:18px 0 3px}
.tempo-reading output{font-size:76px;line-height:1.1;font-weight:800;letter-spacing:-3px;font-variant-numeric:tabular-nums}
.tempo-reading>span{font-size:20px;color:var(--muted);font-weight:650}
#tempoCount{min-height:26px;font-size:15px;color:var(--muted)}
.tempo-pad{display:flex;flex-direction:column;justify-content:center;gap:10px;width:100%;min-height:155px;border-radius:16px;font-size:18px;touch-action:manipulation;user-select:none}
.tempo-pad strong{font-size:26px}
.tempo-pad>span:last-child{font-size:14px;border:1px solid #ffffff80;border-radius:5px;padding:2px 24px}
.beat-light{width:12px;height:12px;background:#fff7;border-radius:50%}
.tempo-pad.tapped{background:#003f8f;box-shadow:inset 0 0 0 4px #a2c7ff}
.tempo-pad.tapped .beat-light{background:#fff;box-shadow:0 0 0 5px #ffffff35}
.tempo-restart{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:18px}
.tempo-restart p{font-size:13px;color:var(--muted);margin:0}
@media(max-height:650px){.tempo-content{padding-block:12px}.tempo-reading{margin-top:8px}.tempo-reading output{font-size:56px}.tempo-pad{min-height:100px;gap:5px}.tempo-content>p{margin-bottom:8px}}

/* One prominent entrance to the text display, with its label visible on phones. */
.song-actions{flex:none;align-items:center}
.song-actions .fullscreen-primary{min-height:48px;min-width:152px;font-size:17px;font-weight:750;padding:12px 20px;gap:10px}
.song-actions .fullscreen-primary>span{display:inline}
.song-actions .fullscreen-primary svg{width:22px;height:22px}
@media(max-width:740px){
  .song-top{flex-wrap:wrap;align-items:center;gap:12px}
  .song-heading{flex:1 1 160px}
  .song-actions{margin-left:auto}
  .song-actions .fullscreen-primary{min-width:142px;min-height:48px;font-size:16px;padding-inline:16px}
}

/* Supporting text must be readable at the same distance as the main controls. */
.eyebrow,.dialog-header .eyebrow{font-size:14px;line-height:1.4;letter-spacing:.045em}
#songEyebrow{font-size:18px;line-height:1.4;font-weight:650;letter-spacing:0;color:var(--text);margin:0 0 8px}
.app-header .app-name{font-size:19px;line-height:1.35}
.beta{font-size:12px;letter-spacing:.06em;padding:4px 6px}
.song-heading>p{font-size:16px;line-height:1.5}
.card-top .eyebrow,.card-number{font-size:14px;line-height:1.4}
.stage-heading{font-size:15px}
.sidebar-label{font-size:14px;letter-spacing:.04em}
.arrangement-tools,.arrangement-tools button{font-size:14px}
.sidebar-foot p{font-size:13px;line-height:1.5}
.tap-hint,.timing label>span,.timing small{font-size:13px}
.countdown-label,.bottom-hint,.footer-note{font-size:14px}
.analysis-section h4 small,.structure-reason,.source-note,.saved-song small{font-size:14px}
.pill{font-size:13px}
.analysis-error,.warning{font-size:14px}
.tool-label{font-size:16px}
.song-actions .fullscreen-primary{font-size:19px}
body.focus-screen .lyric-card h2{font-size:16px}
@media(max-width:740px){
  #songEyebrow{font-size:17px}
  .song-heading>p{font-size:15px}
  .tool-label{font-size:15px}
  .song-actions .fullscreen-primary{font-size:18px}
}

/* Equal, explicit navigation in both directions, including fullscreen. */
.play-controls .section-navigation{width:auto;min-width:116px;min-height:44px;padding:10px 12px;font-size:14px;gap:7px}
.play-controls .section-navigation svg{width:22px;height:22px}
.play-controls .section-navigation:disabled{opacity:.55}
body.focus-screen .play-controls .section-navigation{width:auto;min-width:116px;min-height:44px}
@media(max-width:740px){
  .play-controls .section-navigation,body.focus-screen .play-controls .section-navigation{width:44px;min-width:44px;padding:10px}
  .play-controls .section-navigation span{display:none}
}

/* Direct, reversible control over the suggested song structure. */
.review-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0}
.review-toolbar button{min-height:44px;font-size:15px}
.review-toolbar span{font-size:14px;line-height:1.5;color:var(--muted)}
.review-tools{margin-top:16px;border-top:1px solid var(--border);padding-top:14px}
.split-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-bottom:10px}
.split-controls label{display:flex;flex-direction:column;gap:7px;flex:1 1 190px;min-width:0;font-size:14px;font-weight:600}
.split-controls select{width:100%;min-width:0;max-width:100%;font-size:15px;min-height:44px;text-overflow:ellipsis}
.review-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.review-tools button{min-height:44px;font-size:15px;white-space:normal}
.review-delete{color:#ad3542}
body.dark .review-delete{color:#ff9eaa}
.analysis-section{padding:16px}
.analysis-section h4{font-size:17px;align-items:baseline;flex-wrap:wrap}
.analysis-section details{font-size:15px;line-height:1.6}
.analysis-section summary{padding:6px 0}
.section-kind-label{font-size:15px;flex-wrap:wrap}
.section-kind-label select{font-size:16px;min-height:44px}
.song-info{font-size:15px;line-height:1.6;padding:12px;border:1px solid var(--border);border-radius:10px}
.song-info summary{cursor:pointer;font-weight:650}
@media(max-width:740px){.review-actions button{flex:1 1 140px}.split-controls>button{width:100%}}

/* A source lyric line is one visual line; chord anchors cannot break it. */
.lyrics{max-width:100%;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.lyric-line{flex-wrap:nowrap;white-space:pre;width:max-content;min-width:100%;overflow-wrap:normal;word-break:normal;break-inside:avoid}
.lyric-word,.lyric-piece{flex-shrink:0;max-width:none}
.lyric-piece>.lyric-text{white-space:pre;overflow-wrap:normal;word-break:normal}
.lyrics-only .lyric-line{white-space:pre}
.review-toolbar{position:sticky;top:0;z-index:2;padding:10px 0;background:var(--bg)}

.home-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:15px;font-weight:650;min-height:40px;padding:7px 10px;border-radius:8px;white-space:nowrap}
.home-link:hover{background:var(--blue-soft)}
.header-home img{display:block;flex:none}
.site-footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:1px 24px;border-top:1px solid var(--border);background:var(--surface);font-size:13px;color:var(--muted)}
body.focus-screen .site-footer{display:none!important}
@media(max-width:1000px){.header-home>span:first-of-type{display:none}.header-home{padding:7px;gap:3px}}
@media(max-width:740px){.site-footer{padding:0 12px;justify-content:center}.site-footer>span{display:none}.site-footer .home-link{font-size:14px;min-height:36px}.header-home{min-height:40px}}
.bar-mark{font-weight:500;color:var(--muted);padding-inline:.12em;white-space:pre}
.section-card-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:18px}
.section-card-heading h2{margin:0}
.edit-section-button{font-size:14px;min-height:40px}
body.focus-screen .edit-section-button{display:none}
.section-edit-dialog{width:880px}
.section-edit-content{padding:22px 26px}
.section-edit-content>label{display:block;font-size:16px;font-weight:650;margin:20px 0 9px}
.section-edit-content textarea{display:block;width:100%;resize:vertical;min-height:220px;font:16px/1.8 ui-monospace,monospace;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--bg);color:var(--text);white-space:pre;overflow-wrap:normal}
.section-edit-content .settings-row{flex-wrap:wrap;align-items:end}
.section-edit-content .settings-row label{flex:1 1 150px;min-width:0;font-size:15px}
.section-edit-content h3{font-size:17px}
#sectionEditPreview .lyrics{font-size:22px}
.review-tools>.primary{margin-bottom:13px;width:100%}
@media(max-width:740px){.section-edit-content{padding:18px}.section-card-heading{flex-wrap:wrap}}
.pdf-dialog{width:760px}
.pdf-dialog>.dialog-footer{position:sticky;bottom:0;background:var(--surface);z-index:1;flex-wrap:wrap}
#fileImportError,#pdfImportError{font-size:15px;line-height:1.6}
.pdf-book-tools,.book-selection-tools,.library-book-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0;align-items:center}
.library-book-actions{padding:0 28px}
.pdf-book-tools button,.book-selection-tools button{font-size:15px;min-height:44px}
#pdfBookPicker{padding:16px;border:1px solid var(--border);border-radius:12px;margin:18px 0;background:var(--bg)}
#pdfBookPicker>label{display:block;font-size:15px;font-weight:650}
#pdfSongSearch{display:block;width:100%;margin:8px 0;font-size:16px}
.book-song-list{max-height:330px;overflow:auto;margin-bottom:14px}
.book-song{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--border);padding:9px 0}
.book-song>label{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer;font-size:17px;font-weight:600}
.book-song input{min-height:24px;width:24px;height:24px;flex:none;accent-color:var(--blue)}
.book-song small{display:block;font-size:13px;font-weight:400;color:var(--muted);margin-top:4px}
.book-song button{font-size:15px;min-height:44px}
.pdf-range-title{font-size:17px;margin-top:24px}
.pdf-range-title summary{cursor:pointer;font-weight:650;padding:12px 0}
#pdfReadRange{margin-top:16px}
.pdf-selection-summary{margin:0;padding:12px 25px;background:var(--subtle);font-size:16px;line-height:1.5;max-height:100px;overflow:auto;border-top:1px solid var(--border)}
.import-queue-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 26px;background:var(--blue-soft);font-size:16px}
.import-queue-banner strong{overflow-wrap:anywhere}

/* A column contains as many complete source lines as fit, across sections. */
body #stage.reading-stage{display:grid;position:relative;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:14px;overflow:hidden;min-height:0}
body #stage .reading-column{box-sizing:border-box;min-width:0;min-height:0;height:100%;margin:0;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body #stage .reading-column:focus-visible{outline:3px solid #76acff;outline-offset:-3px}
body #stage .reading-column .lyrics{font-size:var(--lyric-size);line-height:1.4;font-weight:500;letter-spacing:-.3px}
body #stage .flow-line{padding:2px 5px 8px;border-left:3px solid transparent;min-width:0;break-inside:avoid}

body #stage .lyric-line{margin:0;min-height:1.4em}
body #stage .flow-section-heading{display:flex;align-items:center;gap:8px;min-width:0;padding:4px 8px 3px}
body #stage .flow-section-heading h2{flex:1;min-width:0;margin:0;font-size:15px;line-height:1.4;font-weight:650;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body #stage .edit-section-button{flex:none;min-height:28px;margin:0;padding:3px 5px;font-size:12px}
body #stage .instrumental-progression{flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;gap:12px;font-size:var(--lyric-size);line-height:1.3;padding:1px 0}
body #stage .instrumental-progression>span{flex:none}
body #stage .reading-measure{position:fixed;left:-100000px;top:0;visibility:hidden;pointer-events:none;height:auto!important;max-height:none;overflow:visible;display:block!important}
body #stage .empty-column{border-color:transparent;background:transparent}
body.focus-screen #stage .reading-column{border-color:transparent;background:transparent;border-radius:0}
body.focus-screen #stage .edit-section-button{display:none}
#timingEstimate,#sectionEditTimingHint{font-size:15px;line-height:1.6}
body #stage.reading-stage[data-columns="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
/* Keep every source lyric line on one visual row. Fit is measured below. */
body #stage .reading-column .lyrics{overflow:visible}
body #stage .reading-column .lyric-line{width:max-content;min-width:0;max-width:none;white-space:pre;flex-wrap:nowrap;overflow-wrap:normal}
body #stage .reading-column .lyric-word,body #stage .reading-column .lyric-piece{flex-shrink:0;max-width:none}
body #stage .reading-column .lyric-text,body #stage .reading-column .lyrics-only .lyric-line{white-space:pre;overflow-wrap:normal;word-break:normal}
body #stage .reading-column .instrumental-progression{flex-wrap:nowrap;white-space:nowrap;overflow:visible}
/* The performance surface never asks the musician to scroll. */
body #stage .reading-column{overflow:hidden}
body #stage .flow-line{touch-action:manipulation}
body #stage .reading-space-notice{font-size:16px;line-height:1.5;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px}
body #stage .reading-space-notice p{margin:0}

/* Import controls remain readable when the editor narrows. */
.field-row{flex-wrap:wrap}.field-row>label{flex:1 1 180px}.field-row>button{flex-shrink:0}
.restart-song{white-space:nowrap}
@media(max-width:620px){.restart-song span{display:none}.restart-song{min-width:42px}}

/* Equal breathing room in both columns; retain left-aligned chord anchors. */
body #stage .reading-column{padding:10px clamp(18px,2.4vw,46px)}
body #stage .flow-section-heading h2{font-size:clamp(20px,1.8vw,26px);font-weight:800;color:var(--text)}
.section-number{font-size:17px;font-weight:800}.section-label{font-size:17px;font-weight:750}
.pacing-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 0;font-size:16px}.pacing-bar>div{display:flex;gap:8px;flex-wrap:wrap}.pacing-bar output{margin-left:8px;font-variant-numeric:tabular-nums}.pacing-bar button{font-size:15px;min-height:38px}
body.focus-screen .pacing-bar{display:none}
@media(max-width:700px){body #stage .reading-column{padding-inline:16px}body #stage .flow-section-heading h2{font-size:21px}}

/* Reserve the normal view for a real lyric preview, not empty flex space. */
body:not(.focus-screen) .song-heading>.eyebrow,body:not(.focus-screen) .song-heading>p{display:none}
body:not(.focus-screen) .song-top{margin-bottom:10px;min-height:44px}
body:not(.focus-screen) .song-heading h1{margin:0;font-size:clamp(23px,2.2vw,30px)}
body:not(.focus-screen) main{padding-top:14px;padding-bottom:8px}
body:not(.focus-screen) .song-tools{margin-bottom:8px;padding-block:7px;gap:10px 18px}
body:not(.focus-screen) .stage-heading{margin-bottom:6px}
body:not(.focus-screen) .transport{margin-top:8px;padding:8px 10px;gap:8px}
body:not(.focus-screen) .bottom-hint{padding-top:5px}
.sidebar .pacing-bar{margin:16px 8px 0;padding:12px 0;border-top:1px solid var(--border);font-size:15px;gap:8px}.sidebar .pacing-bar output{display:block;margin:6px 0}.sidebar .pacing-bar>div{gap:6px}.sidebar .pacing-bar button{font-size:14px;padding:6px 8px}
.section-button .section-number{font-size:18px;font-weight:800}
.section-row .section-label{font-size:17px;font-weight:800}
@media(max-width:1250px){body:not(.focus-screen) .countdown{flex:1 1 110px;order:0;min-width:95px}.transport .tap-hint{display:none}.transport .timing{gap:6px}.transport .tap-tempo{min-width:95px}}
@media(max-height:850px){body:not(.focus-screen) .app-header{min-height:60px;padding-block:8px}body:not(.focus-screen) .site-footer{padding-block:6px}body:not(.focus-screen) .bottom-hint{display:none}}
@media(max-width:740px){body:not(.focus-screen) .app-header{min-height:58px;padding-block:7px}body:not(.focus-screen) main{padding:8px 12px}body:not(.focus-screen) .song-top{gap:8px;margin-bottom:7px}body:not(.focus-screen) .song-tools{gap:7px 12px;padding-block:6px}body:not(.focus-screen) .transport .timing{flex:1 1 45%;justify-content:flex-start}body:not(.focus-screen) .transport .countdown{flex:1 1 35%;min-width:100px}body:not(.focus-screen) .song-tools .tool-label{display:none}body:not(.focus-screen) .song-tools .font-control{margin:0}body:not(.focus-screen) .song-tools #displayMode{max-width:178px}}

.live-flow-speed{display:flex;flex-direction:column;gap:0;flex:0 1 160px;min-width:115px;font-size:13px;font-weight:650}.live-flow-speed>span{display:flex;justify-content:space-between;gap:8px}.live-flow-speed input{width:100%;min-width:0;min-height:28px;margin:0;padding:0;accent-color:var(--blue);cursor:pointer}.live-flow-speed output{font-variant-numeric:tabular-nums}body.focus-screen .live-flow-speed{flex:0 1 155px;font-size:13px}body.focus-screen .live-flow-speed input{min-height:30px}#meterShortcut{font-size:14px;white-space:nowrap}@media(max-width:740px){.live-flow-speed{flex:1 1 100px}body.focus-screen .transport{flex-wrap:wrap}body.focus-screen .live-flow-speed{flex:1 1 120px}body.focus-screen .countdown{display:none}}

.optional-tempo{margin:14px 8px;padding-top:12px;border-top:1px solid var(--border);font-size:14px}.optional-tempo>strong{display:block;margin-bottom:8px}.optional-tempo #meterShortcut{width:100%;justify-content:flex-start;padding:6px 0;white-space:normal}.sidebar .timing{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0;padding:0;border:0}.sidebar .timing label>span,.sidebar .timing small{display:inline}.sidebar .timing .tap-hint{display:none}.sidebar .timing .tap-tempo{min-width:110px}.sidebar .timing input{width:68px}body:not(.focus-screen) .transport .countdown{flex:1 1 110px;order:0}body:not(.focus-screen) .transport .play-controls{flex:0 1 auto}@media(max-width:740px){body:not(.focus-screen) .transport .play-controls{flex:1 0 100%}}

body .printed-beat{display:inline-block;color:var(--printed-color);font-weight:850;font-variant-numeric:tabular-nums;font-size:1em;text-shadow:0 0 .4px #0005}.lyric-text>.bar-mark{display:inline-block;color:var(--text);font-weight:700;padding:0 .07em;font-size:1.12em;line-height:1}.printed-legend{font-size:15px;font-weight:650}.number-legend:has(.printed-legend){padding-bottom:6px;max-height:35px}body.focus-screen .number-legend{display:none!important}

/* Compact harmonic symbols preserve the lyric size and original words. */
.degree-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.15em;height:1.18em;border-radius:.22em;padding:0 .12em;background:var(--chord-color);color:var(--number-ink);font-style:normal;font-weight:850;line-height:1}
.degree-badge sup{font-size:.68em;margin-left:.12em;align-self:flex-start;padding-top:.05em;font-weight:750;white-space:nowrap}
.chord-name{color:var(--text);font-weight:800;line-height:1.15}
body #stage .chord{min-height:1.18em;line-height:1.18;font-size:.78em;padding:0 .06em .07em 0}
body #stage .chord.number{font-size:.7em}
body #stage .lyric-piece:has(>.chord:only-child){padding:0}
.number-legend{max-height:64px;font-size:18px;padding-bottom:6px;gap:5px 15px}.number-legend .degree-badge{font-size:21px}.number-legend small{font-size:13px}
.column-control select{font-size:17px;min-height:42px}
.live-flow-speed,body.focus-screen .live-flow-speed{flex:0 1 220px;min-width:185px;font-size:15px}
.live-flow-speed>label{display:flex;justify-content:space-between;gap:8px}.flow-stepper{display:flex;align-items:center;gap:8px}.flow-stepper button{min-width:42px;width:42px;min-height:40px;padding:0;font-size:27px;font-weight:750;flex:none}.flow-stepper input{flex:1;min-width:60px}
.section-row{grid-template-columns:minmax(0,1fr) auto}.section-menu-toggle{font-size:13px;min-width:52px}.section-move{grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px;margin-top:-3px}.section-move button{font-size:22px;min-width:44px;min-height:34px;padding:0}.section-row .section-menu{grid-row:auto}
body #stage .flow-section-heading h2{white-space:normal;text-overflow:clip;font-size:clamp(18px,calc(var(--lyric-size)*.7),26px)}

.bar-toggle,.performance-display label{display:flex;align-items:center;gap:7px;font-size:15px;white-space:nowrap}.bar-toggle input,.performance-display input{width:20px;height:20px;min-height:20px;accent-color:var(--blue)}
.performance-display{display:none}body.focus-screen .performance-display{display:flex;align-items:center;gap:10px}body.focus-screen .performance-display select{font-size:16px;min-height:40px;max-width:175px;padding:6px 9px}.flow-section-heading small{font-size:.72em;color:var(--muted);white-space:nowrap}
@media(max-width:1150px){body.focus-screen .transport .countdown{display:none}.performance-display label{font-size:13px}body.focus-screen .performance-display{gap:6px}}

.sidebar-book{white-space:normal;text-align:left;font-size:14px;margin:10px 4px;overflow-wrap:anywhere}.library-books-title{margin:16px 24px 4px}#savedBooks{padding:8px 24px}.saved-book{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}.saved-book>div{flex:1;min-width:0;overflow-wrap:anywhere}.saved-book strong{font-size:17px}.saved-book small{display:block;margin-top:5px;color:var(--muted);font-size:13px}.saved-book button{flex:none;min-height:44px}

body #stage .intact-word{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;white-space:pre;flex-shrink:0}body #stage .intact-word>.chord{white-space:nowrap;flex:none}body #stage .intact-word>.lyric-text{white-space:pre;flex:none}.analysis-section .intact-word,#sectionEditPreview .intact-word{display:inline-flex;flex-direction:column;vertical-align:top}

/* Möppur lagasafns, eingöngu geymdar í þessum vafra. */
.library-dialog{width:min(960px,calc(100vw - 24px))}
.library-manager{padding:16px 25px}.library-toolbar,.folder-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.library-toolbar h3,.folder-heading h4{margin:0;font-size:17px}.folder-heading h4{overflow-wrap:anywhere}
.library-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:20px;margin-top:16px}.folder-tree{display:flex;flex-direction:column;gap:4px;min-width:0}.folder-tree button{justify-content:space-between;text-align:left;white-space:normal;padding-left:calc(10px + var(--folder-depth)*12px)}.folder-tree button span{overflow-wrap:anywhere}.folder-tree button[aria-current="page"]{background:var(--blue-soft);color:var(--blue)}.folder-tree small{flex:none;color:var(--muted)}.folder-content{min-width:0}.folder-content #savedSongs{padding:8px 0}.saved-song{gap:12px;flex-wrap:wrap}.saved-song>button:first-child{min-width:100px}.song-folder-label{font-size:12px;color:var(--muted);flex:0 1 190px}.song-folder-label select,.folder-form input,.folder-form select{display:block;width:100%;min-height:40px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);padding:7px}.folder-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;margin-top:12px;background:var(--subtle);border-radius:10px}.folder-form label{min-width:0;font-size:14px}.folder-form>div{grid-column:1/-1;display:flex;gap:8px}.folder-form[hidden]{display:none}#libraryStatus{font-size:14px;color:var(--muted)}
.lyric-word{white-space:pre;flex-shrink:0;word-break:normal;hyphens:none}
@media(max-width:640px){.library-layout{grid-template-columns:1fr}.folder-tree{max-height:200px;overflow-y:auto}.folder-form{grid-template-columns:1fr}.library-manager{padding:16px}.song-folder-label{flex-basis:100%}}

@media(max-width:640px){body.focus-screen #restart{display:inline-flex;min-width:40px;padding:6px}body.focus-screen #restart span{display:none}.performance-display{flex:1 1 auto}body.focus-screen .live-flow-speed{flex:1 1 185px}body.focus-screen .play-controls .section-navigation{min-width:40px;width:40px;padding:6px}body.focus-screen .play-controls .section-navigation span{display:none}}

/* Tempo discovery and pace adjustment remain together in both reading modes. */
.pace-controls{display:flex;align-items:center;gap:12px;flex:0 1 360px;min-width:295px}.pace-controls .tap-tempo{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:8px 10px;font-size:15px;white-space:nowrap}.pace-controls .tap-control{flex:none}.pace-controls .live-flow-speed{flex:1;min-width:170px}.pace-controls .tap-hint{display:none}@media(max-width:1250px){body.focus-screen .transport{flex-wrap:wrap}}@media(max-width:740px){.pace-controls{flex:1 1 295px;gap:8px}}
.sidebar-panel{padding:8px 4px;min-width:0}.sidebar-panel[hidden],#sectionsPanel[hidden]{display:none}.sidebar-panel h2{font-size:22px;margin:8px 0 16px}.sidebar-panel>button{width:100%;margin-bottom:12px;white-space:normal}.sidebar-panel p{font-size:15px;line-height:1.5}.sidebar-panel>label{display:block;font-size:14px;margin:12px 0}.sidebar-panel select{display:block;width:100%;margin-top:8px;font-size:15px}.book-song-row{display:flex;align-items:center;border-bottom:1px solid var(--border);gap:2px}.book-song-row>button:first-child{flex:1;min-width:0;justify-content:flex-start;text-align:left;white-space:normal;padding:12px 5px;font-size:16px}.book-song-row small{color:var(--muted);margin-right:8px}.book-song-row [aria-current="true"]{color:var(--blue);font-weight:750;background:var(--subtle)}.book-song-row>.quiet{padding:6px;min-width:28px}.book-actions{display:flex;flex-wrap:wrap;gap:10px;padding:12px 24px}.book-message,.own-songbooks{margin:12px 24px}.songbook-form{margin:12px 24px;padding:16px;border:1px solid var(--border);border-radius:12px}.songbook-form>label{display:flex;flex-direction:column;gap:8px}#songbookChoices{max-height:260px;overflow:auto}#songbookChoices>label{display:flex;align-items:center;gap:10px;padding:8px}#songbookChoices input{width:22px;min-height:22px}.book-navigation{display:flex;flex:0 0 auto;align-items:center;gap:12px;padding:5px 0}.book-navigation[hidden]{display:none}.book-navigation>label{display:flex;align-items:center;justify-content:center;gap:12px;flex:1;min-width:0}.book-navigation select{max-width:360px;min-width:0;font-size:15px}.book-navigation span{font-size:14px;color:var(--muted)}body.focus-screen .book-navigation{padding:3px 0}body.focus-screen .book-navigation button{min-height:34px;padding:5px 9px}@media(max-width:740px){.book-navigation span{display:none}.book-navigation{gap:5px}.book-navigation select{width:100%}.book-navigation button{font-size:13px;padding:6px;white-space:nowrap}.header-actions #library span{display:inline}}
.book-navigation{flex-wrap:wrap;border-top:1px solid var(--border);margin-top:5px}.upcoming-songs{display:flex;align-items:center;gap:8px;flex:1 0 100%;overflow-x:auto;min-width:0;max-height:100px;padding:4px 0 8px}.upcoming-songs[hidden]{display:none}.upcoming-songs>p{font-size:13px;max-width:170px;flex:none;margin:0;color:var(--muted)}.queue-song{display:flex;align-items:center;gap:3px;flex:none;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:4px 8px;cursor:grab}.queue-song strong{font-size:14px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue-song button{padding:4px;min-width:32px}.book-navigation>label{flex:1 1 200px}body.focus-screen .book-navigation>label>span{display:none}

#nextSong{flex-direction:column;gap:1px}#nextSongName{font-size:12px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}#appendSingleLabel{display:flex;align-items:center;gap:8px}#appendSingleLabel[hidden]{display:none}#appendSingleToBook{width:20px;min-height:20px;flex:none}
/* Three columns use column-relative margins, not page-wide gutters. */
body #stage.reading-stage[data-columns="3"] .reading-column{padding-inline:clamp(8px,1vw,18px)}
body #stage.reading-stage[data-columns="3"] .flow-line{padding-inline:2px}
.performance-options{display:none;position:relative;flex:none}
body.focus-screen .performance-options{display:block}
.performance-options>summary{cursor:pointer;list-style:none;border:1px solid var(--border);border-radius:8px;padding:10px 14px;background:var(--surface);font-size:16px;font-weight:650}
.performance-options>summary::-webkit-details-marker{display:none}
body.focus-screen .performance-options>.performance-display{position:absolute;bottom:calc(100% + 10px);right:0;z-index:10;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px;width:min(420px,85vw);border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 8px 30px #0002}
body.focus-screen .transport{flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
body.focus-screen .transport .play-controls{flex:0 1 auto;gap:5px;min-width:0}
body.focus-screen .transport .section-navigation{width:42px;min-width:42px;padding:8px}
body.focus-screen .transport .section-navigation span,body.focus-screen .transport #restart span,body.focus-screen .exit-fullscreen span{display:none}
body.focus-screen .transport #restart,body.focus-screen .exit-fullscreen{min-width:42px;width:42px;padding:8px}
body.focus-screen .transport .countdown{flex:1 1 95px;order:0;min-width:85px;max-width:180px}
body.focus-screen .transport .countdown-label>span{display:none}
body.focus-screen .transport .pace-controls{flex:1 1 310px;min-width:275px;max-width:385px}
body.focus-screen .transport .live-flow-speed{min-width:155px}
body.focus-screen .transport .play-button{min-width:130px}
@media(max-width:740px){body.focus-screen .transport .countdown{display:none}.performance-options>summary{padding:9px;font-size:14px}body.focus-screen .performance-options>.performance-display{position:fixed;bottom:140px;right:12px}body.focus-screen .transport .pace-controls{max-width:none}}
.performance-options:not([open])>.performance-display{display:none!important}
