* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.wrap {
  width: 100%;
  height: 100%;
  background: #28c7c7;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  text-align: center;
  touch-action: none;
}
.wrap .container {
  width: 90%;
  max-width: 640px;
  height: 90%;
  overflow: auto;
  background-color: #fffffe;
  border: 3px solid #333132;
  box-shadow: 0px 0px 3px 3px #403d3f;
  border-radius: 5px;
}
.wrap .container button {
  background-color: #c62828;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.wrap .container button:hover, .wrap .container button:focus {
  background-color: #e53935;
  color: #fff;
}
.wrap .container button:active {
  background-color: #8e0000;
  color: #fff;
}
.wrap .container button:disabled {
  opacity: 0.65;
  pointer-events: none;
}
.wrap .container h1 {
  margin: 60px 0 30px;
  font-weight: 400;
  font-size: 1.6em;
}
.wrap .container .stages {
  width: 100%;
  margin-top: 60px;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
}
.wrap .container .stages.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .stages.hide {
  display: none;
}
.wrap .container .stages p {
  margin-bottom: 30px;
  font-size: 1.4em;
}
.wrap .container .stages .stageBtns {
  width: 94%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.wrap .container .stages .stageBtns button {
  width: 50px;
  height: 50px;
  margin: 4px;
  font-size: 1.4em;
}
.wrap .container .count {
  width: 100%;
  min-height: 60px;
  font-size: 3em;
  margin-bottom: 30px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
}
.wrap .container .count.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .count.hide {
  display: none;
}
.wrap .container .count.red {
  color: #c62828;
}
.wrap .container .count.msg {
  font-size: 1.4em;
  color: #c62828;
}
.wrap .container .btnArea {
  width: 94%;
  max-width: 500px;
  height: 200px;
  margin: 20px auto;
  border: 5px solid #333132;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
}
.wrap .container .btnArea.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .btnArea.hide {
  display: none;
}
.wrap .container .btnArea .startBtn,
.wrap .container .btnArea .resetBtn {
  display: block;
  width: 80%;
  padding: 12px 24px;
  font-size: 1.4em;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.4s;
}
.wrap .container .btnArea .startBtn.show,
.wrap .container .btnArea .resetBtn.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .btnArea .startBtn.hide,
.wrap .container .btnArea .resetBtn.hide {
  display: none;
}
.wrap .container .btnArea .mainBtn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #c62828;
  box-shadow: 1px 3px #7a0519;
  color: #fff;
  font-size: 1.4em;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: none;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  opacity: 0;
  transition: opacity 0.4s;
}
.wrap .container .btnArea .mainBtn.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .btnArea .mainBtn:hover {
  opacity: 0.9;
}
.wrap .container .btnArea .mainBtn:active {
  box-shadow: 1px 2px #660111;
  position: relative;
  top: 2px;
}
.wrap .container .btnArea .mainBtn.hide {
  display: none;
}
.wrap .container .btnArea .mainBtn.anime1 {
  animation-name: anime1;
}
.wrap .container .btnArea .mainBtn.anime2 {
  animation-name: anime2;
}
.wrap .container .btnArea .mainBtn.anime3 {
  animation-name: anime3;
}
.wrap .container .btnArea .mainBtn.anime4 {
  animation-name: anime4;
}
.wrap .container .btnArea .mainBtn.anime5 {
  animation-name: anime5;
}
.wrap .container .closeBtn {
  margin-top: 60px;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
}
.wrap .container .closeBtn.show {
  opacity: 1;
  transform: scale(1);
}
.wrap .container .closeBtn.hide {
  display: none;
}
.wrap .container .closeBtn .material-symbols-outlined {
  cursor: pointer;
  font-size: 1.6em;
  color: #333;
}

@keyframes anime1 {
  0% {
    transform: translateX(0) scale(1);
  }
  25% {
    transform: translateX(300px) scale(1);
  }
  75% {
    transform: translateX(-300px) scale(1);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}
@keyframes anime2 {
  0% {
    transform: translateX(0) scale(1);
  }
  25% {
    transform: translateX(300px) scale(1);
  }
  50% {
    transform: translateX(0) scale(0);
  }
  75% {
    transform: translateX(-300px) scale(1);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}
@keyframes anime3 {
  0% {
    transform: translateX(0) scale(1);
  }
  30% {
    transform: translateX(0) scale(1);
  }
  40% {
    transform: translateX(300px) scale(1);
  }
  60% {
    transform: translateX(-300px) scale(1);
  }
  80% {
    transform: translateX(300px) scale(1);
  }
  90% {
    transform: translateX(0) scale(1);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}
@keyframes anime4 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  20% {
    transform: translate(100px, 50px) scale(1);
  }
  40% {
    transform: translate(-200px, -50px) scale(0.5);
  }
  60% {
    transform: translate(300px, 150px) scale(1.5);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}
@keyframes anime5 {
  0% {
    transform: translateX(0) scale(1);
  }
  20% {
    transform: translateX(0) scale(1);
  }
  21% {
    transform: translateX(0) scale(0);
  }
  33% {
    transform: translateX(100px) scale(0);
  }
  34% {
    transform: translateX(100px) scale(1);
  }
  54% {
    transform: translateX(100px) scale(1);
  }
  55% {
    transform: translateX(100px) scale(0);
  }
  67% {
    transform: translateX(-100px) scale(0);
  }
  68% {
    transform: translateX(-100px) scale(1);
  }
  88% {
    transform: translateX(-100px) scale(1);
  }
  89% {
    transform: translateX(-100px) scale(0);
  }
  100% {
    transform: translateX(0) scale(0);
  }
}
@media (max-width: 400px) {
  .wrap .container .btnArea .mainBtn {
    width: 90px;
    height: 90px;
  }
}