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

.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 2.6vw, 12px);
  border: 0;
  border-radius: 12px;
  padding: clamp(12px, 4vw, 16px) clamp(18px, 5.6vw, 24px);
  font-weight: 700;
  font-size: clamp(14px, 4vw, 17px);
  line-height: 1;
  font-family: inherit;
  color: #fff7e6;
  background: #17141a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.copy__icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
}
.copy__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #2f6df6;
  opacity: 0;
  transform: scale(0.4);
}
.copy__sheet {
  position: absolute;
  width: 14px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transition: opacity 300ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.copy__sheet--back {
  left: 0;
  top: 0;
  opacity: 0.55;
}
.copy__sheet--front {
  left: 5px;
  top: 4px;
  background: #17141a;
}
.copy__check {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.copy__check-bar {
  position: absolute;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: left center;
}
.copy__check-bar--short {
  width: 6px;
  left: 7px;
  top: 13px;
  transform: rotate(225deg) scaleX(0);
}
.copy__check-bar--long {
  width: 12px;
  left: 7px;
  top: 13px;
  transform: rotate(-52deg) scaleX(0);
}
.copy__tip {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 4px);
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #17141a;
  color: #fff7e6;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1;
  font-family: inherit;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.copy.is-copied .copy__ring {
  animation: ring-pop 300ms cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.copy.is-copied .copy__sheet--front {
  opacity: 0;
  transform: scale(0.6);
  transition-delay: 0s;
}
.copy.is-copied .copy__sheet--back {
  opacity: 0;
  transform: scale(0.6);
}
.copy.is-copied .copy__check {
  animation: check-in 300ms cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.copy.is-copied .copy__check-bar--short {
  animation: bar-short 300ms cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  animation-delay: 90ms;
}
.copy.is-copied .copy__check-bar--long {
  animation: bar-long 300ms cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  animation-delay: 135ms;
}
.copy.is-copied .copy__tip {
  animation: tip-float 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.copy.is-demo .copy__ring {
  animation: ring-pop-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.copy.is-demo .copy__sheet {
  animation: sheet-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.copy.is-demo .copy__check {
  animation: check-in-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.copy.is-demo .copy__check-bar--short {
  animation: bar-short-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.copy.is-demo .copy__check-bar--long {
  animation: bar-long-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.copy.is-demo .copy__tip {
  animation: tip-float-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes ring-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes ring-pop-loop {
  0%, 32% {
    opacity: 0;
    transform: scale(0.4);
  }
  40%, 78% {
    opacity: 1;
    transform: scale(1);
  }
  92%, 100% {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes check-in {
  to {
    opacity: 1;
  }
}
@keyframes bar-short {
  to {
    transform: rotate(225deg) scaleX(1);
  }
}
@keyframes bar-long {
  to {
    transform: rotate(-52deg) scaleX(1);
  }
}
@keyframes tip-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -2px);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -2px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
}
@keyframes sheet-loop {
  0%, 18% {
    opacity: 1;
    transform: scale(1);
  }
  35%, 82% {
    opacity: 0;
    transform: scale(0.6);
  }
  95%, 100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes check-in-loop {
  0%, 32% {
    opacity: 0;
  }
  40%, 78% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
}
@keyframes bar-short-loop {
  0%, 35% {
    transform: rotate(225deg) scaleX(0);
  }
  45%, 75% {
    transform: rotate(225deg) scaleX(1);
  }
  92%, 100% {
    transform: rotate(225deg) scaleX(0);
  }
}
@keyframes bar-long-loop {
  0%, 40% {
    transform: rotate(-52deg) scaleX(0);
  }
  50%, 75% {
    transform: rotate(-52deg) scaleX(1);
  }
  92%, 100% {
    transform: rotate(-52deg) scaleX(0);
  }
}
@keyframes tip-float-loop {
  0%, 15% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  32% {
    opacity: 1;
    transform: translate(-50%, -2px);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -2px);
  }
  90%, 100% {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .copy__ring, .copy__sheet, .copy__check, .copy__check-bar, .copy__tip {
    animation: none !important;
    transition: none !important;
  }
  .copy.is-copied .copy__ring {
    opacity: 1;
    transform: scale(1);
  }
  .copy.is-copied .copy__sheet {
    opacity: 0;
  }
  .copy.is-copied .copy__check {
    opacity: 1;
  }
  .copy.is-copied .copy__check-bar--short {
    transform: rotate(225deg) scaleX(1);
  }
  .copy.is-copied .copy__check-bar--long {
    transform: rotate(-52deg) scaleX(1);
  }
  .copy.is-copied .copy__tip {
    opacity: 1;
    transform: translate(-50%, -2px);
  }
}
