/* High-contrast, comfortably sized controls while keeping the notation white. */
body.score-editing #studioTopbar { background:#fff; color:#111; border-color:#aaa; }
body.score-editing #studioTopbar button,
body.score-editing #studioTopbar select,
body.score-editing #studioTopbar input { font-size:14px; min-height:38px; height:auto; }
body.score-editing #studioTopbar label { color:#222; font-size:13px; }
body.score-editing #studioPanelTabs { background:#f2f2f2; border-color:#aaa; }
body.score-editing #studioPanelTabs button { font-size:14px; min-height:36px; }
body.score-editing #studioPanelTabs .panel-part-name { color:#222; font-size:13px; }
body.score-editing .arrangement-part strong { font-size:14px; color:#111; }
body.score-editing .arrangement-part small { font-size:12px; color:#333; }
body.score-editing #engravedTimeline .engraved-hit.engraved-selected { fill:#c9d8c9; fill-opacity:.5; stroke:#222; stroke-width:1.5; }
body.score-editing #centralnotation { background:#fff; touch-action:pan-x pan-y; }
@media(max-width:650px) {
 body.score-editing #studioTopbar button, body.score-editing #studioTopbar select { min-height:40px; }
 body.score-editing #studioTopbar label { font-size:12px; }
}

/* Colour follows each part, using the same palette as the website piano. */
body.score-editing #arrangementOverview { background:#0a0a0a!important; padding:5px 0; }
body.score-editing .arrangement-ruler { background:#111!important; color:#eee!important; }
body.score-editing .arrangement-row,
body.score-editing .arrangement-row:hover,
body.score-editing .arrangement-row.selected-arrangement { background:#151515!important; border-color:#333!important; }
body.score-editing .arrangement-part,
body.score-editing .arrangement-part strong,
body.score-editing .arrangement-part small { color:#f7f7f7!important; }
body.score-editing .arrangement-part { background:#161616!important; border-color:#444!important; }
body.score-editing .arrangement-part[aria-pressed=true] { box-shadow:inset 4px 0 #fff; background:#262626!important; }
body.score-editing .arrangement-lane { background-color:#1a1a1a!important; }
body.score-editing .measure-box.has-music {
  background:var(--track-colour)!important; background-clip:padding-box!important;
  border:3px solid transparent!important; border-radius:7px!important;
}
body.score-editing .measure-box.has-music>span { color:#111!important; opacity:.9; font-size:11px; font-weight:600; }
body.score-editing .measure-box.has-music:hover { filter:brightness(1.08); }
body.score-editing .measure-box.selected-measure { outline:2px solid #fff; outline-offset:-4px; z-index:3; }
body.score-editing .overview-note { background:#111!important; opacity:.6; height:4px; z-index:2; }
body.score-editing #centralblocks .central-block { background:var(--block-colour)!important; color:#111!important; border:1px solid #1115!important; }
body.score-editing #centralblocks .central-block span { color:#111!important; font-weight:600; }

/* Keep the interactive piano aligned with the website's pressed-key colours. */
[data-beatroot-piano] [data-beatroot-key]:is(.pressed,.is-playing,.playing,.sounding,[data-pressed=true]) {
  background:var(--note-colour,#cccccc)!important; color:#080808!important; outline:0!important;
}
@media(hover:hover) and (pointer:fine) {
  [data-beatroot-piano] [data-beatroot-key]:hover { background:var(--note-colour,#cccccc)!important; color:#080808!important; outline:0!important; }
}
.note-colour-control{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;padding:6px 9px;color:#111;background:#fff;border:1px solid #aaa;border-radius:5px;font-size:14px}
.note-colour-control input{width:18px;height:18px;accent-color:#111}
#studioEditTools .note-colour-control input{width:18px!important;min-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important}
/* Compact overview bars; custom two-finger zoom stays inside the overview. */
#arrangementOverview{touch-action:pan-y}
body.score-editing #arrangementOverview .arrangement-row,body.score-editing #arrangementOverview .arrangement-lane{min-height:62px;height:62px}
body.score-editing #arrangementOverview .arrangement-part{padding:6px 8px}
body.score-editing #arrangementOverview .measure-box{min-height:0;height:100%}
#overviewZoomTools{display:flex;align-items:center;gap:6px;margin-left:auto;font-size:12px;white-space:nowrap}
#overviewZoomTools button{min-width:34px;min-height:34px;padding:3px 9px}
#overviewZoomTools output{min-width:44px;text-align:center}
#overviewZoomTools small{font-size:11px;color:#bbb}
@media(max-width:600px){#overviewZoomTools small{display:none}#overviewZoomTools{gap:4px}body.score-editing #arrangementOverview .arrangement-row,body.score-editing #arrangementOverview .arrangement-lane{min-height:56px;height:56px}}
#overviewSectionTools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 0;color:#eee;font-size:12px}
#overviewSectionTools button{min-height:34px;padding:5px 9px;font-size:12px}
#overviewSectionTools button[aria-pressed=true]{background:#fff;color:#000;outline:2px solid #cccccc}
#overviewSectionHint{font-size:11px;color:#bbb}
#arrangementOverview .measure-box{touch-action:none;cursor:grab}
#arrangementOverview.moving-section .measure-box{cursor:grabbing}
#arrangementOverview .section-drop-target{outline:3px dashed #fff!important;outline-offset:-5px!important;z-index:8}
.overview-section-name{position:absolute;top:2px;z-index:10;pointer-events:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;font-weight:700;padding:2px 5px;background:#000b;color:white;box-sizing:border-box}
#sectionNameDialog{width:min(380px,90vw);background:white;color:black;border:1px solid #888;border-radius:7px;padding:20px}
#sectionNameDialog input{width:100%;margin:8px 0 16px;padding:9px;box-sizing:border-box}
#sectionNameDialog form>div{display:flex;gap:8px}
body.score-editing #scoreHelp{display:flex;align-items:baseline;gap:8px;background:#000!important;color:#fff!important;border-top:1px solid #333;padding:7px 10px;font-size:12px;line-height:1.35;min-height:30px;box-sizing:border-box}
#scoreHelpTitle{color:#fff;white-space:nowrap;font-size:12px}
#scoreHelpText{color:#fff;min-width:0}
@media(max-width:600px){body.score-editing #scoreHelp{font-size:11px;padding:6px 8px;gap:6px}#scoreHelpTitle{font-size:11px}}
#pageOrientationControl{display:flex;align-items:center;gap:5px;font-size:12px;color:inherit;margin:0 6px}
#pageOrientationControl[hidden]{display:none!important}
#pageOrientation{width:auto;padding:4px;font-size:12px;min-height:30px}
body.full-score-workspace #centralnotation{overflow:auto!important;background:#111!important;touch-action:pan-x pan-y;padding:14px;box-sizing:border-box}
#pagedScoreHost{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:18px;padding-bottom:24px}
body.full-score-workspace #centralnotation #pagedScoreHost svg{display:block;background:#fff;width:min(100%,1000px)!important;min-width:0!important;height:auto!important;flex:none;box-shadow:0 0 0 1px #aaa;user-select:none}
#pagedScoreHost .page-note-hit{fill:transparent;stroke:transparent;cursor:grab;pointer-events:all;touch-action:none}
#pagedScoreHost .page-note-hit.engraved-selected{fill:#74b9ff35;stroke:#1769ba;stroke-width:1}
#pagedScoreHost .page-playing-note{stroke:#333333;stroke-width:2}
#studioMainTools #inlineScoreTitle{width:210px;max-width:32vw;border:1px solid transparent;background:transparent;color:#111;font-size:15px;font-weight:600;padding:5px;min-width:100px}
#studioMainTools #inlineScoreTitle:hover,#studioMainTools #inlineScoreTitle:focus{border-color:#999;background:#fff}
#arrangementOverview .inline-part-row{display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0;padding:6px 7px}
#arrangementOverview .inline-line-name{display:block;width:100%;min-width:0;font-size:14px;font-weight:600;background:transparent;color:#fff;border:1px solid transparent;padding:3px;margin:0;box-sizing:border-box}
#arrangementOverview .inline-line-name:hover,#arrangementOverview .inline-line-name:focus{border-color:#aaa;background:#222}
#arrangementOverview .inline-part-row button{min-height:22px;font-size:11px;padding:1px 3px;text-align:left;border:0;background:transparent;color:#ddd}
#fullScoreTitle[contenteditable]{cursor:text;border:1px solid transparent;padding:5px;min-width:120px}
#fullScoreTitle[contenteditable]:focus{outline:1px solid #999;background:white}
#arrangementOverview .arrangement-ruler>div{touch-action:none;cursor:grab}
