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

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

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

.hx__cell {
  stroke: #ff4d1f;
  stroke-width: 1.6;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.hx__cell--a {
  fill: #fff7e6;
}

.hx__cell--b {
  fill: #fff7e6;
  opacity: 0.54;
}

.hx__cell--c {
  fill: #2f6df6;
}

.hx__cell--d {
  fill: #17141a;
}

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

.hx__seed {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
}

.hx__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;
}

.hx__btn:focus-visible {
  outline: 3px solid #fff7e6;
  outline-offset: 2px;
}

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

.hx.is-demo .hx__cell {
  animation-name: hxWave;
  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) * -108ms);
}

.hx.is-draw .hx__cell {
  animation-name: hxPop;
  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) * 22ms);
}

@keyframes hxWave {
  0% {
    transform: scale(1);
  }
  26% {
    transform: scale(0.58);
  }
  52% {
    transform: scale(1.06);
  }
  78% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes hxPop {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .hx {
    gap: 8px;
  }
  .hx__ic {
    width: 10px;
    height: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hx.is-demo .hx__cell,
  .hx.is-draw .hx__cell {
    animation: none !important;
    transform: scale(1) !important;
  }
}
