/* Only ordinary comparison previews and opt-in category shells. */
body.gallery-premium .gallery-page [hidden] { display: none !important; }
body.gallery-premium .gallery-page .gallery-project .project-comparison--preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
}
body.gallery-premium .gallery-page .gallery-project .project-comparison--preview > .gallery-page__tile {
  flex: 0 1 16rem;
  width: min(100%, 16rem);
  max-width: 16rem;
  min-width: 0;
  margin: 0;
  order: 0;
}
body.gallery-premium .gallery-page .gallery-project .project-comparison--preview .gallery-page__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
body.gallery-premium .gallery-page .gallery-project .project-comparison--preview .gallery-page__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.gallery-premium .gallery-page .gallery-preview-hint {
  margin: 0.75rem 0 0;
  color: var(--premium-muted, #526174);
  font-size: 0.85rem;
  line-height: 1.5;
}
body.gallery-premium .gallery-page .category-box-heading { margin: 0; }
body.gallery-premium .gallery-page .gallery-category-box {
  display: block;
  width: 100%;
  padding: 1.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: var(--premium-navy, #16324f);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body.gallery-premium .gallery-page .gallery-category-box:hover,
body.gallery-premium .gallery-page .gallery-category-box[aria-expanded="true"] {
  border-color: #397faa;
  background: #eef5fa;
}
body.gallery-premium .gallery-page .gallery-category-box:focus-visible {
  outline: 3px solid #397faa;
  outline-offset: 4px;
}
body.gallery-premium .gallery-page .gallery-category-box:disabled { cursor: progress; }
body.gallery-premium .gallery-page .gallery-category-content:not([hidden]) { margin-top: 1.25rem; }
body.gallery-premium .gallery-page .gallery-category-error { color: #8a2929; font-size: 0.9rem; }

/* Explicit, touch-friendly comparison action: no shifting thumbnail layout. */
body.gallery-premium .gallery-page .gallery-reveal-original {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid #397faa;
  border-radius: 0.6rem;
  background: #eef5fa;
  color: var(--premium-navy, #16324f);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transform-origin: left center;
}
body.gallery-premium .gallery-page .gallery-reveal-original[aria-expanded="false"] {
  animation: gallery-reveal-pulse 2.4s ease-in-out infinite;
}
@keyframes gallery-reveal-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(57, 127, 170, 0); }
  50% { transform: scale(1.025); box-shadow: 0 0 0 5px rgba(57, 127, 170, 0.14); }
}
body.gallery-premium .gallery-page .gallery-reveal-original:hover,
body.gallery-premium .gallery-page .gallery-reveal-original:focus-visible {
  animation: none;
  background: #16324f;
  color: #fff;
}
body.gallery-premium .gallery-page .gallery-reveal-original:focus-visible {
  outline: 3px solid #397faa;
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  body.gallery-premium .gallery-page .gallery-reveal-original[aria-expanded="false"] { animation: none; }
}
