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

.page {
  display: grid;
  place-items: center;
}

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

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 26, 0.28);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out, backdrop-filter 300ms ease-out;
}

.drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: auto;
  transform: scale(0.96);
  transform-origin: left center;
  opacity: 0;
  width: min(76vw, 240px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 16px;
  background: #ffffff;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  pointer-events: none;
  transition: transform 300ms ease-out, opacity 300ms ease-out;
}
.drawer h2 {
  margin: 0 0 8px;
  font-size: clamp(13px, 4.2vmin, 17px);
}
.drawer p {
  margin: 0 0 16px;
  font-size: clamp(10px, 3.2vmin, 13px);
  color: rgba(23, 20, 26, 0.7);
}

.drawer__close {
  margin-top: auto;
  border: 0;
  border-radius: 12px;
  background: #ff4d1f;
  color: #ffffff;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.stage.is-open .overlay {
  opacity: 1;
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.stage.is-open .drawer {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

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

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