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

.mo {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 420px);
  height: clamp(156px, 52vw, 236px);
  overflow: hidden;
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.04);
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.mo__page {
  position: absolute;
  inset: 0;
}

.mo__topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid rgba(23, 20, 26, 0.08);
}

.mo__brand {
  width: 44px;
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.24);
}

.mo__nav {
  width: 28px;
  height: 6px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.12);
}

.mo__nav:first-of-type {
  margin-left: auto;
}

.mo__lines {
  display: grid;
  gap: 8px;
  padding: 16px 12px;
}

.mo__line {
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.12);
}

.mo__line--head {
  height: 12px;
  width: 62%;
  background: rgba(23, 20, 26, 0.2);
}

.mo__line--short {
  width: 48%;
}

.mo__reopen {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 20, 26, 0.1);
  color: #2f6df6;
  cursor: pointer;
  transform: scale(1);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms ease-out;
}

.mo__reopen:hover, .mo__reopen:focus-visible {
  background: rgba(47, 109, 246, 0.08);
}

.mo__backdrop {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(23, 20, 26, 0.44);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}

.mo.is-open .mo__backdrop {
  opacity: 1;
  pointer-events: auto;
}

.mo__wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 12px;
  pointer-events: none;
}

.mo__modal {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 264px);
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms ease-out;
}

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

.mo__x {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(23, 20, 26, 0.4);
  cursor: pointer;
  transition: background 220ms ease-out;
}

.mo__x:hover, .mo__x:focus-visible {
  background: rgba(23, 20, 26, 0.06);
}

.mo__title {
  margin: 0;
  padding-right: 24px;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 700;
  line-height: 1.25;
}

.mo__desc {
  margin: 0;
  color: rgba(23, 20, 26, 0.72);
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.4;
}

.mo__acts {
  display: flex;
  gap: 8px;
}

.mo__btn {
  flex: 1 1 auto;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #17141a;
  font-family: inherit;
  font-size: clamp(10px, 2.8vw, 12px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 220ms ease-out;
}

.mo__btn--ok {
  border-color: transparent;
  background: #0a4fe8;
  color: #fff7e6;
}

.mo__btn:hover, .mo__btn:focus-visible {
  background: rgba(23, 20, 26, 0.06);
}

.mo__btn--ok:hover, .mo__btn--ok:focus-visible {
  background: rgba(47, 109, 246, 0.84);
}

.mo.is-demo .mo__reopen {
  animation: mo-pulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.mo.is-demo .mo__backdrop {
  animation: mo-veil 2s ease-out infinite;
}

.mo.is-demo .mo__modal {
  animation: mo-pop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes mo-pulse {
  0% {
    transform: scale(1);
  }
  7% {
    transform: scale(1.08);
  }
  15%, 100% {
    transform: scale(1);
  }
}
@keyframes mo-veil {
  0%, 22% {
    opacity: 0;
  }
  32%, 72% {
    opacity: 1;
  }
  85%, 100% {
    opacity: 0;
  }
}
@keyframes mo-pop {
  0%, 22% {
    opacity: 0;
    transform: scale(0.92);
  }
  32%, 72% {
    opacity: 1;
    transform: scale(1);
  }
  85%, 100% {
    opacity: 0;
    transform: scale(0.92);
  }
}
@media (max-width: 340px) {
  .mo__lines {
    padding: 12px;
    gap: 4px;
  }
  .mo__reopen {
    left: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
  }
  .mo__wrap {
    padding: 8px;
  }
  .mo__modal {
    padding: 12px;
    gap: 4px;
  }
  .mo__title {
    padding-right: 20px;
  }
  .mo__btn {
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mo.is-demo .mo__reopen,
  .mo.is-demo .mo__backdrop,
  .mo.is-demo .mo__modal {
    animation: none !important;
  }
  .mo.is-demo .mo__backdrop {
    opacity: 1;
  }
  .mo.is-demo .mo__modal {
    opacity: 1;
    transform: scale(1);
  }
  .mo__reopen, .mo__backdrop, .mo__modal, .mo__btn, .mo__x {
    transition: none;
  }
}
