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

.md {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}

.md__art {
  display: block;
  width: clamp(176px, 60vw, 320px);
  height: auto;
}

.md__ring {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.md__ring--a {
  stroke: #17141a;
  stroke-width: 1.6;
}

.md__ring--b {
  stroke: #2f6df6;
  stroke-width: 2.4;
}

.md__eye {
  fill: #17141a;
}

.md__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.md__seed {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(23, 20, 26, 0.78);
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
}

.md__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  cursor: pointer;
}

.md__btn:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.md__ic {
  width: 12px;
  height: 12px;
  flex: none;
}

.md.is-demo .md__ring {
  animation-name: mdBreathe;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * -260ms);
}

.md.is-demo .md__ring--b {
  animation-direction: reverse;
}

.md.is-draw .md__ring {
  animation-name: mdOpen;
  animation-duration: 600ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: 1;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes mdBreathe {
  0% {
    transform: rotate(0deg) scale(1);
  }
  32% {
    transform: rotate(10deg) scale(1.07);
  }
  66% {
    transform: rotate(-8deg) scale(0.94);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}
@keyframes mdOpen {
  from {
    transform: rotate(-24deg) scale(0.4);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .md {
    gap: 8px;
  }
  .md__ic {
    width: 10px;
    height: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .md.is-demo .md__ring,
  .md.is-draw .md__ring {
    animation: none !important;
    transform: rotate(0deg) scale(1) !important;
  }
}
