/* ================================================================
   EXP / Level / Title badge styles
   Pure additive — does not override existing classes.
   ================================================================ */

.exp-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

/* ================================================================
   TITLE BADGES — refined, hand-tuned palettes
   One consistent pill shape + icon slot; each tier has its own
   professional color story (no rainbow, no neon).
   ================================================================ */

.exp-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.02em;
  border-radius: 8px;
  vertical-align: middle;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.exp-title .exp-title__icon {
  font-size: 0.78em;
  line-height: 1;
  opacity: 0.95;
  flex-shrink: 0;
}

.exp-title .exp-title__label {
  display: inline-block;
}

/* Plain — quiet slate, for entry titles */
.exp-title--plain {
  background: color-mix(in srgb, #94a3b8 14%, transparent);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.32);
}

/* Shine — brushed graphite / steel */
.exp-title--shine {
  background: linear-gradient(160deg, #303a4b 0%, #1e2634 100%);
  color: #dbe3ee;
  border-color: rgba(203, 213, 225, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* Glow — warm antique gold */
.exp-title--glow {
  background: linear-gradient(160deg, #4a3411 0%, #2a1e0a 100%);
  color: #f6d99a;
  border-color: rgba(217, 168, 74, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 224, 160, 0.16);
}

/* Rainbow (legacy name) — refined teal → indigo duotone */
.exp-title--rainbow {
  background: linear-gradient(135deg, #123c47 0%, #1d2b52 100%);
  color: #b8e6e2;
  border-color: rgba(94, 190, 190, 0.45);
  box-shadow: inset 0 1px 0 rgba(180, 255, 245, 0.12);
}

/* Legend — obsidian with an amber rim, the apex reading tier */
.exp-title--legend {
  background: linear-gradient(135deg, #1c1608 0%, #0f1116 60%, #221a09 100%);
  color: #f3d28a;
  border-color: rgba(214, 168, 74, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 160, 0.18),
    0 0 0 1px rgba(214, 168, 74, 0.14);
}

/* Silver — First Comment */
.exp-title--silver {
  background: linear-gradient(160deg, #3a4150 0%, #232935 100%);
  color: #e2e8f0;
  border-color: rgba(203, 213, 225, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Gold — Discussion Starter */
.exp-title--gold {
  background: linear-gradient(160deg, #453309 0%, #241a05 100%);
  color: #f2cf87;
  border-color: rgba(212, 165, 68, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.16);
}

/* Emerald — Loyal Commenter */
.exp-title--emerald {
  background: linear-gradient(160deg, #0d3a2c 0%, #07211a 100%);
  color: #a7e6cd;
  border-color: rgba(72, 187, 145, 0.48);
  box-shadow: inset 0 1px 0 rgba(167, 230, 205, 0.14);
}

/* Sapphire — Community Voice */
.exp-title--sapphire {
  background: linear-gradient(160deg, #12294f 0%, #0a1730 100%);
  color: #b5d0f5;
  border-color: rgba(96, 149, 230, 0.48);
  box-shadow: inset 0 1px 0 rgba(181, 208, 245, 0.14);
}

/* Crimson — Legend of Comments */
.exp-title--crimson {
  background: linear-gradient(160deg, #4a1418 0%, #260a0d 100%);
  color: #f0b3b3;
  border-color: rgba(200, 82, 82, 0.52);
  box-shadow: inset 0 1px 0 rgba(240, 179, 179, 0.14);
}

/* Reviewer — deep amethyst prestige */
.exp-title--reviewer {
  background: linear-gradient(160deg, #2a1a4d 0%, #150d29 100%);
  color: #ceb8f5;
  border-color: rgba(150, 112, 224, 0.5);
  box-shadow: inset 0 1px 0 rgba(206, 184, 245, 0.14);
  letter-spacing: 0.05em;
}

/* Critic — etched platinum on ink */
.exp-title--critic {
  background: linear-gradient(160deg, #161b24 0%, #0b0e14 100%);
  color: #e8edf5;
  border-color: rgba(163, 178, 199, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(148, 163, 184, 0.14);
  letter-spacing: 0.05em;
}
.exp-title--critic .exp-title__icon { color: #e6c774; }
.exp-title--legend .exp-title__icon { color: #e2b366; }
.exp-title--glow .exp-title__icon,
.exp-title--gold .exp-title__icon { color: #e6bf6f; }

/* Light theme — swap the ink fills for soft tinted surfaces */
[data-theme="light"] .exp-title--plain {
  background: #f1f5f9; color: #475569; border-color: #cbd5e1;
}
[data-theme="light"] .exp-title--shine {
  background: #eef2f7; color: #334155; border-color: #c3cede;
}
[data-theme="light"] .exp-title--glow,
[data-theme="light"] .exp-title--gold {
  background: #fdf5e3; color: #8a6320; border-color: #e2c68a;
}
[data-theme="light"] .exp-title--rainbow {
  background: #e8f4f4; color: #1f5a63; border-color: #a8d3d6;
}
[data-theme="light"] .exp-title--legend {
  background: #f7efdd; color: #7a5a15; border-color: #d9bd7d;
}
[data-theme="light"] .exp-title--silver {
  background: #f1f4f8; color: #3b4557; border-color: #cbd5e1;
}
[data-theme="light"] .exp-title--emerald {
  background: #e7f6ef; color: #1a6b4f; border-color: #a2d8bf;
}
[data-theme="light"] .exp-title--sapphire {
  background: #e8f0fc; color: #1e4a8a; border-color: #aac6ee;
}
[data-theme="light"] .exp-title--crimson {
  background: #fbeaea; color: #8e2427; border-color: #e6adad;
}
[data-theme="light"] .exp-title--reviewer {
  background: #f1ebfc; color: #52309c; border-color: #c9b3ee;
}
[data-theme="light"] .exp-title--critic {
  background: #eef1f6; color: #1f2937; border-color: #b9c4d4;
}
[data-theme="light"] .exp-title--critic .exp-title__icon { color: #a3801f; }
[data-theme="light"] .exp-title--legend .exp-title__icon,
[data-theme="light"] .exp-title--glow .exp-title__icon,
[data-theme="light"] .exp-title--gold .exp-title__icon { color: #b08424; }

@media (prefers-reduced-motion: reduce) {
  .exp-title { transition: none; }
}

/* ----- Profile EXP bar ----- */
.exp-bar {
  position: relative;
  height: 14px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.exp-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.exp-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 6px;
}

/* ----- Titles grid + cards (profile modal) ----- */
.titles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px;
}
.title-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  min-height: 128px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.title-card:hover { border-color: rgba(148, 163, 184, 0.34); transform: translateY(-1px); }
.title-card .exp-title { margin-left: 0; }
.title-card.locked { opacity: 0.55; }
.title-card.locked:hover { transform: none; }
.title-card.selected {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.07);
}
.title-card__meta {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted, #94a3b8);
}
.title-card__meta i { margin-right: 4px; opacity: 0.8; }
.title-card__btn {
  margin-top: auto;
  width: 100%;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary, #e5e7eb);
  border: 1px solid rgba(148, 163, 184, 0.3);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.title-card__btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.5);
}
.title-card.selected .title-card__btn {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.55);
  color: #ddd0f7;
}
.title-card__btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Section headers inside the titles modal */
.titles-section { margin-top: 26px; }
.titles-section:first-child { margin-top: 4px; }
.titles-section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.titles-section__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary, #e5e7eb);
}
.titles-section__count {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}
.titles-section__desc {
  margin: -6px 0 14px;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}
[data-theme="light"] .title-card { background: rgba(15, 23, 42, 0.02); border-color: rgba(15, 23, 42, 0.1); }
[data-theme="light"] .title-card__btn { color: #1f2937; border-color: rgba(15, 23, 42, 0.16); }

/* ----- Comment author link with title ----- */
.comment-author-link {
  color: inherit;
  text-decoration: none;
}
.comment-author-link:hover { text-decoration: underline; }

/* Leaderboard row */
.lb-row {
  display: grid;
  grid-template-columns: 40px 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15,23,42,0.3);
  margin-bottom: 8px;
}
.lb-row__rank { font-weight: 800; color: #c4b5fd; text-align: center; }
.lb-row__rank--1 { color: #facc15; }
.lb-row__rank--2 { color: #d1d5db; }
.lb-row__rank--3 { color: #fb923c; }
.lb-row__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.lb-row__name { font-weight: 600; }
.lb-row__exp { font-size: 0.85rem; color: var(--text-muted, #94a3b8); }

/* ================================================================
   Leaderboard 2.0 — premium layout, Top-3 podium, rank badges
   ================================================================ */

.lbx-container { max-width: 900px; }

/* --- Hero header --- */
.lbx-hero { text-align: center; padding: 8px 0 28px; }
.lbx-hero__icon {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; font-size: 1.5rem; color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.25);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.15);
}
.lbx-hero__icon[data-lb-badge="reputation"] {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.18);
}
.lbx-hero__icon[data-lb-badge="followers"] {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.18);
}
.lbx-hero__title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.lbx-hero__sub { color: var(--text-muted, #94a3b8); max-width: 520px; margin: 0 auto; }

.lbx-loading { text-align: center; padding: 48px 0; color: var(--text-muted, #94a3b8); }
.lbx-empty {
  text-align: center; padding: 56px 16px; color: var(--text-muted, #94a3b8);
  border: 1px dashed rgba(148, 163, 184, 0.25); border-radius: 16px;
}
.lbx-empty i { font-size: 1.8rem; margin-bottom: 12px; display: block; opacity: .7; }
.lbx-empty__hint { font-size: .85rem; opacity: .8; }

/* --- Top 3 podium --- */
.lbx-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}
.lbx-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; text-decoration: none; color: inherit;
  padding: 40px 16px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 27, 55, 0.55), rgba(15, 23, 42, 0.45));
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: lbxRise .5s ease both;
}
.lbx-card:hover { transform: translateY(-4px); }
.lbx-card--1 {
  padding-top: 48px; padding-bottom: 30px;
  border-color: rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 32px rgba(250, 204, 21, 0.12), 0 12px 40px rgba(0, 0, 0, 0.35);
  animation-delay: .05s;
}
.lbx-card--1:hover { box-shadow: 0 0 46px rgba(250, 204, 21, 0.22), 0 16px 44px rgba(0, 0, 0, 0.4); }
.lbx-card--2 { border-color: rgba(209, 213, 219, 0.28); box-shadow: 0 0 22px rgba(209, 213, 219, 0.08); animation-delay: .12s; }
.lbx-card--3 { border-color: rgba(251, 146, 60, 0.3); box-shadow: 0 0 22px rgba(251, 146, 60, 0.1); animation-delay: .18s; }

@keyframes lbxRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Floating rank chip */
.lbx-card__rank {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  min-width: 40px; height: 40px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 50%;
  font-weight: 800; font-size: 1.05rem;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}
.lbx-card__rank--1 {
  color: #1a1203;
  background: linear-gradient(135deg, #fde047, #f59e0b 60%, #d97706);
  border-color: rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.55), 0 0 36px rgba(249, 115, 22, 0.3);
  animation: lbxGoldPulse 2.2s ease-in-out infinite;
}
.lbx-card__rank--2 {
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1 60%, #94a3b8);
  border-color: rgba(226, 232, 240, 0.7);
  box-shadow: 0 0 14px rgba(203, 213, 225, 0.5);
  animation: lbxSilverPulse 2.6s ease-in-out infinite;
}
.lbx-card__rank--3 {
  color: #1c0a02;
  background: linear-gradient(135deg, #fdba74, #ea580c 60%, #9a3412);
  border-color: rgba(251, 146, 60, 0.7);
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.5);
  animation: lbxBronzePulse 2.6s ease-in-out infinite;
}
.lbx-rank-flame i {
  font-size: .8rem;
  color: #7c2d12;
  animation: lbFlameFlicker 1.1s ease-in-out infinite alternate;
  transform-origin: 50% 90%;
}
.lbx-rank-icon i { font-size: .8rem; transform-origin: 50% 90%; }
.lbx-rank-icon--topReader i { color: #7c2d12; animation: lbFlameFlicker 1.1s ease-in-out infinite alternate; }
.lbx-rank-icon--reputation i { color: #1e1b4b; animation: lbxRepTwinkle 2.4s ease-in-out infinite; }
.lbx-rank-icon--followers i { color: #064e3b; animation: lbxCrestGleam 3s ease-in-out infinite; }
.lbx-card__rank--reputation.lbx-card__rank--1 {
  color: #0b1220;
  background: linear-gradient(135deg, #a5f3fc 0%, #38bdf8 45%, #6366f1 100%);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55), 0 0 36px rgba(99, 102, 241, 0.28);
  border-radius: 8px;
}
.lbx-card__rank--followers.lbx-card__rank--1 {
  color: #052e1a;
  background: linear-gradient(135deg, #a7f3d0 0%, #34d399 50%, #059669 100%);
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.55), 0 0 36px rgba(5, 150, 105, 0.28);
  border-radius: 8px 8px 18px 18px / 8px 8px 24px 24px;
}

/* Avatars */
.lbx-card__avatar-wrap {
  border-radius: 22px; padding: 3px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0.1));
}
.lbx-card__avatar-wrap--1 {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 0 26px rgba(250, 204, 21, 0.4);
}
.lbx-card__avatar-wrap--reputation.lbx-card__avatar-wrap--1 {
  background: linear-gradient(135deg, #a5f3fc, #6366f1);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
}
.lbx-card__avatar-wrap--followers.lbx-card__avatar-wrap--1 {
  background: linear-gradient(135deg, #a7f3d0, #059669);
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.35);
}
.lbx-card__avatar-wrap--2 { background: linear-gradient(135deg, #f1f5f9, #94a3b8); box-shadow: 0 0 18px rgba(203, 213, 225, 0.3); }
.lbx-card__avatar-wrap--3 { background: linear-gradient(135deg, #fdba74, #c2410c); box-shadow: 0 0 18px rgba(234, 88, 12, 0.3); }
.lbx-card__avatar {
  display: block; width: 86px; height: 86px;
  border-radius: 19px; object-fit: cover;
  background: #0c0c14;
}
.lbx-card--1 .lbx-card__avatar { width: 104px; height: 104px; }

.lbx-card__name {
  font-weight: 800; font-size: 1.02rem; margin-bottom: 6px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lbx-card--1 .lbx-card__name { font-size: 1.15rem; }
.lbx-card__badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 10px; min-height: 18px; }
.lbx-card__exp { font-weight: 800; font-size: 1.05rem; color: #fb923c; }
.lbx-card--1 .lbx-card__exp { font-size: 1.2rem; }
.lbx-card__exp i { animation: lbFlameFlicker 1.3s ease-in-out infinite alternate; }
.lbx-card__exp--reputation { color: #93c5fd; }
.lbx-card__exp--reputation i { animation: lbxRepTwinkle 2.4s ease-in-out infinite; }
.lbx-card__exp--followers { color: #6ee7b7; }
.lbx-card__exp--followers i { animation: lbxCrestGleam 3s ease-in-out infinite; }
.lbx-card__meta { margin-top: 4px; font-size: .8rem; color: var(--text-muted, #94a3b8); }

/* --- Ranks 4-100 list --- */
.lbx-list {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.35);
}
.lbx-row {
  display: grid;
  grid-template-columns: 52px 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background .18s ease;
}
.lbx-row:last-child { border-bottom: none; }
.lbx-row:hover { background: rgba(139, 92, 246, 0.08); }
.lbx-row__rank {
  font-weight: 800; text-align: center; color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums; font-size: 1rem;
}
.lbx-row__avatar {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  background: #0c0c14; border: 1px solid rgba(148, 163, 184, 0.15);
}
.lbx-row__info { min-width: 0; }
.lbx-row__name {
  font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lbx-row__meta { font-size: .78rem; color: var(--text-muted, #94a3b8); margin-top: 2px; }
.lbx-row__exp {
  font-weight: 800; color: #fb923c; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lbx-row__exp--reputation { color: #93c5fd; }
.lbx-row__exp--followers { color: #6ee7b7; }
.lbx-row__exp i { margin-right: 4px; }

/* --- Responsive --- */
@media (max-width: 720px) {
  .lbx-podium { grid-template-columns: 1fr; gap: 26px; align-items: stretch; }
  .lbx-card--1 { order: 1; }
  .lbx-card--2 { order: 2; }
  .lbx-card--3 { order: 3; }
  .lbx-hero__title { font-size: 1.6rem; }
  .lbx-row { grid-template-columns: 36px 40px minmax(0, 1fr) auto; padding: 10px 12px; gap: 10px; }
  .lbx-row__avatar { width: 40px; height: 40px; }
}

/* ================================================================
   Top-100 leaderboard rank badges
   Shown next to usernames in comments, replies, discussions,
   reviews and profiles. Top 3 are animated; 4-100 are clean chips.
   ================================================================ */
.lb-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; letter-spacing: .3px;
  line-height: 1.5; white-space: nowrap; vertical-align: middle;
}
.lb-badge__num { font-variant-numeric: tabular-nums; }
.lb-badge__icon i {
  font-size: .66rem;
  transform-origin: 50% 90%;
}

/* ===== Category: Top Reader (fire theme, unchanged) ===== */
.lb-badge--topReader .lb-badge__icon i {
  animation: lbFlameFlicker 1.1s ease-in-out infinite alternate;
}
.lb-badge--topReader-gold {
  color: #1a1203;
  background: linear-gradient(135deg, #fde047, #f59e0b 55%, #d97706);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.55), 0 0 22px rgba(249, 115, 22, 0.3);
  animation: lbxGoldPulse 2.2s ease-in-out infinite;
}
.lb-badge--topReader-gold .lb-badge__icon i { color: #7c2d12; }
.lb-badge--topReader-silver {
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1 55%, #94a3b8);
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.5);
  animation: lbxSilverPulse 2.6s ease-in-out infinite;
}
.lb-badge--topReader-silver .lb-badge__icon i { color: #334155; }
.lb-badge--topReader-bronze {
  color: #1c0a02;
  background: linear-gradient(135deg, #fdba74, #ea580c 60%, #9a3412);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.45);
  animation: lbxBronzePulse 2.6s ease-in-out infinite;
}
.lb-badge--topReader-bronze .lb-badge__icon i { color: #431407; }
.lb-badge--topReader-chip {
  color: #fdba74;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
}
.lb-badge--topReader-chip i { font-size: .58rem; opacity: .85; }

/* ===== Category: Reputation (star + gem, cool blue/violet gradient) =====
   Hex-clipped, jewel-like look that reads clearly as an achievement badge
   and does NOT share the fire palette of Top Reader. */
.lb-badge--reputation {
  border-radius: 4px;                 /* squared "gem" chip */
  padding: 1px 8px;
  position: relative;
}
.lb-badge--reputation .lb-badge__icon i {
  animation: lbxRepTwinkle 2.4s ease-in-out infinite;
}
.lb-badge--reputation-gold {
  color: #0b1220;
  background: linear-gradient(135deg, #a5f3fc 0%, #38bdf8 45%, #6366f1 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.55), 0 0 22px rgba(99, 102, 241, 0.35);
  animation: lbxRepPulseGold 2.4s ease-in-out infinite;
}
.lb-badge--reputation-gold .lb-badge__icon i { color: #1e1b4b; }
.lb-badge--reputation-silver {
  color: #0b1220;
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 55%, #60a5fa 100%);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.45);
  animation: lbxRepPulseSilver 2.8s ease-in-out infinite;
}
.lb-badge--reputation-silver .lb-badge__icon i { color: #1e3a8a; }
.lb-badge--reputation-bronze {
  color: #0b1220;
  background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 55%, #6d28d9 100%);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
  animation: lbxRepPulseBronze 2.8s ease-in-out infinite;
}
.lb-badge--reputation-bronze .lb-badge__icon i { color: #1e1b4b; }
.lb-badge--reputation-chip {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}
.lb-badge--reputation-chip i { font-size: .58rem; opacity: .9; }

/* ===== Category: Followers (winged shield / crest, warm rose/emerald) =====
   Pointed crest silhouette via clip-path so it's instantly distinguishable
   from both the rounded flame chip (Top Reader) and the squared jewel
   chip (Reputation). */
.lb-badge--followers {
  border-radius: 3px 3px 12px 12px / 3px 3px 20px 20px;
  padding: 2px 9px 3px;
}
.lb-badge--followers .lb-badge__icon i {
  animation: lbxCrestGleam 3s ease-in-out infinite;
}
.lb-badge--followers-gold {
  color: #052e1a;
  background: linear-gradient(135deg, #a7f3d0 0%, #34d399 50%, #059669 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55), 0 0 22px rgba(5, 150, 105, 0.35);
  animation: lbxFolPulseGold 2.4s ease-in-out infinite;
}
.lb-badge--followers-gold .lb-badge__icon i { color: #064e3b; }
.lb-badge--followers-silver {
  color: #14100a;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 55%, #b45309 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  animation: lbxFolPulseSilver 2.8s ease-in-out infinite;
}
.lb-badge--followers-silver .lb-badge__icon i { color: #78350f; }
.lb-badge--followers-bronze {
  color: #2b0813;
  background: linear-gradient(135deg, #fecdd3 0%, #fb7185 55%, #be123c 100%);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.45);
  animation: lbxFolPulseBronze 2.8s ease-in-out infinite;
}
.lb-badge--followers-bronze .lb-badge__icon i { color: #4c0519; }
.lb-badge--followers-chip {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 3px 3px 10px 10px / 3px 3px 16px 16px;
}
.lb-badge--followers-chip i { font-size: .58rem; opacity: .9; }

/* ===== Category: Verified (email verification shield) =====
   Rendered in the same `.lb-badge` stack as the Karma / Followers badges.
   Distinct sky/cyan shield look so it never reads as a rank badge. */
.lb-badge--verified {
  border-radius: 999px;
  padding: 1px 8px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.22);
}
.lb-badge--verified .lb-badge__icon i {
  color: #38bdf8;
  font-size: .66rem;
  animation: lbxVerifiedGleam 3s ease-in-out infinite;
}
@keyframes lbxVerifiedGleam {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 4px rgba(56, 189, 248, .85)); transform: scale(1.08); }
}
:root[data-theme="light"] .lb-badge--verified,
[data-theme="light"] .lb-badge--verified { color: #0369a1; background: rgba(14, 165, 233, 0.1); }

:root[data-theme="light"] .lb-badge--topReader-chip,
[data-theme="light"] .lb-badge--topReader-chip { color: #c2410c; background: rgba(249, 115, 22, 0.1); }
:root[data-theme="light"] .lb-badge--reputation-chip,
[data-theme="light"] .lb-badge--reputation-chip { color: #1d4ed8; background: rgba(59, 130, 246, 0.1); }
:root[data-theme="light"] .lb-badge--followers-chip,
[data-theme="light"] .lb-badge--followers-chip { color: #047857; background: rgba(16, 185, 129, 0.1); }

/* --- Shared animations --- */
@keyframes lbFlameFlicker {
  0%   { transform: scale(1) rotate(-3deg); opacity: .85; }
  45%  { transform: scale(1.18) rotate(2deg); opacity: 1; }
  100% { transform: scale(1.05) rotate(-2deg); opacity: .92; }
}
@keyframes lbxGoldPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(250, 204, 21, 0.55), 0 0 22px rgba(249, 115, 22, 0.3); }
  50%      { box-shadow: 0 0 16px rgba(250, 204, 21, 0.85), 0 0 34px rgba(249, 115, 22, 0.5); }
}
@keyframes lbxSilverPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(203, 213, 225, 0.4); }
  50%      { box-shadow: 0 0 15px rgba(226, 232, 240, 0.75); }
}
@keyframes lbxBronzePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(234, 88, 12, 0.35); }
  50%      { box-shadow: 0 0 15px rgba(251, 146, 60, 0.65); }
}
@keyframes lbxRepTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .9; }
  50%      { transform: scale(1.15) rotate(8deg); opacity: 1; }
}
@keyframes lbxRepPulseGold {
  0%, 100% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.55), 0 0 22px rgba(99, 102, 241, 0.35); }
  50%      { box-shadow: 0 0 16px rgba(56, 189, 248, 0.85), 0 0 34px rgba(99, 102, 241, 0.55); }
}
@keyframes lbxRepPulseSilver {
  0%, 100% { box-shadow: 0 0 8px rgba(96, 165, 250, 0.35); }
  50%      { box-shadow: 0 0 15px rgba(147, 197, 253, 0.7); }
}
@keyframes lbxRepPulseBronze {
  0%, 100% { box-shadow: 0 0 8px rgba(129, 140, 248, 0.35); }
  50%      { box-shadow: 0 0 15px rgba(167, 139, 250, 0.65); }
}
@keyframes lbxCrestGleam {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50%      { transform: translateY(-1px); opacity: 1; }
}
@keyframes lbxFolPulseGold {
  0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.55), 0 0 22px rgba(5, 150, 105, 0.35); }
  50%      { box-shadow: 0 0 16px rgba(16, 185, 129, 0.85), 0 0 34px rgba(5, 150, 105, 0.55); }
}
@keyframes lbxFolPulseSilver {
  0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
  50%      { box-shadow: 0 0 15px rgba(253, 224, 71, 0.75); }
}
@keyframes lbxFolPulseBronze {
  0%, 100% { box-shadow: 0 0 8px rgba(244, 63, 94, 0.35); }
  50%      { box-shadow: 0 0 15px rgba(251, 113, 133, 0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-badge, .lbx-card, .lbx-card__rank, .lb-badge__icon i,
  .lbx-rank-flame i, .lbx-rank-icon i, .lbx-card__exp i { animation: none !important; }
}

/* ---------- Leaderboard badge text label (Reader / Reputation / Followers) ----------
   Full badge (profile / user / preview card): icon + label + rank.
   Comment sections use .lb-badge--icon-only which hides the label. */
.lb-badge__label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .3px;
  margin: 0 2px 0 1px;
  text-transform: none;
  line-height: 1;
}
.lb-badge--icon-only .lb-badge__label { display: none; }

/* ---------- Profile / User header: Title + Badges row (below Username) ---------- */
.profile-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin: 6px auto 0;
  max-width: 100%;
  line-height: 1.4;
}
.profile-badges-row:empty { display: none; }
.profile-badges-row > span:empty { display: none; }
@media (max-width: 480px) {
  .profile-badges-row { gap: 5px 6px; }
}
[data-theme="light"] .title-card.selected {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.06);
}
[data-theme="light"] .title-card.selected .title-card__btn {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.45);
  color: #5b21b6;
}

/* =====================================================================
   Additional equipped Titles (multi-title equip)
   ---------------------------------------------------------------------
   One Title per category may be equipped at the same time. The FIRST
   equipped Title is the public/primary one and keeps rendering inline
   beside the username everywhere. The remaining equipped Titles are
   rendered in this row and appear ONLY on the Profile Preview Card,
   profile.html and user.html.
   ===================================================================== */
.exp-titles-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.exp-titles-extra:empty { display: none; }
.exp-titles-extra[data-label]::before {
  content: attr(data-label);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #8b8b9e);
  margin-right: 2px;
}
.exp-titles-extra .exp-title {
  transform: scale(0.92);
  transform-origin: left center;
}

.profile-extra-titles { margin-top: 6px; }
.profile-extra-titles:empty { display: none; }

.mp-pp-body > .exp-titles-extra {
  margin-top: 6px;
  justify-content: center;
}

/* ---- Multi-equip: title card actions + equipped priority list ---- */
.title-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.title-card__actions .title-card__btn { flex: 1 1 auto; }
.title-card__btn--ghost { background: transparent; opacity: 0.85; }
.title-card__equipped {
  font-size: 0.72rem;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.title-card.equipped { border-color: rgba(129, 140, 248, 0.45); }

.titles-section--equipped {
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 14px;
  padding: 14px;
  background: rgba(129, 140, 248, 0.06);
}
.titles-section__equipnote { opacity: 0.75; }

.equip-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.equip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.equip-row.is-primary { border-color: rgba(250, 204, 21, 0.45); background: rgba(250, 204, 21, 0.08); }
.equip-row__rank {
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.72rem; font-weight: 700;
  background: rgba(148, 163, 184, 0.22);
}
.equip-row.is-primary .equip-row__rank { background: rgba(250, 204, 21, 0.3); }
.equip-row__cat { font-size: 0.72rem; opacity: 0.7; }
.equip-row__flag { font-size: 0.72rem; opacity: 0.85; margin-left: auto; }
.equip-row__ctrls { display: inline-flex; gap: 4px; }
.equip-row__ctrls button {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.72rem;
}
.equip-row__ctrls button:hover:not(:disabled) { background: rgba(148, 163, 184, 0.18); }
.equip-row__ctrls button:disabled { opacity: 0.35; cursor: not-allowed; }

[data-theme="light"] .equip-row { background: rgba(15, 23, 42, 0.03); border-color: rgba(15, 23, 42, 0.1); }
[data-theme="light"] .title-card__equipped { color: #4f46e5; }
