.spectral-drum-bank{margin:8px auto 0;max-width:1500px;padding:10px 14px;background:oklch(25% .025 270);color:oklch(92% .02 270);border:1px solid oklch(45% .045 81);border-radius:7px;direction:rtl;font:12px system-ui,sans-serif}.spectral-drum-bank-heading{display:flex;gap:16px;align-items:center;margin-bottom:6px}.spectral-drum-bank-heading span{color:oklch(76% .025 270);flex:1}.spectral-drum-bank button,.spectral-drum-bank select{background:oklch(31% .025 270);color:oklch(94% .02 270);border:1px solid oklch(49% .035 270);border-radius:5px;padding:4px 7px;min-height:30px;font:inherit}.spectral-drum-sound-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.spectral-drum-sound-grid label{display:flex;flex-direction:column;gap:3px;min-width:0}.spectral-drum-sound-grid select{width:100%;min-width:0}.drum-midi-controls{display:none!important}a[href="index.html"]{display:none!important}@media(max-width:1050px){.spectral-drum-sound-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:600px){.spectral-drum-sound-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.spectral-drum-bank-heading{flex-wrap:wrap}}

/* The extra sound selectors reserve space above the original full-height app. */
html,body{height:100%;min-height:0;overflow:hidden}
body{margin:0!important;padding:0!important;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);gap:6px;box-sizing:border-box}
.spectral-drum-bank{grid-row:1;box-sizing:border-box;width:calc(100% - 16px);max-width:none;margin:4px 8px 0;padding:6px 10px}
.spectral-drum-bank-heading{margin-bottom:4px;gap:12px}
.spectral-drum-sound-grid{gap:6px}
.spectral-drum-bank select{min-height:26px;padding-block:2px}
#root{grid-row:2;position:relative;min-height:0;min-width:0;width:100%;height:100%;overflow:hidden}
html body #root>.drum-machine-app{position:absolute;top:0;left:0;box-sizing:border-box;min-height:0;min-width:0;height:100%;padding:6px 12px!important;transform-origin:top left}
#root .drum-machine-workspace{width:100%;max-width:none;height:100%;min-height:0;margin:0;display:flex;flex-direction:column;gap:6px}
#root .drum-sequencer{flex:1;min-height:180px;margin:0}
#root .drum-machine-toolbar{margin:0}
#root .drum-machine-toolbar [title^="גרירה או גלגלת"]{width:38px!important;height:38px!important}
#root .drum-notation{margin:0}
/* Short screens use width for notation rather than extending below the grid. */
@media(min-width:700px) and (max-height:700px){
  #root .drum-machine-workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:6px}
  #root .drum-machine-toolbar{grid-column:1/-1;grid-row:1}
  #root .drum-sequencer{grid-column:1;grid-row:2;min-height:0;min-width:0;height:100%;display:flex}
  #root .drum-track-grid>.group{min-height:24px}
  #root .drum-track-grid>.group>div:first-child{width:200px;min-width:0;flex:none}
  #root .drum-track-grid>.group>div:first-child input[type=range]{width:44px}
  #root .drum-notation{grid-column:2;grid-row:2;min-height:0;min-width:0;display:flex;flex-direction:column;gap:4px}
  #root .drum-notation .drum-score{flex:1;min-height:0;display:flex;align-items:center}
  #root .drum-score svg{height:auto!important;max-height:100%;width:100%!important}
}

.spectral-drum-loop-length{display:flex;align-items:center;gap:6px;white-space:nowrap}
.spectral-drum-bank .spectral-drum-notation-toggle{border-color:oklch(68% .09 190);color:oklch(92% .05 190);white-space:nowrap;cursor:pointer}
.spectral-drum-bank .spectral-drum-notation-toggle[aria-pressed=true]{background:oklch(36% .07 190)}
body[data-notation-hidden=true] #root .drum-notation{display:none!important}
body[data-notation-hidden=true] #root .drum-machine-workspace{display:flex;flex-direction:column}
body[data-notation-hidden=true] #root .drum-sequencer{flex:1;min-height:180px;width:100%}
.spectral-drum-measures{display:flex;gap:10px;align-items:center;min-width:0}
.spectral-drum-measure{flex:1;min-width:0}
#root .drum-track-grid button[data-bar-start=true]{border-inline-start:2px solid oklch(87% .12 86);margin-inline-start:7px}
.spectral-drum-bank :is(button,select):focus-visible{outline:2px solid oklch(85% .1 190);outline-offset:2px}

.spectral-drum-bank{background:oklch(25% .04 265);border-color:oklch(53% .075 265)}

/* Keep both measures legible across the full width when the score is visible. */
body[data-loop-bars="2"] #root .drum-machine-workspace{display:flex;flex-direction:column}

/* Reserve separate rows for all eight tracks and the two engraved measures. */
@media(min-width:700px){
 body[data-loop-bars="2"] #root .drum-machine-workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(280px,1fr) minmax(150px,.55fr);gap:8px}
 body[data-loop-bars="2"] #root .drum-machine-toolbar{grid-column:1;grid-row:1}
 body[data-loop-bars="2"] #root .drum-sequencer{grid-column:1;grid-row:2;min-width:0;min-height:0;height:100%;display:flex}
 body[data-loop-bars="2"] #root .drum-sequencer>.overflow-x-auto{box-sizing:border-box;min-height:0;height:100%;padding:6px 10px!important}
 body[data-loop-bars="2"] #root .drum-track-grid{min-height:0;gap:3px}
 body[data-loop-bars="2"] #root .drum-track-grid>.group{min-height:0;height:auto!important;flex:1 1 0}
 body[data-loop-bars="2"] #root .drum-track-grid>.group>div:last-child{height:100%;align-items:center}
 body[data-loop-bars="2"] #root .drum-track-grid>.group>div:last-child>button{height:100%;max-height:36px;min-height:0;margin-block:0}
 body[data-loop-bars="2"] #root .drum-notation{grid-column:1;grid-row:3;box-sizing:border-box;min-height:0;height:100%;display:flex;flex-direction:column;gap:4px;padding:6px 10px!important}
 body[data-loop-bars="2"] #root .drum-notation .drum-score{box-sizing:border-box;flex:1;min-height:0;display:flex;align-items:center;padding:2px 4px}
 body[data-loop-bars="2"] #root .spectral-drum-measures{height:100%;gap:14px}
 body[data-loop-bars="2"] #root .spectral-drum-measure{height:100%;display:flex;align-items:center;min-width:0}
 body[data-loop-bars="2"] #root .drum-score svg{width:100%!important;height:auto!important;max-height:100%;object-fit:contain}
 body[data-loop-bars="2"][data-notation-hidden="true"] #root .drum-machine-workspace{display:flex}
}

.spectral-drum-bank .spectral-drum-notation-toggle{display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:5px;flex:none}
.spectral-drum-notation-toggle svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.spectral-drum-notation-toggle svg ellipse{fill:currentColor;stroke:none}

/* Sound selectors share the sequencer slate surface and active-step gold. */
.spectral-drum-bank .spectral-drum-sound-grid select{background:oklch(31% .027 253);border-color:oklch(48% .035 253);color:oklch(94% .012 253);color-scheme:dark}
.spectral-drum-bank .spectral-drum-sound-grid select:hover{background:oklch(35% .03 253);border-color:oklch(65% .06 253)}
.spectral-drum-bank .spectral-drum-sound-grid select:focus-visible{outline:2px solid oklch(85% .14 85);outline-offset:2px;border-color:oklch(85% .14 85)}
.spectral-drum-bank .spectral-drum-sound-grid :is(option,optgroup){background:oklch(27% .026 253);color:oklch(94% .012 253)}
.spectral-drum-bank .spectral-drum-sound-grid optgroup{color:oklch(86% .105 85)}

.spectral-drum-swing{display:flex;align-items:center;gap:5px;flex:none;font-size:11px;white-space:nowrap}
.spectral-drum-swing>span{flex:none;color:inherit}
.drum-swing-dial{display:block;position:relative;width:32px;height:32px;flex:none}
.drum-swing-dial svg{display:block;width:100%;height:100%;fill:oklch(25% .025 253);stroke:oklch(55% .03 253);stroke-width:2}
.drum-swing-dial .drum-swing-pointer{stroke:oklch(85% .14 85);stroke-width:3;stroke-linecap:round;transform:rotate(var(--swing-angle));transform-origin:18px 18px}
.drum-swing-dial input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:ns-resize;touch-action:none}
.drum-swing-dial:focus-within{outline:2px solid oklch(85% .14 85);outline-offset:2px;border-radius:50%}
.spectral-drum-swing output{min-width:30px;direction:ltr;font-variant-numeric:tabular-nums}

/* Match each native grid lane: red kick, blue snare, gold hats, cyan ride, purple crash, green/orange toms. */
.spectral-drum-sound-grid>label{color:oklch(86% .09 var(--drum-hue))}
.spectral-drum-bank .spectral-drum-sound-grid select{background:oklch(29% .04 var(--drum-hue));border-color:oklch(61% .11 var(--drum-hue));color:oklch(92% .06 var(--drum-hue))}
.spectral-drum-bank .spectral-drum-sound-grid select:hover{background:oklch(34% .055 var(--drum-hue));border-color:oklch(76% .12 var(--drum-hue))}
.spectral-drum-bank .spectral-drum-sound-grid select:focus-visible{outline-color:oklch(84% .13 var(--drum-hue));border-color:oklch(84% .13 var(--drum-hue))}
.spectral-drum-bank .spectral-drum-sound-grid :is(option,optgroup){background:oklch(26% .035 var(--drum-hue));color:oklch(94% .03 var(--drum-hue))}
.spectral-drum-bank .spectral-drum-sound-grid optgroup{color:oklch(85% .10 var(--drum-hue))}
.spectral-drum-bank .drum-metronome-sound,.drum-metronome-sound{width:28px;min-width:28px;height:28px;padding:4px;display:grid;place-items:center}
.drum-metronome-sound svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* Reserve transport geometry across Play/Stop and keep the tempo controls together. */
#root .drum-machine-toolbar>div:first-child>button{width:88px;min-width:88px;flex:none;justify-content:center;white-space:nowrap}
#root .drum-machine-toolbar .drum-swing-host{display:flex;align-items:center;flex:none;min-height:38px}
#root .drum-machine-toolbar .spectral-drum-swing{gap:3px;font-size:10px}
#root .drum-machine-toolbar .drum-swing-dial{width:28px;height:28px}
#root .drum-machine-toolbar>div:last-child>.bg-slate-700:not(:first-child){flex:0 1 118px;max-width:138px;padding:4px 6px;gap:4px}
#root .drum-machine-toolbar>div:last-child>.bg-slate-700:not(:first-child) select{font-size:11px;min-width:0;width:100%;height:26px}
#root .drum-machine-toolbar>div:last-child>.bg-slate-700:not(:first-child)>svg{width:14px;height:14px;flex:none}
@media(max-width:700px){#root .drum-machine-toolbar>div:first-child>button{width:72px;min-width:72px}#root .drum-machine-toolbar .spectral-drum-swing{gap:2px}#root .drum-machine-toolbar .spectral-drum-swing>span:first-child{display:none}}
