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

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

.card {
  position: relative;
  width: min(150px, 48vw);
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: #17141a;
  outline: none;
  cursor: pointer;
}

.card__media {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #2f6df6 0%, #17141a 100%);
}

.card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
}

.card__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.3;
  font-family: inherit;
  color: #ffffff;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #2f6df6;
  opacity: 0;
  z-index: 2;
  transition: transform 220ms ease-out, opacity 220ms ease-out;
}

.corner--tl {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
  transform: translate(8px, 8px);
}

.corner--tr {
  top: 8px;
  right: 8px;
  border-left: none;
  border-bottom: none;
  transform: translate(-8px, 8px);
}

.corner--bl {
  bottom: 8px;
  left: 8px;
  border-right: none;
  border-top: none;
  transform: translate(8px, -8px);
}

.corner--br {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
  transform: translate(-8px, -8px);
}

.card:hover .corner,
.card:focus-visible .corner,
.card:active .corner {
  opacity: 1;
  transform: translate(0, 0);
}

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

@keyframes frame-loop {
  0%, 15% {
    opacity: 0;
  }
  45%, 75% {
    opacity: 1;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .corner {
    transition: none;
  }
  .card.is-demo .corner {
    animation: none;
    opacity: 1;
    transform: translate(0, 0);
  }
}
