html {
  overflow: hidden;
}

body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  color: #fff;
  background-color: #2c2c2c;
  -webkit-overflow-scrolling: touch;
}

body,
body * {
  font-family:
    Inter,
    -apple-system,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 16px;
  font-weight: 300;
  margin: 0;
  padding: 0;
  user-select: none;
  /* Standard syntax */
  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color 2s;
  padding: 16px;
}

#instruction,
#status {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 24px;
  transition: all 2s;
  padding: 24px 0;
}

#instruction.hidden,
#status.hidden {
  opacity: 0;
}

#touch-area {
  position: relative;
  flex: 1;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  max-height: calc(min(100vw, 480px) - 32px);
  align-self: center;
  background-color: #383838;
  border-radius: 7.5%;
  overflow: hidden;
  transition: background-color 2s;
}

#loader,
#touch-local,
#touch-other {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background-color: #cf3697;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 2s;
  animation: none;
}

#loader.waiting {
  animation: pulse 2s infinite;
}

#touch-local.touching,
#touch-other.touching {
  transition: none;
  opacity: 1;
}

.primary,
.secondary {
  color: #fff;
}

.secondary {
  opacity: 0.4;
}

#action {
  opacity: 1;
  color: #cf3697;
}

#link {
  appearance: none;
  background-color: #333;
  border: none;
  color: #fff;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.25;
  line-height: 24px;
  display: block;
  height: 24px;
}

@keyframes pulse {
  0% {
    opacity: 0.125;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.125;
  }
}

body.real-touch,
body.real-touch #touch-area {
  transition: background-color 4s;
  background-color: #cf3697;
}
