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

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.stage {
  position: relative;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 26, 0.45);
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 300px);
  padding: clamp(12px, 4.5vmin, 22px);
  border-radius: 16px;
  background: #ffffff;
  color: #17141a;
  border: 2px solid rgba(23, 20, 26, 0.12);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}
.modal h2 {
  margin: 0 0 6px;
  font-size: clamp(13px, 4.2vmin, 17px);
}
.modal p {
  margin: 0 0 14px;
  font-size: clamp(10px, 3.2vmin, 13px);
  color: rgba(23, 20, 26, 0.65);
}

.modal__accept {
  border: 0;
  border-radius: 12px;
  background: #17141a;
  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;
}

.modal.is-shaking {
  animation: shake 300ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: #c2361a;
}

@keyframes shake {
  10%, 90% {
    transform: translate(calc(-50% - 3px), -50%);
  }
  20%, 80% {
    transform: translate(calc(-50% + 4px), -50%);
    border-color: #c2361a;
  }
  30%, 70% {
    transform: translate(calc(-50% - 4px), -50%);
  }
  40%, 60% {
    transform: translate(calc(-50% + 3px), -50%);
  }
  50% {
    transform: translate(calc(-50% - 3px), -50%);
    border-color: #c2361a;
  }
}
.stage.is-demo .modal {
  animation: shake-loop 2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

@keyframes shake-loop {
  0%, 40%, 100% {
    transform: translate(-50%, -50%);
    border-color: rgba(23, 20, 26, 0.12);
  }
  44% {
    transform: translate(calc(-50% - 4px), -50%);
    border-color: #c2361a;
  }
  48% {
    transform: translate(calc(-50% + 4px), -50%);
  }
  52% {
    transform: translate(calc(-50% - 4px), -50%);
    border-color: #c2361a;
  }
  56% {
    transform: translate(calc(-50% + 3px), -50%);
  }
  60% {
    transform: translate(-50%, -50%);
    border-color: rgba(23, 20, 26, 0.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .modal, .modal.is-shaking {
    animation: none;
  }
  .modal.is-shaking {
    border-color: #c2361a;
  }
}
