/* ===================================================================
   Prompt Gallery — Design System v2
   Dark: deep navy/indigo, NOT pure black
   Light: clean lavender-white, professional
   =================================================================== */

/* ── Variables: Dark (default) ─────────────────────────────────── */
:root {
  --bg:          #0d0b18;
  --bg-elevated: #13112a;
  --surface:     #1a1828;
  --surface-2:   #22203a;
  --border:      #2d2a46;
  --text:        #e6e1ff;
  --text-muted:  #9590b4;
  --text-faint:  #5a566e;
  --accent:      #7c3aed;
  --accent-soft: rgba(124,58,237,.16);
  --warm:        #ff8657;
  --warm-soft:   rgba(255,134,87,.13);
  --header-bg:   rgba(13,11,24,.88);
  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 14px 36px -18px rgba(0,0,0,.65);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --maxw: 1300px;
}

/* ── Variables: Light ───────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg:          #f7f5ff;
  --bg-elevated: #ffffff;
  --surface:     #ffffff;
  --surface-2:   #ede9fa;
  --border:      #d8d2ee;
  --text:        #1a1230;
  --text-muted:  #5c5778;
  --text-faint:  #9b96b0;
  --warm:        #c8501e;
  --warm-soft:   rgba(200,80,30,.10);
  --header-bg:   rgba(247,245,255,.90);
  --shadow-card: 0 1px 0 rgba(255,255,255,.8) inset, 0 8px 28px -14px rgba(80,50,160,.18);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 38% at 50% 0%, rgba(124,58,237,.18) 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(ellipse 90% 38% at 50% 0%, rgba(124,58,237,.09) 0%, transparent 60%),
    var(--bg);
}
img  { max-width: 100%; display: block }
a    { color: inherit; text-decoration: none }
ul   { margin: 0; padding: 0; list-style: none }
button { font: inherit; cursor: pointer }
h1,h2,h3,h4 { font-family: var(--font-display); margin: 0 0 .4em; font-weight: 600; letter-spacing: -.01em }
p { margin: 0 0 1em }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .6em 1em; z-index: 200; border-radius: 0 0 8px 0 }
.skip-link:focus { left: 0 }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px }

/* ── Site Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px; height: 58px;
}
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0 }
.brand-logo { height: 34px; width: auto; display: block }
.brand-icon { height: 30px; width: auto; display: block }
.brand-text { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--text) }
.brand-text strong {
  font-weight: 800;
  background: linear-gradient(180deg, #c9a3ff 0%, #a855f7 35%, #7c3aed 65%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(124,58,237,.35));
}

.primary-nav { display: flex; align-items: center; gap: 2px }
.primary-nav > a {
  padding: 7px 11px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: .15s;
}
.primary-nav > a:hover, .primary-nav > a.active { color: var(--text); background: var(--surface) }

.nav-dropdown { position: relative }
.nav-dropdown-btn {
  display: flex; align-items: center; gap: 5px; background: none; border: 0;
  color: var(--text-muted); padding: 7px 11px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
}
.nav-dropdown-btn:hover { color: var(--text); background: var(--surface) }
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-m); padding: 8px;
  width: 310px; max-height: 400px; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,.55);
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-panel a { padding: 7px 9px; border-radius: 8px; font-size: 13px; color: var(--text-muted) }
.nav-dropdown-panel a:hover { background: var(--surface); color: var(--text) }

/* Nav search bar */
.nav-search {
  flex: 0 1 270px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 6px 0 14px; margin-left: auto;
}
.nav-search svg { color: var(--text-faint); flex-shrink: 0 }
.nav-search input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--text); font-size: 13.5px; font-family: inherit;
  padding: 8px 0; min-width: 0;
}
.nav-search input::placeholder { color: var(--text-faint) }
.nav-search button {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
  flex-shrink: 0;
}
.nav-search button:hover { filter: brightness(1.1) }

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0 }
.icon-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text); transition: .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent) }
.menu-toggle { display: none }

/* Theme toggle icons — controlled by CSS only (no inline styles) */
.theme-toggle .icon-sun  { display: none }
.theme-toggle .icon-moon { display: block }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: block }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none }

/* Hide standalone search icon on desktop (nav-search is visible) */
.search-icon-btn { display: none }

@media(max-width:980px) {
  .primary-nav { display: none }
  .menu-toggle  { display: flex }
  .nav-search   { display: none }
  .search-icon-btn { display: flex }
}

/* ── Mobile Drawer ──────────────────────────────────────────────── */
.mobile-drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(340px, 86vw); background: var(--bg-elevated);
  border-left: 1px solid var(--border); z-index: 120;
  transform: translateX(100%); transition: .25s ease; overflow: auto;
}
.mobile-drawer.open { transform: translateX(0) }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 110; opacity: 0; visibility: hidden; transition: .2s }
.drawer-overlay.open { opacity: 1; visibility: visible }
.mobile-drawer-inner { padding: 20px }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px }
.drawer-nav a { padding: 11px 10px; border-radius: 10px; font-weight: 500 }
.drawer-nav a:hover { background: var(--surface) }
.drawer-heading { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 0 0 8px 10px }
.drawer-categories { display: flex; flex-direction: column; gap: 1px }
.drawer-categories a { padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--text-muted) }
.drawer-categories a:hover { background: var(--surface); color: var(--text) }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { padding: 72px 0 44px; text-align: center }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em;
  color: var(--warm); background: var(--warm-soft); padding: 6px 14px;
  border-radius: 999px; margin-bottom: 22px; border: 1px solid rgba(255,134,87,.22);
}
.hero h1 {
  font-size: clamp(38px, 6vw, 70px); max-width: 860px; margin: 0 auto .18em;
  line-height: 1.06; letter-spacing: -.02em;
  /* Purple gradient title */
  background: linear-gradient(135deg, #b782ff 0%, #7c3aed 45%, #6366f1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
:root[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 50%, #4f46e5 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { max-width: 560px; margin: 0 auto 30px; color: var(--text-muted); font-size: 17px }

.hero-search {
  max-width: 580px; margin: 0 auto 24px; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 6px 6px 22px;
  box-shadow: 0 4px 24px -8px rgba(124,58,237,.25);
}
.hero-search svg { color: var(--text-faint); flex-shrink: 0; margin-right: 10px }
.hero-search input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--text); font-size: 15px; font-family: inherit;
  padding: 8px 0; min-width: 0;
}
.hero-search input::placeholder { color: var(--text-faint) }
.hero-search button {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 26px; font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.hero-search button:hover { filter: brightness(1.08) }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 700px; margin: 0 auto }
.pill {
  font-size: 13px; padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--surface); transition: .15s;
}
.pill:hover { border-color: var(--accent); color: var(--text) }

/* ── Stats Band ─────────────────────────────────────────────────── */
.stats-band { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; margin: 48px 0 8px }
.stat { text-align: center; padding: 0 44px; border-right: 1px solid var(--border) }
.stat:last-child { border-right: 0 }
.stat-num {
  font-family: var(--font-display); font-size: 38px; font-weight: 700;
  color: var(--accent);
  /* counter animation: transition the text-shadow for a glow pop */
}
.stat-num.counted { animation: statGlow .4s ease-out }
@keyframes statGlow {
  0%  { text-shadow: 0 0 0 rgba(124,58,237,0) }
  50% { text-shadow: 0 0 22px rgba(124,58,237,.55) }
  100%{ text-shadow: 0 0 0 rgba(124,58,237,0) }
}
.stat-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px }
@media(max-width:640px) { .stat { padding: 0 18px 14px } }

/* ── Section ────────────────────────────────────────────────────── */
.section { padding: 56px 0 }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(20px, 2.6vw, 28px); display: flex; align-items: center; gap: 10px }
.section-head .view-all {
  font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap;
}
.section-head .view-all:hover { text-decoration: underline }
.section-sub { color: var(--text-muted); font-size: 14.5px; margin-top: -18px; margin-bottom: 26px }

/* ── Prompt Grid — 3 col ───────────────────────── */
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media(max-width:900px)  { .prompt-grid { grid-template-columns: repeat(2, 1fr) } }
@media(max-width:560px)  { .prompt-grid { grid-template-columns: 1fr } }

/* ── Prompt Card ────────────────────────────────────────────────── */
.prompt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.prompt-card:hover { transform: translateY(-4px); border-color: rgba(124,58,237,.5) }

.card-media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-elevated) }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s }
.prompt-card:hover .card-media img { transform: scale(1.05) }

/* Badge: bottom-left, "#43" style */
.card-frame-tag {
  position: absolute; left: 10px; bottom: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  background: rgba(10,9,20,.75); backdrop-filter: blur(6px);
  color: #fff; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
}

.card-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1 }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.card-cat {
  font-size: 11.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}
.card-title { font-size: 14.5px; line-height: 1.35; font-weight: 600; font-family: var(--font-body); margin: 0 }
.card-title a:hover { color: var(--accent) }

.card-stats-row {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
}
.card-stat { display: flex; align-items: center; gap: 4px }

.card-actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px }
.card-copy-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 700; padding: 11px 14px; border: none;
  border-radius: 999px; cursor: pointer; white-space: nowrap; color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 2px 10px rgba(124,58,237,.35);
  transition: filter .15s, transform .15s;
}
.card-copy-btn:hover { filter: brightness(1.08) }
.card-copy-btn:active { transform: scale(.98) }
.card-copy-btn.copied { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 2px 10px rgba(22,163,74,.35) }
.card-share-btn {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s;
}
.card-share-btn:hover { border-color: var(--accent); color: var(--accent) }

.share-menu {
  position: absolute; top: 0; left: 0; z-index: 300;
  display: none; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-card);
}
.share-menu.open { display: block }
.share-menu-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border: none; background: none; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer;
  text-align: left; font-family: inherit; transition: background .15s;
}
.share-menu-item:hover { background: var(--bg-elevated) }
.share-menu-item[data-action="whatsapp"] { color: #25D366 }

/* ── Category Grid ──────────────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px }
.category-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-radius: var(--radius-m); background: var(--surface);
  border: 1px solid var(--border); transition: .15s;
}
.category-pill:hover { border-color: var(--accent); transform: translateY(-2px) }
.cat-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px }
.cat-count {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
  background: var(--bg-elevated); padding: 3px 9px; border-radius: 999px;
}

/* ── Tag Cloud ──────────────────────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px }
.tag-chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.tag-chip:hover { color: var(--text); border-color: var(--accent) }
.tag-chip .count { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; margin-left: 5px }

/* ── Newsletter ─────────────────────────────────────────────────── */
.newsletter-band {
  margin-top: 30px; padding: 72px 24px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(124,58,237,.08));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.newsletter-inner { max-width: 520px; margin: 0 auto }
.newsletter-band h2 { font-size: clamp(24px, 3.4vw, 36px) }
.newsletter-band p { color: var(--text-muted); margin-bottom: 26px }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto }
.newsletter-form input {
  flex: 1; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit;
}
.newsletter-form button {
  padding: 13px 22px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap;
}
.newsletter-form button:hover { filter: brightness(1.1) }
.newsletter-msg { margin-top: 12px; font-size: 13.5px; color: var(--warm); min-height: 1em }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { padding: 56px 24px 28px }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px;
}
.footer-brand p { color: var(--text-muted); font-size: 13.5px; margin-top: 12px; max-width: 260px }
.seo-intro { max-width: 760px; margin: 0 auto 8px; color: var(--text-muted); font-size: 15px; line-height: 1.7; text-align: center }
.footer-blurb { font-size: 12.5px; color: var(--text-faint); margin-top: 10px; max-width: 280px; line-height: 1.5 }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: 14px }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); padding: 5px 0 }
.footer-col a:hover { color: var(--warm) }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px }
.footer-tags a { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px }
.footer-bottom {
  max-width: var(--maxw); margin: 42px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-faint);
}
.footer-bottom a { color: var(--accent) }
@media(max-width:880px) { .footer-inner { grid-template-columns: 1fr 1fr } }
@media(max-width:520px) { .footer-inner { grid-template-columns: 1fr } }

/* ── Toast ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f9d55; color: #fff; padding: 13px 24px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; visibility: hidden; transition: .25s; z-index: 200;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) }

/* ── Page Header (listing pages) ────────────────────────────────── */
.page-head { padding: 52px 0 12px; text-align: center }
.page-head h1 { font-size: clamp(28px, 4.4vw, 48px) }
.page-head p { color: var(--text-muted); max-width: 560px; margin: 10px auto 0 }

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 44px; flex-wrap: wrap }
.page-btn {
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-muted);
}
.page-btn:hover { border-color: var(--accent); color: var(--text) }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff }
.page-dots { color: var(--text-faint); padding: 9px 2px }

/* ── Prompt Detail Page ─────────────────────────────────────────── */
.prompt-detail { padding: 40px 0 70px }
.breadcrumbs { font-size: 13px; color: var(--text-faint); margin-bottom: 24px }
.breadcrumbs a { color: var(--text-muted) }
.breadcrumbs a:hover { color: var(--warm) }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start }
@media(max-width:880px) { .detail-grid { grid-template-columns: 1fr } }
.detail-media { border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--border); position: sticky; top: 80px }
.detail-media img { width: 100%; display: block }
@media(max-width:880px) { .detail-media { position: static } }
.detail-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px }
.detail-cat {
  display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 5px 13px;
  border-radius: 999px; margin-bottom: 0;
}
.detail-cat-secondary {
  font-weight: 500; color: var(--text-muted); background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.detail-info h1 { font-size: clamp(24px, 3.2vw, 38px); line-height: 1.12; margin-bottom: 14px }
.detail-desc { color: var(--text-muted); font-size: 16px; margin-bottom: 22px }
.detail-stats { display: flex; gap: 22px; margin-bottom: 28px; color: var(--text-faint); font-family: var(--font-mono); font-size: 13px }
.prompt-box {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 20px; margin-bottom: 18px;
}
.prompt-box-label {
  font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-faint); margin-bottom: 10px; display: block;
}
.prompt-box pre {
  font-family: var(--font-mono); font-size: 14px; line-height: 1.65;
  color: var(--text); white-space: pre-wrap; word-break: break-word; margin: 0;
}
.detail-copy-btn {
  width: 100%; padding: 15px; border-radius: var(--radius-m); border: 0;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.detail-copy-btn:hover { filter: brightness(1.08) }
.detail-copy-btn.copied { background: #1f9d55 }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px }
.related-section { margin-top: 68px }

/* ── Blog ───────────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; transition: .15s }
.blog-card:hover { transform: translateY(-3px); border-color: var(--accent) }
.blog-card img { aspect-ratio: 16/9; object-fit: cover; width: 100% }
.blog-card-body { padding: 18px }
.blog-card-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-bottom: 8px; display: block }
.blog-card h3 { font-size: 18px; margin-bottom: 8px }
.blog-card p { color: var(--text-muted); font-size: 14px }
.blog-post { padding: 50px 0 80px; max-width: 760px; margin: 0 auto }
.blog-post img { border-radius: var(--radius-l); margin-bottom: 30px }
.blog-post h1 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 14px }
.blog-post-date { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); margin-bottom: 30px; display: block }
.blog-post-content { font-size: 17px; line-height: 1.8; color: var(--text) }
.blog-post-content p { margin-bottom: 1.2em }

/* ── Empty states ───────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-muted) }
.empty-state h3 { color: var(--text); font-size: 22px; margin-bottom: 8px }
.recently-viewed-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px }
@media(max-width:900px) { .recently-viewed-list { grid-template-columns: repeat(2,1fr) } }
@media(max-width:560px) { .recently-viewed-list { grid-template-columns: 1fr } }

/* ── Search links ───────────────────────────────────────────────── */
.search-links { display: flex; flex-wrap: wrap; gap: 9px }
.search-links a {
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.search-links a:hover { color: var(--text); border-color: var(--accent) }

/* ── Share / Like row + Report link (prompt detail page) ─────────── */
.detail-social-row { display: flex; gap: 12px; margin-top: 18px }
.btn-share, .btn-like {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius-s); border: 1px solid transparent;
  cursor: pointer; transition: .15s;
}
.btn-share { background: var(--accent); color: #fff }
.btn-share:hover { background: #6c2fd6 }
.btn-like { background: var(--surface); color: var(--text); border-color: var(--border) }
.btn-like:hover { border-color: var(--accent) }
.btn-like.liked { color: var(--warm); border-color: var(--warm-soft); background: var(--warm-soft) }
.btn-like.liked svg { fill: var(--warm) }
.report-link {
  display: block; background: none; border: none; cursor: pointer; padding: 0;
  margin-top: 14px; font-size: 13px; color: var(--text-faint);
}
.report-link:hover { color: var(--warm) }

/* ── Prev / Next prompt navigation strip ──────────────────────────── */
.prompt-adjacent-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 36px 0; padding: 18px 0;
}
.adjacent-link {
  display: flex; align-items: center; gap: 10px; color: var(--text-muted);
  font-size: 14px; font-weight: 600; min-width: 0;
}
.adjacent-link .adjacent-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.adjacent-link:hover { color: var(--accent) }
.adjacent-label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em }
.adjacent-arrow { font-size: 22px; line-height: 1; flex-shrink: 0 }
.adjacent-next { grid-column: 2; justify-content: flex-end; text-align: right; flex-direction: row-reverse }
@media(max-width:640px) {
  .prompt-adjacent-nav { grid-template-columns: 1fr }
  .adjacent-next { grid-column: 1 }
}

/* ── Report modal ──────────────────────────────────────────────────── */
.report-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none;
  align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.report-modal-overlay.open { display: flex }
.report-modal {
  position: relative; width: 100%; max-width: 420px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-m); padding: 28px;
}
.report-modal h3 { font-size: 19px; margin-bottom: 6px }
.report-modal-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px }
.report-modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--text-faint); cursor: pointer; font-size: 15px; line-height: 1;
}
.report-modal-close:hover { color: var(--text) }
.report-reasons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px }
.report-reason-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer }
.report-modal textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); font-family: inherit; font-size: 13.5px; padding: 10px 12px; resize: vertical;
}
.report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px }
.report-modal-actions button {
  font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-s);
  cursor: pointer; border: 1px solid var(--border);
}
.report-modal-actions button[type="button"] { background: var(--surface); color: var(--text-muted) }
.report-modal-actions button[type="button"]:hover { color: var(--text) }
.report-modal-actions button[type="submit"] { background: var(--accent); color: #fff; border-color: var(--accent) }
.report-modal-actions button[type="submit"]:hover { background: #6c2fd6 }
.report-modal-actions button:disabled { opacity: .6; cursor: default }
.report-modal-msg { font-size: 13px; color: var(--accent); margin: 10px 0 0 }

/* ── Static/legal pages (About, Privacy Policy, Terms) ──────────── */
.legal-content { max-width: 780px; margin: 0 auto; line-height: 1.75; color: var(--text) }
.legal-content h2 { font-size: 21px; margin: 34px 0 12px; color: var(--text) }
.legal-content h2:first-child { margin-top: 0 }
.legal-content h3 { font-size: 17px; margin: 22px 0 10px; color: var(--text) }
.legal-content p { margin: 0 0 14px; color: var(--text-muted) }
.legal-content ul { margin: 0 0 14px; padding-left: 22px; color: var(--text-muted) }
.legal-content li { margin-bottom: 6px }
.legal-content a { color: var(--accent) }
.legal-content a:hover { text-decoration: underline }

/* ── Contact page ────────────────────────────────────────────────── */
.contact-wrap {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; max-width: 900px; margin: 0 auto;
}
@media (max-width: 720px) { .contact-wrap { grid-template-columns: 1fr } }
.contact-info h3 { margin: 0 0 14px; font-size: 17px; color: var(--text) }
.contact-info p { margin: 0 0 12px; color: var(--text-muted) }
.contact-info a { color: var(--accent) }
.contact-info a:hover { text-decoration: underline }
.contact-note { font-size: 13px; color: var(--text-faint) }
.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 26px; display: flex; flex-direction: column; gap: 16px;
}
.contact-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0 }
.form-row { display: flex; flex-direction: column; gap: 6px }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text-muted) }
.form-row input, .form-row textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); font-family: inherit; font-size: 14px; padding: 10px 12px; resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px }
.contact-form button[type="submit"] {
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius-s);
  font-size: 14.5px; font-weight: 600; padding: 12px 18px; cursor: pointer; transition: .15s;
}
.contact-form button[type="submit"]:hover { background: #6c2fd6 }
.contact-form button[type="submit"]:disabled { opacity: .6; cursor: default }
.contact-msg { font-size: 13.5px; margin: 0 }
.contact-msg.success { color: #22c55e }
.contact-msg.error { color: #ef4444 }

/* ── Footer legal links ─────────────────────────────────────────── */
.footer-legal { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px }
.footer-legal a { font-size: 12.5px }

/* ── FAQ section (prompt detail page) ───────────────────────────── */
.faq-section { margin-top: 68px }
.faq-list {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 8px 26px;
}
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0 }
.faq-item:last-child { border-bottom: none }
.faq-question {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  cursor: pointer; font-weight: 700; font-size: 15.5px; color: var(--text);
}
.faq-toggle-btn {
  flex-shrink: 0; background: none; border: none; color: var(--accent);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; transition: transform .18s;
}
.faq-item.collapsed .faq-toggle-btn { transform: rotate(45deg) }
.faq-answer {
  margin-top: 10px; color: var(--text-muted); font-size: 14.5px; line-height: 1.7;
  overflow: hidden; max-height: 400px; transition: max-height .2s ease, opacity .2s ease, margin-top .2s ease;
}
.faq-answer p { margin: 0 }
.faq-item.collapsed .faq-answer { max-height: 0; opacity: 0; margin-top: 0 }

@media(max-width: 640px) {
  .faq-list { padding: 4px 16px }
  .faq-question { font-size: 14.5px; gap: 10px }
  .faq-section { margin-top: 44px }
}

/* ============================================================
   WhatsApp floating button (admin-controlled)
   ============================================================ */
.wa-float-wrap {
  --wa-size: 56px;
  position: fixed;
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 401;
  width: var(--wa-size); height: var(--wa-size);
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  flex-shrink: 0;
}
.wa-float-pulse {
  position: absolute; top: 0; left: 0;
  width: var(--wa-size); height: var(--wa-size);
  aspect-ratio: 1 / 1; box-sizing: border-box;
  border-radius: 50%; background: #25D366;
  animation: wa-pulse 2.4s ease-out infinite; pointer-events: none;
}
.wa-float {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: var(--wa-size); height: var(--wa-size);
  aspect-ratio: 1 / 1; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #25D366; color: #fff; text-decoration: none;
  box-shadow: 0 6px 22px rgba(37,211,102,.45);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover,
.wa-float:focus-visible { transform: scale(1.08); box-shadow: 0 10px 30px rgba(37,211,102,.6); }
.wa-float-icon { width: 32px; height: 32px; flex-shrink: 0; display: block }
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
/* When the WhatsApp button is present, lift the back-to-top above it */
.has-wa-float .back-to-top { bottom: 5.6rem; }

@media (max-width: 480px) {
  .wa-float-wrap {
    --wa-size: 52px;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .wa-float-icon { width: 29px; height: 29px; }
  .has-wa-float .back-to-top { bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float-pulse { animation: none; opacity: 0; }
}
