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

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

.stack {
  width: min(440px, 94vw);
  display: grid;
  row-gap: 12px;
}

.card {
  position: relative;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  padding: 8px 12px;
  display: grid;
  row-gap: 4px;
}

.line {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 4px;
  row-gap: 4px;
  font-size: clamp(9.5px, 2.4vw, 13.5px);
  font-weight: 600;
  color: #17141a;
}

.line--ko {
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.line--en {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.txt::before {
  content: attr(data-t);
}

.ph {
  border-radius: 4px;
  background: #2f6df6;
  color: #fff;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: 700;
  font-size: clamp(9px, 2.2vw, 12.5px);
  padding: 0 4px;
  min-height: 16px;
  display: inline-flex;
  align-items: center;
}

.ph--ghost {
  background: transparent;
  color: rgba(23, 20, 26, 0.72);
  border: 2px dashed rgba(194, 54, 26, 0.6);
}

.verdict {
  position: absolute;
  top: -8px;
  right: 8px;
  border-radius: 999px;
  font-size: clamp(9px, 2.2vw, 12px);
  font-weight: 800;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: 4px 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.verdict--ok {
  background: #50a384;
  color: #17141a;
}

.verdict--ng {
  background: #c2361a;
  color: #fff;
}

.stage.is-demo .ph {
  animation: mark 2s ease-out infinite;
  animation-delay: calc(var(--i) * 0.2s);
}

.stage.is-demo .ph--ghost {
  animation-name: mark-ghost;
}

.stage.is-demo .verdict--ok {
  animation: ok-in 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.stage.is-demo .verdict--ng {
  animation: ng-in 2s ease-out infinite;
}

@keyframes mark {
  0%, 8% {
    filter: brightness(1);
    transform: scale(1);
  }
  16% {
    filter: brightness(1.45);
    transform: scale(1.14);
  }
  26%, 92% {
    filter: brightness(1);
    transform: scale(1);
  }
  100% {
    filter: brightness(1);
    transform: scale(0.9);
  }
}
@keyframes mark-ghost {
  0%, 36% {
    transform: scale(1);
    opacity: 0.55;
  }
  46% {
    transform: scale(1.14);
    opacity: 1;
  }
  56%, 92% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.55;
  }
}
@keyframes ok-in {
  0%, 30% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  38% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  44%, 94% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}
@keyframes ng-in {
  0%, 46% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  54% {
    transform: scale(1.25) rotate(0deg);
    opacity: 1;
  }
  60% {
    transform: scale(1) rotate(0deg);
  }
  68% {
    transform: scale(1) rotate(9deg);
  }
  76% {
    transform: scale(1) rotate(-9deg);
  }
  84% {
    transform: scale(1) rotate(5deg);
  }
  90%, 96% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .ph,
  .stage.is-demo .verdict--ok,
  .stage.is-demo .verdict--ng {
    animation: none;
  }
}
