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

.tip-wrap {
  position: relative;
}

.gear-btn {
  border: 2px solid #fff7e6;
  border-radius: 12px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  background: transparent;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  background: #fff7e6;
  color: #ff4d1f;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: clamp(12px, 3.4vw, 14px);
  white-space: nowrap;
  pointer-events: none;
}

.gear-btn:hover + .tooltip,
.gear-btn:focus-visible + .tooltip {
  opacity: 1;
}

.tooltip.is-demo {
  animation: tip-loop 2s ease-out infinite;
}

@keyframes tip-loop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.85) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: translateX(-50%) scale(1.12) rotate(2.6deg);
  }
  22% {
    opacity: 1;
    transform: translateX(-50%) scale(0.95) rotate(-1.5deg);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) scale(1.03) rotate(0.6deg);
  }
  36%, 55% {
    opacity: 1;
    transform: translateX(-50%) scale(1) rotate(0deg);
  }
  80% {
    opacity: 0;
    transform: translateX(-50%) scale(0.85) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.85) rotate(0deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tooltip.is-demo {
    animation: none;
    opacity: 1;
    transform: translateX(-50%) scale(1) rotate(0deg);
  }
}
