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);
}

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

.gy__phone {
  position: relative;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: clamp(112px, 30vw, 144px);
  padding: 16px 8px 8px;
  border-radius: 16px;
  border: 3px solid #17141a;
  background: #fff7e6;
}

.gy__phone:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 8px;
}

.gy__notch {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 36px;
  height: 6px;
  margin-left: -18px;
  border-radius: 999px;
  background: #17141a;
}

.gy__scene {
  width: 100%;
  height: clamp(72px, 19vw, 92px);
  display: grid;
  place-items: center;
  perspective: 480px;
}

.gy__card {
  display: grid;
  place-items: center;
  gap: 4px;
  width: clamp(64px, 17vw, 84px);
  height: clamp(64px, 17vw, 84px);
  border-radius: 8px;
  background: #2f6df6;
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform: rotateX(0deg) rotateY(0deg);
}

.gy__ico {
  width: 20px;
  height: 20px;
}

.gy__face {
  font-weight: 800;
  font-size: clamp(9px, 2.4vw, 10px);
}

.gy__badge {
  position: relative;
  margin: 0;
  min-height: 18px;
  width: min(100%, 280px);
  white-space: nowrap;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.2vw, 10px);
  text-align: center;
}

.gy__mode--tilt {
  display: none;
}

.gy__hint {
  margin: 0;
  max-width: 260px;
  text-align: center;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
}

.gy.is-demo .gy__card {
  animation-name: gyTilt;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes gyTilt {
  0% {
    transform: rotateX(8deg) rotateY(-18deg);
  }
  8% {
    transform: rotateX(6deg) rotateY(-8deg);
  }
  26% {
    transform: rotateX(2deg) rotateY(-2deg);
  }
  44% {
    transform: rotateX(-2deg) rotateY(3deg);
  }
  52% {
    transform: rotateX(-9deg) rotateY(12deg);
  }
  58% {
    transform: rotateX(-12deg) rotateY(18deg);
  }
  66% {
    transform: rotateX(-8deg) rotateY(9deg);
  }
  84% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  94% {
    transform: rotateX(6deg) rotateY(-9deg);
  }
  100% {
    transform: rotateX(8deg) rotateY(-18deg);
  }
}
.gy.is-demo .gy__mode {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.gy.is-demo .gy__mode--mouse {
  animation-name: gyModeMouse;
}

.gy.is-demo .gy__mode--tilt {
  animation-name: gyModeTilt;
}

@keyframes gyModeMouse {
  0%, 46% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}
@keyframes gyModeTilt {
  0%, 46% {
    opacity: 0;
  }
  50%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .gy__phone {
    padding: 16px 4px 4px;
  }
  .gy__hint {
    max-width: 200px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gy.is-demo .gy__card,
  .gy.is-demo .gy__mode {
    animation: none !important;
  }
  .gy.is-demo .gy__card {
    transform: rotateX(6deg) rotateY(-14deg) !important;
  }
  .gy.is-demo .gy__mode--mouse {
    opacity: 1 !important;
  }
  .gy.is-demo .gy__mode--tilt {
    opacity: 0 !important;
  }
}
