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

.perm-scene {
  position: relative;
  width: min(220px, 80vw);
  height: 172px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.perm-scene__page {
  position: absolute;
  inset: 0;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perm-scene__line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #e6e2d8;
}

.perm-scene__line--short {
  width: 55%;
}

.perm-scene__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 20, 26, 0);
  transition: background 600ms cubic-bezier(0.2, 1.4, 0.4, 1);
  pointer-events: none;
}

.perm-scene__modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(184px, 82%);
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  text-align: center;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: transform 600ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 600ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.perm-scene__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  color: #2f6df6;
  margin-bottom: 4px;
  animation: icon-bounce 2s ease-out infinite;
}

.perm-scene__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #17141a;
  font-family: inherit;
}

.perm-scene__desc {
  margin: 0 0 12px;
  font-size: 11px;
  color: #6b6455;
  font-family: inherit;
}

.perm-scene__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.perm-scene__btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.perm-scene__btn--ghost {
  background: #ffffff;
  border-color: #d8d2c4;
  color: #6b6455;
}

.perm-scene__btn--ghost:hover, .perm-scene__btn--ghost:focus-visible {
  background: #f3efe4;
}

.perm-scene__btn--primary {
  background: #2f6df6;
  color: #ffffff;
}

.perm-scene__btn--primary:hover, .perm-scene__btn--primary:focus-visible {
  background: rgb(4.1019246408%, 32.3596277221%, 94.8000361435%);
}

.perm-scene.is-demo .perm-scene__backdrop {
  animation: backdrop-cycle 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.perm-scene.is-demo .perm-scene__modal {
  animation: modal-cycle 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.perm-scene.is-closed .perm-scene__backdrop {
  background: rgba(23, 20, 26, 0);
}

.perm-scene.is-closed .perm-scene__modal {
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
}

@keyframes backdrop-cycle {
  0%, 8% {
    background: rgba(23, 20, 26, 0);
  }
  23%, 77% {
    background: rgba(23, 20, 26, 0.35);
  }
  92%, 100% {
    background: rgba(23, 20, 26, 0);
  }
}
@keyframes modal-cycle {
  0%, 8% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
  }
  23%, 77% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  92%, 100% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
  }
}
@keyframes icon-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .perm-scene__backdrop, .perm-scene__modal {
    transition: none;
  }
  .perm-scene.is-demo .perm-scene__backdrop,
  .perm-scene.is-demo .perm-scene__modal,
  .perm-scene__icon {
    animation: none;
  }
}
