.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 12;
  pointer-events: none;
}

.balloon {
  position: absolute;
  left: 0;
  top: 0;
  aspect-ratio: 1;
  background: none;
  padding: 0;
  will-change: transform;
  pointer-events: auto;
  touch-action: none;
}

.balloon .tint-balloon {
  position: absolute;
  inset: 0;
}

.balloon span {
  position: absolute;
  left: 0;
  right: 0;
  top: 19%;
  text-align: center;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 3px 0 rgba(61, 58, 92, 0.25);
  pointer-events: none;
}

.balloon.pop .tint-balloon,
.balloon.pop span {
  animation: balloon-pop 0.26s ease-out forwards;
}

.goal {
  position: fixed;
  top: calc(max(14px, env(safe-area-inset-top)) + 78px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 999px;
  padding: 4px 26px;
  font-size: 30px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 10;
}

.mascot-box.corner {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 10;
  pointer-events: none;
}

.mascot-box.corner .bubble {
  max-width: min(280px, calc(100vw - 600px - clamp(90px, 14vw, 150px)));
}

@media (orientation: portrait) {
  .mascot-box.corner {
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 84px);
  }
  .mascot-box.corner .bubble {
    max-width: min(420px, calc(100vw - 60px - clamp(90px, 14vw, 150px)));
    margin-bottom: 40px;
  }
}

.start-balloons {
  display: flex;
  justify-content: center;
  gap: 6px;
  height: 140px;
}

.start-balloons .tint-balloon {
  width: 110px;
  animation: bob 2.4s ease-in-out infinite;
}

.start-balloons .tint-balloon:nth-child(2) {
  animation-delay: -0.8s;
  transform: translateY(-10px);
}

.start-balloons .tint-balloon:nth-child(3) {
  animation-delay: -1.6s;
}

@keyframes balloon-pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  60% {
    transform: scale(1.3);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.balloon.appear .tint-balloon,
.balloon.appear span {
  animation: pop-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.speed {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 800;
  font-size: 20px;
}

.speed button {
  min-width: 72px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--sky);
  font-size: 20px;
  font-weight: 800;
  transition: transform 0.1s ease, background 0.2s ease;
}

.speed button:active {
  transform: scale(0.94);
}

.speed button.on {
  background: var(--mint-deep);
  color: #fff;
}
