.mobile-card-art-window.image-wrap,
.mobile-card-full-art.image-wrap {
  position: relative;
  overflow: hidden;
}

.mobile-card-art-window.image-wrap > img:not([class*="overlay"]),
.mobile-card-full-art.image-wrap > img:not([class*="overlay"]) {
  position: relative;
  z-index: 1;
}

.mobile-card-art-window.image-wrap [class$="-fx"],
.mobile-card-art-window.image-wrap [class*="-fx__"],
.mobile-card-art-window.image-wrap [class$="-particles"],
.mobile-card-full-art.image-wrap [class$="-fx"],
.mobile-card-full-art.image-wrap [class*="-fx__"],
.mobile-card-full-art.image-wrap [class$="-particles"] {
  z-index: 4;
}

/* Hex / Pearl / Neon: variant FX fill the face host, not the art window. */
.mobile-card--type-blackhex.mobile-card-effect-host,
.mobile-card--type-pearlescent.mobile-card-effect-host,
.mobile-card--type-nightneon.mobile-card-effect-host,
.mobile-card--type-blackhex .mobile-card-bezel.mobile-card-effect-host,
.mobile-card--type-pearlescent .mobile-card-bezel.mobile-card-effect-host,
.mobile-card--type-nightneon .mobile-card-bezel.mobile-card-effect-host {
  position: relative;
}

.mobile-card--type-blackhex.mobile-card-effect-host > [data-mobile-variant-fx="1"],
.mobile-card--type-pearlescent.mobile-card-effect-host > [data-mobile-variant-fx="1"],
.mobile-card--type-nightneon.mobile-card-effect-host > [data-mobile-variant-fx="1"],
.mobile-card--type-blackhex .mobile-card-bezel.mobile-card-effect-host > [data-mobile-variant-fx="1"],
.mobile-card--type-pearlescent .mobile-card-bezel.mobile-card-effect-host > [data-mobile-variant-fx="1"],
.mobile-card--type-nightneon .mobile-card-bezel.mobile-card-effect-host > [data-mobile-variant-fx="1"] {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.mobile-card--type-blackhex.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-blackhex.mobile-card-effect-host > .mobile-card-stamps,
.mobile-card--type-pearlescent.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-pearlescent.mobile-card-effect-host > .mobile-card-stamps,
.mobile-card--type-nightneon.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-nightneon.mobile-card-effect-host > .mobile-card-stamps,
.mobile-card--type-blackhex .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-blackhex .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamps,
.mobile-card--type-pearlescent .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-pearlescent .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamps,
.mobile-card--type-nightneon .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamp-slot,
.mobile-card--type-nightneon .mobile-card-bezel.mobile-card-effect-host > .mobile-card-stamps {
  z-index: 6;
}

.mobile-card-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  z-index: 5;
}

/* CSS-only effect tiers (no overlay markup in card-preview-effects.js) */

.effect-black-and-white .mobile-card-art-window.image-wrap > img.mobile-card-art-img,
.effect-black-and-white .mobile-card-full-art.image-wrap > img.mobile-card-art-img {
  filter: grayscale(1) contrast(1.14) brightness(1.03) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.effect-black-and-white .mobile-card-frame::after {
  opacity: 1;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.28) 0%,
    transparent 46%,
    rgba(0, 0, 0, 0.18) 100%
  );
  mix-blend-mode: soft-light;
}

.effect-negative .mobile-card-art-window.image-wrap > img.mobile-card-art-img,
.effect-negative .mobile-card-full-art.image-wrap > img.mobile-card-art-img {
  filter: invert(1) hue-rotate(180deg) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.effect-misprint .mobile-card-art-window.image-wrap > img.mobile-card-art-img,
.effect-misprint .mobile-card-full-art.image-wrap > img.mobile-card-art-img {
  filter: saturate(1.42) contrast(1.1) drop-shadow(2px 0 0 rgba(255, 60, 60, 0.42)) drop-shadow(-2px 0 0 rgba(60, 180, 255, 0.36));
}

.effect-misprint .mobile-card-frame::after {
  opacity: 0.54;
  background: repeating-linear-gradient(
    88deg,
    rgba(244, 201, 93, 0.44) 0 7px,
    rgba(103, 211, 145, 0.3) 7px 14px,
    rgba(241, 119, 119, 0.36) 14px 21px
  );
  mix-blend-mode: overlay;
}

.effect-blank .mobile-card-art-window.image-wrap > img.mobile-card-art-img,
.effect-blank .mobile-card-full-art.image-wrap > img.mobile-card-art-img {
  opacity: 0;
}

.effect-blank .mobile-card-art-window.image-wrap::after,
.effect-blank .mobile-card-full-art.image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--art-top, #525252) 0%, var(--art-bottom, #2e2e2e) 100%);
  z-index: 2;
}

.collection-grid .mobile-card [class$="-fx"],
.collection-grid .mobile-card [class*="-fx__"],
.collection-grid .mobile-card [class$="-particles"],
.gallery-grid .mobile-card [class$="-fx"],
.gallery-grid .mobile-card [class*="-fx__"],
.gallery-grid .mobile-card [class$="-particles"] {
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-card .image-wrap > img:not([class*="overlay"]),
  .mobile-card [class$="-fx"],
  .mobile-card [class*="-fx__"],
  .mobile-card [class$="-particles"] {
    animation: none !important;
  }
}
