:root {
  --height-header: 2.5rem;
  --height-message: 2rem;
  --height-ok: 3.5rem;
}

* {
  box-sizing: border-box;
}

.titleSection {
  font-weight: normal;
}

#outer {
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
}

#wrapper {
  position: relative;
  height: calc(100vh - var(--height-header));
}

#controlsWW {
  width: 100%;
  min-height: calc(100vh - var(--height-header) - var(--height-message) - var(--height-ok));
  max-height: calc(100vh - var(--height-header) - var(--height-message) - var(--height-ok));
  height: calc(100vh - var(--height-header) - var(--height-message) - var(--height-ok));
  overflow-y: scroll;

  padding: 0 0 0 0;
  border-top: 0.24rem solid var(--color-primary-fill);

  display: flex;
  flex-direction: column;
  align-items: center;
}

label {
  margin-left: 0.5rem;
}

#heading {
  grid-template-rows: minmax(2rem, max-content);
  grid-column: 1 / span 3;
}

#messageWrapper {
  position: relative;

  padding: 0;
  height: var(--height-message);
  max-width: 50rem;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

#result {
  font-weight: bold;
  color: var(--color-secondary-text);

  margin-bottom: 1rem;
}

input[type="radio"] {
  margin-left: 1rem;
}

input.formNumber {
  font-size: 1.3rem;
  width: 4rem;
  padding: 0.2rem;
  background-color: var(--color-primary-fill);
  text-align: right;
  margin-top: 0.5rem;
}

#okW {
  position: relative; /* for long ready */
  margin-bottom: 0.5rem;
  width: 100%;
  height: var(--height-ok);
  max-width: 50rem;
  display: flex;
}

#editingW {
  width: 100%;
  max-width: 50rem;
  margin-bottom: 2rem;
  display: flex;
}

#instrument {
  font-size: 1rem;
  padding: 0.2rem;
  margin-top: 0.5rem;
}

#bpwRadios,
#beatsPerBarRadios,
#beatGuideRadios,
#systemRadios {
  font-size: 1rem;
  padding: 0.2rem;
  margin-top: 0.5rem;
}

#controlsW {
  padding: 0 0.5rem 0 0.5rem;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;

  display: grid;
  grid-template-rows: minmax(min-content, max-content) minmax(3rem, auto) minmax(min-content, max-content);
  grid-template-columns: 1fr;
}

#optionsW {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.5rem;
}

.toggleButtonClef {
  min-width: 4rem;
  height: 3.4rem;

  display: flex;
  justify-content: center;
  align-items: center;
}

.toggleStaff {
  padding: 0.3rem;
}

#linkIcon, .clefIcon {
  pointer-events: none;
  height: 100%;
}

#rightButtonWrapper {
  float: right;

  width: 6rem;
  margin-left: auto;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

#ready {
  font-size: 1.5rem;
  margin-left: auto;
  margin-right: 0.6rem;
  background-color: var(--color-primary-light);
  display: flex;
  justify-content: flex-end;
  text-align: right;
  align-items: center;
}

#ready.long {
  position: absolute;
  right: 0;
  font-size: 1.2rem;
}

/* ok button */
#startButton {
  height: 100%;
  width: 6rem;
  text-align: center;
}

#startButton.down {
  background-color: var(--color-emphasis-border);
}

#saveButton {
  height: 100%;
  width: 4rem;
}

#rhythmsWrapper {
  display: grid;
  grid-gap: 0.5rem;
  /* 1 column. */
  grid-template-columns: 1fr;
  /* 2 rows. */
  grid-template-rows: 1.5rem minmax(min-content, max-content);
}

#rhythmsHeading {
  grid-column: 1 / span 1;
  grid-row: 1 / span 1;
}

.rhythmButton {
  background-color: var(--color-primary-fill);

  display: flex;
  align-items: center;
  justify-content: center;
}

.subheading {
  display: flex;
  align-items: flex-end;
}

.setupIntervalButtonGroup {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}

.intervalButton {
  font-size: 1.2rem;
  padding: 0.5rem 0.25rem 0.5rem 0.25rem;
  margin: 0.2rem;
}

.toggleIwhat {
  padding: 0;
  display: flex;
}

.ivPair, .ivSingle {
  padding: 0.5rem;
  min-width: 3rem;
  min-height: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ivSingle {
  font-size: 1.4rem;
}

.setupPitchButtonGroup {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pitchButton {
  font-size: 1.2rem;
  padding: 4rem 0.25rem 0.5rem 0.25rem;
  margin: 0.2rem;
}

.pitchButton.black {
  font-weight: bold;
  padding: 2.5rem 0.25rem 0.5rem 0.25rem;
}

.toggleHighest, .toggleLowest {
  font-size: 1.2rem;
  padding: 2rem 0.5rem 0.5rem 0.5rem;
  margin: 0.2rem;
}

.toggleKey {
  font-size: 1.2rem;
  padding: 2rem 0 0.5rem 0;
  min-width: 2.2rem;
  margin: 0.2rem;
}

#easyKeyW, #moreKeysW, #easyKeysW {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
}

#easyKeysW {
  justify-content: flex-start;
}

.easyKeyIndent {
  width: 100%;
  max-width: 6rem;
}

.easyKey {
  cursor: pointer;
  font-size: 0.9rem;
  margin: 0.3rem;
}

#moreKeysW {
  margin-top: 0.5rem;
  max-width: calc(7 * 2.6rem);
  display: flex;
  justify-content: flex-end;
}

#moreKeys {
  cursor: pointer;
  font-size: 0.9rem;
}

#highestONote, #lowestONote {
  width: auto;
  margin-left: 0.5rem;
}

#highestOText, #lowestOText {
  width: auto;
  margin-right: 0.5rem;
}

#genreButtonWrapper {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.genreButton {
  min-width: 4rem;
  max-width: max-content;
  height: 2rem;
  padding: 1.5rem;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.toggleBeats {
  min-width: 4rem;
}

#moreKeysW.retracted,
#editingW.retracted,
#tempoWrapper.retracted,
#rhythmsWrapper.retracted,
.retracted {
  display: none;
}

#bottomW {
  width: 100%;
  max-width: 100%;
  height: 100%;
  background-color: var(--color-primary-fill);

  display: flex;
  justify-content: center;
}

#bottom {
  width: 100%;
  max-width: 50rem;
  padding: 0 0.5rem 1.5rem 0.5rem;

  display: flex;
}

#bottomLeft {
  font-size: 0.85rem;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#bottomLeft > a, #darkButton {
  padding-top: 0.7rem;
}

#bottomRight {
  margin-left: auto;

  display: flex;
  flex-direction: column;
}

#bpbSig {
  user-select: none;
}

.toggleSystem.disabled {
  opacity: 0.3;
}

#bpwRadios {
  display: flex;
}

#beatEquationW {
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
}

#beatEquation {
  display: flex;
  align-items: flex-end;
}

#oneBeat {
  margin-right: 0.5rem;
}

#bpwNote {
  width: 2rem;
}

#sizeUnit {
  margin-left: 0.5rem;
}

#tempoGapText {
  width: 3.2rem;
}

#ttButton {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

#tgButton {
  margin-bottom: auto;
}

#infoDropToplink {
  position: absolute;
  top: var(--height-ok);
  background-color: var(--color-primary-light);
  z-index: 4;
  margin-left: 0;
}

.privacyNote {
  margin-left: 2rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  display: flex;
}

#anytimeLabel {
  cursor: pointer;
}

.editOption {
  margin-top: 1.5rem;
}

.teacherButton {
  padding: 0.4rem;
}

#you {
  margin-top: 0.5rem;
}
