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

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

.cg {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
}

.cg__wrap {
  width: min(100%, 320px);
}

.cg__card {
  --gx: 50;
  --gy: 50;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  height: clamp(110px, 32vh, 156px);
  padding: 16px;
  background: #fff7e6;
  border: 3px solid #17141a;
  border-radius: 16px;
  will-change: transform;
}

.cg__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 84px;
  height: 84px;
  box-sizing: border-box;
  background: radial-gradient(circle, rgba(255, 210, 63, 0) 46%, rgba(255, 210, 63, 0.5) 62%, rgba(255, 210, 63, 0) 78%);
  border-radius: 50%;
  transform: translate3d(calc(var(--gx) * 1px - 42px), calc(var(--gy) * 1px - 42px), 0);
  will-change: transform;
}

.cg__title {
  margin: 0 0 8px;
  color: #17141a;
  font-weight: 800;
  font-size: clamp(16px, 4.4vw, 21px);
  line-height: 1.2;
}

.cg__desc {
  margin: 0;
  color: rgba(23, 20, 26, 0.78);
  font-weight: 500;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1.5;
}

.cg__dots {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: flex;
  gap: 4px;
}

.cg__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17141a;
  opacity: 0.8;
}

.cg__dots i:nth-child(2) {
  opacity: 0.5;
}

.cg__dots i:nth-child(3) {
  opacity: 0.3;
}

.cg__hint {
  margin: 0;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
}

.cg.is-demo .cg__ring {
  animation: cgOrbit 2s ease-out infinite;
}

.cg.is-demo .cg__card {
  animation: cgPull 2s ease-out infinite;
}

@keyframes cgOrbit {
  0%, 6% {
    transform: translate3d(36px, 18px, 0);
  }
  30%, 36% {
    transform: translate3d(214px, 60px, 0);
  }
  56%, 62% {
    transform: translate3d(120px, 92px, 0);
  }
  84%, 100% {
    transform: translate3d(36px, 18px, 0);
  }
}
@keyframes cgPull {
  0%, 6% {
    transform: translate3d(-3px, -2px, 0);
  }
  30%, 36% {
    transform: translate3d(5px, 2px, 0);
  }
  56%, 62% {
    transform: translate3d(0px, 5px, 0);
  }
  84%, 100% {
    transform: translate3d(-3px, -2px, 0);
  }
}
@media (max-width: 340px) {
  .cg {
    gap: 8px;
  }
  .cg__card {
    height: clamp(96px, 28vh, 126px);
    padding: 12px;
  }
  .cg.is-demo .cg__ring {
    animation-name: cgOrbitNarrow;
  }
}
@keyframes cgOrbitNarrow {
  0%, 6% {
    transform: translate3d(24px, 14px, 0);
  }
  30%, 36% {
    transform: translate3d(150px, 44px, 0);
  }
  56%, 62% {
    transform: translate3d(84px, 66px, 0);
  }
  84%, 100% {
    transform: translate3d(24px, 14px, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cg.is-demo .cg__ring,
  .cg.is-demo .cg__card {
    animation: none !important;
  }
  .cg.is-demo .cg__ring {
    transform: translate3d(170px, 60px, 0) !important;
  }
}
