html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.sp {
  position: relative;
  width: min(88vw, 368px);
  display: grid;
  place-items: center;
  gap: 8px;
}

.sp__hit {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sp__hit:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 4px;
  border-radius: 16px;
}

.sp__scene {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 16/10;
}

.sp__char {
  position: absolute;
  bottom: 6%;
  left: 50%;
  width: 34%;
  aspect-ratio: 1/0.92;
  background: #6ec8ff;
  border: 3px solid #17141a;
  border-radius: 50% 50% 46% 46%/44% 44% 56% 56%;
  transform: translateX(-50%);
}

.sp__eye {
  position: absolute;
  top: 32%;
  width: 17%;
  aspect-ratio: 1;
  color: #17141a;
}

.sp__eye--l {
  left: 20%;
}

.sp__eye--r {
  right: 20%;
}

.sp__eye svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sp__mouth {
  position: absolute;
  top: 56%;
  left: 50%;
  width: 18%;
  height: 9%;
  border: 3px solid #17141a;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.sp__cheek {
  position: absolute;
  top: 50%;
  width: 16%;
  aspect-ratio: 1;
  background: #ff9ebb;
  border-radius: 50%;
  opacity: 0.55;
}

.sp__cheek--l {
  left: 2%;
}

.sp__cheek--r {
  right: 2%;
}

.sp__eye {
  animation-name: spTwinkle;
  animation-duration: 1s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes spTwinkle {
  0%, 100% {
    transform: scale(0.82) rotate(0deg);
  }
  50% {
    transform: scale(1.12) rotate(12deg);
  }
}
.sp__auto, .sp__fly {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  color: #c2361a;
  z-index: 2;
  pointer-events: none;
}

.sp__auto svg, .sp__fly svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sp__auto {
  animation-name: spRise;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.sp__auto--1 {
  left: 30%;
  bottom: 34%;
  animation-delay: 0s;
}

.sp__auto--2 {
  left: 56%;
  bottom: 30%;
  animation-delay: 0.66s;
}

.sp__auto--3 {
  left: 42%;
  bottom: 44%;
  animation-delay: 1.32s;
}

@keyframes spRise {
  0% {
    transform: translateY(10px) scale(0.2);
  }
  18% {
    transform: translateY(-16px) scale(1.05);
  }
  40% {
    transform: translateY(-34px) scale(0.92);
  }
  55% {
    transform: translateY(-46px) scale(0.4);
  }
  60%, 100% {
    transform: translateY(-52px) scale(0);
  }
}
.sp__fly {
  transform: scale(0);
  animation: spRise 900ms cubic-bezier(0.2, 1.2, 0.4, 1) 1 forwards;
}

.sp__count {
  min-width: 24px;
  padding: 0 8px;
  box-sizing: border-box;
  background: #17141a;
  color: #ffd23f;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 20px;
}

@media (max-width: 340px) {
  .sp {
    width: min(76vw, 368px);
    gap: 4px;
  }
  .sp__char {
    border-width: 2px;
  }
  .sp__count {
    font-size: 11px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sp__auto,
  .sp__fly,
  .sp__eye {
    animation: none !important;
  }
  .sp__auto, .sp__fly {
    transform: scale(0);
  }
}
