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

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

.jl {
  position: relative;
  display: grid;
  place-items: end center;
}

.jl__count {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  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;
}

.jl__hit {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.jl__hit:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 4px;
  border-radius: 16px;
}

.jl__scene {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: clamp(150px, 48vw, 210px);
  height: clamp(120px, 38vw, 168px);
}

.jl__shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 62%;
  height: 12px;
  background: rgba(23, 20, 26, 0.22);
  border-radius: 50%;
  transform: translateX(-50%);
}

.jl__body {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 56%;
  aspect-ratio: 1/0.82;
  background: #4cd4a6;
  border: 3px solid #17141a;
  border-radius: 46% 46% 42% 42%/58% 58% 38% 38%;
  transform: translateX(-50%);
}

.jl__shine {
  position: absolute;
  top: 14%;
  left: 18%;
  width: 22%;
  height: 16%;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.jl__eye {
  position: absolute;
  top: 34%;
  width: 9%;
  aspect-ratio: 1;
  background: #17141a;
  border-radius: 50%;
}

.jl__eye--l {
  left: 26%;
}

.jl__eye--r {
  right: 26%;
}

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

.jl.is-demo .jl__body {
  animation-name: jlHop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.jl.is-demo .jl__shadow {
  animation-name: jlShadow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes jlHop {
  0% {
    transform: translateX(-50%) scale(1, 1);
  }
  8% {
    transform: translateX(-50%) scale(1.16, 0.66);
  }
  16% {
    transform: translateX(-50%) translateY(-52px) scale(0.9, 1.16);
  }
  24% {
    transform: translateX(-50%) translateY(-18px) scale(0.98, 1.05);
  }
  30% {
    transform: translateX(-50%) scale(1.12, 0.78);
  }
  38% {
    transform: translateX(-50%) scale(0.96, 1.06);
  }
  46% {
    transform: translateX(-50%) scale(1.06, 0.93);
  }
  54% {
    transform: translateX(-50%) scale(0.97, 1.04);
  }
  62% {
    transform: translateX(-50%) scale(1.03, 0.97);
  }
  70%, 100% {
    transform: translateX(-50%) scale(1, 1);
  }
}
@keyframes jlShadow {
  0% {
    transform: translateX(-50%) scale(1, 1);
  }
  8% {
    transform: translateX(-50%) scale(1.1, 1);
  }
  16% {
    transform: translateX(-50%) scale(0.55, 0.8);
  }
  30% {
    transform: translateX(-50%) scale(1.08, 1);
  }
  40%, 100% {
    transform: translateX(-50%) scale(1, 1);
  }
}
.jl__body--boing {
  animation: jlBoing 700ms cubic-bezier(0.28, 1.7, 0.42, 1) 1;
}

@keyframes jlBoing {
  0% {
    transform: translateX(-50%) scale(1.2, 0.6);
  }
  30% {
    transform: translateX(-50%) translateY(-72px) scale(0.86, 1.22);
  }
  55% {
    transform: translateX(-50%) scale(1.18, 0.74);
  }
  75% {
    transform: translateX(-50%) scale(0.96, 1.06);
  }
  100% {
    transform: translateX(-50%) scale(1, 1);
  }
}
@media (max-width: 340px) {
  .jl__count {
    font-size: 11px;
    line-height: 16px;
  }
  .jl__body {
    border-width: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jl.is-demo .jl__body,
  .jl.is-demo .jl__shadow,
  .jl__body--boing {
    animation: none !important;
  }
}
