/* ---- shared text stage ---- */
.mmpw-stage {
  position: relative; z-index: 1; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; overflow: hidden; box-sizing: border-box;
}
.mmpw-stage[data-align="left"] { justify-content: flex-start; text-align: left; }
.mmpw-stage[data-align="center"] { justify-content: center; text-align: center; }
.mmpw-stage[data-align="right"] { justify-content: flex-end; text-align: right; }
.mm-pw { position: relative; display: block; width: 100%; overflow: hidden; isolation: isolate; }
.mm-pw *, .mm-pw *::before, .mm-pw *::after { box-sizing: border-box; }

.mm-pw .mmpw-stage { touch-action: pan-y; }
.mm-pw .mmpw-flow {
  position: relative; z-index: 2; max-width: 100%; font-size: min(var(--mmpw-size, 128px), 15vw); line-height: 1.08;
  letter-spacing: -0.03em; user-select: none; margin: 0; padding: 0;
}
.mm-pw .mmpw-line { display: block; white-space: nowrap; margin: 0; padding: 0; font: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.mm-pw .mmpw-ch {
  display: inline-block; white-space: pre; font-weight: 100; font-variation-settings: "wght" 100;
  will-change: transform, font-variation-settings; transform-origin: 50% 70%;
}

/* ---- shared gallery kit ---- */
.mmpw-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mmpw-bg__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.mmpw-bg__ov { position: absolute; inset: 0; }
.mmpw-demo {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  min-height: var(--mm-demo-h, clamp(200px, 35vh, 360px)); margin: 0 1rem; border: 2px dotted rgba(140, 140, 160, 0.55); border-radius: 14px;
  color: rgba(160, 160, 180, 0.9); font: 500 13px/1.4 system-ui, sans-serif; letter-spacing: 0.02em;
}
.mmpw-demo--before { margin-bottom: 1rem; }
.mmpw-demo--after { margin-top: 1rem; }
/* Editor scroll room (1.3.4): same heights as the demo pages; editor preview only, never rendered live. */
.mmpw-demo--after { min-height: var(--mm-demo-h-after, 50vh); }
@media (max-width: 640px) { .mmpw-demo--before { min-height: var(--mm-demo-h-sm, clamp(160px, 30vh, 260px)); } }
.mmpw-lb {
  position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center;
  padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
  font-family: inherit;
}
.mmpw-lb[hidden] { display: none !important; }
.mmpw-lb.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mmpw-lb__card {
  position: relative; z-index: 1; width: min(96vw, 960px); max-height: min(92dvh, 900px);
  display: flex; flex-direction: column; align-items: center; padding-top: 0.75rem;
  background: var(--mmpw-lb-bg, #101014); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(18px) scale(0.96); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mmpw-lb.is-open .mmpw-lb__card { transform: none; }
.mmpw-lb__close:hover, .mmpw-lb__close:focus, .mmpw-lb__close:focus-visible {
  background: rgba(0, 0, 0, 0.7) !important; color: #fff !important; opacity: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important; outline: none !important; box-shadow: none !important;
}
.mmpw-lb__scrim:hover, .mmpw-lb__scrim:focus { background: rgba(0, 0, 0, 0.66) !important; outline: none !important; box-shadow: none !important; }
.mmpw-lb__media {
  display: block; width: auto !important; height: auto !important; max-width: 100% !important;
  max-height: min(74dvh, 760px); min-height: min(40dvh, 300px); object-fit: contain;
  border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important;
}
.mmpw-lb__body { flex: 0 0 auto; align-self: stretch; padding: 0.85rem 1.1rem 1.05rem; overflow-y: auto; text-align: left; }
.mmpw-lb__title { margin: 0 0 0.4rem !important; padding: 0 !important; font-size: 21px !important; font-weight: 600 !important; letter-spacing: -0.02em; line-height: 1.2 !important; color: var(--mmpw-lb-title, #fff) !important; text-transform: none !important; }
.mmpw-lb__desc { margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--mmpw-lb-text, #c8c8d0) !important; }
.mmpw-lb__title[hidden], .mmpw-lb__desc[hidden], .mmpw-lb__link[hidden] { display: none !important; }
.mmpw-lb__link, .mmpw-lb__link:visited {
  display: inline-block; margin-top: 0.8rem; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--mmpw-lb-title, #fff) !important; color: var(--mmpw-lb-bg, #101014) !important;
  font-size: 0.85rem; font-weight: 600; text-decoration: none !important; border: 0 !important; box-shadow: none !important;
}
.mmpw-lb__link:hover, .mmpw-lb__link:focus { opacity: 0.88; text-decoration: none !important; outline: none !important; }
/* ---- end kit ---- */
