/* Rotating Card Stack */
.mm-rotstack { position: relative; width: 100%; overflow: clip; isolation: isolate; box-sizing: border-box; }
.mm-rotstack *, .mm-rotstack *::before, .mm-rotstack *::after { box-sizing: border-box; }
.mm-rotstack .mmcr-body { position: relative; z-index: 1; }
.mm-rotstack .mmcr-pin { position: relative; width: 100%; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 1.5rem; container-type: size; }
/* The stage fits the turned cards: --mmcr-fx / --mmcr-fy are the extra width
   and height a card needs once it is turned (set by the runtime from card
   shape, shrink and rotation). The view only clips below its bottom edge
   (plus the room a turned card needs), so cards waiting below stay hidden
   while the turned cards behind are never cut at the top or the sides. */
.mm-rotstack .mmcr-view {
  position: relative; aspect-ratio: var(--mmcr-aspect, 4 / 3);
  width: min(var(--mmcr-w, 42%), var(--mmcr-max, 720px), calc(85vh * var(--mmcr-arn, 1.3333) / var(--mmcr-fy, 1)), calc(100% / var(--mmcr-fx, 1)));
  width: min(var(--mmcr-w, 42%), var(--mmcr-max, 720px), calc(94cqh * var(--mmcr-arn, 1.3333) / var(--mmcr-fy, 1)), calc(96cqw / var(--mmcr-fx, 1)));
  overflow: visible; clip-path: inset(-200vh -200vw calc(-1 * var(--mmcr-eb, 0%) - 4px) -200vw);
  border-radius: calc(var(--mmcr-r, 24px) * 0.4); perspective: var(--mmcr-persp, 1200px); transform-style: preserve-3d;
}
.mm-rotstack .mmcr-card {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--mmcr-r, 24px); overflow: hidden;
  background: var(--mmcr-card-bg, #1d1d24); box-shadow: var(--mmcr-shadow); transform-origin: center center; will-change: transform; cursor: pointer; outline: none;
}
.mm-rotstack .mmcr-card:focus-visible { outline: 3px solid #fff !important; outline-offset: -3px; }
.mm-rotstack .mmcr-card__img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; pointer-events: none; user-select: none; }
.mm-rotstack.is-static .mmcr-pin { height: auto; min-height: 420px; padding: 3rem 1.5rem; container-type: normal; }
.mm-rotstack.is-static .mmcr-view { width: min(var(--mmcr-w, 42%), var(--mmcr-max, 720px)); clip-path: none; }
.mm-rotstack.is-static .mmcr-card:not(:first-child) { display: none; }
.mm-rotstack.is-reduced .mmcr-pin { height: auto; padding: 2rem 1.5rem; container-type: normal; }
.mm-rotstack.is-reduced .mmcr-view { width: min(var(--mmcr-w, 42%), var(--mmcr-max, 720px)); aspect-ratio: auto; overflow: visible; clip-path: none; }
.mm-rotstack.is-reduced .mmcr-card { position: relative; inset: auto; height: auto; aspect-ratio: var(--mmcr-aspect, 4 / 3); margin-bottom: 1.25rem; }
@media (max-width: 767px) { .mm-rotstack .mmcr-pin { padding: 1rem; } }

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