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

.hz {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(8px, 3vw, 16px);
  width: clamp(272px, 94vw, 432px);
  padding-bottom: 8px;
}

.hz__copy {
  flex: 1 1 38%;
  min-width: 0;
}

.hz__title {
  margin: 0;
  color: #17141a;
  font-weight: 800;
  font-size: clamp(12px, 3.2vw, 18px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.hz__sub {
  margin: 4px 0 0;
  color: #17141a;
  font-weight: 500;
  font-size: clamp(9px, 2.2vw, 12px);
  line-height: 1.4;
}

.hz__frame {
  position: relative;
  flex: 1 1 62%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.hz__art {
  transform-origin: 30% 34%;
  transform: scale(1);
}

.hz__screen {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: clamp(72px, 24vw, 104px);
  padding: 8px;
  border-radius: 8px;
  background: #fdf7ec;
}

.hz__bar {
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.78);
}

.hz__bar--head {
  width: 42%;
  height: 8px;
}

.hz__bar--a {
  width: 68%;
  height: 6px;
  background: rgba(23, 20, 26, 0.32);
}

.hz__row {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
}

.hz__tile {
  flex: 1 1 0;
  border-radius: 8px;
}

.hz__tile--v {
  background: #9791c9;
}

.hz__tile--g {
  flex: 0 0 32%;
  background: #479074;
}

.hz__spot {
  position: absolute;
  width: 0;
  height: 0;
}

.hz__spot--1 {
  left: 26%;
  top: 32%;
}

.hz__spot--2 {
  left: 46%;
  top: 66%;
}

.hz__dot {
  position: absolute;
  left: -9px;
  top: -9px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #17141a;
  color: #ffffff;
  cursor: pointer;
}

.hz__dot:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.hz__ring {
  position: absolute;
  inset: 0;
  border: 2px solid #17141a;
  border-radius: 50%;
  opacity: 0;
  transform: scale(1);
}

.hz__note {
  position: absolute;
  left: 14px;
  top: -8px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #17141a;
  color: #ffffff;
  font-weight: 600;
  font-size: clamp(8px, 2vw, 11px);
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease-out;
}

.hz__spot.is-open .hz__note {
  opacity: 1;
  visibility: visible;
}

.hz.is-demo .hz__art {
  animation-name: hzZoom;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.hz.is-demo .hz__dot {
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.hz.is-demo .hz__spot--1 .hz__dot {
  animation-name: hzPulse1;
}

.hz.is-demo .hz__spot--2 .hz__dot {
  animation-name: hzPulse2;
}

.hz.is-demo .hz__ring {
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.hz.is-demo .hz__spot--1 .hz__ring {
  animation-name: hzBurst1;
}

.hz.is-demo .hz__spot--2 .hz__ring {
  animation-name: hzBurst2;
}

.hz.is-demo .hz__note {
  visibility: visible;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  transition: none;
}

.hz.is-demo .hz__spot--1 .hz__note {
  animation-name: hzNote1;
}

.hz.is-demo .hz__spot--2 .hz__note {
  animation-name: hzNote2;
}

@keyframes hzZoom {
  0% {
    transform: scale(1);
  }
  52% {
    transform: scale(1.12);
  }
  88%, 100% {
    transform: scale(1);
  }
}
@keyframes hzPulse1 {
  0% {
    transform: scale(1);
  }
  8% {
    transform: scale(1.28);
  }
  22%, 100% {
    transform: scale(1);
  }
}
@keyframes hzPulse2 {
  0%, 40% {
    transform: scale(1);
  }
  46% {
    transform: scale(1.28);
  }
  58%, 100% {
    transform: scale(1);
  }
}
@keyframes hzBurst1 {
  0%, 4% {
    transform: scale(1);
    opacity: 0.9;
  }
  26% {
    transform: scale(2.8);
    opacity: 0;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
@keyframes hzBurst2 {
  0%, 40% {
    transform: scale(1);
    opacity: 0;
  }
  44% {
    transform: scale(1);
    opacity: 0.9;
  }
  62%, 100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
@keyframes hzNote1 {
  0% {
    opacity: 0;
  }
  26% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes hzNote2 {
  0% {
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .hz {
    gap: 8px;
    width: 100%;
    padding-bottom: 4px;
  }
  .hz__frame {
    padding: 8px;
  }
  .hz__screen {
    padding: 4px;
  }
  .hz__spot--1 {
    left: 18%;
    top: 30%;
  }
  .hz__spot--2 {
    left: 24%;
    top: 66%;
  }
  .hz__note {
    left: 12px;
    padding: 0 4px;
  }
  .hz__dot {
    width: 16px;
    height: 16px;
    left: -8px;
    top: -8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hz__art, .hz__dot, .hz__ring, .hz__note {
    animation: none !important;
    transition: none !important;
  }
  .hz.is-demo .hz__note {
    opacity: 1 !important;
  }
}
