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

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

.hb {
  display: block;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hb:focus-visible {
  outline: 2px solid #ff9ebb;
  outline-offset: 4px;
  border-radius: 50%;
}

.hb__face {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: clamp(120px, 38vw, 168px);
  aspect-ratio: 1;
  background: #fff7e6;
  border: 3px solid #17141a;
  border-radius: 50%;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.hb__eye {
  position: absolute;
  top: 32%;
  width: 22%;
  aspect-ratio: 1;
  color: #ff9ebb;
  transform-origin: 50% 50%;
}

.hb__eye--l {
  left: 20%;
}

.hb__eye--r {
  right: 20%;
}

.hb__eye svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hb__cheek {
  position: absolute;
  top: 52%;
  width: 20%;
  aspect-ratio: 1;
  background: #ff9ebb;
  border-radius: 50%;
  opacity: 0;
}

.hb__cheek--l {
  left: 7%;
}

.hb__cheek--r {
  right: 7%;
}

.hb__mouth {
  position: absolute;
  top: 58%;
  left: 50%;
  width: 26%;
  height: 14%;
  border: 3px solid #17141a;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.hb[aria-pressed=true] .hb__cheek {
  opacity: 0.55;
}

.hb[aria-pressed=true] .hb__eye {
  scale: 1.16;
}

.hb.is-demo .hb__eye {
  animation-name: hbBlink;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.hb.is-demo .hb__eye svg {
  animation-name: hbBeat;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.hb.is-demo .hb__cheek {
  animation-name: hbBlush;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes hbBlink {
  0%, 40% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(0.08);
  }
  54%, 100% {
    transform: scaleY(1);
  }
}
@keyframes hbBeat {
  0%, 12% {
    transform: scale(1);
  }
  17% {
    transform: scale(1.14);
  }
  22% {
    transform: scale(1);
  }
  27% {
    transform: scale(1.1);
  }
  32%, 100% {
    transform: scale(1);
  }
}
@keyframes hbBlush {
  0%, 61% {
    opacity: 0;
  }
  62%, 87% {
    opacity: 0.55;
  }
  88%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .hb__face {
    border-width: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb.is-demo .hb__eye,
  .hb.is-demo .hb__eye svg,
  .hb.is-demo .hb__cheek {
    animation: none !important;
  }
}
