/* Keep ordinary dialogs within the screen without changing reader gestures. */
html.dialogScrollLocked{overscroll-behavior:none;scrollbar-gutter:auto}
#dialog:not(.scoreReaderDialog):not(.lyricsViewerDialog){overflow-x:hidden;overscroll-behavior:contain;max-width:calc(100% - 20px);max-height:calc(100dvh - 24px)}
#dialog #modal{min-width:0;overflow-wrap:anywhere}
#dialog:not(.scoreReaderDialog) input,#dialog:not(.scoreReaderDialog) select,#dialog:not(.scoreReaderDialog) textarea{min-width:0;max-width:100%}
#dialog:not(.scoreReaderDialog) .grid>*{min-width:0}
.loginEmailRow{display:flex;align-items:center;justify-content:space-between;gap:10px}.loginEmailRow>span{min-width:0;overflow-wrap:anywhere}.loginEmailRow button{flex:none;min-height:34px;padding:5px 10px}
/* Score-first practice player. The control sheet floats above its compact bar. */
.practiceReaderDialog .practicePlayer{position:relative;max-height:none;overflow:visible;padding:7px 12px calc(7px + env(safe-area-inset-bottom));background:#f5f2f4f5;pointer-events:auto;min-width:0}
.practiceTransport{display:flex;gap:8px;align-items:center;min-width:0}.practiceTransport button{min-height:36px;padding:6px 10px;font-size:13px}.practiceSeekLabel{flex:1;min-width:30px;margin:0!important;display:block}.practiceSeekLabel input{width:100%;min-height:28px;height:28px;margin:0;padding:0;accent-color:#765968}.practiceTransport #practiceTime{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted)}
.srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.practiceFollowBar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-height:29px;font-size:12px}.practiceFollowBar label{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:500;margin:0}.practiceFollowBar input{width:17px!important;margin:0}.practiceFollowBar button{margin-left:auto;min-height:28px;padding:3px 7px;font-size:11px;background:var(--soft);color:var(--dark)}
.practiceReaderDialog .practiceSettings{position:absolute;bottom:100%;right:8px;left:8px;max-width:720px;margin-left:auto;max-height:min(60dvh,580px);overflow-y:auto;overscroll-behavior:contain;background:#faf8fafc;border:1px solid var(--line);border-radius:14px;box-shadow:0 -6px 25px #30203018;padding:12px;pointer-events:auto;color:var(--ink);z-index:8}
.practiceSettingsHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.practiceSettingsHead b{font-size:14px;font-weight:550}.practiceSettingsHead button{min-height:30px;padding:3px 9px;background:var(--soft);color:var(--dark)}
.practiceReaderDialog .practiceSettings .scoreControls{position:static;display:flex;grid-area:auto;pointer-events:auto;margin:10px 0;padding:4px 0;flex-wrap:wrap;gap:6px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.practiceSettings .practiceFollow{margin:0}.practiceSettings .practiceVoices{flex-wrap:wrap;overflow:visible}.practiceSettings .practiceRecording{gap:8px}.practiceSettings label{font-weight:500}.practiceSettings input,.practiceSettings select{font-size:16px}
.practiceRepeatRange,.practiceEditorTabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.practiceRepeatRange label{display:flex;gap:5px;align-items:center;margin:0}.practiceEditorTabs button{background:var(--soft);color:var(--dark)}.practiceEditorTabs button[aria-pressed=true]{background:var(--accent);color:white}
.practiceRegionRow{display:flex;align-items:center;gap:6px;margin:4px 0}.practiceRegionRow>button:first-child,.practiceRegionRow>span{flex:1;text-align:left}.practiceRegionRow>button:first-child{background:var(--soft);color:var(--dark)}
#practiceRegionList,#practiceMarkerList{max-height:150px;overflow:auto;overscroll-behavior:contain;margin:6px 0}#practiceMeasureNumber{width:90px}#practiceLoopStatus{font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding-top:4px}#practiceLoopStatus button{min-height:26px;padding:3px 8px;font-size:11px}
.practiceScoreLine.isPrepared{outline:1px dashed #76596888;background:#7659680b!important}.practiceScoreLine.isPrepared span{position:absolute;left:0;top:0;font-size:10px;line-height:1;background:#765968;color:white;padding:2px;border-radius:2px}.practiceScoreLine.isCurrent{background:#76596830!important;outline:2px solid #765968b0;box-shadow:inset 0 0 0 1px #fff8!important}.practiceCorner{position:absolute;width:9px;height:9px;border-radius:50%;background:#765968;transform:translate(-50%,-50%)}
.practiceReaderDialog .practicePlayer [hidden]{display:none!important}
.practiceReaderDialog .scoreChoice{min-width:0;overflow:hidden;text-overflow:ellipsis}
#practiceQuickPrepare{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding-top:5px;border-top:1px solid var(--line);font-size:11px}#practiceQuickPrepare>span{flex-basis:100%;color:var(--muted)}#practiceQuickPrepare button{min-height:30px;padding:4px 8px;font-size:12px}#practiceQuickPrepare button:last-child{margin-left:auto;background:var(--soft);color:var(--dark)}
@media(max-width:1024px){#dialog:not(.scoreReaderDialog) input,#dialog:not(.scoreReaderDialog) select,#dialog:not(.scoreReaderDialog) textarea{font-size:16px}}
@media(max-width:480px){.practiceReaderDialog .scoreTitle{display:none}.practiceReaderDialog .scoreChoice{flex:1;max-width:none;width:auto}.practiceReaderDialog .practicePlayer{padding-left:8px;padding-right:8px}.practiceTransport{gap:6px}.practiceTransport #practiceTime{font-size:10px}.practiceMarkerRow{flex-wrap:wrap}.practiceMarkerRow label{font-size:11px}.practiceFollowBar{gap:5px}#practicePosition{font-size:11px}}
