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

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

.stage {
  padding: clamp(6px, 2.4vw, 16px);
}

.card {
  position: relative;
  width: min(220px, 70vw);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.card__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.card__rect {
  fill: none;
  stroke: #17141a;
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.card.is-drawn .card__rect {
  animation: draw 600ms ease-out forwards;
}

.card.is-demo .card__rect {
  animation: draw-loop 2s ease-out infinite;
}

.card__body {
  position: relative;
  padding: 20px 16px;
}

.card__title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: clamp(13px, 3.6vw, 15px);
  line-height: 1.3;
  font-family: inherit;
  color: #17141a;
}

.card__meta {
  margin: 0;
  font-weight: 500;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1.3;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.6);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes draw-loop {
  0%, 5% {
    stroke-dashoffset: 100;
  }
  35%, 60% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -100;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card.is-drawn .card__rect, .card.is-demo .card__rect {
    animation: none;
    stroke-dashoffset: 0;
  }
}
