/* THE WOODSHED'S RHYTHM: js/woodshed-rhythm.js's two bars (notes, lane, count) and the clap pad. Combat Center's words through the page's own classes.
   He is colour-blind: a clap is a solid diamond and a said word a hollow one, a hit a solid block, a miss a dashed block with an X, a tap a white tick. Never hue alone. */
#rhythmPage .ws-col{min-width:clamp(250px,24vw,340px);max-width:34vw;flex:none}
.rh-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}
.rh-stage{flex:1 1 0;min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:clamp(8px,2.4vh,24px);padding:clamp(16px,5vh,44px) 0;touch-action:manipulation;-webkit-user-select:none;user-select:none}

/* the rhythm list */
body .mw-menu .ws-word.rh-rhythm{justify-content:space-between;gap:10px}
body .mw-menu .ws-word.rh-rhythm.on::after{display:none}
.rh-pip{display:inline-flex;align-items:center}
.rh-pip i{display:block;width:10px;height:10px;box-sizing:border-box;border-radius:50%;background:currentColor;opacity:.22}
.rh-pip i.rh-done{opacity:1;background:var(--key);border-radius:0;transform:rotate(45deg)}
.rh-switches{display:flex;justify-content:flex-end;align-items:center;gap:18px}
body .mw-menu .rh-switches .ws-word{flex:none;width:auto}
#rhythmPage .rh-step{display:flex;align-items:center;gap:4px}
#rhythmPage .rh-stepname{display:flex;align-items:center;justify-content:center;gap:8px;min-width:110px;text-align:center;font:700 clamp(18px,1.6vw,22px)/1 var(--face);color:#fff;text-shadow:0 1px 2px #05131f}
#rhythmPage .rh-step .ws-arrow{min-width:44px;min-height:38px;font-size:30px}
.rh-runname{padding:0 24px;text-align:right;font:italic 800 clamp(26px,3vw,40px)/1 var(--face);color:var(--key)}
.rh-runname small{display:block;margin-top:4px;font:700 clamp(16px,1.5vw,20px)/1 var(--face);font-style:normal;color:#fff}

/* the count word, big */
.rh-now{display:flex;align-items:center;justify-content:center;gap:clamp(12px,2vw,24px);min-height:clamp(58px,13vh,116px)}
#rhythmPage:not(.rh-running) .rh-big{display:none}
.rh-big{min-width:1.2em;text-align:center;font:italic 800 clamp(52px,12vh,104px)/1 var(--face);color:#fff;opacity:.55;text-shadow:0 2px 4px #05131f}
.rh-big.rh-on{color:var(--key);opacity:1}
.rh-pulse{display:block;width:22px;height:22px;box-sizing:border-box;border:3px solid #fff;transform:rotate(45deg);opacity:.5}
.rh-pulse.on{background:var(--key);border-color:#fff;opacity:1}
#rhythmPage:not(.rh-running) .rh-pulse{display:none}

/* the two bars: side by side where there is room, one over the other on an upright phone */
.rh-bars{display:flex;gap:clamp(6px,1vw,14px);min-height:0}
.rh-bar{display:block;flex:1 1 0;min-width:0;width:100%;height:auto;background:#05131fb8}
.rh-staff{stroke:#ffffff8c;stroke-width:1.6}
.rh-barline{stroke:#fff;stroke-width:2.4}
.rh-head{fill:#fff;stroke:#fff;stroke-width:1}
.rh-head.rh-hollow{fill:none;stroke-width:2.6}
.rh-stem{stroke:#fff;stroke-width:2.2}
.rh-beam{fill:#fff}
.rh-flag{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round}
.rh-rest circle{fill:#fff}
.rh-reststroke{fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round}
.rh-laneback{fill:#ffffff10}
.rh-beatline{stroke:#ffffffb3;stroke-width:2}
.rh-sub{stroke:#ffffff38;stroke-width:1}
/* opaque, so a half note reads as ONE long block and not as the beat lines under it */
.rh-block{fill:#5d7385;stroke:#fff;stroke-width:1.5}
.rh-block.rh-hitblock{fill:var(--key);stroke:#fff}
.rh-block.rh-missblock{fill:none;stroke:#fff;stroke-width:2;stroke-dasharray:4 3}
.rh-x{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round}
.rh-tap{stroke:#fff;stroke-width:3;stroke-linecap:round}
.rh-word{font:600 19px var(--face);fill:#ffffffa6}
.rh-word.rh-beat{font-size:24px;font-weight:800;fill:#fff}
.rh-word.rh-clapword{fill:var(--key);font-weight:800}
.rh-dia{fill:var(--key);stroke:#fff;stroke-width:1}
.rh-dia.rh-diaoff{fill:none;stroke:#ffffffa6;stroke-width:1.5}
.rh-playhead{display:none;stroke:#fff;stroke-width:3}
/* the note being clapped now, lit three ways at once */
.rh-head.rh-now-note{fill:var(--key);stroke:var(--key)}
.rh-head.rh-hollow.rh-now-note{fill:none}
.rh-block.rh-now-note{stroke-width:3.5}
.rh-word.rh-now-note{font-size:28px}

/* the pad: a round button with a burst in it, CLAP lettered beside it */
.rh-pad{display:grid;place-items:center;width:clamp(68px,12vh,104px);height:clamp(68px,12vh,104px);padding:0;border:4px solid #fff;border-radius:50%;background:#05131fb8;color:#fff;cursor:pointer;touch-action:manipulation}
.rh-pad svg{width:62%;height:62%}
.rh-pad path{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round}
.rh-pad circle{fill:currentColor}
.rh-pad:focus-visible{outline:none;background:#fff;color:#05131f}
.rh-pad.rh-hit{animation:rh-hit .14s ease-out}
@keyframes rh-hit{from{transform:scale(.88);background:#fff;color:#05131f}to{transform:scale(1)}}
.rh-padword{font:italic 800 clamp(24px,2.6vw,34px)/1 var(--face);color:#fff;-webkit-text-stroke:0;text-shadow:0 2px 3px #05131f,0 0 6px #05131fcc;letter-spacing:.04em}
#rhythmPage:not(.rh-running) .rh-padword::after{content:' TO START';font-size:.6em}

@media(max-height:500px){
  #rhythmPage .ws-col{padding-top:8px;padding-bottom:6px}
  #rhythmPage .ws-head{font-size:26px;margin:0}
  .rh-stage{padding:6px 0;gap:6px}
  .rh-now{min-height:36px}
  .rh-big{font-size:38px}
  .rh-pad{width:58px;height:58px;border-width:3px}
  body #rhythmPage.mw-menu .ws-word{font-size:17px;min-height:34px;padding-top:0;padding-bottom:0}
  body #rhythmPage.mw-menu .ws-word.ws-go{flex:none;font-size:22px;min-height:42px}
  body #rhythmPage.mw-menu .ws-foot .ws-word{min-height:40px}
  #rhythmPage .rh-step .ws-arrow{min-width:34px;min-height:30px;font-size:26px}
  #rhythmPage .rh-stepname{min-width:76px;font-size:17px}
  #rhythmPage .rh-switches{gap:8px}
  #rhythmPage .rh-tempo .rh-stepname{min-width:62px}
  #rhythmPage .ws-say{display:none}
}
@media(max-width:700px) and (orientation:portrait){
  #rhythmPage{flex-direction:column;gap:0;padding:0 16px max(10px,env(safe-area-inset-bottom,0px))}
  #rhythmPage .ws-col{display:contents}
  #rhythmPage .ws-head{order:0;margin:clamp(10px,3vh,24px) 0 4px;text-align:left}
  #rhythmPage .rh-stage{order:1;flex:1 1 0;padding:4px 0;gap:8px}
  #rhythmPage .rh-words{order:2;flex:none;margin:6px 0 0}
  #rhythmPage .rh-line{order:0;margin:0;padding:0;text-align:left}
  #rhythmPage .ws-say{order:3;width:100%;min-width:0;margin:2px 0;min-height:0;text-align:left}
  #rhythmPage .ws-foot{order:4;margin:0;flex:none}
  body #rhythmPage.mw-menu .ws-word{flex:none;font-size:19px;min-height:40px}
  body #rhythmPage.mw-menu .ws-word.ws-go{font-size:24px;min-height:46px}
  .rh-bars{flex-direction:column;gap:6px}
  .rh-bar{flex:none}
  .rh-runname{padding:0;text-align:left}
  #rhythmPage .rh-switches{justify-content:space-between}
  #rhythmPage .rh-pick{justify-content:center;width:100%;padding:0}
  #rhythmPage .rh-pickname{min-width:200px;font-size:22px}
  #rhythmPage .rh-step .ws-arrow{min-width:56px;min-height:44px;font-size:34px}
  #rhythmPage .rh-tempo .ws-arrow{min-width:40px}
  #rhythmPage .rh-tempo .rh-stepname{min-width:84px}
  .rh-now{min-height:64px;gap:12px}
  .rh-big{font-size:52px}
  .rh-pad{width:64px;height:64px;border-width:3px}
}
