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

  #heading {
    display: none;
  }

  #tinyLogoWrapper {
    display: block;
  }
}

.titleSection {
  font-weight: normal;
}

div.outer,
div.wrapper {
  min-width: auto;
}

#messageWrapper {
  padding-top: 0;
  padding-bottom: 0;
}

#cellsWrapper {
  margin-top: 2rem;
  /* 100vh - heading - message - bottom bar - bottom buttons - bottom space */
  width: min(100vw, calc(100vh - 2rem - 2rem - 2rem - 6rem - 1rem));
  max-width: 40rem;

  display: flex;
  flex-direction: column;
}

#drumW {
  margin-left: auto;
}

#hereW {
  margin-bottom: 0.5rem;
  width: 100%;
  max-width: min(40rem, 100%);
  display: flex;
}

#here {
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.hereGroove {
  margin: 0 0.25rem 0 0.25rem;
}

#appWrapper.appFullWidth > #cellsWrapper {
  max-width: none;
}

#cells {
  width: 100%;
  max-height: 100%;

  display: grid;
  grid-gap: 0.5rem;
}

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

.memory.emphasis.up {
  background-color: var(--color-emphasis-fill);
}

.memory.one.up,
.memory.two.up {
  border: 0.12rem solid var(--color-emphasis-fill);
  pointer-events: none;
  background-color: var(--color-primary-fill);
}

.memory {
  margin-right: 0.25rem;
  margin-left: 0.25rem;

  padding: 0.25rem;

  height: 4rem;
}

#buttonsWrapper {
  width: 100%;
  max-width: 40rem;
  margin-top: 0;
  margin-bottom: 2rem;
  height: 4rem;
  padding-top: 0;
  padding-bottom: 0;

  display: grid;
  grid-gap: 0.5rem;
  grid-template-columns: auto auto;
}

#rightButtons, #leftButtons {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#setupEx {
  bottom: 0.25rem;
}

#rightButtons {
  justify-content: flex-end;
}

.memHighlight {
  border-color: var(--color-transparent);
  pointer-events: none;
  box-shadow: 0 0 1rem 1rem var(--color-emphasis-fill);
  transition: box-shadow 1s;
}

.memFade {
  opacity: 0.5;
  box-shadow: none;
}

.cell {
  display: flex;
}

#fullscreenButton {
  width: 4rem;
  height: 4rem;
  margin-left: 0.5rem;
}

#fullscreenIcon {
  pointer-events: none;
  height: 50%;
  max-width: 50%;
}


.star {
  position: absolute;

  opacity: 0;
  padding: 0;
  width: 0;
  height: 0;

  transform: translate(-50%,-50%);

  display: flex;
}

.star > img {
  width: 100%;
}

#score {
  line-height: 1.3;
  text-align: center;
}

.subscore {
  font-size: 0.8rem;
}

@media screen and (max-height: 30rem) {
  #cellsWrapper {
    /* calc(100vh - message - bottom bar - bottom buttons - bottom space) */
    width: min(100vw, calc(100vh - 2rem - 2rem - 6rem));
  }
}

@media screen and (max-height: 50rem) {
  #wrapper {
    justify-content: center;
  }
}
