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

.pk {
  box-sizing: border-box;
  width: min(300px, 88vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.pk__card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 16px;
  background-color: #fff7e6;
  box-shadow: 0 10px 24px rgba(23, 20, 26, 0.12);
}

.pk__head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  height: 16px;
  color: rgba(23, 20, 26, 0.62);
}

.pk__head-ic {
  display: inline-flex;
}

.pk__head-ic svg {
  display: block;
}

.pk__head-t {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pk__badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}

.pk__ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(23, 20, 26, 0.14);
  border-radius: 50%;
}

.pk__arc {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: #2f6df6;
  border-radius: 50%;
  opacity: 0;
}

.pk__ic {
  position: absolute;
  display: inline-flex;
  width: 40px;
  height: 40px;
  opacity: 0;
  color: #2f6df6;
}

.pk__ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pk__ic[data-ic=shield] {
  color: #4cd4a6;
}

.pk__state {
  position: relative;
  margin: 0;
  width: 100%;
  height: 16px;
}

.pk__word {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: rgba(23, 20, 26, 0.66);
  white-space: nowrap;
  opacity: 0;
}

.pk__btn {
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 40px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background-color: #0a4fe8;
  color: #fff7e6;
  cursor: pointer;
  transition: background-color 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.pk__btn:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.pk__face {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
}

.pk:not(.is-demo)[data-state=idle] .pk__face[data-face=idle],
.pk:not(.is-demo)[data-state=busy] .pk__face[data-face=busy],
.pk:not(.is-demo)[data-state=done] .pk__face[data-face=done],
.pk:not(.is-demo)[data-state=idle] .pk__word[data-word=idle],
.pk:not(.is-demo)[data-state=busy] .pk__word[data-word=busy],
.pk:not(.is-demo)[data-state=done] .pk__word[data-word=done],
.pk:not(.is-demo)[data-state=idle] .pk__ic[data-ic=print],
.pk:not(.is-demo)[data-state=busy] .pk__ic[data-ic=print],
.pk:not(.is-demo)[data-state=done] .pk__ic[data-ic=shield],
.pk:not(.is-demo)[data-state=busy] .pk__arc {
  opacity: 1;
}

.pk:not(.is-demo)[data-state=busy] .pk__btn {
  background-color: rgba(23, 20, 26, 0.14);
  color: rgba(23, 20, 26, 0.55);
}

.pk:not(.is-demo)[data-state=done] .pk__btn {
  background-color: #4cd4a6;
  color: #17141a;
}

.pk:not(.is-demo)[data-state=done] .pk__ring {
  border-color: #4cd4a6;
}

.pk__arc {
  animation-name: pk-spin;
  animation-duration: 900ms;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes pk-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.pk.is-demo .pk__face,
.pk.is-demo .pk__word,
.pk.is-demo .pk__ic,
.pk.is-demo .pk__ring,
.pk.is-demo .pk__btn {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.pk.is-demo .pk__face[data-face=idle],
.pk.is-demo .pk__word[data-word=idle] {
  animation-name: pk-idle;
}

.pk.is-demo .pk__face[data-face=busy],
.pk.is-demo .pk__word[data-word=busy] {
  animation-name: pk-busy;
}

.pk.is-demo .pk__face[data-face=done],
.pk.is-demo .pk__word[data-word=done],
.pk.is-demo .pk__ic[data-ic=shield] {
  animation-name: pk-done;
}

.pk.is-demo .pk__ring {
  animation-name: pk-ring;
}

.pk.is-demo .pk__btn {
  animation-name: pk-skin;
}

@keyframes pk-idle {
  0% {
    opacity: 1;
  }
  16.67% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes pk-busy {
  0% {
    opacity: 0;
  }
  16.67% {
    opacity: 1;
  }
  66.67% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes pk-done {
  0% {
    opacity: 0;
  }
  66.67% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes pk-ring {
  0% {
    border-color: rgba(23, 20, 26, 0.14);
  }
  66.67% {
    border-color: #4cd4a6;
  }
  100% {
    border-color: #4cd4a6;
  }
}
@keyframes pk-skin {
  0% {
    background-color: #0a4fe8;
    color: #fff7e6;
  }
  16.67% {
    background-color: rgba(23, 20, 26, 0.14);
    color: rgba(23, 20, 26, 0.55);
  }
  66.67% {
    background-color: #4cd4a6;
    color: #17141a;
  }
  100% {
    background-color: #4cd4a6;
    color: #17141a;
  }
}
.pk.is-demo .pk__arc {
  animation-name: pk-spin, pk-busy;
  animation-duration: 900ms, 2s;
  animation-timing-function: linear, steps(1, end);
  animation-iteration-count: infinite, infinite;
}

.pk.is-demo .pk__ic[data-ic=print] {
  animation-name: pk-print, pk-pulse;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite, infinite;
}

@keyframes pk-print {
  0% {
    opacity: 1;
  }
  66.67% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes pk-pulse {
  0% {
    transform: scale(1);
  }
  16.67% {
    transform: scale(1);
  }
  29.17% {
    transform: scale(1.16);
  }
  41.67% {
    transform: scale(1);
  }
  54.17% {
    transform: scale(1.16);
  }
  66.67% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.pk.is-demo .pk__badge {
  animation-name: pk-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes pk-pop {
  0% {
    transform: scale(1);
  }
  66.67% {
    transform: scale(0.9);
  }
  75% {
    transform: scale(1.1);
  }
  85% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .pk__card {
    gap: 8px;
    padding: 8px;
  }
  .pk__head {
    height: 14px;
  }
  .pk__head-t {
    font-size: 11px;
    line-height: 14px;
  }
  .pk__badge {
    width: 52px;
    height: 52px;
  }
  .pk__ic {
    width: 30px;
    height: 30px;
  }
  .pk__state {
    height: 14px;
  }
  .pk__word {
    font-size: 10px;
    line-height: 14px;
  }
  .pk__btn {
    height: 30px;
  }
  .pk__face {
    font-size: 12px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pk.is-demo .pk__face,
  .pk.is-demo .pk__word,
  .pk.is-demo .pk__ic,
  .pk.is-demo .pk__ring,
  .pk.is-demo .pk__btn,
  .pk.is-demo .pk__arc,
  .pk.is-demo .pk__badge,
  .pk__arc {
    animation: none !important;
  }
  .pk.is-demo .pk__face[data-face=idle],
  .pk.is-demo .pk__word[data-word=idle],
  .pk.is-demo .pk__ic[data-ic=print] {
    opacity: 1 !important;
  }
  .pk.is-demo .pk__arc {
    opacity: 0 !important;
  }
  .pk__btn {
    transition: none !important;
  }
}
