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

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

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

.ml__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #ffd23f;
}

.ml__hint span {
  flex: 1 1 auto;
  min-width: 0;
}

.ml__scene {
  position: relative;
  width: 100%;
  height: 150px;
}

.ml__ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.18);
}

.ml__lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  --char-w: 104px;
  animation-name: mlWalk;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-direction: alternate;
  animation-iteration-count: infinite;
}

@keyframes mlWalk {
  0% {
    transform: translateX(calc(-1 * (100% - var(--char-w))));
  }
  100% {
    transform: translateX(0);
  }
}
.ml__step {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--char-w);
  height: 140px;
  transform-origin: 50% 100%;
  animation-name: mlStep;
  animation-duration: 250ms;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes mlStep {
  0%, 100% {
    transform: translateY(0) scaleY(0.9);
  }
  40% {
    transform: translateY(-6px) scaleY(1.05);
  }
  80% {
    transform: translateY(0) scaleY(1);
  }
}
.ml__body {
  position: absolute;
  left: 8px;
  bottom: 0;
  width: 88px;
  height: 96px;
  border-radius: 50% 50% 46% 46%;
  background: #fff7e6;
}

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

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

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

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

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

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

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

.ml__arm {
  position: absolute;
  top: 56px;
  width: 10px;
  height: 30px;
  border-radius: 999px;
  background: #fff7e6;
  transform-origin: 5px 5px;
}

.ml__arm--l {
  left: 11px;
  transform: rotate(-148deg);
}

.ml__arm--r {
  right: 11px;
  transform: rotate(148deg);
}

.ml__box {
  position: absolute;
  top: -4px;
  left: calc(50% - 22px);
  width: 44px;
  height: 34px;
  border-radius: 4px;
  background: #ffd23f;
}

.ml__box::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 4px);
  width: 8px;
  background: #17141a;
  opacity: 0.85;
}

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

.ml__odo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.ml__odoWin {
  display: block;
  width: 10px;
  height: 14px;
  overflow: hidden;
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  color: #fff7e6;
}

.ml__odoCol {
  display: block;
}

.ml__odoCol b {
  display: block;
  font-weight: 700;
}

.ml__odoCol--t {
  animation-name: mlOdo;
  animation-duration: 2s;
  animation-timing-function: steps(10, end);
  animation-iteration-count: infinite;
}

.ml__odoCol--u {
  animation-name: mlOdo;
  animation-duration: 200ms;
  animation-timing-function: steps(10, end);
  animation-iteration-count: infinite;
}

@keyframes mlOdo {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}
.ml__pct {
  display: block;
  margin-left: 4px;
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  color: #fff7e6;
}

.ml__track {
  position: relative;
  display: block;
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.16);
  overflow: hidden;
}

.ml__fill {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 999px;
  background: #ffd23f;
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation-name: mlFill;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes mlFill {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}
@media (max-width: 340px) {
  .ml {
    gap: 8px;
  }
  .ml__scene {
    height: 116px;
  }
  .ml__lane {
    height: 112px;
    --char-w: 92px;
  }
  .ml__step {
    width: var(--char-w);
    height: 112px;
  }
  .ml__body {
    left: 8px;
    width: 76px;
    height: 82px;
  }
  .ml__eye {
    top: 34px;
    width: 9px;
    height: 11px;
  }
  .ml__eye--l {
    left: 18px;
  }
  .ml__eye--r {
    right: 18px;
  }
  .ml__cheek {
    top: 48px;
  }
  .ml__cheek--l {
    left: 10px;
  }
  .ml__cheek--r {
    right: 10px;
  }
  .ml__mouth {
    top: 52px;
  }
  .ml__arm {
    top: 48px;
    height: 28px;
  }
  .ml__arm--l {
    left: 8px;
  }
  .ml__arm--r {
    right: 8px;
  }
  .ml__box {
    top: 0;
    left: calc(50% - 20px);
    width: 40px;
    height: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ml__lane,
  .ml__step,
  .ml__fill,
  .ml__odoCol--t,
  .ml__odoCol--u {
    animation: none !important;
  }
  .ml__lane {
    transform: translateX(-38%) !important;
  }
  .ml__step {
    transform: none !important;
  }
  .ml__fill {
    transform: scaleX(0.6) !important;
  }
  .ml__odoCol--t {
    transform: translateY(-60%) !important;
  }
  .ml__odoCol--u {
    transform: translateY(0) !important;
  }
}
