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

.mb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.mb__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  color: #17141a;
}

.mb__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #2f6df6;
}

.mb__floor {
  position: relative;
  width: 100%;
  height: 132px;
  display: grid;
  place-items: end center;
}

.mb__char {
  position: relative;
  width: 104px;
  height: 124px;
  display: grid;
  place-items: end center;
}

.mb__body {
  position: relative;
  display: block;
  width: 88px;
  height: 96px;
  border-radius: 50% 50% 46% 46%;
  background: #2f6df6;
  transform-origin: 50% 100%;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.mb__eye {
  position: absolute;
  top: 40px;
  width: 10px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
}

.mb__eye--l {
  left: 22px;
}

.mb__eye--r {
  right: 22px;
}

.mb__cheek {
  position: absolute;
  top: 56px;
  width: 12px;
  height: 6px;
  border-radius: 999px;
  background: #ff9ebb;
  opacity: 0.9;
}

.mb__cheek--l {
  left: 14px;
}

.mb__cheek--r {
  right: 14px;
}

.mb__mouth {
  position: absolute;
  top: 60px;
  left: 50%;
  width: 16px;
  height: 8px;
  margin-left: -8px;
  border-bottom: 3px solid #ffffff;
  border-radius: 0 0 999px 999px;
}

.mb__shadow {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 72px;
  height: 10px;
  margin-left: -36px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.18);
}

.mb__beat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.mb__beatLabel {
  font-weight: 700;
  font-size: 11px;
  color: #17141a;
  flex: 0 0 auto;
}

.mb__beatTrack {
  position: relative;
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
  overflow: hidden;
}

.mb__beatFill {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 999px;
  background: #2f6df6;
  transform-origin: 0 50%;
  transform: scaleX(0.12);
}

@keyframes mbBreath {
  0%, 100% {
    transform: scaleY(1) scaleX(1);
  }
  50% {
    transform: scaleY(1.085) scaleX(0.975);
  }
}
@keyframes mbShadow {
  0%, 100% {
    transform: scaleX(1);
    opacity: 0.18;
  }
  50% {
    transform: scaleX(0.84);
    opacity: 0.12;
  }
}
@keyframes mbBeat {
  0%, 100% {
    transform: scaleX(0.12);
  }
  50% {
    transform: scaleX(1);
  }
}
@keyframes mbBlink {
  0%, 74% {
    transform: scaleY(1);
  }
  76%, 80% {
    transform: scaleY(0.08);
  }
  82%, 100% {
    transform: scaleY(1);
  }
}
.mb.is-demo .mb__body {
  animation-name: mbBreath;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

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

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

.mb.is-demo .mb__eye {
  transform-origin: 50% 50%;
  animation-name: mbBlink;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.mb.is-blink .mb__eye {
  transform: scaleY(0.08);
}

@media (max-width: 340px) {
  .mb {
    gap: 8px;
  }
  .mb__floor {
    height: 112px;
  }
  .mb__char {
    width: 92px;
    height: 104px;
  }
  .mb__body {
    width: 76px;
    height: 82px;
  }
  .mb__eye {
    top: 34px;
    width: 9px;
    height: 11px;
  }
  .mb__eye--l {
    left: 18px;
  }
  .mb__eye--r {
    right: 18px;
  }
  .mb__cheek {
    top: 48px;
  }
  .mb__mouth {
    top: 52px;
  }
  .mb__shadow {
    width: 62px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mb.is-demo .mb__body,
  .mb.is-demo .mb__shadow,
  .mb.is-demo .mb__beatFill,
  .mb.is-demo .mb__eye {
    animation: none !important;
  }
  .mb.is-demo .mb__body {
    transform: scaleY(1.04) !important;
  }
  .mb.is-demo .mb__beatFill {
    transform: scaleX(0.56) !important;
  }
  .mb.is-demo .mb__eye {
    transform: none !important;
  }
}
