.meguvrc-gallery-main {
  width: min(calc(100% - 36px), 1900px);
  margin: 0 auto;
  padding: 58px 0 92px;
}

.meguvrc-gallery-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 34px;
}

.meguvrc-gallery-hero h1 {
  margin: 0;
  color: var(--ink, #111116);
  font-family: var(--font-head, Impact, sans-serif);
  font-size: clamp(4.2rem, 9vw, 8.8rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.meguvrc-gallery-hero p:not(.section-kicker) {
  max-width: 640px;
  margin: 0;
  color: #3a343d;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}

.meguvrc-polaroid-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(74px, 1fr));
  gap: clamp(10px, 1.05vw, 18px);
  align-items: start;
  padding: clamp(12px, 2vw, 26px);
}

.meguvrc-photo-wall-pagination {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 0 clamp(12px, 2vw, 26px) 8px;
}

.meguvrc-photo-wall-control-slot {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
}

.meguvrc-photo-wall-control-slot.is-left {
  justify-content: flex-start;
}

.meguvrc-photo-wall-control-slot.is-right {
  justify-content: flex-end;
  gap: 14px;
}

.meguvrc-share-wall-toolbar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 52px;
}

.meguvrc-photo-wall-pagination span,
.meguvrc-share-wall-toolbar span {
  color: #3a343d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meguvrc-share-wall-builder {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.meguvrc-share-wall-builder[hidden] {
  display: none;
}

.meguvrc-share-wall-cancel {
  min-height: 42px;
  border: 0;
  color: #342b35;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.meguvrc-share-wall-cancel:hover {
  color: #ff4daf;
}

.meguvrc-wall-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(17, 17, 22, 0.2);
  border-radius: 8px;
  color: #fff;
  background: #111116;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 14px 34px rgba(17, 17, 22, 0.14), 0 0 24px rgba(255, 94, 188, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.meguvrc-wall-page-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(17, 17, 22, 0.2), 0 0 30px rgba(255, 94, 188, 0.28);
}

.meguvrc-wall-page-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.meguvrc-polaroid {
  position: relative;
  margin: 0;
  padding: clamp(5px, 0.55vw, 10px) clamp(5px, 0.55vw, 10px) clamp(16px, 1.25vw, 28px);
  border: 1px solid rgba(17, 17, 22, 0.16);
  background: #fff;
  box-shadow: 0 18px 34px rgba(17, 17, 22, 0.16);
  cursor: zoom-in;
  transform: rotate(var(--polaroid-angle, 0deg));
  transition: transform 180ms ease, box-shadow 180ms ease, z-index 180ms ease;
}

.meguvrc-polaroid::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 42%;
  height: 18px;
  background: rgba(255, 94, 188, 0.58);
  transform: translateX(-50%) rotate(var(--tape-angle, -3deg));
}

.meguvrc-polaroid:hover {
  z-index: 3;
  box-shadow: 0 26px 50px rgba(17, 17, 22, 0.22);
  transform: rotate(0deg) scale(1.08);
}

.meguvrc-share-selecting .meguvrc-polaroid {
  cursor: pointer;
}

.meguvrc-share-selecting .meguvrc-polaroid::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: rgba(17, 17, 22, 0.36);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.meguvrc-share-selecting .meguvrc-polaroid.is-share-selected {
  outline: 4px solid #ff5ebc;
  outline-offset: 5px;
  box-shadow: 0 28px 58px rgba(255, 94, 188, 0.36);
}

.meguvrc-share-selecting .meguvrc-polaroid.is-share-selected::after {
  content: "\2713";
  display: grid;
  place-items: center;
  color: #fff;
  background: #ff4daf;
  font-weight: 900;
}

.meguvrc-polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #ffe7f3;
}

.meguvrc-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  background: rgba(13, 13, 17, 0.88);
  cursor: zoom-out;
}

.meguvrc-photo-viewer[hidden] {
  display: none;
}

.meguvrc-photo-viewer img {
  display: block;
  box-sizing: border-box;
  max-width: calc(100vw - clamp(32px, 6vw, 84px));
  max-height: calc(100vh - clamp(32px, 6vw, 84px));
  object-fit: contain;
  border: clamp(8px, 1.3vw, 18px) solid #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), 0 0 45px rgba(255, 94, 188, 0.28);
}

.meguvrc-photo-heart {
  position: fixed;
  right: clamp(24px, 6vw, 96px);
  bottom: clamp(28px, 7vh, 90px);
  z-index: 100001;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px;
  min-width: 112px;
  min-height: 78px;
  padding: 10px 18px 12px 14px;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: 999px;
  color: #ff4daf;
  background: linear-gradient(145deg, #ffffff 0%, #fff1f9 48%, #ffd2ea 100%);
  box-shadow:
    inset 0 4px 7px rgba(255, 255, 255, 0.95),
    inset 0 -8px 14px rgba(255, 91, 181, 0.24),
    0 14px 0 #e8a5c9,
    0 28px 44px rgba(0, 0, 0, 0.34),
    0 0 36px rgba(255, 94, 188, 0.62);
  cursor: pointer;
  transform-style: preserve-3d;
  animation: meguvrc-heart-bob 2.4s ease-in-out infinite;
}

.meguvrc-photo-heart::before,
.meguvrc-photo-heart::after,
.meguvrc-photo-heart-sparkles::before,
.meguvrc-photo-heart-sparkles::after {
  content: "*";
  position: absolute;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 94, 188, 0.95), 0 0 18px rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.meguvrc-photo-heart::before {
  top: -18px;
  left: 16px;
  font-size: 24px;
  animation: meguvrc-heart-sparkle 1.8s ease-in-out infinite;
}

.meguvrc-photo-heart::after {
  right: 7px;
  bottom: -15px;
  font-size: 18px;
  animation: meguvrc-heart-sparkle 2.1s ease-in-out 0.55s infinite;
}

.meguvrc-photo-heart-sparkles::before {
  right: -20px;
  top: 9px;
  font-size: 22px;
  animation: meguvrc-heart-sparkle 1.6s ease-in-out 0.2s infinite;
}

.meguvrc-photo-heart-sparkles::after {
  left: 42px;
  bottom: -24px;
  font-size: 15px;
  animation: meguvrc-heart-sparkle 2.35s ease-in-out 0.9s infinite;
}

.meguvrc-photo-heart-shape {
  display: inline-block;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 0.9;
  color: #fff;
  -webkit-text-stroke: 3px #ff4daf;
  text-shadow:
    0 3px 0 #d83a91,
    0 7px 0 #a62269,
    0 0 20px rgba(255, 94, 188, 0.9);
  transform: rotate(-8deg);
}

.meguvrc-photo-heart-count {
  min-width: 28px;
  color: #171018;
  font-family: var(--font-head, Impact, sans-serif);
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1;
  text-align: left;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}

.meguvrc-photo-heart.has-liked {
  color: #ff248f;
  background: linear-gradient(145deg, #fff 0%, #ffe4f3 42%, #ffacd3 100%);
}

.meguvrc-photo-heart:disabled {
  cursor: wait;
}

.meguvrc-photo-heart.is-popping {
  animation: meguvrc-heart-pop 520ms cubic-bezier(0.2, 1.7, 0.35, 1), meguvrc-heart-bob 2.4s ease-in-out infinite;
}

.meguvrc-photo-heart.has-error {
  animation: meguvrc-heart-shake 260ms linear 2;
}

.meguvrc-photo-share {
  position: fixed;
  right: clamp(24px, 6vw, 96px);
  bottom: clamp(124px, 19vh, 208px);
  z-index: 100001;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 17px;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: 999px;
  color: #171018;
  background: linear-gradient(145deg, #ffffff 0%, #fff1f9 48%, #ffd2ea 100%);
  box-shadow:
    inset 0 4px 7px rgba(255, 255, 255, 0.95),
    inset 0 -7px 13px rgba(255, 91, 181, 0.2),
    0 10px 0 #e8a5c9,
    0 22px 34px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(255, 94, 188, 0.5);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  animation: meguvrc-share-float 2.8s ease-in-out infinite;
}

.meguvrc-photo-share-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: #ff4daf;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(111, 24, 76, 0.24), 0 4px 0 #d83a91;
}

.meguvrc-photo-share.is-copied {
  background: linear-gradient(145deg, #fff 0%, #e8fff3 42%, #b7ffd9 100%);
}

.meguvrc-photo-viewer-open {
  overflow: hidden;
}

@keyframes meguvrc-heart-bob {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}

@keyframes meguvrc-heart-sparkle {
  0%, 100% {
    opacity: 0.2;
    transform: translate3d(0, 0, 0) scale(0.7) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate3d(4px, -9px, 0) scale(1.3) rotate(22deg);
  }
}

@keyframes meguvrc-heart-pop {
  0% {
    transform: translateY(0) scale(1) rotate(-2deg);
  }
  55% {
    transform: translateY(-18px) scale(1.24) rotate(6deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(-2deg);
  }
}

@keyframes meguvrc-heart-shake {
  0%, 100% { transform: translateX(0) rotate(-2deg); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(3deg); }
}

@keyframes meguvrc-share-float {
  0%, 100% {
    transform: translateY(0) rotate(2deg);
  }
  50% {
    transform: translateY(-8px) rotate(-2deg);
  }
}

.meguvrc-polaroid:nth-child(12n + 1) { --polaroid-angle: -7deg; --tape-angle: 4deg; }
.meguvrc-polaroid:nth-child(12n + 2) { --polaroid-angle: 4deg; --tape-angle: -5deg; }
.meguvrc-polaroid:nth-child(12n + 3) { --polaroid-angle: -2deg; --tape-angle: 3deg; }
.meguvrc-polaroid:nth-child(12n + 4) { --polaroid-angle: 6deg; --tape-angle: -2deg; }
.meguvrc-polaroid:nth-child(12n + 5) { --polaroid-angle: -5deg; --tape-angle: 5deg; }
.meguvrc-polaroid:nth-child(12n + 6) { --polaroid-angle: 2deg; --tape-angle: -4deg; }
.meguvrc-polaroid:nth-child(12n + 7) { --polaroid-angle: 8deg; --tape-angle: 2deg; }
.meguvrc-polaroid:nth-child(12n + 8) { --polaroid-angle: -4deg; --tape-angle: -6deg; }
.meguvrc-polaroid:nth-child(12n + 9) { --polaroid-angle: 5deg; --tape-angle: 4deg; }
.meguvrc-polaroid:nth-child(12n + 10) { --polaroid-angle: -8deg; --tape-angle: -3deg; }
.meguvrc-polaroid:nth-child(12n + 11) { --polaroid-angle: 3deg; --tape-angle: 5deg; }
.meguvrc-polaroid:nth-child(12n + 12) { --polaroid-angle: -3deg; --tape-angle: -2deg; }

.meguvrc-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(255, 94, 188, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: #3a343d;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .meguvrc-polaroid-grid {
    grid-template-columns: repeat(6, minmax(92px, 1fr));
  }
}

@media (max-width: 780px) {
  .meguvrc-polaroid-grid {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }
}

@media (max-width: 460px) {
  .meguvrc-photo-wall-pagination {
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
  }

  .meguvrc-photo-wall-control-slot,
  .meguvrc-photo-wall-control-slot.is-left,
  .meguvrc-photo-wall-control-slot.is-right,
  .meguvrc-share-wall-toolbar {
    justify-content: center;
    flex-wrap: wrap;
  }

  .meguvrc-polaroid-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meguvrc-photo-heart,
  .meguvrc-photo-share {
    right: 16px;
  }

  .meguvrc-photo-share {
    bottom: 116px;
  }
}
