/* THE WOODSHED'S SCALES: js/woodshed-scales.js's table of boxes and the neck. Combat Center's words through the page's own classes. An upright phone holds one scale's twelve at
   a time and never scrolls. He is colour-blind: heard is solid, ticked is hollow, a hit and a miss differ by shape and lightness, never by hue alone. */
#scalePage .ws-col{min-width:clamp(250px,24vw,340px);max-width:34vw;flex:none}
.ss-line{margin:0 0 clamp(6px,1.6vh,14px);padding-right:30px;min-height:1.2em;text-align:right;font:600 clamp(16px,1.5vw,20px)/1.2 var(--face);color:#fff;text-shadow:0 1px 2px #05131f,0 0 6px #05131fcc}
.ss-stage{flex:1 1 0;min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:clamp(8px,2vh,20px);padding:clamp(16px,5vh,44px) 0}

/* the table */
.ss-grid{display:flex;flex-direction:column;gap:clamp(3px,.7vh,7px);min-height:0}
.ss-row{display:grid;grid-template-columns:minmax(92px,10vw) repeat(12,minmax(0,1fr));gap:clamp(2px,.4vw,5px);align-items:stretch}
.ss-rowname{align-self:center;padding-right:10px;text-align:right;font:700 clamp(13px,1.15vw,17px)/1.02 var(--face);letter-spacing:.03em;color:#fff;text-shadow:0 1px 2px #05131f,0 0 6px #05131fcc}
.ss-box{container-type:inline-size;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(2px,.6vh,6px);min-width:0;min-height:clamp(34px,8.2vh,74px);padding:2px;border:0;border-radius:0;background:#05131fb8;color:#fff;font:700 clamp(15px,1.5vw,22px)/1 var(--face);cursor:pointer}
.ss-box b{font-weight:700}
.ss-box:focus-visible{background:#fff;color:#05131f;outline:none}
@media(hover:hover){.ss-box:hover{background:#fff;color:#05131f}.ss-box.ss-full:hover{background:#fff}}
.ss-box.ss-full{background:#2a3d4dcc}
.ss-box.ss-full:focus-visible{background:#fff}
.ss-pips{display:inline-flex;gap:min(5px,4cqw);align-items:center}
.ss-pips i{display:block;width:min(10px,15cqw);height:min(10px,15cqw);box-sizing:border-box;border-radius:50%;background:currentColor;opacity:.22}
.ss-pips i.ss-heard{opacity:1;background:var(--key);border-radius:0;transform:rotate(45deg)}
.ss-pips i.ss-ticked{opacity:1;background:none;border:clamp(1.5px,.16vw,2px) solid var(--key);border-radius:0;transform:rotate(45deg)}
.ss-box:hover .ss-pips i.ss-heard,.ss-box:focus-visible .ss-pips i.ss-heard{background:#05131f}
.ss-box:hover .ss-pips i.ss-ticked,.ss-box:focus-visible .ss-pips i.ss-ticked{border-color:#05131f}

/* a box's rhythms */
body .mw-menu .ws-word.ss-rhythm{justify-content:space-between;gap:10px}
/* the picked word's own diamond would read as a heard mark: here the pick is the colour alone */
body .mw-menu .ws-word.ss-rhythm.on::after{display:none}
.ss-rhythm .ss-pips i{width:10px;height:10px}
.ss-runname{padding:0 24px;text-align:right;font:italic 800 clamp(26px,3vw,40px)/1 var(--face);color:var(--key)}

/* the neck */
.ss-now{display:flex;align-items:center;justify-content:center;gap:18px;min-height:clamp(58px,14vh,120px)}
.ss-letter{font:italic 800 clamp(52px,12vh,108px)/1 var(--face);color:var(--key);text-shadow:0 2px 4px #05131f;font-variant-numeric:tabular-nums}
.ss-letter small{margin-left:.18em;font-size:.42em;font-style:normal;vertical-align:.3em}
.ss-low .ss-letter{color:#fff}
.ss-pulse{display:block;width:22px;height:22px;box-sizing:border-box;border:3px solid #fff;transform:rotate(45deg);opacity:.5}
.ss-pulse.on{background:#fff;opacity:1}
#scalePage:not(.ss-running) .ss-pulse{display:none}
.ss-neck{display:block;flex:none;width:100%;height:auto;background:#05131fb8}
.ss-fret{stroke:#ffffff55;stroke-width:2}
.ss-nut{stroke:#fff;stroke-width:6}
.ss-string{stroke:#ffffffa6}
.ss-fretnum{font:700 20px var(--face);fill:#fff}
.ss-path{fill:none;stroke:#ffffff52;stroke-width:3;stroke-linejoin:round}
.ss-note circle{fill:#05131f;stroke:#fff;stroke-width:3}
.ss-note .ss-x{display:none;fill:none;stroke:#fff;stroke-width:4;stroke-linecap:round}
.ss-note.ss-root circle{fill:#fff}
.ss-note.ss-past circle{fill:#ffffff8c;stroke:#ffffff8c}
.ss-note.ss-now circle{fill:var(--key);stroke:#fff;stroke-width:4;r:21px}
.ss-note.ss-hit circle{fill:var(--key);stroke:var(--key)}
.ss-note.ss-miss circle{fill:#05131f;stroke:#fff;stroke-dasharray:4 4}
.ss-note.ss-miss .ss-x{display:block}
.ss-after{min-height:0}
.ss-after.ss-xp{min-height:64px}

.ss-switches{display:flex;justify-content:flex-end;gap:22px}
body .mw-menu .ss-switches .ws-word{flex:none;width:auto}
/* CAGED: five shapes on one neck, each named over its box; the chord's notes are the big dots and the arpeggio's extra notes the small ones (size, not colour). While a run
   plays the shape being played is lit and the rest fade back. */
.ss-shapename{font:italic 800 24px var(--face);fill:var(--key)}
.ss-letter small.ss-shapeword{margin-left:.4em}
.ss-note.ss-arpnote circle{r:10px}
.ss-note.ss-arpnote.ss-now circle{r:16px}
/* the faded shapes keep their letters readable: only their dots and paths fade */
.ss-oneshape .ss-shape:not(.on) .ss-note,.ss-oneshape .ss-shape:not(.on) .ss-path{opacity:.2}
.ss-oneshape .ss-shape:not(.on) .ss-shapename{fill:#fff;opacity:.6}
.ss-runname small{display:block;margin-top:4px;font:700 clamp(16px,1.5vw,20px)/1 var(--face);font-style:normal;color:#fff}
#scalePage .ss-time{align-items:center}
#scalePage .ss-tempo{display:flex;align-items:center;gap:4px}
#scalePage .ss-tempo .ss-stepname{display:block;min-width:120px;text-align:center;font:700 clamp(18px,1.6vw,22px)/1 var(--face);color:#fff;text-shadow:0 1px 2px #05131f}
#scalePage .ss-tempo .ws-arrow{min-width:44px;min-height:38px;font-size:30px}
@media(max-width:700px) and (orientation:portrait){
  #scalePage .ss-tempo .ss-stepname{min-width:120px;font-size:20px}
  body #scalePage.mw-menu .ss-tempo .ws-arrow{min-width:56px;min-height:40px}
  body #scalePage.mw-menu .ss-time .ws-word{min-height:40px}
}
@media(max-height:500px){
  #scalePage .ws-col{padding-top:8px;padding-bottom:6px}
  #scalePage .ws-head{font-size:26px;margin:0}
  .ss-stage{padding:6px 0;gap:4px}
  .ss-box{min-height:28px;gap:1px;padding:2px 0;font-size:14px}
  .ss-pips i.ss-ticked{border-width:1px}
  .ss-rowname{font-size:12px}
  body #scalePage.mw-menu .ws-word{font-size:17px;min-height:34px;padding-top:0;padding-bottom:0}
  body #scalePage.mw-menu .ws-word.ws-go{flex:none;font-size:22px;min-height:42px}
  body #scalePage.mw-menu .ws-foot .ws-word{min-height:40px}
  /* a sideways phone's column holds the CLICK / DRUMS row too: the rhythms and that row stand a little shorter */
  body #scalePage.mw-menu .ws-word.ss-rhythm{min-height:27px}
  body #scalePage.mw-menu .ss-time .ws-word{min-height:30px}
  #scalePage .ss-tempo .ws-arrow{min-width:34px;min-height:30px;font-size:26px}
  #scalePage .ss-tempo .ss-stepname{min-width:76px;font-size:17px}
  #scalePage .ss-time{gap:12px}
  .ss-now{min-height:40px}
  .ss-letter{font-size:40px}
  .ss-neck{flex:0 1 auto;min-height:0;width:auto;max-width:100%;margin:0 auto}
}
@media(max-width:700px) and (orientation:portrait){
  #scalePage{flex-direction:column;gap:0;padding:0 16px max(10px,env(safe-area-inset-bottom,0px))}
  #scalePage .ws-col{display:contents}
  #scalePage .ws-head{order:0;margin:clamp(10px,3vh,24px) 0 4px;text-align:left}
  #scalePage .ss-stage{order:1;flex:1 1 0;padding:4px 0}
  #scalePage .ss-words{order:2;flex:none;margin:6px 0 0}
  #scalePage .ss-line{order:0;margin:0;padding:0;text-align:left}
  #scalePage .ws-say{order:3;width:100%;min-width:0;margin:2px 0;min-height:0;text-align:left}
  #scalePage .ws-foot{order:4;margin:0;flex:none}
  body #scalePage.mw-menu .ws-word{flex:none;font-size:19px;min-height:40px}
  body #scalePage.mw-menu .ws-word.ss-rhythm{padding-left:4px;padding-right:4px}
  body #scalePage.mw-menu .ws-word.ws-go{font-size:24px;min-height:46px}
  .ss-runname{padding:0;text-align:left}
  #scalePage .ss-switches{justify-content:center}
  .ss-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .ss-box{min-height:clamp(70px,14vh,104px);gap:8px;font-size:30px}
  .ss-pips{gap:4px}
  .ss-pips i{width:8px;height:8px}
  #scalePage .ss-step{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:0}
  #scalePage .ss-stepname{min-width:190px;text-align:center}
  #scalePage .ss-stepname{display:block;font:700 24px/1 var(--face);color:#fff;letter-spacing:.03em;text-shadow:0 1px 2px #05131f}
  #scalePage .ss-step .ws-arrow{min-width:64px;min-height:48px;font-size:36px}
  .ss-now{min-height:70px}
  .ss-letter{font-size:64px}
}
