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

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

.mm {
  position: relative;
}

.mm__view {
  position: relative;
  box-sizing: border-box;
  width: 288px;
  height: 160px;
  overflow: hidden;
  border-radius: 16px;
  background: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  cursor: grab;
  touch-action: none;
}

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

.mm__layer {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg, rgba(255, 247, 230, 0.34) 0 0.5%, transparent 0.5% 6%), repeating-linear-gradient(90deg, rgba(255, 247, 230, 0.34) 0 0.5%, transparent 0.5% 8%), radial-gradient(circle at 78% 30%, #ff9ebb 0 9%, transparent 10%), linear-gradient(48deg, transparent 0 38%, rgba(255, 210, 63, 0.9) 38% 44%, transparent 44%), linear-gradient(200deg, #17141a 0%, #2f6df6 58%, #17141a 100%);
  transform-origin: center center;
  transform: scale(2.4) translate(0, 0);
}

.mm__map {
  position: absolute;
  right: 8px;
  bottom: 8px;
  box-sizing: border-box;
  width: 76px;
  aspect-ratio: 288/160;
  overflow: hidden;
  border: 2px solid rgba(255, 247, 230, 0.72);
  border-radius: 8px;
  background: repeating-linear-gradient(0deg, rgba(255, 247, 230, 0.34) 0 0.5%, transparent 0.5% 6%), repeating-linear-gradient(90deg, rgba(255, 247, 230, 0.34) 0 0.5%, transparent 0.5% 8%), radial-gradient(circle at 78% 30%, #ff9ebb 0 9%, transparent 10%), linear-gradient(48deg, transparent 0 38%, rgba(255, 210, 63, 0.9) 38% 44%, transparent 44%), linear-gradient(200deg, #17141a 0%, #2f6df6 58%, #17141a 100%);
  background-size: 100% 100%;
}

.mm__box {
  box-sizing: border-box;
  width: 41.67%;
  height: 41.67%;
  border: 2px solid #fff7e6;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.22);
  transform: translate(21px, 11.7px);
}

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

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

@keyframes mm-layer {
  0% {
    transform: scale(2.4) translate(0, 0);
  }
  26% {
    transform: scale(2.4) translate(-84px, -28px);
  }
  54% {
    transform: scale(2.4) translate(75.6px, 32.7px);
  }
  80% {
    transform: scale(2.4) translate(-33.6px, 9.3px);
  }
  100% {
    transform: scale(2.4) translate(0, 0);
  }
}
@keyframes mm-box {
  0% {
    transform: translate(21px, 11.7px);
  }
  26% {
    transform: translate(42px, 18.7px);
  }
  54% {
    transform: translate(2.1px, 3.5px);
  }
  80% {
    transform: translate(29.4px, 9.4px);
  }
  100% {
    transform: translate(21px, 11.7px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm.is-demo .mm__layer,
  .mm.is-demo .mm__box {
    animation: none !important;
  }
}
