/* ============================================================
   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: #F0F3FA !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: 28px !important;
  background: #fff !important;
  height: 100% !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !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;
}

@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: 28px !important;
  overflow: hidden !important;
  isolation: isolate !important;
  background: #fff !important;
}

/* Full-bleed image (no inset white gap) — top corners match card */
.card-image-wrapper {
  position: relative !important;
  cursor: pointer !important;
  overflow: hidden !important;
  margin: 0 !important;
  border-radius: 28px 28px 0 0 !important;
  aspect-ratio: 1 / 1 !important;
  background: #F0F3FA !important;
  box-shadow: none !important;
  transform: translateZ(0);
}

/* Link fills the image frame */
.card-image-wrapper > .card-image-link {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  overflow: hidden !important;
  background: transparent !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.card-image-wrapper > .card-image-link img,
.card-image-wrapper .card-image-link img,
.card-image-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
  pointer-events: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: scale(1) !important;
  transform-origin: center center !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-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: 0 !important;
  overflow: hidden !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: even gaps, clean rounded thumbs */
.micro-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important;
  gap: 10px !important;
}

.micro-card {
  border-radius: 12px !important;
  overflow: hidden !important;
  aspect-ratio: 1 / 1 !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: 8px !important;
  }

  .micro-card {
    border-radius: 10px !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(135deg, #6366F1, #8B5CF6) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35) !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(135deg, #6366F1, #8B5CF6) !important;
  color: #fff !important;
  font-size: 16px !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35) !important;
}

.footer-brand-title .ipa-brand-name,
.footer-brand-title span:not(.footer-brand-icon--fallback) {
  font-weight: 800 !important;
  color: #0F172A !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: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #6366F1, #8B5CF6, #06B6D4) !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: 0 6px 16px rgba(99, 102, 241, 0.35) !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;
  background: linear-gradient(135deg, #6366F1, #8B5CF6, #06B6D4) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !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: #6366F1 !important;
}

/* ============================================================
   v6.0.1 — Laptop header · Home icon · Prompt visibility/scroll
   Absolute last authority overrides
   ============================================================ */

/* --- Laptop / desktop header: shell + inner glass pill --- */
@media (min-width: 768px) {
  .advanced-header,
  #ipaAdvancedHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 12px 16px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }

  .advanced-header .ah-container,
  #ipaAdvancedHeader .ah-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin: 0 auto !important;
    min-height: 58px !important;
    padding: 8px 12px 8px 16px !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(18px) saturate(1.35) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.35) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 9999px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07) !important;
  }

  .advanced-header.scrolled .ah-container {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  .ah-brand {
    flex: 0 0 auto !important;
    max-width: 220px !important;
    min-width: 0 !important;
  }

  .ah-nav {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    background: rgba(241, 245, 249, 0.7) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    border-radius: 9999px !important;
    padding: 4px !important;
  }

  .ah-nav a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Home / nav icons must always render */
  .ah-nav a i,
  .ah-nav a .fa-solid,
  .ah-nav a .fas,
  .mobile-bottom-nav .nav-item i,
  .footer-social a i,
  .popup-item .popup-icon i {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-style: normal !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    width: 1em !important;
    height: 1em !important;
    text-align: center !important;
  }

  .ah-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  #main-content,
  main#main-content,
  main.site-main,
  main.ipa-single-prompt,
  .ipa-single-prompt {
    padding-top: 96px !important;
  }
}

/* Mid laptop: compress header so nothing overflows */
@media (min-width: 768px) and (max-width: 1100px) {
  .advanced-header,
  #ipaAdvancedHeader {
    padding: 10px 12px 0 !important;
  }

  .ah-nav a {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }

  .ah-nav a span {
    max-width: 5.5em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .ah-search-pill {
    min-width: 0 !important;
    max-width: 150px !important;
    padding: 7px 10px !important;
  }

  .ah-search-pill input {
    min-width: 0 !important;
    width: 90px !important;
  }

  .ah-gallery-btn {
    padding: 9px 12px !important;
    font-size: 0.8rem !important;
  }

  .ah-icon-btn {
    width: 38px !important;
    height: 38px !important;
  }
}

/* Narrow laptop: icon-first nav + hide search field text area */
@media (min-width: 768px) and (max-width: 900px) {
  .ah-search-pill {
    display: none !important;
  }

  .ah-nav a span {
    display: none !important;
  }

  .ah-nav a {
    padding: 9px 11px !important;
  }

  .ah-nav a i {
    font-size: 1rem !important;
    margin: 0 !important;
  }

  .ah-gallery-btn span {
    font-size: 0 !important;
  }

  .ah-gallery-btn i {
    font-size: 0.95rem !important;
    margin: 0 !important;
  }
}

/* --- AI Prompt box: always visible + scroll (single / cards) --- */
.prompt-box {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

.prompt-box .prompt-header-row,
.prompt-box .prompt-label,
.prompt-box .btn-copy-sm,
.prompt-box .action-row {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.prompt-box .prompt-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #475569 !important;
}

.prompt-box .prompt-text,
.prompt-box #fullPrompt,
#fullPrompt,
div.prompt-text#fullPrompt {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #1E293B !important;
  -webkit-text-fill-color: #1E293B !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin: 0 0 14px !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  max-height: 240px !important;
  min-height: 80px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  position: relative !important;
}

.prompt-box .prompt-text::after,
#fullPrompt::after {
  display: none !important;
  content: none !important;
  background: none !important;
  height: 0 !important;
}

/* Mobile: taller scroll area for full prompt */
@media (max-width: 767px) {
  .prompt-box {
    padding: 14px !important;
    margin-top: 12px !important;
  }

  .prompt-box .prompt-text,
  .prompt-box #fullPrompt,
  #fullPrompt {
    display: block !important;
    max-height: 200px !important;
    min-height: 96px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  /* Card prompt preview: show with scroll instead of hiding */
  .prompt-card .prompt-text,
  article.prompt-card .prompt-text,
  .card-prompt-preview {
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    background: #F1F5F9 !important;
    max-height: 88px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
  }

  .prompt-card .prompt-text::after {
    display: none !important;
  }
}

/* Face tool original prompt also scrollable on mobile */
@media (max-width: 767px) {
  .face-text,
  .face-hidden-content .face-text {
    max-height: 160px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }

  .read-p-code {
    display: block !important;
    max-height: 160px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    color: #1E293B !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Desktop read-page prompt code also readable + scrollable */
.read-p-code {
  display: block !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  color: #1E293B !important;
  opacity: 1 !important;
  visibility: visible !important;
}
