* {
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}
html,
body {
  height: 100vh;
  width: 100vw;
  margin: 0;
}
html {
  overflow: hidden;
}
body {
  background: var(--background-color);
  position: relative;
  overflow: auto;
}
body.frozen {
  overflow-y: hidden;
}
h1,
h2,
p,
p::after,
label {
  color: var(--text-color);
}
p,
label {
  font-family: var(--text-font);
  margin: 0;
  text-align: center;
  user-select: none;
}
section.template {
  display: none;
}
#screen-overlay section.template {
  display: inherit;
}
#screen-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: var(--background-color);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: scroll;
}
#screen-overlay.hidden {
  display: none;
}
#landing-template {
  height: 100%;
  width: 100%;
}
#landing-template #landing-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}
#landing-template #landing-content p.tap-to-play {
  font-size: 1.5rem;
  animation: shine 1s alternate infinite;
}
#loading-template {
  height: 100%;
  width: 100%;
}
#loading-template #loading-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#loading-template #loading-content p {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  font-size: 1.5rem;
  height: 1.5em;
  line-height: 1.5em;
}
#menu-template {
  padding: 30px 0 60px;
}
#menu-template .menu-buttons .btn {
  margin: 5px 0;
}
#menu-template #submenu-mode-selector {
  margin: 1em;
}
#menu-template #submenu-mode-selector .mode-change-button {
  cursor: pointer;
}
#menu-template #submenu-mode-selector p {
  font-size: 1.7rem;
  padding: 1rem 0.3rem;
}
#menu-template .submenu.hidden {
  display: none;
}
#menu-template #submenu-exploration #level-picker {
  margin-top: 2rem;
  justify-content: center;
}
#menu-template #submenu-exploration #level-picker #picked-level {
  margin: 0 1rem;
}
#menu-template #submenu-exploration #level-picker #minus {
  line-height: 0.3em;
}
#menu-template #submenu-workouts .btn {
  line-height: 1em;
}
#menu-template #submenu-workouts span {
  opacity: 0.75;
}
#menu-template #submenu-settings .range-row {
  width: 450px;
}
#menu-template #submenu-settings .range-row label {
  margin-left: 20px;
  width: 250px;
  text-align: left;
}
@media (max-width: 500px) {
  #menu-template #submenu-settings .range-row {
    flex-flow: column;
  }
  #menu-template #submenu-settings .range-row label {
    margin-left: 0;
    margin-top: 10px;
    text-align: center;
  }
}
#menu-template #submenu-settings .switch {
  margin-right: 15px;
}
#menu-template #submenu-settings .switch#theme-toggle.on {
  background-color: var(--purple-30);
  outline-color: var(--purple-30);
}
#menu-template #submenu-settings span.version {
  opacity: 0.5;
}
#menu-template #submenu-settings #share-button {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  border: solid 1px var(--text-color);
  margin-right: 10px;
  cursor: pointer;
}
#menu-template #submenu-settings #share-button p {
  line-height: 1em;
  padding-top: 0.45em;
}
#menu-template #submenu-settings #share-button:hover {
  background: var(--text-color);
}
#menu-template #submenu-settings #share-button:hover p {
  color: var(--background-color);
}
#menu-template #submenu-settings #qr img {
  width: 120px;
}
#game-over-template,
#workout-complete-template {
  padding-top: 80px;
}
#game-over-template h1,
#workout-complete-template h1 {
  font-family: var(--text-font);
  text-align: center;
  text-transform: uppercase;
}
#game-over-template p,
#workout-complete-template p {
  font-size: 1.2rem;
}
#game-over-template button,
#workout-complete-template button {
  margin: 2em 0;
}
#play-area {
  width: var(--main-size);
  height: var(--main-size);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 20px auto 60px;
}
#number-container {
  width: auto;
  /* Set in JS */
  height: auto;
  /* Set in JS */
  z-index: 1;
  outline: none;
  outline-offset: -5px;
  font-size: var(--main-font-size);
  text-shadow: var(--text-color) 0 0 1px;
  background: var(--container-color);
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
#number-container.win {
  outline: solid 7px var(--win-color);
  outline-offset: -5px;
  z-index: 2;
}
#number-container.lose {
  outline: solid 7px var(--lose-color);
  outline-offset: -5px;
  z-index: 2;
}
#number-container p#number-to-guess {
  padding-bottom: 0.27em;
  font-family: var(--numbers-font);
}
#number-container p#number-to-guess.shuffling {
  opacity: 0.2;
}
#number-container #xp-container {
  position: absolute;
  right: 5px;
  height: calc(100% - 10px);
  width: 6%;
  overflow: hidden;
}
#number-container #xp-container #xp-bar {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--progression-bars-color);
  width: 100%;
  height: 0%;
  /* Set in JS */
  transition: height 0.5s ease-out;
}
#prime-container {
  height: var(--main-size);
  width: var(--main-size);
}
#feedback-container {
  width: 100%;
  height: 60px;
  position: fixed;
  z-index: 10;
  left: 0;
  bottom: 0;
  background: var(--container-color);
  border-top: var(--outline-faintest);
}
#feedback-container.win {
  outline: var(--win-color) solid 2px;
}
#feedback-container.lose {
  outline: var(--lose-color) solid 2px;
}
#feedback-container p {
  font-size: 1.8rem;
  line-height: 1.8rem;
  padding: 0.9rem 2rem;
  color: var(--text-color);
}
#feedback-container p span {
  font-size: 1.2rem;
  line-height: 1.2rem;
}
.prime {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primes-background-color);
  outline: var(--outline-faintest);
  outline-offset: -3px;
  cursor: pointer;
  padding: 0px;
  height: auto;
  /* Set in JS */
  width: auto;
  /* Set in JS */
  /* Selected once */
  /* Selected twice or more */
}
.prime.hidden {
  display: none;
}
.prime:not([data-select-count="0"]) {
  z-index: 1;
  background: var(--primes-selected-background-color);
  outline: var(--outline-thick);
  outline-offset: -4px;
}
.prime:not([data-select-count="0"]):not([data-select-count="1"])::after {
  content: attr(data-select-count);
  color: var(--primes-selected-text-color);
  font-size: calc(var(--main-font-size) / 3.5);
  font-family: var(--numbers-font);
  padding-bottom: calc(var(--main-font-size) / 3.5);
  padding-left: 2px;
}
.prime p {
  display: inline;
  font-family: var(--numbers-font);
  font-size: calc(var(--main-font-size) / 2.5);
  padding-bottom: 0.3em;
  color: var(--primes-text-color);
  vertical-align: middle;
  pointer-events: none;
}
.prime:not([data-select-count="0"]) p {
  color: var(--primes-selected-text-color);
}
#menu {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--container-color);
  cursor: pointer;
  outline: var(--outline-faintest);
}
#menu.hidden {
  display: none;
}
#menu .bar {
  background: var(--text-color);
  border-radius: 1px;
  width: 30px;
  height: 4px;
  position: absolute;
  left: 15px;
  transition: transform 200ms, height 200ms, left 150ms;
}
#menu .bar-1 {
  top: 18px;
  transform-origin: 0 0;
}
#menu .bar-2 {
  top: 28px;
  transition: height 200ms;
}
#menu .bar-3 {
  top: 38px;
  transform-origin: 0 4px;
}
#menu.open .bar {
  left: 21px;
}
#menu.open .bar-1 {
  transform: rotate(45deg);
}
#menu.open .bar-2 {
  height: 0;
  transition: height 0ms;
}
#menu.open .bar-3 {
  transform: rotate(-45deg);
}
#info {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: calc(100% - 60px);
  height: 60px;
  background: var(--container-color);
  border-bottom: var(--outline-faintest);
}
#info p#info-content {
  font-family: var(--text-font);
  font-size: 1.4rem;
  padding: 8px 1em;
  text-align: left;
}
#info p#info-content span {
  font-size: 1.9rem;
}
#step-bar-container {
  position: fixed;
  z-index: 10;
  top: 60px;
  left: 0;
  width: 100%;
  height: 8px;
  overflow: hidden;
}
#step-bar-container #step-bar {
  background: var(--progression-bars-color);
  width: 0%;
  /* Set in JS */
  height: 100%;
  transition: width 0.5s ease-out;
}
@keyframes shine {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}
