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

.mm {
  box-sizing: border-box;
  width: min(480px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.mm__map {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  height: clamp(104px, 34vw, 160px);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: radial-gradient(circle at 28% 28%, #c9e0bd 0 40px, transparent 40px), linear-gradient(122deg, transparent 0 56%, #bcd9ea 56% 63%, transparent 63%), repeating-linear-gradient(90deg, #fffdf7 0 7px, transparent 7px 31px), repeating-linear-gradient(0deg, #fffdf7 0 7px, transparent 7px 27px), #efe9dc;
}

.mm__block {
  position: absolute;
  display: block;
  background: #e2dac9;
  border-radius: 4px;
}

.mm__block--a {
  left: 8%;
  top: 62%;
  width: 16%;
  height: 24%;
}

.mm__block--b {
  left: 44%;
  top: 16%;
  width: 18%;
  height: 24%;
}

.mm__block--c {
  left: 62%;
  top: 56%;
  width: 14%;
  height: 20%;
}

.mm__you {
  position: absolute;
  left: 18%;
  top: 40%;
  display: block;
  transform: translate(-50%, -50%);
  color: #2f6df6;
  filter: drop-shadow(0 2px 3px rgba(23, 20, 26, 0.3));
}

.mm__you svg {
  display: block;
}

.mm__mini {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  box-sizing: border-box;
  width: 30%;
  height: 40%;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  background: repeating-linear-gradient(90deg, #fffdf7 0 3px, transparent 3px 12px), repeating-linear-gradient(0deg, #fffdf7 0 3px, transparent 3px 11px), #efe9dc;
  transition: border-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mm__mini:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.mm.is-open .mm__mini {
  border-color: #2f6df6;
}

.mm__ico {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: inline-flex;
  padding: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(23, 20, 26, 0.78);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mm__ico svg {
  display: block;
}

.mm.is-open .mm__ico {
  transform: rotate(180deg);
}

.mm__view, .mm__panel-view {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #2f6df6;
  border-radius: 4px;
  background: rgba(47, 109, 246, 0.16);
}

.mm__view {
  left: 8%;
  top: 12%;
  width: 34%;
  height: 34%;
}

.mm__panel-view {
  left: 10%;
  top: 16%;
  width: 30%;
  height: 32%;
}

.mm__panel {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  box-sizing: border-box;
  width: 66%;
  height: 78%;
  padding: 8px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: radial-gradient(circle at 72% 70%, #c9e0bd 0 26px, transparent 26px), repeating-linear-gradient(90deg, #fffdf7 0 5px, transparent 5px 22px), repeating-linear-gradient(0deg, #fffdf7 0 5px, transparent 5px 20px), #efe9dc;
  transform-origin: 100% 100%;
  transform: scale(0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mm.is-open .mm__panel {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.mm__panel-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(23, 20, 26, 0.9);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  white-space: nowrap;
}

.mm__panel-ico {
  display: inline-flex;
  color: #2f6df6;
}

.mm__panel-ico svg {
  display: block;
}

.mm__hint {
  margin: 0;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.58);
}

.mm.is-demo .mm__view, .mm.is-demo .mm__panel-view {
  animation-name: mm-pan;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes mm-pan {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(108%, 68%);
  }
  100% {
    transform: translate(0, 0);
  }
}
.mm.is-demo .mm__panel {
  animation-name: mm-open;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes mm-open {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  24% {
    opacity: 0;
    transform: scale(0.3);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
  66% {
    opacity: 1;
    transform: scale(1);
  }
  84% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}
.mm.is-demo .mm__ico {
  animation-name: mm-flip;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes mm-flip {
  0% {
    transform: rotate(0deg);
  }
  24% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(180deg);
  }
  66% {
    transform: rotate(180deg);
  }
  84% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@media (max-width: 340px) {
  .mm {
    gap: 0;
  }
  .mm__hint {
    margin-top: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm.is-demo .mm__view,
  .mm.is-demo .mm__panel-view,
  .mm.is-demo .mm__panel,
  .mm.is-demo .mm__ico {
    animation: none !important;
  }
  .mm__panel, .mm__ico, .mm__mini {
    transition: none;
  }
}
