/* ==========================================================================
   PromptPlum theme layer — exact colour system, cards, buttons, layout
   Light default: blue→lavender gradient bg · Poppins · blue #2563eb
   Dark: navy→indigo gradient · blue #3b82f6
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --bg-gradient-start: #e0edff;
  --bg-gradient-end: #ebe5f7;
  --glow-yellow: #ffc8644d;
  --glow-orange: #ffb45040;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --color-primary: #2563eb;
  --link-color: #2563eb;
  --border-color: rgba(15, 23, 42, .10);
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, .07);
  --shadow-card: none;
  --radius: 16px;
  /* engine var remap */
  --background: #e3eeff;
  --foreground: #0f172a;
  --surface: #ffffff;
  --surface-soft: #f4f7fe;
  --card: #ffffff;
  --muted: #eef2fb;
  --muted-foreground: #475569;
  --border: rgba(15, 23, 42, .10);
  --input: rgba(15, 23, 42, .16);
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --gradient-primary: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 55%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, #dbeafe, #ede9fe);
}

html.dark {
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  --glow-yellow: #ffc86426;
  --glow-orange: #ffb4501f;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --color-primary: #3b82f6;
  --link-color: #60a5fa;
  --border-color: #374151;
  --card-bg: #16203a;
  --card-border: rgba(255, 255, 255, .07);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .55);
  --background: #0f172a;
  --foreground: #f8fafc;
  --surface: #16203a;
  --surface-soft: #1b2542;
  --card: #16203a;
  --muted: #1e293b;
  --muted-foreground: #cbd5e1;
  --border: #374151;
  --input: rgba(255, 255, 255, .18);
  --primary: #3b82f6;
}

/* ---------------- base ---------------- */
.pp-body, body.pp-body {
  font-family: 'Poppins', 'Nunito', ui-sans-serif, system-ui, sans-serif !important;
  background:
    radial-gradient(900px 420px at 12% -6%, var(--glow-yellow), transparent 60%),
    radial-gradient(900px 420px at 88% -6%, var(--glow-orange), transparent 60%),
    linear-gradient(180deg, var(--bg-gradient-start), var(--bg-gradient-end)) fixed !important;
  color: var(--text-primary);
}
a { color: var(--link-color); }

/* grid pattern behind hero */
.grid-bg {
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px) !important;
  background-size: 44px 44px !important;
  background-color: transparent;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 75%, transparent);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 75%, transparent);
}
html.dark .grid-bg { opacity: .35; }

/* hero */
.pp-body h1 { color: var(--text-primary); }
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
#pp-hero-search { color: var(--text-primary); }
#pp-hero-search::placeholder { color: var(--text-secondary); }

/* ==========================================================================
   BUTTONS — explicit backgrounds everywhere, both modes (never invisible)
   ========================================================================== */
.btn-gradient {
  background: var(--color-primary) !important;
  color: #fff !important;
  border: none;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55);
}
.btn-gradient:hover { background: #1d4ed8 !important; }
html.dark .btn-gradient { background: #3b82f6 !important; box-shadow: 0 6px 18px -6px rgba(59, 130, 246, .6); }
html.dark .btn-gradient:hover { background: #2563eb !important; }

.pp-btn-blue {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .5);
}
.pp-btn-blue:hover { background: #1d4ed8; color: #fff; }
html.dark .pp-btn-blue { background: #3b82f6; }
html.dark .pp-btn-blue:hover { background: #2563eb; }

.btn-orange, .pp-btn-orange, #pp-prompts .pp-copy {
  background: linear-gradient(135deg, #fb923c, #f97316) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .55);
}
.btn-orange:hover, .pp-btn-orange:hover, #pp-prompts .pp-copy:hover { background: linear-gradient(135deg, #f97316, #ea580c) !important; }

.bg-primary, button.bg-primary { background-color: var(--color-primary) !important; }
.text-primary { color: var(--color-primary) !important; }
.border-primary { border-color: var(--color-primary) !important; }

/* generic pills that previously relied on old vars */
.glass-strong { background: var(--card-bg) !important; border: 1px solid var(--card-border) !important; }

/* ==========================================================================
   HEADER — centered floating white pill (PromptPlum style)
   ========================================================================== */
.pp-body > div > header, .pp-body header.mx-auto { padding-top: 14px; }
.glass-strong.rounded-full {
  border-radius: 999px !important;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
  padding-top: 8px; padding-bottom: 8px;
}
.glass-strong .text-foreground, .glass-strong nav a { color: var(--text-primary); }
.glass-strong nav a:hover { color: var(--color-primary); }
#pp-theme-toggle, #pp-drawer-toggle {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-color);
}
#pp-theme-toggle:hover, #pp-drawer-toggle:hover { background: var(--muted); }

/* ==========================================================================
   CARDS — white, 16px radius, plum typography
   ========================================================================== */
.glass-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}
.glass-card .text-muted-foreground { color: var(--text-secondary); }

.pp-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.pp-card h3 { color: var(--text-primary); font-family: 'Poppins', sans-serif; }
.pp-card .text-muted-foreground { color: var(--text-secondary); }
.pp-card:hover { box-shadow: 0 14px 34px -14px rgba(37, 99, 235, .28); }

.pp-copy { background: var(--color-primary); color: #fff; }
.pp-copy:hover { background: #1d4ed8; }
html.dark .pp-copy { background: #3b82f6; }

.js-card-share { background: var(--card-bg); border: 1px solid var(--border-color); }

/* like pill on image */
.pp-like { background: rgba(255, 255, 255, .96) !important; color: #0f172a !important; }
html.dark .pp-like { background: rgba(15, 23, 42, .82) !important; color: #f8fafc !important; }

/* category chip on image */
.pp-card .bg-white\/95 { background: rgba(255, 255, 255, .96) !important; color: #0f172a !important; }

/* ==========================================================================
   HOME — sidebar + content
   ========================================================================== */
.pp-main-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1200px;
  margin: 26px auto 0;
  padding: 0 14px;
}
@media (max-width: 1023px) { .pp-main-wrap { grid-template-columns: minmax(0, 1fr); } }

.pp-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1023px) { .pp-side { display: none; } }
.pp-side-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
}
.pp-side-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: space-between;
}
.pp-side-all { font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.pp-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pp-seg-item {
  flex: 1 1 auto; text-align: center;
  padding: 7px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--text-primary);
  background: var(--surface-soft); border: 1px solid transparent;
}
.pp-seg-item:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pp-seg-item.active { background: #e4edff; color: var(--color-primary); border-color: #bcd0ff; }
html.dark .pp-seg-item { background: #1e293b; color: #e2e8f0; }
html.dark .pp-seg-item.active { background: rgba(59, 130, 246, .18); color: #93c5fd; border-color: rgba(59, 130, 246, .5); }

.pp-side-cats { display: flex; flex-direction: column; margin-top: 8px; }
.pp-side-cat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
}
.pp-side-cat b { font-size: 11.5px; color: var(--text-secondary); font-weight: 700; }
.pp-side-cat:hover { background: var(--surface-soft); }
.pp-side-cat.active { background: #e4edff; color: var(--color-primary); box-shadow: inset 2px 0 0 var(--color-primary); }
.pp-side-cat.active b { color: var(--color-primary); }
html.dark .pp-side-cat.active { background: rgba(59, 130, 246, .16); color: #93c5fd; box-shadow: inset 2px 0 0 #3b82f6; }

.pp-side-premium {
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  background: linear-gradient(140deg, #4f46e5 0%, #7c3aed 60%, #9333ea 100%);
  box-shadow: 0 14px 30px -12px rgba(124, 58, 237, .55);
}
.pp-side-premium a { background: #fff; color: #4f46e5; }
.pp-side-premium a:hover { background: #eef2ff; color: #4338ca; }

/* mobile horizontal sort row (mirrors sidebar on small screens) */
.pp-mobile-sort { display: none; }
@media (max-width: 1023px) {
  .pp-mobile-sort { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
  .pp-mobile-sort a {
    flex: 0 0 auto; padding: 8px 16px; border-radius: 999px;
    background: var(--card-bg); border: 1px solid var(--card-border);
    font-size: 13px; font-weight: 700; color: var(--text-primary);
  }
  .pp-mobile-sort a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
}

.pp-content-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-content-head h2 { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.pp-content-head .pp-sort-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }

/* ==========================================================================
   BROWSE BY STYLE
   ========================================================================== */
.pp-styles-wrap {
  max-width: 1200px; margin-left: auto; margin-right: auto;
  padding: 40px 14px 8px;
}
.pp-styles-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
@media (max-width: 1100px) { .pp-styles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .pp-styles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-style-tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 12px;
  color: var(--text-primary);
  transition: transform .16s ease, box-shadow .16s ease;
}
.pp-style-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(37, 99, 235, .35); }
.pp-style-ic {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  color: #fff;
}
.pp-style-ic.ic0 { background: #f59e0b; } .pp-style-ic.ic1 { background: #10b981; }
.pp-style-ic.ic2 { background: #3b82f6; } .pp-style-ic.ic3 { background: #ec4899; }
.pp-style-ic.ic4 { background: #8b5cf6; } .pp-style-ic.ic5 { background: #ef4444; }
.pp-style-ic.ic6 { background: #14b8a6; } .pp-style-ic.ic7 { background: #f97316; }

/* what is section */
.pp-what {
  max-width: 1000px; margin: 34px auto 0; padding: 0 14px;
}
.pp-what .glass-card { padding: 30px 26px; text-align: center; }
.pp-what p { color: var(--text-secondary); }

/* ==========================================================================
   PROMPT DETAIL PAGE
   ========================================================================== */
.pp-crumb {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 999px; box-shadow: var(--shadow-card);
  padding: 8px 16px; font-size: 12.5px; font-weight: 600;
}
.pp-crumb a { color: var(--text-secondary); }
.pp-crumb a:hover { color: var(--color-primary); }
.pp-detail-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0f172a; color: #fff;
  border-radius: 999px; padding: 5px 14px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
html.dark .pp-detail-chip { background: #334155; }

.pp-prompt-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px; margin-bottom: 12px;
}
.pp-prompt-head .t { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--color-primary); text-transform: uppercase; }
.pp-prompt-head .s { font-size: 11.5px; color: var(--text-secondary); }
.pp-save-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-color); border-radius: 15px;
  background: var(--card-bg); color: var(--text-primary);
  padding: 6px 14px; font-size: 12px; font-weight: 700;
}
.pp-save-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

.select-all {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  scrollbar-width: thin;
}
html.dark .select-all { background: #1b2542; }

.pp-buy-note {
  border: 1px dashed rgba(37, 99, 235, .45);
  background: rgba(37, 99, 235, .07);
  border-radius: 14px; padding: 14px 16px;
}
html.dark .pp-buy-note { background: rgba(59, 130, 246, .1); }

/* related + reviews */
.pp-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1024px) { .pp-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .pp-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ==========================================================================
   FOOTER — white rounded card
   ========================================================================== */
.pp-body footer .glass-card { border-radius: 24px; padding: 34px; }
.pp-body footer .glass-card, .pp-body footer .glass-card * { color: var(--text-primary); }
.pp-body footer .glass-card .text-muted-foreground,
.pp-body footer .glass-card h4 { color: var(--text-secondary); }
.pp-body footer .glass-card a:hover { color: var(--color-primary); }

/* pagination pills */
.pp-body .pp-pagination a, .pp-body .pp-pagination span {
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-primary);
}
.pp-body .pp-pagination .current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* tabs pills (legacy wherever used) */
.glass-card.inline-flex a.bg-primary, .glass-card.inline-flex .active {
  background: var(--color-primary) !important; color: #fff !important;
}

/* loader / misc */
.pp-toast { background: #0f172a; color: #fff; }
html.dark .pp-toast { background: #f8fafc; color: #0f172a; }

/* ==========================================================================
   PROMPTPLUM UI LAYER v2 — tabbar, footer, totop, tiles, fixes
   ========================================================================== */

/* hero text: ALWAYS full opacity (no reveal dimming) */
.pp-reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
.grid-bg { -webkit-mask-image: none !important; mask-image: none !important; }
html.dark .grid-bg { opacity: 1; }
.pp-body .text-muted-foreground { color: var(--text-secondary); }

/* tab bar (mobile sort) */
.pp-tabbar {
  display: flex; align-items: stretch; gap: 2px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 999px; box-shadow: var(--shadow-card);
  padding: 6px; margin: 4px 0 14px;
    justify-content:space-around;
}
.pp-tabbar-item {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; padding: 10px 4px;
  font-size: 13.5px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap;
}
.pp-tabbar-item:hover { color: var(--color-primary); }
.pp-tabbar-item.active { background: #e4edff; color: var(--color-primary); }
.pp-tabbar-item.is-premium.active { background: rgba(251, 191, 36, .14); color: #d97706; }
html.dark .pp-tabbar-item.active { background: rgba(59, 130, 246, .16); color: #93c5fd; }
html.dark .pp-tabbar-item.is-premium.active { background: rgba(251, 191, 36, .12); color: #fbbf24; }

/* browse-by-style tiles: mobile big centered 2-col */
@media (max-width: 640px) {
  .pp-styles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pp-style-tile { flex-direction: column; text-align: center; padding: 26px 12px 20px; gap: 12px; }
  .pp-style-ic { width: 58px; height: 58px; border-radius: 16px; font-size: 20px; font-weight: 800; box-shadow: 0 10px 24px -8px rgba(59, 130, 246, .55); }
}
@media (min-width: 641px) {
  .pp-style-ic { display: grid; place-items: center; }
}

/* prompt box actions */
.pp-prompt-actions .pp-like-big, .pp-like-big {
  background: var(--color-primary) !important; color: #fff !important;
}
html.dark .pp-like-big { background: #3b82f6 !important; }
.pp-save-btn { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-primary); }
.pp-save-btn:hover, .pp-save-btn.saved { border-color: var(--color-primary); color: var(--color-primary); }
.pp-save-btn.saved { background: #e4edff; }
html.dark .pp-save-btn.saved { background: rgba(59, 130, 246, .16); }

/* rating */
.pp-rating-value, #pp-rating-value { color: var(--text-primary); }

/* ==========================================================================
   FOOTER — centered card, purple top edge, circle socials, quick links
   ========================================================================== */
.pp-footer-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  padding: 38px 26px 0;
  overflow: hidden;
}
.pp-footer-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 45%, #ec4899 80%, #f59e0b);
}
.pp-soc {
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all .18s ease;
}
.pp-soc:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); }
.pp-quick-title {
  font-size: 12px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase;
  color: var(--text-secondary);
}
.pp-quick-link {
  display: block; text-align: center;
  padding: 9px 10px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.pp-quick-link:hover { background: var(--surface-soft); color: var(--color-primary); }
.pp-copyright {
  margin-top: 30px; padding: 16px 10px;
  border-top: 1px solid var(--border-color);
  text-align: center; font-size: 12.5px; color: var(--text-secondary);
}
.pp-footer-card > div:first-child > p { font-size: 13px !important; line-height: 1.6 !important; }
.pp-footer-card > div:first-child > a span { font-size: 1.35rem !important; }

/* scroll to top */
.pp-totop {
  position: fixed; right: 18px; bottom: 22px; z-index: 120;
  width: 52px; height: 52px; border-radius: 999px;
  display: none; place-items: center;
  background: var(--color-primary); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, .6);
  border: 4px solid rgba(255, 255, 255, .25);
}
html.dark .pp-totop { background: #3b82f6; }
.pp-totop.show { display: grid; }
.pp-totop:hover { transform: translateY(-3px); }

/* footer logo text white like plum */
.pp-footer-card a span { color: var(--text-primary) !important; }
/* card author line never overflows */
.pp-card .px-4.pb-4 { overflow: hidden; }
.pp-card .px-4.pb-4 .text-\[11\.5px\] { min-width: 0; max-width: 46%; }
.pp-card .px-4.pb-4 .text-\[11\.5px\] span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* PromptPlum reference skin: dark-first mobile canvas with explicit light fallback. */
:root {
  --ref-bg: #0b1224;
  --ref-surface: #111a31;
  --ref-border: rgba(148, 163, 184, .20);
  --ref-text: #f8fafc;
  --ref-muted: #9aa9c6;
  --ref-blue: #2878f5;
}

html.dark .pp-body, html.dark body.pp-body {
  background:
    linear-gradient(rgba(83, 108, 163, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 108, 163, .07) 1px, transparent 1px),
    radial-gradient(900px 480px at 50% -20%, rgba(44, 92, 190, .20), transparent 68%),
    var(--ref-bg) !important;
  background-size: 43px 43px, 43px 43px, auto, auto !important;
  color: var(--ref-text);
}
html.dark .glass-card, html.dark .glass-strong, html.dark .pp-card,
html.dark .pp-side-block, html.dark .pp-style-tile, html.dark .pp-footer-card {
  background: rgba(17, 26, 49, .84) !important;
  border-color: var(--ref-border) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
  color: var(--ref-text);
}
html.dark .glass-card .text-muted-foreground, html.dark .pp-body .text-muted-foreground,
html.dark .pp-style-tile p, html.dark .pp-content-head .pp-sort-label,
html.dark .pp-side-title { color: var(--ref-muted) !important; }
html.dark .pp-main-wrap { margin-top: 30px; }
html.dark .pp-tabbar { background: rgba(17, 26, 49, .9); border-color: var(--ref-border); }
html.dark .pp-tabbar-item { color: #cbd5e1; }
html.dark .pp-tabbar-item.active { background: var(--ref-blue); color: #fff; box-shadow: 0 8px 22px rgba(40, 120, 245, .34); }
html.dark .pp-tabbar-item.is-premium.active { background: #f5b91d; color: #111827; }
html.dark #pp-hero-search, html.dark input, html.dark textarea, html.dark select { color: var(--ref-text); background-color: transparent; }
html.dark input::placeholder, html.dark textarea::placeholder { color: var(--ref-muted); }
html.dark .pp-style-tile { min-height: 174px; justify-content: center; flex-direction: column; text-align: center; }
html.dark .pp-style-ic { width: 58px; height: 58px; border-radius: 17px; background: linear-gradient(145deg, #285fbd, #683395) !important; box-shadow: 0 10px 24px rgba(40, 120, 245, .28); }
html.dark .pp-style-tile:hover { border-color: rgba(76, 139, 255, .65) !important; }
html.dark .pp-footer-card { background: #18223b !important; }

html:not(.dark) .pp-body, html:not(.dark) body.pp-body { background: linear-gradient(180deg, #eef4ff, #f4efff) fixed !important; }
html:not(.dark) .pp-tabbar-item.active { background: var(--color-primary); color: #fff; }
html:not(.dark) .pp-tabbar-item.is-premium.active { background: #f5b91d; color: #111827; }

/* Glass widgets (sort bar, chips, likes) use their own backdrop-filter. */

/* Off-canvas navigation: solid black in both modes for reliable contrast. */
.pp-drawer-panel {
  background: #000 !important;
  border-color: #2f2f2f !important;
  color: #fff !important;
}
.pp-drawer-panel .text-foreground,
.pp-drawer-panel .text-muted-foreground,
.pp-drawer-panel span,
.pp-drawer-panel svg { color: #fff !important; }
.pp-drawer-item {
  background: #111 !important;
  border: 1px solid #2b2b2b;
  color: #fff !important;
}
.pp-drawer-item:hover { background: #222 !important; border-color: #555; }
.pp-drawer-panel button { color: #fff !important; background: #111 !important; border-color: #333 !important; }

/* PromptPlum-style cover cards: image fills the tile and copy sits over the lower fade. */
.pp-card-cover {
  aspect-ratio: 3 / 4;
  border-color: rgba(0, 0, 0, .08) !important;
  isolation: isolate;
}
.pp-card-cover::after {
  content: '';
  position: absolute;
  inset: 25% 0 0;
  z-index: 1;
  pointer-events: none;
}
.pp-card-cover > a { position: static; display: block; width: 100%; height: 100%; }
.pp-card-cover > a > div:first-child { position: absolute; inset: 0; z-index: 0; height: 100%; aspect-ratio: auto; }
.pp-card-cover > a > div:nth-child(2) { position: absolute; inset-inline: 0; bottom: 3.75rem; z-index: 2; padding: 1rem 1.25rem .25rem; }
.pp-card-cover > a > div:nth-child(2) h3 { color: #111827; font-size: 1.05rem; }
.pp-card-cover > a > div:nth-child(2) p { color: #374151; }
.pp-card-cover > .px-4.pb-4 { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; padding: .75rem 1.25rem 1.25rem; }
.pp-card-cover > .px-4.pb-4 .text-muted-foreground { color: #6b7280; }
html.dark .pp-card-cover { border-color: rgba(255, 255, 255, .10) !important; }
html.dark .pp-card-cover::after { background: linear-gradient(to top, rgba(0, 0, 0, .96), rgba(0, 0, 0, .88) 42%, transparent 80%); }
html.dark .pp-card-cover > a > div:nth-child(2) h3 { color: #fff; }
html.dark .pp-card-cover > a > div:nth-child(2) p { color: rgba(255, 255, 255, .80); }
html.dark .pp-card-cover > .px-4.pb-4 .text-muted-foreground { color: rgba(255, 255, 255, .60); }

/* Small-radius, scrollable category tabs with a distinct Premium gradient. */
.pp-tabbar {
  overflow-x: auto;
  justify-content: flex-start;
  border-radius: 18px;
  scrollbar-width: none;
}
.pp-tabbar::-webkit-scrollbar { display: none; }
.pp-tabbar-item.is-premium.active,
html.dark .pp-tabbar-item.is-premium.active,
html:not(.dark) .pp-tabbar-item.is-premium.active {
  background: linear-gradient(135deg, #f59e0b, #ec4899 52%, #7c3aed) !important;
  color: #fff !important;
  box-shadow: 0 7px 20px rgba(236, 72, 153, .28);
}

/* Post-page actions. */
.pp-copy-post { background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f59e0b 100%) !important; box-shadow: 0 10px 24px rgba(249, 115, 22, .20); }
.pp-copy-post:hover { transform: translateY(-1px); }
.pp-copy-shine { background: linear-gradient(to right, transparent, rgba(255, 255, 255, .20), transparent); }
.pp-save-btn { background: linear-gradient(135deg, #2563eb, #7c3aed) !important; border-color: transparent !important; color: #fff !important; }
.pp-save-btn:hover, .pp-save-btn.saved { color: #fff !important; border-color: transparent !important; }

@media (max-width: 640px) {
  .pp-card-cover > a > div:nth-child(2) { padding-inline: 1rem; }
  .pp-card-cover > .px-4.pb-4 { padding-inline: 1rem; }
}

@media (max-width: 640px) {
  .pp-body > div > header, .pp-body header.mx-auto { padding-top: 4px; }
  .pp-body main#content { margin-top: 14px; }
  .pp-main-wrap { padding: 0 10px; margin-top: 20px; }
  .pp-content-head { padding: 0 2px; }
  .pp-content-head h2 { font-size: 16px; }
  #pp-grid { gap: 10px !important; }
  .pp-card { border-radius: 20px !important; }
    .pp-card .p-4 { padding: 10px; }
  .pp-card .px-4.pb-4 { padding: 0 10px 10px; }
  .pp-card h3 { font-size: 13px; }
  .pp-card .pp-copy { padding: 7px 10px; font-size: 11px; }
  .pp-styles-wrap { padding: 32px 10px 8px; }
  .pp-styles-grid { gap: 10px; }
  .pp-style-tile { min-height: 166px; }
}

/* Product card layout switcher and mobile single-column feed. */
.pp-layout-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  margin-bottom: 2px;
}
.pp-layout-label {
  margin-right: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pp-layout-option {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 9px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}
.pp-layout-option:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pp-layout-option.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 5px 14px rgba(37, 99, 235, .28); }
html.dark .pp-layout-option { background: var(--ref-surface); border-color: var(--ref-border); color: var(--ref-muted); }
html.dark .pp-layout-option.active { background: var(--ref-blue); border-color: var(--ref-blue); color: #fff; }

@media (max-width: 640px) {
  #pp-grid:not(.pp-masonry), .pp-rel-grid { grid-template-columns: minmax(0, 1fr) !important; }
  #pp-grid.pp-masonry { display: block !important; grid-template-columns: none !important; }
  .pp-layout-switcher { justify-content: flex-start; margin: 10px 0 0; }
}

/* Detail-page containment and rounded share controls. */
.pp-share-heading-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--color-primary);
}
.pp-share a, .pp-share button { border-radius: 12px !important; }
.pp-share a { border: 1px solid rgba(0, 0, 0, .08); }
html.dark .pp-share a { border-color: rgba(255, 255, 255, .12); }
.pp-product-layout { min-width: 0; max-width: 100%; }
.pp-product-layout > * { min-width: 0; max-width: 100%; }
.pp-card-cover .px-4.pb-4 { min-width: 0; }
.pp-card-cover .px-4.pb-4 > div { min-width: 0; }
.pp-card-cover .px-4.pb-4 .text-muted-foreground { min-width: 0; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .pp-product-layout { width: 100%; margin-inline: auto; }
  .pp-product-layout .glass-card, .pp-product-layout .pp-buy-note { overflow-wrap: anywhere; }
  .pp-product-layout h1 { font-size: 1.65rem; line-height: 1.12; }
  .pp-product-layout .pp-share { width: 100%; justify-content: flex-start; }
  .pp-product-layout .pp-share a, .pp-product-layout .pp-share button { width: 34px; height: 34px; }
  .pp-card-cover > a > div:nth-child(2) h3 { font-size: .96rem; }
  .pp-card-cover > a > div:nth-child(2) p { font-size: .78rem; }
  .pp-card-cover .px-4.pb-4 { padding: .65rem .75rem .85rem; }
}

.pp-card-cover .p-4{
    border-top: 1px solid #f5eaea45;
  border-radius:15px 15px 0px 0px;}
.pp-card-cover .p-4, .pp-card-cover .px-4 {
        background: var(--card);
}

