/* THE PAGE VIEW (js/sheet-page.js, js/sheet.js drawPage). With the falling
   notes off the sheet fills the space above the keyboard as a page, and the
   HUD (score, combo, accuracy, measure) moves out from under the old strip
   into the band left between the page and the keys. main.js syncSheetPage
   puts body.sheet-page on and --page-h at the page's bottom edge; the band's
   height is pageHudBand() there. */
body.sheet-page #hud-left { top: calc(var(--page-h, 600px) + 18px); }
body.sheet-page #hud-right { top: calc(var(--page-h, 600px) + 18px); }
/* The judgment popups (fx.js) rise from just over the keys into this same
   band, and they rise mostly over the middle of the keyboard: the combo
   leaves the centre for a place beside accuracy and measure, set to their
   scale, and the centre is the popups'. */
body.sheet-page #hud-center {
  top: calc(var(--page-h, 600px) + 12px);
  left: auto; right: 290px; transform: none;
}
body.sheet-page #combo { font-size: 42px; min-height: 48px; }

/* the tempo readouts (free-form's 🕊, flex's band, the D/F toast) sit at the
   top centre, which on a page is the row being played: they move into the
   band's free middle */
body.sheet-page #free-tempo,
body.sheet-page #tempo-toast { top: calc(var(--page-h, 600px) + 30px); }

/* the count-in is set in the band too (main.js drawCountIn): the combo, still
   at 0, steps aside until the first beat */
body.sheet-page.page-count #combo-wrap { visibility: hidden; }

/* a phone held upright: the HUD is style.css's narrow flow layout, pushed
   down by the page instead of by the strip, in two rows (the score; then
   the combo, accuracy and measure) so it fits the band. The tempo readouts
   have no free middle in the band, so they sit on the page's bottom edge,
   over the row furthest ahead. */
@media (max-width: 560px) {
  body.sheet-page #hud {
    flex-direction: row; flex-wrap: wrap; align-items: flex-start; row-gap: 0;
    padding-top: calc(var(--page-h, 600px) + 4px);
  }
  body.sheet-page #hud-left,
  body.sheet-page #hud-center,
  body.sheet-page #hud-right { top: auto; }
  /* style.css stacks combo and accuracy/measure as two rows of their own:
     here they share one, under the score, so the band holds two rows */
  body.sheet-page #hud-left { width: 100%; }
  body.sheet-page #hud-center { right: auto; width: auto; flex: 1; }
  body.sheet-page #hud-right { width: auto; flex: 2; }
  body.sheet-page #combo { font-size: 26px; min-height: 0; }
  body.sheet-page #score { font-size: 26px; }
  body.sheet-page #free-tempo,
  body.sheet-page #tempo-toast { top: calc(var(--page-h, 600px) - 44px); }
  /* the count-in takes the band's second row on a phone: accuracy and
     measure (100% and "-" until the first beat) step aside with the combo */
  body.sheet-page.page-count #hud-right { visibility: hidden; }
}
