html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  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: #17141a;
  background: #fff7e6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 26, 0.55);
  opacity: 0;
  pointer-events: none;
}

dialog.modal::backdrop {
  background: transparent;
}

dialog.modal {
  border: 0;
  margin: auto;
  position: fixed;
  inset: 0;
  width: min(78vw, 300px);
  height: fit-content;
  padding: clamp(12px, 4.5vmin, 22px);
  border-radius: 16px;
  background: #ffffff;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  transform: scale(0.92) translateY(10px);
}
dialog.modal h2 {
  margin: 0 0 6px;
  font-size: clamp(13px, 4.4vmin, 18px);
}
dialog.modal p {
  margin: 0 0 14px;
  font-size: clamp(10px, 3.2vmin, 13px);
  color: rgba(23, 20, 26, 0.65);
}
dialog.modal {
  transition: opacity 300ms ease-out, transform 300ms ease-out, overlay 300ms allow-discrete, display 300ms allow-discrete;
}
dialog.modal[open] {
  opacity: 1;
  transform: none;
}
@starting-style {
  dialog.modal[open] {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
}

.modal__close {
  border: 0;
  border-radius: 12px;
  background: #2f6df6;
  color: #ffffff;
  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;
}

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

dialog.modal.is-demo {
  animation: dialog-loop 2s ease-out infinite;
}

@keyframes overlay-loop {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  85% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes dialog-loop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  15% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  70% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  85% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .overlay.is-demo, dialog.modal.is-demo {
    animation: none;
  }
  dialog.modal {
    transition-duration: 1ms;
  }
}
