/* Masonry Gallery with Lightbox */
.mm-masonry { position: relative; width: 100%; isolation: isolate; box-sizing: border-box; }
.mm-masonry *, .mm-masonry *::before, .mm-masonry *::after { box-sizing: border-box; }
.mm-masonry .mmmy-wrap { position: relative; z-index: 1; width: 100%; }
.mm-masonry .mmmy-list { position: relative; width: 100%; margin: 0 auto; min-height: 120px; }
.mm-masonry .mmmy-item { position: absolute; top: 0; left: 0; padding: var(--mmmy-gap, 6px); cursor: pointer; outline: none; will-change: transform, width, height, opacity; transform-origin: center; }
.mm-masonry .mmmy-item__inner { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--mmmy-r, 10px); background: rgba(127, 127, 127, 0.18); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.35); }
.mm-masonry .mmmy-item__img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; pointer-events: none; }
.mm-masonry .mmmy-item__shift { position: absolute; inset: 0; background: var(--mmmy-accent, #ff4fa3); opacity: 0; pointer-events: none; mix-blend-mode: normal; }
.mm-masonry .mmmy-item:focus-visible .mmmy-item__inner { box-shadow: 0 0 0 3px var(--mmmy-accent, #fff) !important; }

/* ---- shared gallery kit ---- */
.mmmy-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mmmy-bg__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.mmmy-bg__ov { position: absolute; inset: 0; }
.mmmy-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;
}
.mmmy-demo--before { margin-bottom: 1rem; }
.mmmy-demo--after { margin-top: 1rem; }
/* Editor scroll room (1.3.4): same heights as the demo pages; editor preview only, never rendered live. */
.mmmy-demo--after { min-height: var(--mm-demo-h-after, 50vh); }
@media (max-width: 640px) { .mmmy-demo--before { min-height: var(--mm-demo-h-sm, clamp(160px, 30vh, 260px)); } }
.mmmy-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;
}
.mmmy-lb[hidden] { display: none !important; }
.mmmy-lb.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mmmy-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(--mmmy-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);
}
.mmmy-lb.is-open .mmmy-lb__card { transform: none; }
.mmmy-lb__close:hover, .mmmy-lb__close:focus, .mmmy-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;
}
.mmmy-lb__scrim:hover, .mmmy-lb__scrim:focus { background: rgba(0, 0, 0, 0.66) !important; outline: none !important; box-shadow: none !important; }
.mmmy-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;
}
.mmmy-lb__body { flex: 0 0 auto; align-self: stretch; padding: 0.85rem 1.1rem 1.05rem; overflow-y: auto; text-align: left; }
.mmmy-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(--mmmy-lb-title, #fff) !important; text-transform: none !important; }
.mmmy-lb__desc { margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--mmmy-lb-text, #c8c8d0) !important; }
.mmmy-lb__title[hidden], .mmmy-lb__desc[hidden], .mmmy-lb__link[hidden] { display: none !important; }
.mmmy-lb__link, .mmmy-lb__link:visited {
  display: inline-block; margin-top: 0.8rem; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--mmmy-lb-title, #fff) !important; color: var(--mmmy-lb-bg, #101014) !important;
  font-size: 0.85rem; font-weight: 600; text-decoration: none !important; border: 0 !important; box-shadow: none !important;
}
.mmmy-lb__link:hover, .mmmy-lb__link:focus { opacity: 0.88; text-decoration: none !important; outline: none !important; }
/* ---- end kit ---- */
