/* ============================================================
   Marketplace UI — screenshot layout (loads last)
   Clean white cards, multi-color icon actions, chip filters.
   60 site themes tint accents via --sd-p / --sd-s / --sd-grad.
   ============================================================ */

html body.ipa-sitedesign .advanced-header,
html body.ipa-sitedesign .site-header.advanced-header {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid #eef2f7 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: blur(16px) !important;
}
html body.ipa-sitedesign .ah-container {
  max-width: 1280px !important;
  gap: 16px !important;
}
html body.ipa-sitedesign .ah-nav a {
  color: #475569 !important;
  font-weight: 600 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 8px 4px !important;
  box-shadow: none !important;
}
html body.ipa-sitedesign .ah-nav a i {
  display: none !important;
}
html body.ipa-sitedesign .ah-nav a.active {
  color: var(--sd-p) !important;
  box-shadow: inset 0 -2px 0 var(--sd-p) !important;
}
html body.ipa-sitedesign .ah-search-pill {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
html body.ipa-sitedesign .ah-icon-btn,
html body.ipa-sitedesign .header-icon-btn {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
html body.ipa-sitedesign .ah-icon-btn i,
html body.ipa-sitedesign .header-icon-btn i {
  background: transparent !important;
  box-shadow: none !important;
  color: #475569 !important;
  width: auto !important;
  height: auto !important;
}
html body.ipa-sitedesign .ah-gallery-btn {
  background: var(--sd-grad) !important;
  color: #fff !important;
  border-radius: 999px !important;
  border: none !important;
  padding: 10px 18px !important;
}

/* Category chips */
html body.ipa-sitedesign .category-slider-section {
  background: transparent !important;
  padding: 8px 12px 16px !important;
}
html body.ipa-sitedesign .category-slider-item {
  background: #fff !important;
  border: 1px solid #eceff3 !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
  color: #334155 !important;
  padding: 8px 12px 8px 10px !important;
}
html body.ipa-sitedesign .category-slider-item .count-badge {
  background: color-mix(in srgb, var(--sd-p) 12%, #fff) !important;
  color: var(--sd-p) !important;
  border-radius: 999px !important;
  min-width: 22px;
  padding: 2px 8px;
  font-weight: 800;
  font-size: 11px;
}
html body.ipa-sitedesign .category-slider-item.active {
  background: #fff !important;
  color: var(--sd-p) !important;
  border-color: color-mix(in srgb, var(--sd-p) 35%, #fff) !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sd-p) 14%, transparent) !important;
}

/* Cards */
html body.ipa-sitedesign .prompt-card,
html body.ipa-sitedesign .ipa-extracted-card,
html body.ipa-sitedesign .blog-card {
  background: #fff !important;
  border: 1px solid #eef2f6 !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden !important;
  transform: none !important;
}
html body.ipa-sitedesign .prompt-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10) !important;
}
html body.ipa-sitedesign .prompt-card .card-body,
html body.ipa-sitedesign .prompt-card .card-footer {
  background: #fff !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
html body.ipa-sitedesign .card-image-wrapper {
  border-radius: 18px 18px 0 0 !important;
  overflow: hidden !important;
}
html body.ipa-sitedesign .card-image-overlay {
  opacity: 0 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 10px !important;
  background: linear-gradient(transparent, rgba(15,23,42,.35)) !important;
}
html body.ipa-sitedesign .prompt-card:hover .card-image-overlay,
html body.ipa-sitedesign .card-image-wrapper:hover .card-image-overlay {
  opacity: 1 !important;
  pointer-events: auto !important;
}
html body.ipa-sitedesign .card-image-overlay .card-overlay-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 50% !important;
  background: #fff !important;
  background-image: none !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(15,23,42,.18) !important;
  backdrop-filter: none !important;
}
html body.ipa-sitedesign .card-image-overlay .card-overlay-btn i {
  font-size: 11px !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-text-fill-color: unset !important;
}
html body.ipa-sitedesign .card-image-overlay .ipa-act-view i { color: #7c5cff !important; }
html body.ipa-sitedesign .card-image-overlay .ipa-act-like i { color: #f43f5e !important; }
html body.ipa-sitedesign .card-image-overlay .ipa-act-share i { color: #3b82f6 !important; }
html body.ipa-sitedesign .card-image-overlay .ipa-act-save i { color: #10b981 !important; }
html body.ipa-sitedesign .card-image-overlay .ipa-act-copy {
  background: #fff !important;
  background-image: none !important;
}
html body.ipa-sitedesign .card-image-overlay .ipa-act-copy i { color: #f97316 !important; }
html body.ipa-sitedesign .card-bookmark {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 6 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  border: none !important;
  background: rgba(15, 23, 42, 0.55) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
html body.ipa-sitedesign .card-bookmark i {
  color: #fff !important;
  font-size: 13px !important;
}
html body.ipa-sitedesign .card-bookmark.liked,
html body.ipa-sitedesign .card-bookmark[aria-pressed="true"] {
  background: rgba(15, 23, 42, 0.62) !important;
}
html body.ipa-sitedesign .card-bookmark.liked i,
html body.ipa-sitedesign .card-bookmark[aria-pressed="true"] i {
  color: #fff !important;
}
html body.ipa-sitedesign .card-badges .model-tag,
html body.ipa-sitedesign .card-image-wrapper .model-tag {
  background: var(--cat-c, var(--sd-p)) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  text-transform: uppercase !important;
  backdrop-filter: none !important;
}
html body.ipa-sitedesign .ipa-views-chip,
html body.ipa-sitedesign .ipa-time-chip {
  background: rgba(15, 23, 42, 0.55) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 999px !important;
}

html body.ipa-sitedesign .prompt-card .card-title,
html body.ipa-sitedesign .prompt-card .card-title a {
  color: #0f172a !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: 3 !important;
  max-height: 4.1em !important;
}
html body.ipa-sitedesign .prompt-card .card-meta {
  display: none !important;
}
html body.ipa-sitedesign .prompt-card .prompt-text,
html body.ipa-sitedesign .ipa-extracted-card .prompt-text {
  max-height: 52px !important;
  height: 52px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid #eef2f7 !important;
  border-left: 3px solid var(--sd-p, #7c5cff) !important;
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  padding: 6px 8px !important;
  margin: 0 0 8px !important;
  border-radius: 10px !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.card-tool-tags,
.card-prompt-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  max-height: none;
  overflow: visible;
  align-content: flex-start;
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  font-family: "Plus Jakarta Sans", Outfit, system-ui, sans-serif;
  text-decoration: none !important;
  background: #f5f3ff;
  color: #5b21b6;
}
.tool-chip-0 { background: #f5f3ff; color: #5b21b6; }
.tool-chip-1 { background: #fdf2f8; color: #9d174d; }
.tool-chip-2 { background: #ecfeff; color: #0e7490; }
.tool-chip-3 { background: #fff7ed; color: #c2410c; }
.tool-chip-4 { background: #ecfdf5; color: #047857; }
.tool-chip-5 { background: #eff6ff; color: #1d4ed8; }
.tool-chip-6 { background: #fef3c7; color: #b45309; }
.tool-chip-7 { background: #fce7f3; color: #9d174d; }

/* 5 multi-color action buttons — screenshot */
html body.ipa-sitedesign .action-row-top,
html body.ipa-sitedesign.ipa-act-row-inline .action-row-top,
html body.ipa-layout-magazine .action-row-top {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .action-btn-sm,
html body.ipa-sitedesign .prompt-card .action-row-top .action-btn-sm.ipa-act-copy,
html body.ipa-sitedesign .ipa-extracted-card .action-row-top .action-btn-sm {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid #eef2f7 !important;
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #64748b !important;
  -webkit-text-fill-color: unset !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .action-btn-sm i {
  font-size: 13px !important;
  line-height: 1 !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .action-btn-sm .action-label,
html body.ipa-sitedesign .action-btn-sm .action-label,
html body.ipa-layout-magazine .action-btn-sm .action-label {
  display: none !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-view i { color: #7c5cff !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-like i { color: #f43f5e !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-share i { color: #3b82f6 !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-save i { color: #10b981 !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-copy,
html body.ipa-sitedesign .prompt-card .action-row-top .action-btn-sm.ipa-act-copy {
  background: #fff7ed !important;
  background-image: none !important;
  border-color: #ffedd5 !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-copy i,
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-copy .action-label,
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-copy span {
  color: #f97316 !important;
  -webkit-text-fill-color: #f97316 !important;
}
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-view { background: #f5f3ff !important; border-color: #ede9fe !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-like { background: #fff1f2 !important; border-color: #ffe4e6 !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-share { background: #eff6ff !important; border-color: #dbeafe !important; }
html body.ipa-sitedesign .prompt-card .action-row-top .ipa-act-save { background: #ecfdf5 !important; border-color: #d1fae5 !important; }

html body .nova-hero-panel .neu-utility-nav {
  display: none !important;
}
.card-prompt-words .tool-chip {
  text-transform: none;
  font-weight: 400 !important;
  font-size: 12px;
}

/* Feature strip */
html body.ipa-sitedesign .ipa-feature-strip-bottom,
html body.ipa-sitedesign .neu-feature-strip {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
  background: #fff !important;
  border: 1px solid #eef2f6 !important;
  border-radius: 24px !important;
  padding: 18px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05) !important;
  margin: 28px 0 8px !important;
}
html body.ipa-sitedesign .neu-feature-chip,
html body.ipa-sitedesign .apex-feature-chip {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
html body.ipa-sitedesign .neu-feature-chip i {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
}
html body.ipa-sitedesign .neu-feature-chip:nth-child(1) i { background: #f5f3ff !important; color: #7c5cff !important; }
html body.ipa-sitedesign .neu-feature-chip:nth-child(2) i { background: #e0f2fe !important; color: #0284c7 !important; }
html body.ipa-sitedesign .neu-feature-chip:nth-child(3) i { background: #fdf2f8 !important; color: #db2777 !important; }
html body.ipa-sitedesign .neu-feature-chip:nth-child(4) i { background: #f5f3ff !important; color: #7c3aed !important; }
html body.ipa-sitedesign .neu-feature-chip:nth-child(5) i { background: #ecfdf5 !important; color: #059669 !important; }

@media (max-width: 1100px) {
  html body.ipa-sitedesign .ipa-feature-strip-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 767px) {
  html body.ipa-sitedesign .ipa-feature-strip-bottom {
    grid-template-columns: 1fr !important;
  }
  html body.ipa-sitedesign .prompt-card .action-row-top .action-label {
    font-size: 9px !important;
  }
}

/* Sort By: keep Random Prompt fully visible */
html body .category-slider-item.sort-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  max-width: none !important;
}
html body .custom-sort-modal {
  width: min(420px, calc(100vw - 24px)) !important;
  max-width: 420px !important;
  max-height: min(82vh, 560px) !important;
  overflow: hidden !important;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
}
html body .custom-sort-modal.active {
  display: flex !important;
  flex-direction: column !important;
}
html body .custom-sort-modal .sort-header {
  flex: 0 0 auto !important;
}
html body .custom-sort-modal .sort-options-list {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: none !important;
  padding: 4px 4px 10px !important;
  -webkit-overflow-scrolling: touch;
}
html body .custom-sort-modal .sort-option-item {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  min-height: 48px !important;
  margin-bottom: 4px !important;
}
html body .custom-sort-modal .sort-option-item:last-child {
  margin-bottom: 0 !important;
}
@media (max-width: 767px) {
  html body .custom-sort-modal {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    bottom: 0 !important;
    transform: translateY(100%) !important;
    max-height: min(78vh, 560px) !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body .custom-sort-modal.active {
    transform: translateY(0) !important;
  }
}
