:root {
  --primary: #7c3aed;
  --primary-dark: #4f46e5;
  --ink: #1f1b3b;
  --muted: #6b6890;
  --bg: #faf9ff;
  --card: #ffffff;
  --border: #ede9fe;
  --shadow: 0 10px 30px rgba(79, 70, 229, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  scroll-behavior: smooth;
}

a { color: var(--primary-dark); }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  /* Contain the blur orbs' filter so they don't leak across stacking
     contexts on iOS Safari (causes the whole signup dialog to look blurred). */
  isolation: isolate;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  color: #fff;
  /* Top padding leaves room for the fixed user-widget (~52px tall + breathing) */
  padding: 68px 16px 22px;
  text-align: center;
}
@media (min-width: 700px) { .hero { padding: 88px 0 56px; } }
/* IMPORTANT: do NOT declare `filter: blur(...)` outside the @media block.
   iOS Safari has been observed to composite blur layers even on
   display:none elements in some versions, which leaks the blur onto
   <dialog> top-layer content. */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
  display: none;
}
.hero-orb-1 { width: 160px; height: 160px; background: #ec4899; top: -40px; left: -40px; }
.hero-orb-2 { width: 140px; height: 140px; background: #38bdf8; bottom: -50px; right: -30px; }
@media (min-width: 700px) {
  .hero-orb { display: block; filter: blur(60px); }
  .hero-orb-1 { width: 320px; height: 320px; top: -80px; left: -60px; }
  .hero-orb-2 { width: 280px; height: 280px; bottom: -100px; right: -40px; }
}
.hero-inner { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* No backdrop-filter on mobile — same iOS bug surface as the orbs. */
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}
@media (min-width: 700px) {
  .hero-badge { gap: 8px; padding: 8px 18px; font-size: 0.85rem; margin-bottom: 18px; backdrop-filter: blur(10px); }
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 5.5vw, 3.4rem);
  margin: 0 0 8px;
  line-height: 1.18;
  letter-spacing: -0.5px;
}
@media (min-width: 700px) { .hero h1 { margin-bottom: 14px; line-height: 1.15; } }

.hero-sub {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(0.85rem, 2.4vw, 1.15rem);
  opacity: 0.92;
  line-height: 1.45;
}
@media (min-width: 700px) { .hero-sub { line-height: 1.55; } }

/* ===== SEARCH ===== */
.search-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #faf9ff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
@media (min-width: 700px) {
  .search-wrap { background: rgba(250, 249, 255, 0.92); backdrop-filter: blur(10px); }
}
.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}

/* ===== Anonymous daily counter strip ===== */
/* No longer sticky — was eating ~28% of the mobile viewport when stacked
   under the sticky search bar. Sits once above the grid, scrolls away. */
.anon-counter {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 1px solid rgba(217,119,6,0.18);
}
.anon-counter.warn {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-bottom-color: rgba(220,38,38,0.18);
}
.anon-counter.gone {
  background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
  border-bottom-color: rgba(220,38,38,0.3);
}
.anon-counter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
}
.anon-counter-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.anon-counter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(217,119,6,0.18);
  color: #b45309;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.anon-counter.warn .anon-counter-icon,
.anon-counter.gone .anon-counter-icon {
  background: rgba(220,38,38,0.18);
  color: #b91c1c;
}
.anon-counter-text { font-size: 0.85rem; font-weight: 600; color: #78350f; line-height: 1.3; }
.anon-counter-text strong {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  color: #92400e;
  margin-right: 4px;
  font-weight: 800;
}
.anon-counter.warn .anon-counter-text,
.anon-counter.gone .anon-counter-text { color: #7f1d1d; }
.anon-counter.warn .anon-counter-text strong,
.anon-counter.gone .anon-counter-text strong { color: #b91c1c; }

.anon-counter-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: #1f1b3b;
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.anon-counter-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31,27,59,0.3); }
.anon-counter-cta i { font-size: 0.75rem; }
.anon-counter.warn .anon-counter-cta,
.anon-counter.gone .anon-counter-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.anon-counter-bar {
  height: 3px;
  background: rgba(217,119,6,0.15);
  width: 100%;
}
.anon-counter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.4s ease-out;
  width: 100%;
}
.anon-counter.warn .anon-counter-bar { background: rgba(220,38,38,0.15); }
.anon-counter.warn .anon-counter-bar-fill { background: linear-gradient(90deg, #f87171, #dc2626); }
.anon-counter.gone .anon-counter-bar-fill { background: #dc2626; }

.anon-counter-cta .cta-short { display: none; }
@media (max-width: 480px) {
  .anon-counter-cta .cta-long  { display: none; }
  .anon-counter-cta .cta-short { display: inline; }
  .anon-counter-text strong { font-size: 1rem; }
  .anon-counter-text { font-size: 0.78rem; }
  .anon-counter-inner { padding: 9px 12px; }
}

/* ===== Filter chips ===== */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.18s;
}
.filter-chip:hover { color: var(--primary-dark); border-color: var(--primary); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124,58,237,0.25);
}
.filter-count {
  background: rgba(0,0,0,0.18);
  color: inherit;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.filter-chip:not(.active) .filter-count { background: #ede9fe; color: var(--primary-dark); }

/* ===== GRID ===== */
.gallery-wrap { padding: 28px 12px 50px; }
@media (min-width: 700px) { .gallery-wrap { padding: 36px 16px 60px; } }
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 28px; } .gallery-wrap { max-width: 1280px; } }

/* ===== CARD ===== */
.card-p {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card-p:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(124,58,237,0.15); }

.card-img-wrap { position: relative; }
.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  overflow: hidden;
}

/* Favorite heart + member badge overlays */
.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.92);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(15,13,35,0.18);
  transition: transform 0.15s, color 0.15s, background 0.15s;
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.08); color: #ef4444; }
.fav-btn.active { color: #ef4444; background: #fff; }
.fav-btn.busy { opacity: 0.55; cursor: progress; }
@keyframes fav-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.fav-btn.pop { animation: fav-pop 0.32s ease-out; }

.member-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(217,119,6,0.4);
  z-index: 2;
  cursor: help;
}
.member-badge i { font-size: 0.85rem; }
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.card-img:hover img { transform: scale(1.04); }

.card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
@media (min-width: 700px) { .card-body { padding: 18px 18px 20px; gap: 12px; } }
.card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 700px) { .card-title { font-size: 1.1rem; } }

/* Legacy chip styles — kept for any other surfaces that still use them */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f3f0ff;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip i { font-size: 0.7rem; }

/* Trending / global copy count — only renders for prompts with >= TRENDING_THRESHOLD copies */
.copy-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  line-height: 1.1;
}
.copy-stat i { color: #ea580c; font-size: 0.7rem; }
@media (min-width: 700px) { .copy-stat { font-size: 0.75rem; padding: 4px 11px; } }

/* "Best results in {agent}" line — replaces the model chip row on cards */
.best-in {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.3;
  min-width: 0;
}
.best-in i { color: var(--primary); font-size: 0.78rem; flex-shrink: 0; }
.best-in span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.best-in strong { color: var(--ink); font-weight: 700; }
@media (min-width: 700px) { .best-in { font-size: 0.82rem; } }

.card-notes {
  background: #fff8e1;
  border-left: 3px solid #f59e0b;
  color: #5b3f00;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 8px;
  word-break: break-word;
  /* Clamp to 2 lines on mobile; full text on hover via title attribute */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 700px) {
  .card-notes { font-size: 0.85rem; padding: 9px 12px; line-height: 1.5; -webkit-line-clamp: 3; }
}

/* ===== Placeholder dialog ===== */
.ph-dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(460px, 92vw);
  /* `dvh` accounts for iOS Safari's dynamic browser chrome (URL bar that
     slides up/down). `vh` would push the bottom action buttons under
     Safari's bottom toolbar, hiding Cancel/Save. */
  max-height: 88dvh;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(15, 13, 35, 0.35);
  overflow: hidden;
}
@supports not (height: 88dvh) {
  .ph-dialog { max-height: 88vh; }
}
.ph-dialog::backdrop { background: rgba(15, 13, 35, 0.7); }
@media (min-width: 700px) {
  .ph-dialog::backdrop { background: rgba(15, 13, 35, 0.65); backdrop-filter: blur(4px); }
}
/* Use a child wrapper for flex-column layout instead of putting it on the
   dialog itself — applying display:flex / position:fixed directly on a
   native <dialog> trips up iOS Safari's rendering. */
.ph-dialog form,
.ph-dialog .dialog-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 88dvh;
}
@supports not (height: 88dvh) {
  .ph-dialog form,
  .ph-dialog .dialog-stack { max-height: 88vh; }
}
.ph-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}
.ph-dialog-head h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  flex: 1;
}
.ph-dialog-close {
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: #f3f0ff;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ph-dialog-close:hover { background: #ede9fe; }
.ph-dialog-sub {
  padding: 0 20px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.ph-dialog-fields {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.ph-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ph-field span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ph-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ph-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.ph-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 20px;
  /* Add the iPhone home-indicator inset so buttons stay tappable. */
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  background: #faf9ff;
  /* Inside the form flex-column, the auth-body (flex:1, overflow-y:auto)
     already absorbs the scroll. This footer just needs to sit at the
     bottom in document flow — no sticky needed, which trips iOS WebKit. */
  flex-shrink: 0;
}
.ph-dialog-actions > * { flex: 0 1 auto; }
@media (max-width: 420px) {
  .ph-dialog-actions {
    justify-content: stretch;
    padding: 14px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .ph-dialog-actions > * { flex: 1 1 auto; justify-content: center; }
}
.btn-ghost, .btn-primary {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.btn-ghost { background: #f3f0ff; color: var(--primary-dark); }
.btn-ghost:hover { background: #ede9fe; }
.btn-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(124,58,237,0.35); transform: translateY(-1px); }

/* ===== How-to-use dialog (post-copy) ===== */
.howto-dialog { width: min(560px, 92vw); }
.howto-check { color: #16a34a; margin-right: 6px; }
.howto-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 20px 4px;
  -webkit-overflow-scrolling: touch;
}
.howto-steps {
  list-style: none;
  margin: 4px 0 12px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.howto-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #faf8ff;
  border: 1px solid #ece5ff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #1f2937;
}
.howto-step-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.howto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.howto-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d8ccff;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 8px;
  min-height: 44px;
}
.howto-link:hover { background: #f5efff; }
.howto-note {
  margin-top: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.howto-note i { margin-top: 2px; }
.howto-prompt-label {
  display: block;
  margin: 4px 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.howto-prompt-text {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  resize: vertical;
  min-height: 110px;
  max-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  white-space: pre-wrap;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .howto-body { padding: 0 16px 4px; }
  .howto-steps li { padding: 10px; font-size: 0.9rem; gap: 10px; }
  .howto-step-num { flex-basis: 26px; width: 26px; height: 26px; font-size: 0.8rem; }
  .howto-actions { gap: 6px; }
  .howto-link { padding: 9px 12px; font-size: 0.85rem; }
  .howto-prompt-text { min-height: 100px; max-height: 180px; font-size: 0.78rem; }
}
@media (prefers-color-scheme: dark) {
  .howto-steps li { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.25); color: #e5e7eb; }
  .howto-link { background: rgba(255,255,255,0.04); border-color: rgba(124,58,237,0.35); color: #c4b5fd; }
  .howto-link:hover { background: rgba(124,58,237,0.15); }
  .howto-note { background: rgba(252,211,77,0.08); border-color: rgba(252,211,77,0.3); color: #fcd34d; }
  .howto-prompt-text { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: #e5e7eb; }
  .howto-prompt-label { color: #9ca3af; }
}

.copy-btn {
  margin-top: auto;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 10px;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.copy-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(124,58,237,0.35); }
@media (min-width: 700px) { .copy-btn { font-size: 0.95rem; min-height: 46px; padding: 10px 14px; } }
.copy-btn:active { transform: translateY(0); }
.copy-btn.copied { background: linear-gradient(135deg, #10b981, #059669); }

/* ===== User widget (top-right, fixed so dropdown isn't clipped by hero overflow) ===== */
.user-widget {
  position: fixed;
  top: 12px;
  right: 12px;
  /* Must sit above the sticky search bar (z-index 50) AND the anon-counter
     strip (z-index 40). Native <dialog> top-layer beats any z-index. */
  z-index: 200;
}
@media (min-width: 700px) {
  .user-widget { top: 18px; right: 22px; }
}
.user-widget[data-state="loading"] > * { display: none !important; }
/* Hide the user widget whenever a modal dialog is open. Avoids any chance
   of it sitting on top of the dialog on iOS Safari (where the dialog's
   top-layer promotion is unreliable). */
body.dialog-open .user-widget { display: none; }
body.dialog-open .anon-counter { display: none; }

.user-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  background: rgba(124, 58, 237, 0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
@media (min-width: 700px) {
  .user-signin-btn { background: rgba(255,255,255,0.18); backdrop-filter: blur(10px); }
}
.user-signin-btn:hover { background: rgba(124, 58, 237, 1); transform: translateY(-1px); }
.user-signin-btn span { white-space: nowrap; }
@media (max-width: 380px) {
  .user-signin-btn { padding: 8px 10px; font-size: 0.78rem; }
}

.user-chip { position: relative; }
.user-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.95);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15,13,35,0.18);
  min-height: 40px;
  font-family: inherit;
}
.user-chip-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #ede9fe;
}
.user-chip-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) { .user-chip-name { display: none; } }
.user-chip-caret { color: var(--muted); font-size: 0.7rem; }

.user-menu {
  /* Lives as a direct child of <body> (moved there by script.js) so its
     z-index isn't trapped inside the .user-widget stacking context.
     Always fixed so it tracks the viewport regardless of page scroll. */
  position: fixed;
  top: 60px;
  right: 12px;
  width: min(280px, calc(100vw - 24px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15,13,35,0.25);
  border: 1px solid var(--border);
  overflow: hidden;
  /* Above sticky search bar (50), anon counter (40), and user-widget (200). */
  z-index: 500;
}
@media (min-width: 561px) {
  .user-menu { top: 64px; right: 22px; width: 280px; }
}
.user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: #faf9ff;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.user-menu-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-menu-head > div { min-width: 0; flex: 1; }
.user-menu-head > div > div:first-child {
  font-weight: 700; color: var(--ink); font-size: 0.9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-email {
  color: var(--muted); font-size: 0.75rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}
.user-menu-item:hover { background: #f3f0ff; color: var(--primary-dark); }
.user-menu-item i { width: 16px; color: var(--primary-dark); }

/* Credit balance line inside dropdown */
.credit-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: #7c2d12;
}
.credit-line i { color: #d97706; }
.credit-line strong { font-size: 1.05rem; color: #92400e; }
.credit-line.low { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #7f1d1d; }
.credit-line.low i, .credit-line.low strong { color: #b91c1c; }
.credit-line-buy {
  background: #d97706;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}
.credit-line-buy:hover { background: #b45309; }
.credit-line.low .credit-line-buy { background: #dc2626; }
.credit-line.low .credit-line-buy:hover { background: #b91c1c; }

/* Container that stacks the monthly + wallet rows in the user-menu */
.credit-stack { display: flex; flex-direction: column; }
.credit-line { border-bottom: 0; }
.wallet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: #4c1d95;
}
.wallet-line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-line-main { display: inline-flex; align-items: center; gap: 6px; }
.wallet-line-main i { color: #7c3aed; }
.wallet-line-main strong { font-size: 1.05rem; color: #5b21b6; }
.wallet-line-sub { font-size: 0.72rem; font-weight: 500; opacity: 0.75; }
.credit-line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.credit-line-main { display: inline-flex; align-items: center; gap: 6px; }
.credit-line-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  color: #92400e;
  opacity: 0.85;
}
.credit-line-next i { font-size: 0.72rem; color: #b45309; }
.credit-line.low .credit-line-next { color: #b91c1c; }
.credit-line.low .credit-line-next i { color: #dc2626; }

/* Generic spinner — works on light + dark backgrounds via currentColor */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}
/* Inline loader replacing the count "—" while we fetch */
.credit-loading { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -3px; }

/* Copy button loading state */
.copy-btn.loading, .btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}
.copy-btn.loading .spinner, .btn-primary.loading .spinner { color: currentColor; }

/* Credit pill on the user chip (avatar button) */
.user-chip-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 2px;
}
.user-chip-credit i { font-size: 0.65rem; }
.user-chip-credit.low { background: linear-gradient(135deg, #f87171, #dc2626); }

/* Buy credits dialog */
.buy-dialog { width: min(520px, 94vw); }
.buy-status {
  text-align: center;
  padding: 10px 20px 4px;
  font-size: 0.95rem;
  color: var(--ink);
}
.buy-status strong { color: var(--primary-dark); font-size: 1.1rem; }
.buy-status-split {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 20px 4px;
  align-items: stretch;
}
.buy-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.buy-status-row i { color: var(--primary); margin-right: 4px; }
.buy-status-row strong { font-size: 1rem; color: var(--primary-dark); }
.pack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px 20px 6px;
}
@media (min-width: 480px) { .pack-grid { grid-template-columns: repeat(4, 1fr); } }
.pack-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 10px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pack-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(124,58,237,0.18);
}
.pack-card.popular { border-color: #f59e0b; }
.pack-card.popular:hover { border-color: #d97706; }
.pack-card.best-value { border-color: #10b981; }
.pack-card.best-value:hover { border-color: #059669; }
.pack-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pack-card.best-value .pack-tag { background: #10b981; }
/* Cyan-teal — clearly distinct from the brand purple, fits the warm→cool
   value progression (amber → teal → green). */
.pack-tag.savings { background: #0891b2; }
.pack-card[data-amount="250"] { border-color: #67e8f9; }
.pack-card[data-amount="250"]:hover,
.pack-card[data-amount="250"]:focus-visible { border-color: #0891b2; }
.pack-card[data-amount="250"] .pack-rate { color: #0e7490; }

/* Strong focus state for keyboard / touch — single-gesture commit means
   the user needs a clear visual on the card they're about to commit to. */
.pack-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.pack-card:active {
  transform: translateY(-1px) scale(0.985);
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}
.pack-cred { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.pack-label { font-size: 0.72rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.pack-price { margin-top: 10px; font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.pack-rate { margin-top: 4px; font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.pack-card.popular .pack-rate { color: #d97706; }
.pack-card.best-value .pack-rate { color: #059669; }
.buy-foot {
  margin: 0;
  padding: 12px 20px 18px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  transition: color 0.2s, background 0.2s;
}
.buy-foot i { color: #25d366; }
.buy-foot.active {
  color: var(--ink);
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}
.buy-foot.active strong { color: #047857; }

/* ===== Auth dialog ===== */
.auth-dialog .auth-body { padding: 0 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.auth-step { display: flex; flex-direction: column; gap: 12px; }
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  background: #fff;
  color: #1f1f1f;
  border: 1.5px solid #dadce0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}
.google-btn:hover { background: #f8f9fa; box-shadow: 0 4px 12px rgba(60,64,67,0.12); }
.google-btn[disabled] { opacity: 0.7; cursor: progress; }
.auth-tiny { color: var(--muted); font-size: 0.78rem; margin: 0; text-align: center; }
.auth-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f3f0ff;
  border-radius: 12px;
}
.auth-profile img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #ddd; }
.auth-name { font-weight: 700; font-size: 0.92rem; }
.auth-email { color: var(--muted); font-size: 0.8rem; word-break: break-all; }
.phone-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.phone-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f3f0ff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border-right: 1.5px solid var(--border);
}
.phone-row input { flex: 1; border: 0; padding: 11px 14px; font-family: inherit; font-size: 0.95rem; outline: none; background: transparent; }
.auth-error { color: #b91c1c; background: #fee2e2; border-radius: 8px; padding: 8px 12px; margin: 0; font-size: 0.85rem; }
.btn-primary[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }

/* Stats grid (profile dialog) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-card {
  background: linear-gradient(135deg, #f3f0ff, #ede9fe);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Danger zone (delete account) */
.danger-zone {
  margin-top: 6px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}
.danger-zone h4 {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.danger-zone p { margin: 0 0 10px; font-size: 0.82rem; color: #7f1d1d; line-height: 1.4; }
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: #dc2626;
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.2s, transform 0.15s;
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Copy history list */
.history-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  max-height: 50vh;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #faf9ff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.history-meta { flex: 1; min-width: 0; }
.history-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-time { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.history-copy {
  flex-shrink: 0;
  background: var(--primary-dark);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.history-copy:hover { background: var(--primary); }
.history-copy:disabled { opacity: 0.5; cursor: not-allowed; }
.history-empty { color: var(--muted); text-align: center; padding: 24px 12px; font-size: 0.9rem; }

/* ===== EMPTY ===== */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 1.05rem;
}

/* ===== LIGHTBOX (native <dialog>) ===== */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(15, 13, 35, 0.92); }
@media (min-width: 700px) {
  .lightbox::backdrop { background: rgba(15, 13, 35, 0.85); backdrop-filter: blur(6px); }
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 700px) {
  .lightbox-close { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); }
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 30px);
  background: #1f1b3b;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 28px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--card);
}
footer a { color: var(--primary-dark); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }

/* ============================================================
   Reduced-motion preference — disables non-essential animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Dark mode — system preference (prefers-color-scheme: dark)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --primary:      #a78bfa;
    --primary-dark: #818cf8;
    --ink:          #e7e4f5;
    --muted:        #a8a4c9;
    --bg:           #0f0e1a;
    --card:         #1a1830;
    --border:       #2d2a4a;
    --shadow:       0 10px 30px rgba(0, 0, 0, 0.45);
  }
  /* Containers / surfaces that referenced literal hex */
  .ph-dialog                { background: var(--card); }
  .ph-dialog-actions        { background: #15132b; border-top-color: var(--border); }
  .ph-dialog-close          { background: #2a2748; color: #cfc9ee; }
  .ph-dialog-close:hover    { background: #3a3760; }
  .ph-field input,
  .phone-row                { background: var(--bg); color: var(--ink); border-color: var(--border); }
  .phone-prefix             { background: #2a2748; color: #cfc9ee; border-right-color: var(--border); }
  .google-btn               { background: #1e1c38; color: #e7e4f5; border-color: #3d3a5a; }
  .google-btn:hover         { background: #2a2748; }
  .auth-profile             { background: #1e1c38; }
  .stat-card                { background: linear-gradient(135deg, #1e1c38, #2a2748); }
  .stat-value               { color: var(--primary); }
  .danger-zone              { background: #2a1515; border-color: #5b1a1a; }
  .danger-zone h4           { color: #fda4a4; }
  .danger-zone p            { color: #f0a8a8; }
  .history-item             { background: #1e1c38; border-color: var(--border); }
  .history-title            { color: var(--ink); }
  .user-menu                { background: var(--card); border-color: var(--border); }
  .user-menu-head           { background: #15132b; border-bottom-color: var(--border); }
  .user-menu-head > div > div:first-child { color: var(--ink); }
  .user-menu-item           { background: var(--card); color: var(--ink); }
  .user-menu-item:hover     { background: #2a2748; color: var(--primary); }
  .user-menu-item i         { color: var(--primary); }
  .search-wrap              { background: var(--bg); border-bottom-color: var(--border); }
  .search-box input         { background: var(--card); color: var(--ink); border-color: var(--border); }
  .filter-chip              { background: var(--card); color: var(--muted); border-color: var(--border); }
  .filter-chip:not(.active):hover { color: var(--primary); border-color: var(--primary); }
  .filter-chip:not(.active) .filter-count { background: #2a2748; color: var(--primary); }
  footer                    { background: #0a0915; border-top-color: var(--border); }
  .card-p                   { background: var(--card); border-color: var(--border); }
  .card-img                 { background: linear-gradient(135deg, #2a2748, #1e1c38); }
  .card-notes               { background: #2a1f00; border-left-color: #b45309; color: #fbbf24; }
  .copy-stat                { background: linear-gradient(135deg, #2a1f00, #3d2e00); color: #fbbf24; border-color: rgba(217,119,6,0.35); }
  .copy-stat i              { color: #fb923c; }
  .pack-card                { background: var(--card); border-color: var(--border); }
  .pack-card:hover          { border-color: var(--primary); }
  .pack-price               { color: var(--ink); }
  .pack-cred                { color: var(--primary); }
  .toast                    { background: #2a2748; }
  .user-chip-btn            { background: #2a2748; color: var(--ink); }
  .user-chip-name           { color: var(--ink); }
  .user-chip-caret          { color: var(--muted); }
  .anon-counter             { background: linear-gradient(135deg, #2a1f00, #3d2e00); border-bottom-color: rgba(217,119,6,0.3); }
  .anon-counter-text        { color: #fbbf24; }
  .anon-counter-text strong { color: #fde68a; }
  .anon-counter-icon        { background: rgba(251,191,36,0.18); color: #fbbf24; }
  .anon-counter.warn        { background: linear-gradient(135deg, #3a1414, #4a1818); }
  .anon-counter.warn .anon-counter-text,
  .anon-counter.gone .anon-counter-text { color: #fda4a4; }
  .anon-counter.gone        { background: linear-gradient(135deg, #4a1818, #5a1414); }
  .credit-line              { background: linear-gradient(135deg, #2a1f00, #3d2e00); color: #fde68a; border-bottom-color: var(--border); }
  .credit-line strong       { color: #fef3c7; }
  .credit-line.low          { background: linear-gradient(135deg, #3a1414, #4a1818); color: #fda4a4; }
  .credit-line-next         { color: #fcd34d; }
  .credit-line-next i       { color: #fbbf24; }
  .credit-line.low .credit-line-next { color: #fda4a4; }
  .wallet-line              { background: linear-gradient(135deg, #1f1a3a, #2a2256); color: #c4b5fd; border-bottom-color: var(--border); }
  .wallet-line-main i       { color: #a78bfa; }
  .wallet-line-main strong  { color: #ddd6fe; }
  .wallet-line-sub          { color: rgba(196,181,253,0.7); }
  .buy-status-row           { background: rgba(124,58,237,0.10); border-color: rgba(124,58,237,0.25); color: var(--ink); }
  .buy-status-row strong    { color: #c4b5fd; }
}
