:root {
  --width-side: 3rem;
}

@media screen and (max-height: 20rem) {
  :root {
    --header-height: 0.5rem;
  }

  #heading {
    display: none;
  }

  #tinyLogoWrapper {
    display: block;
  }
}

#messageWrapper {
  top: 2rem;
}

.infoText {
  margin-bottom: 0.3rem;
}

.info.top {
  border-bottom-right-radius: 2rem;
  border-bottom-left-radius: 2rem;
}

.info.tempo {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  margin-top: 0;
  padding-top: 1.5rem;
}

.info.infoControls {
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

#tempoSlider, #volumeSlider {
  width: 100%;
  max-width: 40rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem 0 0.5rem;

  display: flex;
  flex-direction: row;
}

#tempoSlider {
  margin-top: 0.5rem;
}

#tempoRange, #volumeRange {
  width: 100%;
}

img.volumeIcon {
  pointer-events: none;
  width: 1.2rem;
  height: 1.2rem;
}

#visualW {
  position: relative;
  width: 100%;
  padding: 0;
  height: 100%;

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

#setupW {
  width: 100%;
  height: 100%;
  max-width: 30rem;
  max-height: 30rem;
  padding: 0 0.5rem 0 0.5rem;

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

#setupTop, #linkTop {
  display: flex;
  width: 100%;
}

#playButton2, #setupIconTop {
  margin-bottom: 0.5rem;
  max-width: 4rem;
  width: 4rem;
}

#okButton, #okButtonLink {
  margin-bottom: 0.5rem;
  margin-left: auto;
  height: 2rem;
  width: 6rem;
}

#playButton2 {
  margin-right: auto;
}

#setupIconTop {
  margin-left: auto;
  margin-right: auto;
}

.divisionToggle {
  margin: 0.25rem;
  padding: 0.5rem;
  min-width: 2.5rem;
  border: 0.15rem solid var(--color-primary-border);
}

.divisionToggle.selected {
  border: 0.15rem solid var(--color-emphasis-border);
}

#divisions.setup > .divisionW > .divisionToggle {
  margin-left: 0;
}

.divisionSetup {
  width: 100%;

  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: repeat(11, 1fr);
}

#primaries {
  position: relative;
  max-width: 40rem;
  width: 100%;
  max-height: 6.4rem;
  height: 100%;
  padding: 0 0.5rem 0 0.5rem;

  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#primaries.retracted {
  display: none;
}

#primaries.infoOn {
  height: 12.5rem;
  min-height: 6.4rem;
}

.primaryToggleW {
  width: 3rem;
  height: 3rem;
  margin: 0.1rem;

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

.primaryToggleW.retracted {
  display: none;
}

.primaryToggle {
  margin: 0;
  padding: 0;
  width: 2.2rem;
  height: 2.2rem;
  border: 0.1rem solid var(--color-emphasis-border);
  border-radius: 50%;
}

.primaryToggle.selected {
  width: 3rem;
  height: 3rem;
}

#infoButton.retracted,
#setupW.retracted,
#diceWW.retracted,
.dieW.retracted,
#visualW.retracted,
#linkButton.retracted,
#links.retracted,
#divisions.retracted,
#setupTop.retracted,
#tempoSlider.retracted,
#volumeSlider.retracted,
#setupButton.retracted,
#fullscreenButton.retracted,
.divisionSetup.retracted {
  display: none;
}

#linkButton, #setupButton, #fullscreenButton {
  cursor: pointer;
  margin-left: 0.5rem;
}

#linkButton, #infoButton, #setupButton, #fullscreenButton {
  z-index: 2;
  width: 2rem;
  height: 2rem;

  display: flex;
  align-items: center;
}

.drumToggle {
  width: 100%;
  display: flex;
  align-items: center;
  opacity: 0.5;
  padding: 0;
}

#setupButton, #fullscreenButton {
  display: flex;
}

.drumIcon {
  pointer-events: none;
  width: 100%;
  padding: 20%;
}

.divisionIcon {
  pointer-events: none;
  width: 100%;
  padding: 5% 50% 50% 5%;
}

#divisions.setup > .divisionW > .divisionButton > .divisionIcon {
  display: none;
}

#infoW {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  width: auto;

  max-width: 40rem;
  display: flex;
  justify-content: flex-start;
}

#infoW.on {
  position: static;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#infoButton {
  padding: 0;
}

#infoButton.on {
  margin: 0;
  width: auto;
  padding: 0 0.4rem 0 0;
}

#linkIcon, #infoIcon, .drumIcon, #playIcon, #setupIcon, #fullscreenIcon {
  pointer-events: none;
  height: 100%;
  max-width: 100%;
}

#infoIcon {
  padding: 0.3rem;
}

#playIcon, #playButton2, #setupIconTop {
  max-height: 2rem;
}

#hammer {
  margin: 0;
  transform-origin: bottom center;
  transform-box: fill-box;
  stroke: var(--color-emphasis-fill);
  fill: var(--color-emphasis-fill);
}

.loopCircle {
  transform-box: fill-box;
}

g {
  z-index: -1;
}

g.primary {
  z-index: auto;
}

#ttButton {
  margin-top: 0.5rem;
}

#howtoEmbed {
  margin-top: 0.5rem;
  border: 0.12rem solid var(--color-emphasis-border);
}

#links {
  width: 100%;
  max-width: 40rem;
  padding: 0 0.5rem 0 0.5rem;

  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

.linksLine {
  margin: 0.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hugTop {
  margin-top: 0;
}

.url {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0;
  display: flex;
  width: 100%;
}

#linkEmbedding {
  font-size: 1.1rem;
}

.copy {
  width: 1.1rem;
  margin-top: 0;
  padding: 0;
  border: none;
  display: flex;
}

#hereEmbedding {
  margin-top: 2rem;
}

#linkTop {
  margin-bottom: 2rem;
}

#gearI, #chainI {
  pointer-events: none;
  user-select: none;
  width: 1rem;
  height: 1rem;
}

#diceWW {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.dieW {
  perspective-origin: 150% -50%;
  perspective: 50rem;
  width: 100%;
  max-width: 9rem;
  margin: 2rem 0 2rem 0;

  display: flex;
  justify-content: center;
}

.die {
  position: relative;
  transform-style: preserve-3d;
  width: 100%;

  display: flex;
}

.die, .side {
  width: calc(var(--width-side) * 2);
  height: calc(var(--width-side) * 2);
}

.side {
  cursor: pointer;
  position: absolute;

  background-color: var(--color-primary-fill);
  border: 0.12rem solid var(--color-emphasis-fill);
  border-radius: 1%;

  display: flex;
  justify-content: center;
}

/* back */
.side5 {
  transform: rotateY(180deg) translateZ(var(--width-side));
}
/* left */
.side4 {
  transform: rotateY(-90deg) translateZ(var(--width-side));
}
/* top */
.side3 {
  transform: rotateX(90deg) translateZ(var(--width-side));
}
/* right */
.side2 {
  transform: rotateY(90deg) translateZ(var(--width-side));
}
/* bottom */
.side1 {
  transform: rotateX(-90deg) translateZ(var(--width-side));
}
/* front */
.side0 {
  transform: translateZ(var(--width-side));
}

.diceImg {
  user-select: none;
  pointer-events: none;
  padding: 15%;
}

.die.side1 {
  transform: rotateX(-270deg);
}

.die.side2 {
  transform: rotateY(-90deg);
}

.die.side3 {
  transform: rotateX(-90deg);
}

.die.side4 {
  transform: rotateY(90deg);
}

.die.side5 {
  transform: rotateY(180deg);
}

#rollButton {
  width: 5rem;
  height: 3rem;
}

.diceRhythmToggle0, .diceRhythmToggle1, .diceRhythmToggle2, .diceRhythmToggle3 {
  width: 4rem;
  height: 4rem;
  margin: 0.25rem;
}

.diceRhythmImg {
  user-select: none;
  pointer-events: none;
  width: 100%;
  height: 100%;
  padding: 15%;
}

.setupH {
  width: 100%;
  font-weight: bold;
  margin-top: 1rem;
}
