/* ============================================================
   UI Fixes v5.0.5 — loads LAST (after laptop-fix)
   Image 1: Full thumbnails (no crop)
   Image 2: Full thumbnails + gallery card design
   Image 3: No empty gap under mobile header
   Image 4: No laptop header overlap
   Image 5: Tight hero spacing + visible pill icon
   ============================================================ */

/* ============================================================
   1–2. THUMBNAILS — show full collage / image (never crop)
   ============================================================ */
.blog-card-visual,
.ipa-gallery-hero .blog-card-visual,
.more-blog-card .blog-card-visual,
.more-posts-wrapper .blog-card-visual,
.blog-card .blog-card-visual {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  position: relative !important;
  background: #EEF2F7 !important;
}

.blog-card-visual a,
.ipa-gallery-hero .blog-card-visual a,
.more-blog-card .blog-card-visual a {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  line-height: 0 !important;
  position: relative !important;
  inset: auto !important;
}

.blog-card-visual img,
.blog-card-visual a img,
.ipa-gallery-hero .blog-card-visual img,
.ipa-gallery-hero .blog-card-visual a img,
.more-blog-card .blog-card-visual img,
.more-posts-wrapper .blog-card-visual img,
.more-blog-card img,
.blog-card > .blog-card-visual img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center top !important;
  display: block !important;
  transform: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .blog-card:hover .blog-card-visual img,
  .blog-card:hover .blog-card-visual a img,
  .more-blog-card:hover .blog-card-visual img {
    transform: scale(1.02) !important;
    transform-origin: center center !important;
  }
}

/* Gallery / Explore card design polish */
.blog-card,
.ipa-gallery-hero .blog-card,
.more-blog-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  background: #fff !important;
  height: 100% !important;
}

.blog-card-content {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 16px 18px 18px !important;
  min-width: 0 !important;
}

.blog-meta-info {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 12px !important;
  font-size: 12px !important;
  color: #64748B !important;
  margin: 0 !important;
}

.blog-card-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  word-break: break-word !important;
}

.blog-card-excerpt {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: #64748B !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  flex: 0 1 auto !important;
}

.blog-card-footer {
  margin-top: auto !important;
  padding-top: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.more-posts-wrapper .blog-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 22px !important;
  width: 100% !important;
}

.more-blog-card .blog-card-visual {
  margin: 0 !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: none !important;
}

/* ============================================================
   3–5. HEADER SPACING — one offset, no double gap, no overlap
   ============================================================ */

/* Never pad body top for the fixed header (except WP admin bar) */
body.ipa-neu,
body.ipa-premium-light,
body.ipa-premium-light.ipa-neu,
body {
  padding-top: 0 !important;
}

body.admin-bar {
  padding-top: 32px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    padding-top: 46px !important;
  }
}

/* Desktop / laptop: clear fixed advanced-header */
@media (min-width: 768px) {
  .advanced-header,
  #ipaAdvancedHeader {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
  }

  body.admin-bar .advanced-header,
  body.admin-bar #ipaAdvancedHeader {
    top: 32px !important;
  }

  .mobile-header-modern,
  .mobile-header,
  #ipaMobileHeader,
  .mobile-bottom-nav {
    display: none !important;
  }

  /* Single source of top offset — comfortable gap under fixed header */
  main#main-content,
  #main-content,
  main.site-main,
  main.ipa-gallery-hero,
  main.ipa-single-prompt,
  main.container.ipa-single-prompt,
  main.read-container,
  .ipa-single-prompt {
    padding-top: 112px !important;
    margin-top: 0 !important;
    position: relative !important;
    z-index: 2 !important;
  }

  /* Hero / blog hero: small extra air under main offset */
  .hero,
  .hero.ipa-hero,
  .ipa-hero,
  section.hero,
  .blog-hero,
  .ipa-gallery-hero .blog-hero,
  .neu-hero,
  .au-hero {
    padding-top: 12px !important;
    margin-top: 0 !important;
  }

  .stats-wrapper {
    margin-top: 4px !important;
    margin-bottom: 14px !important;
  }

  /* Breadcrumb never under header — small extra top margin */
  .breadcrumb,
  .ipa-single-prompt .breadcrumb,
  main.ipa-single-prompt .breadcrumb {
    margin-top: 4px !important;
    margin-bottom: 16px !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Category strip below header chrome */
  .category-slider-section,
  .category-slider-wrapper {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
  }
}

/* Phone: clear floating mobile header — no body + main double gap */
@media (max-width: 767px) {
  .advanced-header,
  #ipaAdvancedHeader {
    display: none !important;
  }

  .mobile-header-modern,
  .mobile-header,
  #ipaMobileHeader {
    display: flex !important;
  }

  body.ipa-neu,
  body.ipa-premium-light,
  body {
    padding-top: 0 !important;
  }

  body.admin-bar {
    padding-top: 46px !important;
  }

  main#main-content,
  #main-content,
  main.site-main,
  main.ipa-gallery-hero,
  main.ipa-single-prompt,
  main.container.ipa-single-prompt,
  main.read-container,
  .ipa-single-prompt {
    /* Clear fixed mobile bar + comfortable breathing room */
    padding-top: calc(84px + env(safe-area-inset-top, 0px)) !important;
    margin-top: 0 !important;
  }

  .hero,
  .hero.ipa-hero,
  .ipa-hero,
  section.hero,
  .blog-hero,
  .neu-hero {
    padding-top: 10px !important;
    margin-top: 0 !important;
  }

  .stats-wrapper {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
  }

  .breadcrumb,
  .ipa-single-prompt .breadcrumb,
  main.ipa-single-prompt .breadcrumb {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
  }
}

/* ============================================================
   5b. PROMPT CARD IMAGE — full-bleed top, clean corners, balanced gap
   ============================================================ */

/* Balanced gap between cards (not too tight, not sparse) */
.masonry-grid,
.ipa-prompt-grid,
section.masonry-grid,
#ipaPromptGrid {
  display: grid !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  column-count: unset !important;
}

/* Magazine: force 4 columns on all non-phone screens */
html body.ipa-layout-magazine .masonry-grid,
html body.ipa-layout-magazine .ipa-prompt-grid,
html body.ipa-layout-magazine #ipaPromptGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  column-count: unset !important;
}

@media (max-width: 767px) {
  html body.ipa-layout-magazine .masonry-grid,
  html body.ipa-layout-magazine .ipa-prompt-grid,
  html body.ipa-layout-magazine #ipaPromptGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) {
  .masonry-grid,
  .ipa-prompt-grid,
  #ipaPromptGrid {
    gap: 18px !important;
  }
}

@media (min-width: 1200px) {
  .masonry-grid,
  .ipa-prompt-grid,
  #ipaPromptGrid {
    gap: 20px !important;
  }
}

@media (max-width: 767px) {
  .masonry-grid,
  .ipa-prompt-grid,
  #ipaPromptGrid {
    gap: 12px !important;
  }
}

/* Card shell — one clean outer radius; image fills top edge-to-edge */
.prompt-card {
  border-radius: 18px !important;
  overflow: hidden !important;
  isolation: isolate !important;
  background: #fff !important;
}

/* Image hugs the photo — no square/tall empty frame above the picture */
.card-image-wrapper {
  position: relative !important;
  cursor: pointer !important;
  overflow: hidden !important;
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  aspect-ratio: auto !important;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 0 !important;
  transform: translateZ(0);
}

.card-image-wrapper > .card-image-link {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  border-radius: inherit !important;
  overflow: hidden !important;
  background: transparent !important;
  cursor: pointer !important;
  text-decoration: none !important;
  line-height: 0 !important;
}

.card-image-wrapper > .card-image-link img,
.card-image-wrapper .card-image-link img,
.card-image-wrapper img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: unset !important;
  object-position: top center !important;
  display: block !important;
  pointer-events: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  transform-origin: center top !important;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (hover: hover) and (pointer: fine) {
  .prompt-card:hover .card-image-wrapper .card-image-link img,
  .prompt-card:hover .card-image-wrapper img {
    transform: scale(1.04) !important;
  }
}

/* Overlay does not steal clicks */
.card-image-overlay {
  pointer-events: none !important;
  z-index: 2 !important;
  border-radius: 0 !important;
  inset: 0 !important;
}

.card-image-overlay .card-overlay-btn,
.card-image-overlay a.card-overlay-btn,
.card-image-overlay button {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 3 !important;
  cursor: pointer !important;
}

.card-image-wrapper .card-badges {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 4 !important;
  pointer-events: none !important;
  max-width: calc(100% - 20px) !important;
}

.card-image-wrapper .card-badges a,
.card-image-wrapper .card-badges .model-tag {
  pointer-events: auto !important;
}

.prompt-card .card-body {
  padding: 12px 14px 14px !important;
}

/* All layout modes: full-bleed top image, no inset gap */
body.ipa-layout-grid2 .card-image-wrapper,
body.ipa-layout-grid3 .card-image-wrapper,
body.ipa-layout-grid4 .card-image-wrapper,
body.ipa-layout-masonry .card-image-wrapper,
body.ipa-layout-magazine .card-image-wrapper {
  margin: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  overflow: hidden !important;
}

body.ipa-layout-list .card-image-wrapper {
  margin: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body.ipa-layout-list .card-image-wrapper img,
body.ipa-layout-list .card-image-wrapper .card-image-link img {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
}

/* Single post (stack): full uncropped image */
html body.ipa-layout-stack .card-image-wrapper {
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}
html body.ipa-layout-stack .card-image-wrapper > .card-image-link {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  width: 100% !important;
}
html body.ipa-layout-stack .card-image-wrapper img,
html body.ipa-layout-stack .card-image-wrapper .card-image-link img {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center top !important;
  display: block !important;
}

/* Laptop: full tag (icon + text) on the image, top-left glass pill */
@media (min-width: 768px) {
  html body .card-image-wrapper .card-badges {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 20px) !important;
    overflow: visible !important;
    z-index: 5 !important;
  }
  html body .card-image-wrapper .model-tag,
  html body.ipa-layout-magazine .card-image-wrapper .model-tag:not(.model-tag--meta) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    overflow: visible !important;
  }
  html body .card-image-wrapper .model-tag span,
  html body .image-wrapper .model-badge-overlay span {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: 160px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #fff !important;
    font-size: inherit !important;
  }
  html body.ipa-tagp-on_image .model-tag--meta,
  html body.ipa-layout-magazine .model-tag--meta {
    display: none !important;
  }
}

/* Phone + Magazine: tag under the title, not on the image */
@media (max-width: 767px) {
  html body.ipa-layout-magazine .card-image-wrapper .card-badges,
  html body.ipa-layout-magazine .card-image-wrapper .model-tag:not(.model-tag--meta) {
    display: none !important;
  }
  html body.ipa-layout-magazine .card-meta .model-tag--meta,
  html body.ipa-layout-magazine .prompt-card .model-tag--meta {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Title + prompt: kill empty gap under the title */
html body .prompt-card .card-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  max-height: 2.7em !important;
  margin: 0 0 6px !important;
  line-height: 1.35 !important;
}
html body .prompt-card .card-title a {
  display: inline !important;
}
html body.ipa-meta-empty .prompt-card .card-meta {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
html body.ipa-layout-magazine .prompt-card .card-meta,
html body.ipa-layout-magazine.ipa-meta-empty .prompt-card .card-meta {
  display: flex !important;
  height: auto !important;
  margin: 0 0 6px !important;
  overflow: visible !important;
}
html body .prompt-card .prompt-text {
  margin-top: 4px !important;
}

@media (max-width: 767px) {
  .prompt-card {
    border-radius: 14px !important;
  }

  body.ipa-layout-grid2 .card-image-wrapper,
  body.ipa-layout-grid3 .card-image-wrapper,
  body.ipa-layout-masonry .card-image-wrapper,
  .card-image-wrapper {
    margin: 0 !important;
    border-radius: 14px 14px 0 0 !important;
  }
}

/* Micro-grid: clear gap so thumbs never touch */
.micro-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important;
  gap: 14px !important;
  row-gap: 14px !important;
  column-gap: 14px !important;
}

.micro-card {
  border-radius: 12px !important;
  overflow: hidden !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
}

.micro-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: inherit !important;
  display: block !important;
}

@media (max-width: 767px) {
  .micro-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)) !important;
    gap: 12px !important;
    row-gap: 12px !important;
    column-gap: 12px !important;
  }

  .micro-card {
    border-radius: 10px !important;
  }

  /* Prompt box on mobile matches laptop (scrollable) */
  .prompt-card .prompt-text {
    display: block !important;
    max-height: 72px !important;
    overflow-y: auto !important;
  }
}

/* Feature strip sits at bottom (after popular tags), not under hero */
.ipa-feature-strip-bottom,
.neu-feature-strip.ipa-feature-strip-bottom {
  margin-top: 36px !important;
  margin-bottom: 28px !important;
}

/* ============================================================
   6. FOOTER BRAND ICON — site icon (or visible glyph)
   ============================================================ */
.footer-brand-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  max-width: 100% !important;
}

.footer-brand-icon,
.footer-brand-title .footer-brand-icon,
.footer-brand-title img.footer-brand-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
  background: #fff !important;
  box-shadow:
    4px 4px 10px rgba(163, 177, 198, 0.4),
    -3px -3px 8px rgba(255, 255, 255, 0.85) !important;
}

.footer-brand-icon--fallback,
.footer-brand-title .footer-brand-icon--fallback {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, #7BA3C9, #5B8AB8) !important;
  color: #fff !important;
  box-shadow:
    4px 4px 10px rgba(74, 122, 171, 0.3),
    -2px -2px 6px rgba(255, 255, 255, 0.6) !important;
}

.footer-brand-icon--fallback i,
.footer-brand-title .footer-brand-icon--fallback i {
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #fff !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: inline-block !important;
}

/* Kill old empty circle on bare <i> if still present */
.footer-brand-title > i.fa-solid,
.footer-brand-title > i.fas {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, #7BA3C9, #5B8AB8) !important;
  color: #fff !important;
  font-size: 16px !important;
  box-shadow:
    4px 4px 10px rgba(74, 122, 171, 0.3),
    -2px -2px 6px rgba(255, 255, 255, 0.6) !important;
}

.footer-brand-title .ipa-brand-name,
.footer-brand-title span:not(.footer-brand-icon--fallback) {
  font-weight: 800 !important;
  color: #2A3A4D !important;
  line-height: 1.3 !important;
  word-break: break-word !important;
}

/* ============================================================
   5. PREMIUM PILL ICON — always visible
   ============================================================ */
.premium-pill {
  position: relative !important;
  overflow: visible !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Pseudo overlays must not cover icon / text */
.premium-pill::before,
.premium-pill::after {
  z-index: 0 !important;
  pointer-events: none !important;
}

.premium-pill > * {
  position: relative !important;
  z-index: 1 !important;
}

.premium-pill .pp-icon,
.pp-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #6366F1, #4F46E5, #4338CA) !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 14px !important;
  line-height: 1 !important;
  animation: none !important;
  overflow: visible !important;
  box-shadow:
    3px 3px 8px rgba(74, 122, 171, 0.35),
    -2px -2px 6px rgba(255, 255, 255, 0.55) !important;
}

.premium-pill .pp-icon i,
.pp-icon i,
.pp-icon .fa,
.pp-icon .fas,
.pp-icon .fa-solid,
.pp-icon [class*="fa-"] {
  color: #ffffff !important;
  font-size: 14px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  text-shadow: none !important;
  animation: none !important;
}

.premium-pill .pp-text {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px 8px !important;
  min-width: 0 !important;
}

.premium-pill .pp-count {
  display: inline !important;
  font-weight: 800 !important;
  color: #4A7AAB !important;
  -webkit-text-fill-color: #4A7AAB !important;
  background: none !important;
}

.premium-pill .pp-arrow {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #5B8AB8 !important;
}

/* SEO: wrap LCP image in a self-link without breaking the zoom card */
.image-wrapper .ipa-lcp-image-link {
  display: block;
  width: 100%;
  line-height: 0;
}
.image-wrapper .ipa-lcp-image-link img {
  width: 100%;
  height: auto;
  display: block;
}

/* View page: kill extra white frame around the prompt image */
html body.ipa-single-prompt .image-card,
html body.ipa-collection-prompt-view .image-card {
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}
html body.ipa-single-prompt .image-wrapper,
html body.ipa-collection-prompt-view .image-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden !important;
}
html body.ipa-single-prompt .image-wrapper .ipa-lcp-image-link,
html body.ipa-collection-prompt-view .image-wrapper .ipa-lcp-image-link {
  display: block !important;
  width: 100% !important;
  line-height: 0 !important;
}
html body.ipa-single-prompt .image-wrapper img,
html body.ipa-single-prompt .image-wrapper #viewImg,
html body.ipa-collection-prompt-view .image-wrapper img,
html body.ipa-collection-prompt-view .image-wrapper #viewImg {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center top !important;
  display: block !important;
  margin: 0 !important;
  background: transparent !important;
}
html body.ipa-single-prompt .image-stats,
html body.ipa-collection-prompt-view .image-stats {
  margin: 0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

/* Popular Tags: never go black on click / visited / sticky-hover */
html body .ipa-popular-tags-cloud a,
html body .ipa-popular-tags-cloud a:link,
html body .ipa-popular-tags-cloud a:visited,
html body .ipa-popular-tags-cloud a:focus,
html body .ipa-popular-tags-cloud a:active,
html body .ipa-tag-chip,
html body .ipa-tag-chip:link,
html body .ipa-tag-chip:visited,
html body .ipa-tag-chip:focus,
html body .ipa-tag-chip:active {
  background: #fff !important;
  color: #475569 !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

html body .ipa-tag-chip .ipa-tag-name,
html body .ipa-tag-chip .ipa-tag-hash,
html body .ipa-popular-tags-cloud a .ipa-tag-name,
html body .ipa-popular-tags-cloud a .ipa-tag-hash {
  color: inherit !important;
}

html body .ipa-tag-chip .ipa-tag-count {
  color: #F36072 !important;
  background: rgba(243, 96, 114, 0.12) !important;
}

/* Per-prompt SEO content */
.ipa-prompt-seo {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 28px 0 8px;
}
.ipa-seo-block.glass-card {
  padding: 22px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.ipa-seo-prose {
  color: #475569;
  line-height: 1.8;
  font-size: 15px;
}
.ipa-seo-prose p {
  margin: 0 0 12px;
}
.ipa-seo-prose p:last-child {
  margin-bottom: 0;
}
body.ipa-hide-howto .ipa-howto-block {
  display: none !important;
}
.ipa-howto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ipa-howto-head .section-title {
  margin: 0 !important;
  flex: 1 1 auto;
}
.ipa-howto-copy {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 10px !important;
  min-height: 28px !important;
  font-size: 11px !important;
  font-weight: 700;
  border-radius: 999px !important;
  white-space: nowrap;
  cursor: pointer;
}
.ipa-howto-copy i {
  font-size: 11px;
}
@media (max-width: 767px) {
  .ipa-howto-head {
    flex-wrap: wrap;
  }
  .ipa-howto-copy {
    margin-left: auto;
  }
}
.ipa-seo-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ipa-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ipa-seo-steps li {
  counter-increment: ipa-step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 12px;
  align-items: start;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.65;
}
.ipa-seo-steps li::before {
  content: counter(ipa-step);
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #F36072, #FB923C);
}
.ipa-seo-steps li strong {
  color: #0f172a;
  font-size: 15px;
}
.ipa-seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ipa-faq-block {
  padding: 22px 22px 18px !important;
}
.ipa-faq-heading {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}
.ipa-faq-heading i {
  color: #F36072 !important;
}
.ipa-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ipa-faq-block .faq-item,
.ipa-faq-block .ipa-faq-item {
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 12px !important;
  margin: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden !important;
  padding: 0 !important;
}
.ipa-faq-block .faq-item[open],
.ipa-faq-block .ipa-faq-item[open] {
  border-color: rgba(243, 96, 114, 0.35) !important;
  background: #fff !important;
}
.ipa-faq-block .faq-question,
.ipa-faq-block .ipa-faq-question {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a !important;
  padding: 14px 16px !important;
  list-style: none !important;
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
.ipa-faq-block .faq-question::-webkit-details-marker,
.ipa-faq-block .ipa-faq-question::-webkit-details-marker {
  display: none;
}
.ipa-faq-block .faq-question::after,
.ipa-faq-block .faq-question::before,
.ipa-faq-block .ipa-faq-question::after,
.ipa-faq-block .ipa-faq-question::before {
  content: none !important;
  display: none !important;
}
.ipa-faq-qtext {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  font-size: 14.5px;
}
.ipa-faq-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(243, 96, 114, 0.12);
  color: #F36072;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.ipa-faq-toggle::before {
  content: '+';
}
.ipa-faq-item[open] .ipa-faq-toggle,
.ipa-faq-block details[open] .ipa-faq-toggle {
  background: #F36072;
  color: #fff;
}
.ipa-faq-item[open] .ipa-faq-toggle::before,
.ipa-faq-block details[open] .ipa-faq-toggle::before {
  content: '\2212';
}
.ipa-faq-block .faq-answer,
.ipa-faq-block .ipa-faq-answer {
  color: #475569 !important;
  font-size: 14.5px !important;
  line-height: 1.7 !important;
  padding: 0 16px 14px !important;
}

@media (hover: hover) {
  html body .ipa-popular-tags-cloud a:hover,
  html body .ipa-tag-chip:hover {
    background: linear-gradient(135deg, #F36072, #FB923C) !important;
    color: #fff !important;
    border-color: transparent !important;
  }

  html body .ipa-tag-chip:hover .ipa-tag-count,
  html body .ipa-popular-tags-cloud a:hover .ipa-tag-count {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.22) !important;
  }
}
