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

.stage {
  position: relative;
}

.trigger {
  border: 0;
  border-radius: 999px;
  padding: clamp(10px, 3.4vmin, 14px) clamp(20px, 7vmin, 30px);
  font-weight: 600;
  font-size: clamp(13px, 4vmin, 16px);
  line-height: 1;
  font-family: inherit;
  color: #ff4d1f;
  background: #fff7e6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 26, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  left: auto;
  transform: translateX(100%);
  width: min(78vw, 260px);
  box-sizing: border-box;
  padding: clamp(14px, 5vmin, 24px);
  background: #ffffff;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  pointer-events: none;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer h2 {
  margin: 0 0 6px;
  font-size: clamp(13px, 4.2vmin, 17px);
}
.drawer p {
  margin: 0 0 14px;
  font-size: clamp(10px, 3.2vmin, 13px);
  color: rgba(23, 20, 26, 0.65);
}

.drawer__close {
  border: 0;
  border-radius: 12px;
  background: #ff4d1f;
  color: #fff7e6;
  padding: clamp(7px, 2.6vmin, 9px) clamp(14px, 4.6vmin, 18px);
  font-weight: 600;
  font-size: clamp(11px, 3.4vmin, 13px);
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.stage.is-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

.stage.is-open .drawer {
  transform: translateX(0);
  pointer-events: auto;
}

.stage.is-demo .overlay {
  animation: overlay-loop 2s ease-in-out infinite;
}

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

@keyframes overlay-loop {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  85% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes drawer-loop {
  0% {
    transform: translateX(100%);
  }
  15% {
    transform: translateX(0);
  }
  70% {
    transform: translateX(0);
  }
  85% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .overlay, .stage.is-demo .drawer {
    animation: none;
  }
  .overlay, .drawer {
    transition-duration: 1ms;
  }
}
