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

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

.screen {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 280px);
  height: 148px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 112px;
  height: 32px;
  border-radius: 12px;
  background: #2f6df6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pi {
  display: block;
  width: 14px;
  height: 14px;
}

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

.tile {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 32px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  color: #17141a;
}

.spot {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 120px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(23, 20, 26, 0.74);
  transform-origin: left center;
  transform: translateX(0) scaleX(1);
  scale: 1;
}

.stage.is-demo .spot {
  animation: move 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite, spot-land 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite;
}

.ring {
  position: absolute;
  inset: 0;
  border: 2px solid #fff;
  border-radius: inherit;
  opacity: 0;
}

.stage.is-demo .ring {
  animation: ping 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.stage.is-demo .tip {
  animation: tip-pendulum 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite, tip-wobble 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite;
  transform-origin: bottom center;
  rotate: 0deg;
}

@keyframes tip-pendulum {
  0%, 10% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-2.5deg);
  }
  40% {
    transform: rotate(1.8deg);
  }
  60% {
    transform: rotate(-1deg);
  }
  80%, 100% {
    transform: rotate(0);
  }
}
@keyframes tip-wobble {
  0%, 4% {
    rotate: 0deg;
  }
  16% {
    rotate: 1.4deg;
  }
  34% {
    rotate: -1deg;
  }
  52% {
    rotate: 0.55deg;
  }
  70%, 100% {
    rotate: 0deg;
  }
}
.stage.is-demo .pi {
  animation-name: pi-spring;
  animation-duration: 2s;
  animation-timing-function: linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1);
  animation-iteration-count: infinite;
}

@keyframes pi-spring {
  0%, 6% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.25);
  }
  20% {
    transform: scale(0.9);
  }
  26% {
    transform: scale(1.05);
  }
  30%, 100% {
    transform: scale(1);
  }
}
@keyframes move {
  0%, 18% {
    transform: translateX(0) scaleX(1);
  }
  50%, 68% {
    transform: translateX(124px) scaleX(0.8333);
  }
  100% {
    transform: translateX(0) scaleX(1);
  }
}
@keyframes spot-land {
  0% {
    scale: 1;
  }
  4% {
    scale: 1.1;
  }
  11% {
    scale: 0.96;
  }
  18%, 46% {
    scale: 1;
  }
  50% {
    scale: 1.1;
  }
  57% {
    scale: 0.96;
  }
  64%, 100% {
    scale: 1;
  }
}
@keyframes ping {
  0%, 10% {
    opacity: 0.9;
    transform: scale(1);
  }
  30% {
    opacity: 0;
    transform: scale(1.18);
  }
  50%, 60% {
    opacity: 0.9;
    transform: scale(1);
  }
  80%, 100% {
    opacity: 0;
    transform: scale(1.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .spot {
    animation: none;
    scale: 1;
  }
  .stage.is-demo .ring {
    animation: none;
    opacity: 0.9;
  }
  .stage.is-demo .tip {
    animation: none;
    rotate: 0deg;
  }
  .stage.is-demo .pi {
    animation: none;
  }
}
