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

[hidden] {
  display: none !important;
}

.ep {
  box-sizing: border-box;
  width: clamp(240px, 84vw, 360px);
  padding: clamp(12px, 4vw, 20px);
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 20, 26, 0.1);
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.ep__main {
  display: grid;
  gap: 12px;
}

.ep__title {
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ep__desc {
  margin: 0;
  font-size: clamp(9px, 2.6vw, 12px);
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

.ep__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ep__btn {
  position: relative;
  min-width: 0;
  border: 2px solid #2f6df6;
  border-radius: 12px;
  padding: 8px 12px;
  background: #ffffff;
  color: #2f6df6;
  font-family: inherit;
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease-out, background 220ms ease-out;
}

.ep__btn--accept {
  background: #2f6df6;
  color: #ffffff;
}

.ep__btn:active {
  transform: scale(0.97);
}

.ep__btn:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 4px;
}

.ep__btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid #2f6df6;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
}

.ep__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ep__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: clamp(9px, 2.6vw, 12px);
  font-weight: 600;
  color: rgba(23, 20, 26, 0.72);
}

.ep__check {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #2f6df6;
}

.ep__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep__link {
  justify-self: start;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: none;
  color: rgba(23, 20, 26, 0.72);
  font-family: inherit;
  font-size: clamp(9px, 2.6vw, 12px);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: color 220ms ease-out;
}

.ep__link:hover, .ep__link:focus-visible {
  color: #2f6df6;
}

.ep__done {
  margin: 0;
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 700;
  color: #2f6df6;
}

.ep.is-demo .ep__btn--reject::after {
  animation: ep-ring-a 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ep.is-demo .ep__btn--accept::after {
  animation: ep-ring-b 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes ep-ring-a {
  0%, 30% {
    opacity: 1;
    transform: scale(1.04);
  }
  50%, 80% {
    opacity: 0;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.04);
  }
}
@keyframes ep-ring-b {
  0%, 30% {
    opacity: 0;
    transform: scale(1);
  }
  50%, 80% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .ep__main {
    gap: 8px;
  }
  .ep__btn {
    padding: 4px 8px;
  }
  .ep__btn::after {
    inset: -4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ep.is-demo .ep__btn--reject::after, .ep.is-demo .ep__btn--accept::after {
    animation: none !important;
  }
  .ep.is-demo .ep__btn--reject::after {
    opacity: 1;
    transform: scale(1.04);
  }
  .ep__btn, .ep__link {
    transition: none;
  }
}
