html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: #000 url("yeahbaby.jpg") center center / cover no-repeat;
  color: #fff;
  font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua",
    Georgia, serif;
  touch-action: none;
}

kbd {
  font-family: Menlo, Consolas, "Roboto Mono", monospace;
}

.is-hidden {
  display: none;
}

.txanim {
  animation-fill-mode: both;
  animation-iteration-count: 1;
}

.start {
  display: none;
  position: absolute;
  width: 200px;
  height: 200px;
  left: calc(50% - 100px);
  top: calc(50% - 100px);

  animation-duration: 500ms;
  animation-timing-function: ease-in-out;
  transform-origin: 37.5% 37.5%;
}

.has-js .start {
  display: block;
}

.start button {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.start button img {
  position: absolute;
  left: calc(50% - 48px);
  top: calc(50% - 48px);
  width: 96px;
  height: 96px;
}

.start.txout {
  pointer-events: none;
  animation-name: start--txout--rm;
}

@media (prefers-reduced-motion: no-preference) {
  .start.txout {
    animation-name: start--txout;
  }
}

@keyframes start--txout--rm {
  to {
    opacity: 0;
  }
}

@keyframes start--txout {
  16% {
    transform: scale(1.125) rotate(-10deg);
  }
  100% {
    transform: scale(0) rotate(1turn);
  }
}

.dimmer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.625;
  animation-duration: 500ms;
  animation-timing-function: ease-in-out;
}

.dimmer.txout {
  pointer-events: none;
  animation-name: dimmer--txout;
}

@keyframes dimmer--txout {
  to {
    opacity: 0;
  }
}

.message {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 25%;
  padding: 0 1em;
  line-height: 1.5;
  text-align: center;
}

.keyboardParent {
  position: absolute;
  left: 1em;
  height: 7em;
  bottom: 0em;
  right: 1em;
  text-align: center;
  -webkit-user-select: none;
  overflow: hidden;
}

.keyboard {
  width: 100%;
  height: calc(100% - 1em);
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: stretch;

  max-width: 40em;
  margin: 0 auto;

  opacity: 0;
  animation-duration: 500ms;
  animation-delay: 250ms;
  animation-timing-function: ease-out;
}

.keyboard.txin {
  animation-name: keyboard--txin--rm;
}

@keyframes keyboard--txin--rm {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .keyboard {
    opacity: 1;
  }

  .keyboard.txin {
    animation-name: keyboard--txin;
  }
}

@keyframes keyboard--txin {
  0% {
    transform: translateY(125%);
  }
  100% {
    transform: translateY(0);
  }
}

.keyboard__key {
  flex: 1 1 0;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-end;
  align-items: center;

  margin: 0 0.125em;
  border: 1px solid #fff;

  cursor: pointer;
  color: #000;
  background-color: rgba(255, 255, 255, 0.875);
}

.keyboard__key span {
  font-size: 0.625em;
  margin: 0.25rem 0;
  opacity: 0.5;
}

.keyboard__key--sharp {
  color: #fff;
  border-color: #000;
  background-color: rgba(0, 0, 0, 0.875);
}

.keyboard__key--pressed {
  box-shadow: inset 0 0.125em 0.5em #f09;
  transform: translateY(2px);
}
