:root{color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:#191e27;color:#f5f6f9;font:16px system-ui,sans-serif}header,footer,.title,.legend,#editing{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px}header{background:#11151c;border-bottom:1px solid #454d5c}header strong{font-size:28px;margin-right:10px}header #about,footer output{margin-left:auto}main{padding:14px}button,select{font:inherit;color:inherit;background:#292f3b;border:1px solid #69768a;border-radius:7px;padding:7px 12px}button,select{cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,select:focus-visible{outline:3px solid #81acff}#save{background:#235cc4}.title{background:#252c37;color:#f5f6f9;border-radius:8px;margin-bottom:14px}.title h1{font-size:23px;margin:0}#status{font-size:14px}.workspace{display:flex;gap:10px}#scroll{overflow-x:auto;flex:1;min-width:0;background:#1e242e;border-radius:8px}#score{position:relative;min-width:100%;color:#f5f6f9}.row{position:relative;border-bottom:1px solid #505a69}.label{position:sticky;left:0;display:inline-flex;align-items:center;width:var(--gutter,110px);height:100%;padding:12px;white-space:nowrap;background:#2b3340;z-index:4;font-weight:bold}.cell,.mark,.playhead{position:absolute}.cell{height:100%;border-left:1px solid #596474;padding:7px;font-weight:bold;top:0;overflow:hidden;white-space:nowrap}.tempo svg{position:absolute;top:0;left:var(--gutter,110px);touch-action:none}.mark{color:#f5f6f9;top:8px;background:#303c52;border:1px solid #336de4;font-size:13px;padding:3px 6px;white-space:nowrap}.cue{color:#171a21;background:#ffe000;border-color:#573f00}.note{background:#473919;border-color:#ba932b;color:#fff0c7}.section{background:#254558;color:#e3f4ff}.playhead{top:0;bottom:0;width:7px;background:#ec222d;pointer-events:none;z-index:3}.legend i,#signal.red,#signal.green,#signal.blue{display:inline-grid;place-items:center;border-radius:50%;font-style:normal;font-weight:bold}.legend i{width:31px;height:31px}.legend .blue{width:14px;height:14px}.red,#stop{background:#c81f31;color:white}.blue{background:#278bff}.green,#start{background:#107841;color:white}.legend .yellow,.yellow{background:#ffdf00;color:#16191e;border-radius:3px}aside{width:clamp(100px,20vw,260px);background:#252c37;border-radius:8px;display:grid;place-items:center;text-align:center}#signal{font-size:clamp(16px,2.7vw,42px);font-weight:900;padding:10px}#signal.red,#signal.green{width:90px;height:90px}#signal.blue{width:30px;height:30px}footer{border-top:1px solid #454d5c;font-variant-numeric:tabular-nums}[hidden]{display:none!important}
.time-ruler{background:#222a36;font-variant-numeric:tabular-nums}
.time-ruler .cell{font-size:13px}
.cue.draggable{cursor:grab;touch-action:none;user-select:none;z-index:2}
.cue.draggable:active{cursor:grabbing}
.track-row{background:#343943;color:#fff;border-bottom-color:#636b79}
.track-row .cell{border-left-color:#69717e}
.track-row .label{gap:5px}
.track-color{cursor:pointer;width:25px;height:26px;padding:1px;flex:none}
.playhead{pointer-events:auto;cursor:ew-resize;touch-action:none;user-select:none;transform:translateX(-50%)}
.note.draggable{cursor:grab;touch-action:none;user-select:none;z-index:2}
.note.draggable:active{cursor:grabbing}
.score-dialog{max-width:calc(100% - 28px);padding:20px;background:#252c37;color:#fff;border:1px solid #69768a;border-radius:10px}
.score-dialog::backdrop{background:#0008}
.score-dialog h2{margin:0 0 16px;font-size:20px}
.score-dialog form{display:flex;gap:8px;flex-wrap:wrap}
#markerDelete{background:#a32335}

#flash{container-type:size}
#signal.red,#signal.green{
  width:96cqmin;height:96cqmin;padding:0;font-size:54cqmin;
}
#signal.blue{width:42cqmin;height:42cqmin;padding:0}
footer input[type=range]{width:clamp(65px,9vw,125px);accent-color:#6ca9ff}
#flash{flex:none;align-self:stretch;min-height:100px}

#readout{margin-left:auto;display:flex;align-items:center;gap:14px;padding:8px 12px;background:#11151c;border:1px solid #56647a;border-radius:8px}
#readout div{display:grid;gap:2px}
#readout span{font-size:12px;color:#c9d4e5}
#readout strong{font-size:clamp(24px,3vw,36px);line-height:1.05;color:#fff}
#liveTime{min-width:5ch}
#liveBar{min-width:2ch}
#liveTempo{color:#c9d4e5}
#scoreLength{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#lengthValue{font:inherit;width:8em;padding:7px;border:1px solid #69768a;border-radius:7px;background:#292f3b;color:inherit}
header .credit{margin-left:auto;font-size:.82rem;color:#c9d4e5}
header #about{margin-left:0}
.playhead.locked{pointer-events:none}

.transport-display{margin-left:auto;display:grid;justify-items:end;gap:5px}

#conductorBeat.blue{transform:scale(.72)}

footer{position:relative}
.transport-display{display:contents}
footer #readout{margin-left:auto}
#conductorBeat{
  position:absolute;
  bottom:calc(100% + 8px);
  left:100%;
  translate:-50% 0;
  width:58px;
  height:58px;
  border-radius:50%;
}
main:has(#conductorBeat:not([hidden])) .legend{min-height:64px;padding-right:min(34%,220px)}

#conductorBeat.yellow{width:87px;border-radius:4px}

#scroll{container-type:inline-size}
.conductorOverlay{position:absolute;inset-inline:0;z-index:5;pointer-events:none}
.flashShape{position:sticky;left:0;width:100cqw;height:100%;display:none;place-items:center}
.conductorOverlay:is([data-flash],[data-name]) .flashShape{display:grid}
.flashShape::before{content:'';grid-area:1/1;width:min(38.4cqw,264px);aspect-ratio:1;border-radius:50%}
.conductorOverlay[data-flash="blue"] .flashShape::before{transform:scale(.68)}
.conductorOverlay[data-flash="yellow"] .flashShape::before{
  width:min(98.4cqw,792px);height:min(76.8%,216px);aspect-ratio:auto;
  border-radius:8px;
}
.flashShape svg{display:none;grid-area:1/1;width:min(88.8cqw,720px);height:min(63.6%,174px)}
.conductorOverlay[data-name] svg{display:block}
.flashShape text{font:900 44px system-ui,sans-serif;fill:#141414}

.flashShape text{paint-order:stroke;stroke:#fff9ee;stroke-width:2px;stroke-linejoin:round}


.voice-controls{display:flex;align-items:center;gap:8px}
input[type=checkbox]{accent-color:#6ca9ff}

/* Shared cue colors for the legend, player signal, and conductor indicators. */
:is(.legend i,#signal,#conductorBeat).red,.conductorOverlay[data-flash="red"]{
  --cue-glow:255 67 96;
  --cue-edge:#ffb1be;
}
:is(.legend i,#signal,#conductorBeat).blue,.conductorOverlay[data-flash="blue"]{
  --cue-glow:68 178 255;
  --cue-edge:#b4e5ff;
}
:is(.legend i,#signal,#conductorBeat).green,.conductorOverlay[data-flash="green"]{
  --cue-glow:50 255 156;
  --cue-edge:#b4ffda;
}
:is(.legend i,#signal,#conductorBeat).yellow,.conductorOverlay[data-flash="yellow"]{
  --cue-glow:255 226 66;
  --cue-edge:#fff7b0;
}
:is(.legend i,#signal,#conductorBeat):is(.red,.blue,.green,.yellow){
  background:rgb(var(--cue-glow));
  color:#10141c;
  box-shadow:inset 0 0 0 1px var(--cue-edge),0 0 14px rgb(var(--cue-glow) / 48%);
}
.legend i:is(.red,.blue,.green,.yellow){
  box-shadow:inset 0 0 0 1px var(--cue-edge);
}
.conductorOverlay[data-flash] .flashShape::before{
  background:rgb(var(--cue-glow) / 68%);
  box-shadow:inset 0 0 0 3px var(--cue-edge),0 0 28px rgb(var(--cue-glow) / 72%);
}

#conductorBeat:is(.red,.blue,.green,.yellow){
  background:color-mix(in srgb,rgb(var(--cue-glow)) 84%,white);
  box-shadow:inset 0 0 0 2px var(--cue-edge),0 0 20px rgb(var(--cue-glow) / 72%);
}

#signal.yellow{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  border-radius:inherit;
  font-size:clamp(12px,14cqw,42px);
}

.track-actions{display:inline-flex;gap:4px;flex:none}
.track-actions button{width:29px;height:28px;padding:0;color:#f5f6f9;line-height:1}

.tempo-ramp,.tempo-step{stroke:#5688ff}
.tempo-step{stroke-linejoin:round}
