/* THE WOODSHED'S JAM: js/woodshed-jam.js's backing tracks and drone. Combat Center's words through the page's own classes; the mixer is the song mixer's own rows
   (#mixer's .ws-mix, drawn into .jm-mix). An upright phone never scrolls. He is colour-blind: the bar playing is solid and bright, the rest hollow, never by hue alone. */
#jamPage .ws-col{min-width:clamp(250px,24vw,340px);max-width:34vw;flex:none}
.jm-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 chord now */
.jm-now{display:flex;align-items:baseline;justify-content:center;gap:18px;min-height:clamp(58px,14vh,120px)}
.jm-chord{font:italic 800 clamp(52px,12vh,108px)/1 var(--face);color:var(--key);text-shadow:0 2px 4px #05131f;font-variant-numeric:tabular-nums}
.jm-beat{display:block;align-self:center;width:22px;height:22px;box-sizing:border-box;border:3px solid #fff;transform:rotate(45deg);opacity:.5}
.jm-beat.on{background:#fff;opacity:1}
#jamPage:not(.jm-playing) .jm-beat{display:none}
.jm-bar{font:700 clamp(16px,1.6vw,22px)/1 var(--face);color:#fff;letter-spacing:.06em;text-shadow:0 1px 2px #05131f}
.jm-notes{font:700 clamp(22px,4vh,38px)/1 var(--face);color:#fff;word-spacing:.22em;white-space:nowrap;text-shadow:0 1px 2px #05131f}

/* the chord now's notes on the neck: the scales' own neck and dots, a dot's letter over it, the root solid (lightness, not hue). The neck fits whatever height the stage has left. */
.jm-neck{flex:1 1 0;min-height:110px;display:flex;align-items:center;justify-content:center;container-type:size}
.jm-neck .ss-neck{flex:none;width:min(100cqw,calc(100cqh*714/263));height:auto}
.jm-neck .ss-dotname{font:800 22px var(--face);fill:#fff}
.jm-neck .ss-root .ss-dotname{fill:#05131f}
.jm-neck .ss-passing circle{stroke-width:2.5}
.jm-neck .ss-fretnum{font-size:21px}
body #jamPage.mw-menu .ws-word.jm-view{display:none}

/* the chart: a box a bar, eight to a row */
.jm-chart{display:grid;grid-template-columns:repeat(var(--bars,8),minmax(0,1fr));gap:clamp(2px,.4vw,5px)}
.jm-barbox{display:flex;align-items:center;justify-content:center;min-width:0;min-height:clamp(30px,6vh,54px);padding:2px 4px;box-sizing:border-box;border:0;border-radius:0;cursor:pointer;background:#05131fb8;color:#fff;font:700 clamp(13px,1.3vw,19px)/1.05 var(--face);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jm-barbox.on{background:#fff;color:#05131f}
.jm-playing .jm-barbox{cursor:default}

/* the mixer and the drone's instrument */
.jm-mix{display:flex;flex-direction:column;min-height:0}
.jm-drones{display:flex;flex-wrap:wrap;gap:0 4px}
body #jamPage.mw-menu .jm-drones .ws-word{flex:1 1 0;width:auto;min-width:0;justify-content:center;padding:2px 8px;font-size:clamp(17px,1.5vw,22px)}

@media(max-height:500px){
  #jamPage .ws-col{padding-top:8px;padding-bottom:6px}
  #jamPage .ws-head{font-size:26px;margin:0}
  #jamPage .ws-say{display:none}
  .jm-stage{padding:6px 0;gap:4px}
  body #jamPage.mw-menu .ws-word{font-size:17px;min-height:32px;padding-top:0;padding-bottom:0}
  body #jamPage.mw-menu .ws-word.ws-go{flex:none;font-size:22px;min-height:40px}
  .jm-now{min-height:40px}
  .jm-chord{font-size:40px}
  .jm-barbox{min-height:24px;font-size:13px}
  .jm-mix .ws-mix{min-height:32px}
  .jm-mix .ws-vol{height:30px}.jm-mix .ws-vol .tr{top:13px}
  #jamPage:not(.jm-mixing) .jm-mix,#jamPage:not(.jm-mixing) .jm-drones,#jamPage.jm-mixing .jm-neck{display:none}
  body #jamPage.mw-menu .ws-word.jm-view{display:flex;flex:none;justify-content:center;min-height:28px}
}
@media(max-width:700px) and (orientation:portrait){
  #jamPage{flex-direction:column;gap:0;padding:0 16px max(10px,env(safe-area-inset-bottom,0px))}
  #jamPage .ws-col{display:contents}
  #jamPage .ws-head{order:0;margin:clamp(8px,2vh,20px) 0 0;text-align:left}
  #jamPage .jm-line{order:0;margin:0;padding:0;text-align:left}
  #jamPage .jm-stage{order:1;flex:1 1 0;padding:2px 0;gap:6px;justify-content:flex-start}
  #jamPage .jm-words{order:2;flex:none;display:grid;grid-template-columns:1fr 1fr;gap:0 8px;margin:4px 0 0}
  #jamPage .ws-say{display:none}
  #jamPage .ws-foot{order:4;margin:0;flex:none}
  body #jamPage.mw-menu .ws-word{flex:none;width:auto;font-size:19px;min-height:38px;padding:0 6px}
  body #jamPage.mw-menu .ws-word.ws-go{grid-column:1/-1;font-size:24px;min-height:44px}
  #jamPage .jm-step{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:0}
  #jamPage .jm-step small{min-width:150px;text-align:center;font:700 22px/1 var(--face);color:#fff;letter-spacing:.03em;text-shadow:0 1px 2px #05131f}
  #jamPage .jm-step .ws-arrow{min-width:56px;min-height:40px;font-size:32px}
  .jm-now{min-height:56px}
  .jm-chord{font-size:54px}
  .jm-chart{grid-template-columns:repeat(4,minmax(0,1fr))}
  .jm-barbox{min-height:24px;font-size:14px}
  .jm-mix .ws-mix{min-height:36px}
  .jm-mix .ws-vol{height:34px}.jm-mix .ws-vol .tr{top:15px}
  body #jamPage.mw-menu .jm-drones .ws-word{font-size:17px;min-height:36px;padding:0 4px}
  .jm-notes{font-size:22px;word-spacing:.12em}
  .jm-bar{display:none}
  #jamPage:not(.jm-mixing) .jm-mix,#jamPage:not(.jm-mixing) .jm-drones,#jamPage.jm-mixing .jm-neck{display:none}
  body #jamPage.mw-menu .ws-word.jm-view{display:flex;flex:none;justify-content:center;min-height:36px}
}
