/* ═══════════════════════════════════════════════════════════════
   PLAYMEET — Profile, Auth, Economy & Rewards Styles
   Premium dark theme with glassmorphism and micro-animations
   ═══════════════════════════════════════════════════════════════ */

:root {
  --pm-accent: #a855f7;
  --pm-accent-soft: rgba(168, 85, 247, 0.15);
  --pm-accent-green: #22c55e;
  --pm-accent-gold: #f59e0b;
  --pm-accent-red: #ef4444;
  --pm-spark-gradient: linear-gradient(135deg, #f59e0b, #f97316, #ef4444);
  --pm-vibe-gradient: linear-gradient(135deg, #a855f7, #6366f1);
  --pm-card-bg: rgba(255, 255, 255, 0.04);
  --pm-card-border: rgba(255, 255, 255, 0.08);
  --pm-card-hover: rgba(255, 255, 255, 0.07);
  --pm-text: #e8e6f0;
  --pm-text-dim: #8b8a94;
  --pm-text-bright: #ffffff;
  --pm-radius: 14px;
  --pm-radius-sm: 8px;
}

/* ── Auth Section ── */

#playmeet-auth-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-auth-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.pm-auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.pm-auth-brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pm-text-bright);
  margin-bottom: 4px;
}

.pm-auth-subtitle {
  font-size: 0.82rem;
  color: var(--pm-text-dim);
  line-height: 1.4;
}

.pm-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--pm-radius-sm);
  background: rgba(255,255,255,0.06);
  color: var(--pm-text-bright);
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-google-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.pm-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--pm-text-dim);
  font-size: 0.78rem;
}

.pm-auth-divider::before,
.pm-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pm-card-border);
}

.pm-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-email-form input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 10px 14px;
  color: var(--pm-text);
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.pm-email-form input:focus {
  border-color: var(--pm-accent);
}

.pm-email-actions {
  display: flex;
  gap: 8px;
}

.pm-email-actions .btn {
  flex: 1;
}

.pm-auth-error {
  font-size: 0.8rem;
  color: var(--pm-accent-red);
  text-align: center;
  min-height: 18px;
}

.pm-guest-link {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--pm-text-dim);
  cursor: pointer;
  transition: color 0.2s;
}

.pm-guest-link:hover {
  color: var(--pm-accent);
}

/* Signed-in auth card */
.pm-auth-card.pm-signed-in {
  padding: 18px;
}

.pm-auth-card.pm-auth-compact {
  padding: 14px 16px;
}

.pm-auth-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-auth-profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 4px 8px 4px 4px;
  margin: -4px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.pm-auth-profile-link:hover {
  background: rgba(168, 85, 247, 0.08);
}

.pm-auth-status-copy {
  flex: 1;
  min-width: 0;
}

.pm-auth-status-title {
  font-weight: 700;
  color: var(--pm-text-bright);
  font-size: 0.94rem;
}

.pm-auth-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pm-auth-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.pm-auth-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pm-accent);
}

.pm-auth-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.pm-orbit-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0a0a0f;
  background: #555;
}

.pm-orbit-dot.pm-orbit-1 { background: #2dd4bf; }
.pm-orbit-dot.pm-orbit-2 { background: #3b82f6; }
.pm-orbit-dot.pm-orbit-3 { background: #a855f7; }
.pm-orbit-dot.pm-orbit-4 { background: #f59e0b; }
.pm-orbit-dot.pm-orbit-5 { background: linear-gradient(135deg, #f59e0b, #ef4444, #a855f7, #3b82f6); }

.pm-auth-user-info {
  flex: 1;
  min-width: 0;
}

.pm-auth-name {
  font-weight: 600;
  color: var(--pm-text-bright);
  font-size: 0.95rem;
}

.pm-auth-tag {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  font-family: monospace;
}

.pm-spark-badge {
  background: var(--pm-spark-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.pm-auth-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-bottom: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--pm-card-border);
}

.pm-auth-actions {
  display: flex;
  justify-content: flex-end;
}

.pm-auth-logout-btn {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
  white-space: nowrap;
}

.pm-auth-link-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.pm-auth-text-link {
  color: var(--pm-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.pm-auth-text-link:hover {
  color: var(--pm-text-bright);
}

/* ── Spark Pill (room header) ── */

.pm-spark-pill {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(249, 115, 22, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #f59e0b;
  position: relative;
  cursor: default;
}

.pm-spark-toast {
  position: absolute;
  top: -24px;
  right: 0;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--pm-spark-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pm-spark-rise 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes pm-spark-rise {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* ── Profile Panel ── */

.pm-locked-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  gap: 12px;
}

.pm-locked-icon { font-size: 2.2rem; }
.pm-locked-title { font-weight: 600; color: var(--pm-text-bright); font-size: 1.05rem; }
.pm-locked-note { font-size: 0.82rem; color: var(--pm-text-dim); max-width: 250px; }

.pm-profile-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 20px;
  margin-bottom: 16px;
}

.pm-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pm-profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.pm-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--pm-accent);
}

.pm-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-weight: 700;
  font-size: 1.4rem;
}

.pm-orbit-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--pm-accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 6px;
  border: 2px solid #0a0a0f;
}

.pm-profile-info { flex: 1; min-width: 0; }
.pm-profile-name { font-weight: 700; color: var(--pm-text-bright); font-size: 1.1rem; }
.pm-profile-tag { font-size: 0.78rem; color: var(--pm-text-dim); font-family: monospace; margin-top: 2px; }
.pm-profile-bio { font-size: 0.8rem; color: var(--pm-text-dim); margin-top: 6px; line-height: 1.4; }

/* Level bar */
.pm-level-bar-wrap { margin-bottom: 16px; }
.pm-level-label { font-size: 0.78rem; font-weight: 600; color: var(--pm-text); margin-bottom: 4px; }
.pm-level-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.pm-level-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--pm-vibe-gradient);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pm-level-xp {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  margin-top: 3px;
  text-align: right;
}

/* Stats grid */
.pm-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--pm-radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  gap: 2px;
}

.pm-stat-value { font-weight: 700; font-size: 0.88rem; color: var(--pm-text-bright); }
.pm-stat-label { font-size: 0.68rem; color: var(--pm-text-dim); }

/* Panel tabs */
.pm-panel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--pm-radius-sm);
  padding: 3px;
}

.pm-tab {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--pm-text-dim);
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pm-tab.active {
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-weight: 600;
}

.pm-tab:hover:not(.active) {
  color: var(--pm-text);
}

/* ── Streak Chest ── */

.pm-streak-section { padding: 4px 0; }

.pm-streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pm-streak-fire {
  font-weight: 700;
  color: var(--pm-text-bright);
  font-size: 1rem;
}

.pm-streak-best {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
}

.pm-streak-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.pm-streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--pm-radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}

.pm-streak-day.done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.pm-streak-day.current {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  animation: pm-chest-glow 2s ease-in-out infinite;
}

@keyframes pm-chest-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.15); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
}

.pm-streak-day-num { font-size: 0.68rem; color: var(--pm-text-dim); font-weight: 600; }
.pm-streak-day-icon { font-size: 1.2rem; }
.pm-streak-day-reward { font-size: 0.68rem; color: var(--pm-accent-gold); font-weight: 600; }
.pm-streak-day-note { font-size: 0.6rem; color: var(--pm-text-dim); text-align: center; }

.pm-claim-btn {
  width: 100%;
  background: var(--pm-spark-gradient) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 12px !important;
  font-size: 0.92rem !important;
  border-radius: var(--pm-radius-sm) !important;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pm-claim-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}

.pm-streak-claimed {
  text-align: center;
  padding: 14px;
  color: var(--pm-accent-green);
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(34, 197, 94, 0.06);
  border-radius: var(--pm-radius-sm);
}

/* ── Badges ── */

.pm-badges-section { padding: 4px 0; }

.pm-badge-category {
  margin-bottom: 18px;
}

.pm-badge-cat-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.pm-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pm-badge-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.3s;
}

.pm-badge-card.locked {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.pm-badge-card.unlocked {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.05);
}

.pm-badge-card.unlocked:hover {
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.12);
}

.pm-badge-icon { font-size: 1.6rem; margin-bottom: 6px; }
.pm-badge-title { font-weight: 600; font-size: 0.82rem; color: var(--pm-text-bright); margin-bottom: 2px; }
.pm-badge-desc { font-size: 0.7rem; color: var(--pm-text-dim); margin-bottom: 8px; line-height: 1.3; }

.pm-badge-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 4px;
}

.pm-badge-progress-fill {
  height: 100%;
  background: var(--pm-accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.pm-badge-progress-text {
  font-size: 0.68rem;
  color: var(--pm-text-dim);
}

.pm-badge-claim-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--pm-accent);
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pm-badge-claim-btn:hover {
  background: var(--pm-accent);
  color: #fff;
}

.pm-badge-claimed-label {
  font-size: 0.72rem;
  color: var(--pm-accent-green);
  margin-top: 6px;
  font-weight: 500;
}

/* ── Drops ── */

.pm-drops-section { padding: 4px 0; }

.pm-drops-header {
  margin-bottom: 14px;
}

.pm-drops-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pm-text-bright);
}

.pm-drops-note {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-top: 2px;
}

.pm-drops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pm-drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  transition: all 0.25s;
  cursor: default;
}

.pm-drop-card.locked {
  opacity: 0.4;
}

.pm-drop-card.pm-drop-rare {
  border-color: rgba(59, 130, 246, 0.2);
}

.pm-drop-card.pm-drop-epic {
  border-color: rgba(168, 85, 247, 0.2);
}

.pm-drop-card.pm-drop-legendary {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.04);
}

.pm-drop-card.pm-drop-orbit_exclusive {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
}

.pm-drop-icon { font-size: 1.6rem; margin-bottom: 6px; }
.pm-drop-name { font-size: 0.76rem; font-weight: 600; color: var(--pm-text-bright); margin-bottom: 3px; }
.pm-drop-cost { font-size: 0.72rem; color: var(--pm-accent-gold); font-weight: 600; }
.pm-drop-vibe { font-size: 0.65rem; color: var(--pm-text-dim); }
.pm-drop-locked { font-size: 0.65rem; color: var(--pm-accent-red); margin-top: 4px; font-weight: 600; }

/* Drop Send Modal */
#pm-drop-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pm-drop-modal-card {
  background: #14141e;
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.pm-drop-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pm-drop-modal-header h3 {
  font-size: 1rem;
  color: var(--pm-text-bright);
  margin: 0;
}

.pm-drop-modal-balance {
  font-size: 0.85rem;
  color: var(--pm-accent-gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.pm-drop-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pm-drop-send-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  color: var(--pm-text);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
}

.pm-drop-send-btn:hover:not(.disabled) {
  background: var(--pm-card-hover);
  border-color: var(--pm-accent);
  transform: translateY(-2px);
}

.pm-drop-send-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pm-drop-send-icon { font-size: 1.4rem; }
.pm-drop-send-name { font-size: 0.72rem; font-weight: 600; }
.pm-drop-send-cost { font-size: 0.68rem; color: var(--pm-accent-gold); }

/* Drop Animation Layer */
#pm-drop-animation-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pm-drop-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: pm-drop-animate 2s ease-out forwards;
}

.pm-drop-anim-icon { font-size: 4rem; }
.pm-drop-anim-name { font-size: 1.2rem; font-weight: 700; color: var(--pm-text-bright); text-shadow: 0 2px 12px rgba(0,0,0,0.6); }

@keyframes pm-drop-animate {
  0% { transform: scale(0.3); opacity: 0; }
  20% { transform: scale(1.3); opacity: 1; }
  40% { transform: scale(1); }
  80% { opacity: 1; }
  100% { transform: scale(0.8) translateY(-40px); opacity: 0; }
}

.drop-bounce { animation-name: pm-drop-bounce !important; }
@keyframes pm-drop-bounce {
  0% { transform: scale(0.2) translateY(100px); opacity: 0; }
  30% { transform: scale(1.2) translateY(-20px); opacity: 1; }
  50% { transform: scale(0.95) translateY(0); }
  70% { transform: scale(1.05); }
  100% { transform: scale(0.8); opacity: 0; }
}

.drop-flame { animation-name: pm-drop-flame !important; }
@keyframes pm-drop-flame {
  0% { transform: scale(0.3); opacity: 0; filter: brightness(3); }
  30% { transform: scale(1.4); opacity: 1; filter: brightness(1.5); }
  100% { transform: scale(0.6) translateY(-60px); opacity: 0; filter: brightness(0.5); }
}

.drop-zap { animation-name: pm-drop-zap !important; }
@keyframes pm-drop-zap {
  0%, 5% { transform: scale(0.1); opacity: 0; }
  10% { transform: scale(2); opacity: 1; filter: brightness(3); }
  15% { transform: scale(0.8); filter: brightness(1); }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.5); opacity: 0; }
}

.drop-sparkle { animation-name: pm-drop-sparkle !important; }
@keyframes pm-drop-sparkle {
  0% { transform: scale(0.3) rotate(-30deg); opacity: 0; }
  30% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  60% { transform: scale(1) rotate(0deg); filter: brightness(1.4); }
  100% { transform: scale(0.7) rotate(15deg); opacity: 0; }
}

/* ── Leaderboard ── */

.pm-leaderboard-section { padding: 4px 0; }

.pm-lb-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--pm-radius-sm);
  padding: 3px;
}

.pm-lb-tab {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--pm-text-dim);
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pm-lb-tab.active {
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-weight: 600;
}

.pm-lb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pm-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--pm-card-bg);
  border: 1px solid transparent;
  border-radius: var(--pm-radius-sm);
  transition: all 0.2s;
}

.pm-lb-row:hover {
  background: var(--pm-card-hover);
}

.pm-lb-row.pm-lb-me {
  border-color: var(--pm-accent);
  background: var(--pm-accent-soft);
}

.pm-lb-row.pm-lb-top {
  background: rgba(245, 158, 11, 0.04);
}

.pm-lb-rank {
  font-weight: 700;
  font-size: 0.88rem;
  min-width: 32px;
  text-align: center;
  color: var(--pm-text-dim);
}

.pm-lb-top .pm-lb-rank {
  color: var(--pm-accent-gold);
}

.pm-lb-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pm-lb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pm-lb-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.pm-lb-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--pm-text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-lb-tag {
  font-size: 0.68rem;
  color: var(--pm-text-dim);
  font-family: monospace;
}

.pm-lb-value {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--pm-text-bright);
  white-space: nowrap;
}

/* ── Toast System ── */

#pm-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.pm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--pm-text-bright);
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.pm-toast.pm-toast-show {
  transform: translateX(0);
}

.pm-toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pm-toast-msg {
  flex: 1;
}

/* ── Empty State ── */
.pm-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--pm-text-dim);
  font-size: 0.85rem;
}

.pm-section-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-section-grid,
.pm-profile-quick-grid,
.pm-rank-grid,
.pm-showcase-grid,
.pm-public-profile-stats {
  display: grid;
  gap: 12px;
}

.pm-section-grid,
.pm-profile-quick-grid,
.pm-rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pm-showcase-grid,
.pm-public-profile-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-insight-card,
.pm-profile-quick-card,
.pm-rank-card,
.pm-showcase-card,
.pm-subsection,
.pm-settings-panel,
.pm-public-profile-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
}

.pm-insight-card,
.pm-profile-quick-card,
.pm-rank-card,
.pm-showcase-card {
  padding: 14px;
}

.pm-subsection,
.pm-settings-panel,
.pm-public-profile-card {
  padding: 18px;
}

.pm-subsection-head,
.pm-public-profile-head,
.pm-public-profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pm-subsection-title,
.pm-insight-value,
.pm-rank-value,
.pm-showcase-title {
  color: var(--pm-text-bright);
  font-weight: 700;
}

.pm-subsection-copy,
.pm-insight-label,
.pm-insight-note,
.pm-profile-quick-label,
.pm-rank-label,
.pm-rank-note,
.pm-showcase-copy,
.pm-public-profile-loading,
.pm-activity-meta,
.pm-pill-note {
  color: var(--pm-text-dim);
}

.pm-insight-label,
.pm-profile-quick-label,
.pm-rank-label,
.pm-pill-note {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pm-insight-value,
.pm-rank-value {
  font-size: 1.08rem;
  margin: 4px 0 6px;
}

.pm-profile-quick-value {
  color: var(--pm-text-bright);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.pm-showcase-icon,
.pm-drop-feed-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pm-showcase-title {
  margin-top: 10px;
}

.pm-showcase-copy {
  font-size: 0.8rem;
  margin-top: 6px;
  line-height: 1.45;
}

.pm-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.pm-activity-row:first-child {
  padding-top: 0;
  border-top: none;
}

.pm-activity-copy {
  min-width: 0;
  flex: 1;
}

.pm-activity-title {
  color: var(--pm-text-bright);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.pm-activity-meta {
  font-size: 0.78rem;
  margin-top: 4px;
}

.pm-activity-pill {
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.pm-activity-pill.gain {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.pm-activity-pill.spend {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.pm-activity-pill.neutral {
  background: rgba(255,255,255,0.08);
  color: var(--pm-text);
}

.pm-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--pm-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.pm-settings-field input,
.pm-settings-field textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 12px 14px;
  color: var(--pm-text);
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  outline: none;
}

.pm-settings-field textarea {
  min-height: 104px;
  resize: vertical;
}

.pm-settings-status {
  padding: 10px 12px;
  border-radius: var(--pm-radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--pm-text-dim);
  font-size: 0.82rem;
}

.pm-settings-status.success {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.pm-settings-status.error {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.pm-settings-actions,
.pm-public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pm-profile-trigger {
  white-space: nowrap;
}

#pm-public-profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
}

.pm-public-profile-card {
  width: min(720px, 100%);
  max-height: min(88vh, 920px);
  overflow-y: auto;
}

.pm-public-profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 18px;
}

.pm-public-profile-copy {
  min-width: 0;
  flex: 1;
}

.pm-public-profile-loading {
  text-align: center;
  padding: 30px 12px;
}

/* ── Public Profile Redesign ── */
.pm-public-profile-card {
  position: relative;
}

.pm-pub-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--pm-card-border);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: var(--pm-text-dim);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 1;
}

.pm-pub-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 40px;
}

.pm-pub-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.pm-pub-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pm-accent);
}

.pm-pub-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-size: 1.6rem;
  font-weight: 800;
}

.pm-pub-identity {
  min-width: 0;
  flex: 1;
}

.pm-pub-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pm-text-bright);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-pub-tag {
  font-size: 0.75rem;
  color: var(--pm-text-dim);
  font-family: monospace;
  margin-top: 2px;
}

.pm-pub-bio {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-top: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pm-pub-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pm-pub-level-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pm-accent);
  white-space: nowrap;
}

.pm-pub-xp-lbl {
  font-size: 0.68rem;
  color: var(--pm-text-dim);
  white-space: nowrap;
}

.pm-pub-key-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pm-pub-ks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.pm-pub-ks-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pm-text-bright);
}

.pm-pub-ks-lbl {
  font-size: 0.64rem;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pm-pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pm-pub-action-gift {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: transparent;
  color: #fff;
}

.pm-pub-friends-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.28);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 600;
}

.pm-pub-section {
  margin-bottom: 16px;
}

.pm-pub-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pm-text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-pub-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pm-accent-soft);
  color: var(--pm-accent);
  font-size: 0.66rem;
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .pm-auth-status-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pm-auth-logout-btn {
    width: 100%;
  }

  .pm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-streak-calendar {
    grid-template-columns: repeat(4, 1fr);
  }
  .pm-badge-grid,
  .pm-drops-grid,
  .pm-drop-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-section-grid,
  .pm-profile-quick-grid,
  .pm-rank-grid,
  .pm-showcase-grid,
  .pm-public-profile-stats {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .pm-public-profile-hero,
  .pm-subsection-head,
  .pm-public-profile-head,
  .pm-pub-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-pub-key-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .pm-activity-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* ══════════════════════════════════════════════════════════════
   BADGE LEVEL-UP & UNLOCK ANIMATIONS
   ══════════════════════════════════════════════════════════════ */

@keyframes pm-badge-level-up {
  0%   { transform: scale(0.85); opacity: 0.6; }
  40%  { transform: scale(1.18); }
  60%  { transform: scale(0.95); }
  80%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pm-badge-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pm-badge-glow-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.2), 0 0 16px rgba(168, 85, 247, 0.1); }
  50%      { box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), 0 0 32px rgba(168, 85, 247, 0.25); }
}

@keyframes pm-badge-orbit {
  0%   { transform: rotate(0deg) translateX(22px) rotate(0deg); opacity: 1; }
  100% { transform: rotate(360deg) translateX(22px) rotate(-360deg); opacity: 0; }
}

@keyframes pm-level-up-entrance {
  0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
  50%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  70%  { transform: scale(0.92) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.pm-badge-card.unlocked.newly-unlocked {
  animation: pm-badge-level-up 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             pm-badge-glow-pulse 2s ease-in-out infinite 0.6s;
  border-color: rgba(245, 158, 11, 0.4) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  position: relative;
  overflow: hidden;
}

.pm-badge-card.unlocked.newly-unlocked::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(245, 158, 11, 0.12) 37%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(245, 158, 11, 0.12) 63%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: pm-badge-shimmer 2.5s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.pm-badge-card.unlocked.newly-unlocked .pm-badge-icon {
  position: relative;
}

.pm-badge-card.unlocked.newly-unlocked .pm-badge-icon::after {
  content: "✦";
  position: absolute;
  font-size: 0.5rem;
  color: #f59e0b;
  animation: pm-badge-orbit 1.8s linear infinite;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   GAME ANALYSIS TAB
   ══════════════════════════════════════════════════════════════ */

.pm-game-analysis {
  padding: 4px 0;
}

.pm-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pm-game-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  transition: all 0.25s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.pm-game-stat-card:hover {
  border-color: rgba(168, 85, 247, 0.2);
  background: var(--pm-card-hover);
}

.pm-game-stat-card.is-favorite {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
}

.pm-game-stat-card.is-favorite::after {
  content: "★";
  position: absolute;
  top: 6px;
  right: 8px;
  color: #f59e0b;
  font-size: 0.7rem;
}

.pm-game-stat-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.pm-game-stat-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pm-text-bright);
  margin-bottom: 8px;
}

/* Radial progress ring */
.pm-game-ring {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
}

.pm-game-ring svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.pm-game-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.pm-game-ring-fill {
  fill: none;
  stroke: var(--pm-accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pm-game-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--pm-text-bright);
}

.pm-game-stat-detail {
  display: flex;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--pm-text-dim);
}

.pm-game-stat-detail span {
  white-space: nowrap;
}

/* Game performance heatmap */
.pm-game-heatmap {
  margin-top: 16px;
}

.pm-game-heatmap-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pm-text);
  margin-bottom: 8px;
}

.pm-game-heatmap-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.pm-game-heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.15s;
}

.pm-game-heatmap-cell:hover { transform: scale(1.3); }
.pm-game-heatmap-cell.cell-win { background: rgba(34, 197, 94, 0.5); border-color: rgba(34, 197, 94, 0.3); }
.pm-game-heatmap-cell.cell-loss { background: rgba(239, 68, 68, 0.4); border-color: rgba(239, 68, 68, 0.3); }
.pm-game-heatmap-cell.cell-draw { background: rgba(245, 158, 11, 0.35); border-color: rgba(245, 158, 11, 0.25); }

.pm-game-heatmap-legend {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--pm-text-dim);
}

.pm-game-heatmap-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pm-game-heatmap-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.pm-game-favorite-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--pm-radius-sm);
  margin-bottom: 16px;
}

.pm-game-favorite-icon { font-size: 2rem; }

.pm-game-favorite-copy {
  flex: 1;
  min-width: 0;
}

.pm-game-favorite-label {
  font-size: 0.72rem;
  color: var(--pm-accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-game-favorite-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pm-text-bright);
}

.pm-game-favorite-stat {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-top: 2px;
}

/* ── Level Up Overlay Animation ── */

.pm-level-up-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  animation: pm-overlay-fade 2.5s ease-out forwards;
}

@keyframes pm-overlay-fade {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

.pm-level-up-card {
  text-align: center;
  animation: pm-level-up-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.pm-level-up-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

.pm-level-up-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--pm-spark-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.pm-level-up-subtitle {
  font-size: 0.88rem;
  color: var(--pm-text-dim);
}

@media (max-width: 480px) {
  .pm-game-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE FULL-PAGE MODAL
   ═══════════════════════════════════════════════════════════════ */

.profile-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 5, 15, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  animation: profilePageIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.profile-page-shell {
  width: 100%;
  max-width: 720px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0 80px;
}

/* Topbar */
.profile-page-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(10, 10, 20, 0.82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-page-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.profile-page-avatar-mini-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.profile-page-avatar-mini-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pm-accent, #a855f7), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.profile-page-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-coin-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  font-size: 0.84rem;
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
}

.profile-coin-icon { font-size: 1rem; }

.profile-page-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--pm-text-dim, #8b8a94);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.profile-page-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Nav strip */
.profile-page-nav {
  display: flex;
  gap: 4px;
  padding: 14px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-page-nav::-webkit-scrollbar { display: none; }
.profile-page-nav { -ms-overflow-style: none; }

.profile-page-navbtn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pm-text-dim, #8b8a94);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.profile-page-navbtn.active,
.profile-page-navbtn:hover {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

/* Body */
.profile-page-body {
  flex: 1;
  padding: 20px;
}

.profile-page-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-page-locked {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ── Overview ── */
.profile-overview-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.profile-overview-avatar-wrap { position: relative; flex-shrink: 0; }

.profile-overview-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.3);
}

.profile-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.profile-overview-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.profile-overview-tag {
  font-size: 0.76rem;
  color: var(--pm-text-dim, #8b8a94);
  margin: 2px 0 6px;
}

.profile-overview-bio {
  font-size: 0.85rem;
  color: var(--pm-text-dim, #8b8a94);
  line-height: 1.5;
}

.profile-overview-level {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-overview-level-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pm-text-dim, #8b8a94);
  white-space: nowrap;
}

.profile-overview-level-xp {
  font-size: 0.74rem;
  color: var(--pm-text-dim, #8b8a94);
  white-space: nowrap;
}

.pm-level-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pm-level-fill { height: 100%; background: linear-gradient(90deg, #a855f7, #6366f1); border-radius: 3px; transition: width 0.6s ease; }

.profile-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-stat-card {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.profile-stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.profile-stat-label {
  font-size: 0.68rem;
  color: var(--pm-text-dim, #8b8a94);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.profile-overview-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ── Settings ── */
.profile-settings-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.profile-settings-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.pm-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.pm-settings-field span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--pm-text-dim, #8b8a94);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-settings-field input,
.pm-settings-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 12px;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s ease;
}

.pm-settings-field input:focus,
.pm-settings-field textarea:focus {
  border-color: rgba(168, 85, 247, 0.5);
}

.pm-settings-field textarea { resize: vertical; min-height: 70px; }

.pm-avatar-generator {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.pm-avatar-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.pm-avatar-preview-wrap {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: relative;
}

.pm-avatar-preview-image,
.pm-avatar-preview-fallback {
  width: 100%;
  height: 100%;
}

.pm-avatar-preview-image {
  display: block;
  object-fit: cover;
}

.pm-avatar-preview-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.55), rgba(56, 189, 248, 0.45));
}

.pm-avatar-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pm-avatar-preview-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.pm-avatar-preview-meta {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.pm-avatar-entitlement-note {
  font-size: 0.76rem;
  color: var(--pm-text-dim, #8b8a94);
  line-height: 1.4;
}

.pm-avatar-source-toggle {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-avatar-source-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pm-text-dim, #8b8a94);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pm-avatar-source-btn.active {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.16);
}

.pm-avatar-generated-controls[hidden] {
  display: none;
}

.pm-avatar-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-avatar-generator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pm-settings-field select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  outline: none;
}

.pm-settings-field select:focus {
  border-color: rgba(168, 85, 247, 0.5);
}

.pm-settings-status {
  font-size: 0.8rem;
  color: var(--pm-text-dim, #8b8a94);
  padding: 8px 0;
}

.pm-settings-status.error { color: #f87171; }
.pm-settings-status.success { color: #4ade80; }

.pm-settings-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pm-settings-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.84rem;
  color: var(--pm-text-dim, #8b8a94);
}

.pm-settings-field-value { color: #fff; font-weight: 600; }

.profile-settings-actions-row {
  margin-top: 12px;
}

/* ── Game Analysis ── */
.profile-analysis-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.profile-fav-game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(251, 191, 36, 0.07);
}

.profile-fav-icon { font-size: 2rem; }

.profile-fav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(251, 191, 36, 0.7);
}

.profile-fav-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  text-transform: capitalize;
  margin: 2px 0;
}

.profile-fav-stat { font-size: 0.8rem; color: var(--pm-text-dim, #8b8a94); }

.profile-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.profile-game-card {
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.profile-game-card.is-favorite {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.05);
}

.profile-game-name {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  color: #fff;
}

.profile-game-detail {
  display: flex;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--pm-text-dim, #8b8a94);
}

/* ── Coin Ledger ── */
.profile-coins-hero {
  text-align: center;
  padding: 28px 20px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.05));
}

.profile-coins-balance-big {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fde68a;
}

.profile-coins-balance-label {
  font-size: 0.78rem;
  color: rgba(251, 191, 36, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.profile-coins-meta-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.profile-coins-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-coins-meta-label {
  font-size: 0.68rem;
  color: var(--pm-text-dim, #8b8a94);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-coins-meta-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fde68a;
}

.profile-coins-how {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.profile-coins-how-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pm-text-dim, #8b8a94);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.profile-coins-how-list { display: flex; flex-direction: column; gap: 8px; }

.profile-coins-how-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--pm-text, #e8e6f0);
}

.profile-coins-how-icon { font-size: 1.1rem; flex-shrink: 0; }

.profile-coins-ledger-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.profile-coins-ledger {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.profile-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-ledger-row:last-child { border-bottom: none; }

.profile-ledger-desc {
  font-size: 0.84rem;
  color: var(--pm-text, #e8e6f0);
  grid-column: 1;
  grid-row: 1;
}

.profile-ledger-ts {
  font-size: 0.72rem;
  color: var(--pm-text-dim, #8b8a94);
  grid-column: 1;
  grid-row: 2;
}

.profile-ledger-amount {
  font-size: 0.9rem;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  white-space: nowrap;
}

.profile-ledger-amount.earn { color: #4ade80; }
.profile-ledger-amount.spend { color: #f87171; }

/* Settings coin summary in sidebar */
.coin-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.06);
}

.coin-balance-icon { font-size: 1.2rem; }

.coin-balance-amount {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fde68a;
}

.coin-balance-label {
  font-size: 0.78rem;
  color: rgba(251, 191, 36, 0.6);
}

.coin-balance-note {
  font-size: 0.74rem;
  color: var(--pm-text-dim, #8b8a94);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── Permanent Rooms ── */
.profile-rooms-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.profile-rooms-explainer {
  font-size: 0.84rem;
  color: var(--pm-text-dim, #8b8a94);
  line-height: 1.5;
}

.profile-rooms-purchase-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-rooms-purchase-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(251, 191, 36, 0.7);
}

.profile-rooms-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--pm-text-dim, #8b8a94);
}

.profile-rooms-balance-val { font-weight: 700; color: #fde68a; }

.profile-rooms-insufficient {
  font-size: 0.76rem;
  color: #f87171;
  margin-left: auto;
}

.profile-rooms-name-input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s ease;
}

.profile-rooms-name-input:focus { border-color: rgba(251, 191, 36, 0.5); }
.profile-rooms-name-input:disabled { opacity: 0.45; cursor: not-allowed; }

.profile-rooms-create-btn {
  padding: 11px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a0a00;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.profile-rooms-create-btn:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.profile-rooms-create-btn.disabled,
.profile-rooms-create-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--pm-text-dim, #8b8a94);
}

.profile-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-room-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.profile-room-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.profile-room-card-dot.active {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
  animation: pulseGlow 2s infinite;
}

.profile-room-card-copy { flex: 1; min-width: 0; }

.profile-room-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-room-card-meta {
  font-size: 0.74rem;
  color: var(--pm-text-dim, #8b8a94);
  margin-top: 2px;
  text-transform: capitalize;
}

.profile-room-card-slug {
  font-size: 0.72rem;
  color: var(--pm-text-dim, #8b8a94);
  margin-bottom: 2px;
  font-family: monospace;
}

.profile-room-card-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--pm-text-dim, #8b8a94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.profile-room-card-badge.live {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.25);
}

/* Coin gate modal */
.coin-gate-card {
  text-align: center;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 340px;
}

.coin-gate-icon { font-size: 2.8rem; }

.coin-gate-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.coin-gate-body {
  font-size: 0.86rem;
  color: var(--pm-text-dim, #8b8a94);
  line-height: 1.5;
}

.coin-gate-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .profile-overview-hero { flex-direction: column; align-items: center; text-align: center; }
  .profile-overview-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-overview-insight-grid { grid-template-columns: 1fr; }
  .profile-game-grid { grid-template-columns: 1fr; }
  .profile-coins-meta-row { gap: 12px; }
  .profile-page-navbtn { padding: 6px 12px; font-size: 0.78rem; }
  .pm-avatar-preview-card { align-items: flex-start; }
  .pm-avatar-generator-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   PROFILE V2 — Full Economy Modal System
   ═══════════════════════════════════════════════════════════════ */

/* ── V2 Overlay & Modal ── */

.pm-v2-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmV2FadeIn 0.18s ease;
}

@keyframes pmV2FadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pm-v2-modal {
  width: min(1080px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #13111a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: pmV2SlideUp 0.22s cubic-bezier(0.22,1,0.36,1);
}

@keyframes pmV2SlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── V2 Header ── */

.pm-v2-header {
  flex-shrink: 0;
  padding: 0;
  position: relative;
}

.pm-v2-header-inner {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 28px 24px 18px;
  position: relative;
  z-index: 1;
}

.pm-v2-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #fff;
  transition: background 0.15s;
}
.pm-v2-close-btn:hover { background: rgba(255,255,255,0.2); }

.pm-v2-avatar-wrap {
  flex-shrink: 0;
}

.pm-v2-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  object-fit: cover;
}

.pm-v2-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.pm-v2-header-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.pm-v2-header-tag {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

.pm-v2-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* ── VIP Badge ── */

.pm-v2-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  color: #fff;
  letter-spacing: 0.03em;
}

.pm-v2-vip-badge--sm {
  padding: 2px 8px;
  font-size: 0.7rem;
}

.pm-v2-vip-badge--lg {
  padding: 6px 16px;
  font-size: 0.9rem;
  border-radius: 24px;
}

/* ── V2 Nav ── */

.pm-v2-nav {
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  padding: 0 16px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  scrollbar-width: none;
}
.pm-v2-nav::-webkit-scrollbar { display: none; }

.pm-v2-nav-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 11px 11px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.pm-v2-nav-btn:hover { color: rgba(255,255,255,0.8); }

.pm-v2-nav-btn.active {
  color: #fff;
  border-bottom-color: var(--pm-accent, #a855f7);
}

/* ── V2 Body ── */

.pm-v2-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.pm-v2-body::-webkit-scrollbar { width: 4px; }
.pm-v2-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.pm-v2-section {
  display: block;
}
.pm-v2-section.active {
  display: block;
}

.pm-v2-section-head {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
}

.pm-v2-subsection {
  margin-top: 24px;
}

.pm-v2-subsection-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

/* ── Loading & Empty States ── */

.pm-v2-loading {
  text-align: center;
  padding: 48px 16px;
  color: var(--pm-text-dim);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pm-v2-loading::before {
  content: "";
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--pm-accent);
  border-radius: 50%;
  animation: pmV2Spin 0.8s linear infinite;
}

@keyframes pmV2Spin {
  to { transform: rotate(360deg); }
}

.pm-v2-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--pm-text-dim);
  font-size: 0.88rem;
}

/* ── Feedback ── */

.pm-v2-feedback {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-top: 12px;
  display: none;
  line-height: 1.4;
}

.pm-v2-feedback.info    { display: block; background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.pm-v2-feedback.success { display: block; background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.pm-v2-feedback.error   { display: block; background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }

/* ── Buttons ── */

.pm-v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.pm-v2-btn:active { transform: scale(0.97); }
.pm-v2-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.pm-v2-btn.primary {
  background: var(--pm-accent);
  color: #fff;
}
.pm-v2-btn.primary:hover:not(:disabled) { opacity: 0.88; }

.pm-v2-btn.ghost {
  background: rgba(255,255,255,0.07);
  color: var(--pm-text);
  border: 1px solid rgba(255,255,255,0.1);
}
.pm-v2-btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,0.12); }

.pm-v2-btn.vip {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #000;
}
.pm-v2-btn.vip:hover:not(:disabled) { opacity: 0.88; }

.pm-v2-btn.claim {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.pm-v2-btn.buy {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.pm-v2-btn.equip {
  background: rgba(168,85,247,0.2);
  border: 1px solid rgba(168,85,247,0.4);
  color: #c084fc;
}

/* ── Overview Hero ── */

.pm-v2-overview-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.pm-v2-level-wrap {
  flex: 1;
}

.pm-v2-level-badge {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pm-accent-gold);
  margin-bottom: 6px;
}

.pm-v2-level-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.pm-v2-level-progress {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pm-accent), #6366f1);
  transition: width 0.6s cubic-bezier(0.22,1,0.36,1);
}

.pm-v2-level-label {
  font-size: 0.75rem;
  color: var(--pm-text-dim);
}

/* ── Stat Grid ── */

.pm-v2-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.pm-v2-stat-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s;
}
.pm-v2-stat-card:hover { background: var(--pm-card-hover); }

.pm-v2-stat-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.pm-v2-stat-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.pm-v2-stat-label {
  font-size: 0.74rem;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-v2-stat--spark .pm-v2-stat-val { color: #f59e0b; }
.pm-v2-stat--coin  .pm-v2-stat-val { color: #818cf8; }
.pm-v2-stat--vibe  .pm-v2-stat-val { color: #c084fc; }

/* ── Insight Row ── */

.pm-v2-insight-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-v2-insight {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 12px 14px;
  transition: background 0.15s;
}
.pm-v2-insight:hover { background: var(--pm-card-hover); }

.pm-v2-insight-icon { font-size: 1.2rem; flex-shrink: 0; }
.pm-v2-insight-copy { flex: 1; font-size: 0.84rem; color: var(--pm-text); line-height: 1.4; }
.pm-v2-insight-arrow { font-size: 0.7rem; color: var(--pm-text-dim); flex-shrink: 0; }

/* ── VIP Grid ── */

.pm-v2-vip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.pm-v2-vip-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.pm-v2-vip-card.is-current,
.pm-v2-vip-card.pm-v2-vip-card--active {
  border-color: var(--tier-color, var(--pm-accent));
  box-shadow: 0 0 0 1px var(--tier-color, var(--pm-accent)), 0 8px 24px rgba(0,0,0,0.4);
}

.pm-v2-vip-card-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pm-v2-vip-card-header .tier-icon { font-size: 1.6rem; }
.pm-v2-vip-card-header .tier-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.pm-v2-vip-current {
  margin-left: auto;
}

.pm-v2-vip-owned-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(34,197,94,0.18);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
  padding: 3px 8px;
  border-radius: 20px;
}

.pm-v2-vip-expiry {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  margin-top: 2px;
}

.pm-v2-vip-expired {
  font-size: 0.72rem;
  color: #f87171;
}

.pm-v2-vip-card-body {
  padding: 14px 16px;
}

.pm-v2-vip-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-v2-vip-perks li {
  font-size: 0.8rem;
  color: var(--pm-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-v2-vip-perks li::before { content: "✓"; color: var(--pm-accent-green); font-weight: 700; flex-shrink: 0; }

.pm-v2-vip-price {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-bottom: 10px;
  line-height: 1.5;
}

.pm-v2-vip-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Task List ── */

.pm-v2-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-v2-task-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: background 0.15s;
}
.pm-v2-task-card:hover { background: var(--pm-card-hover); }

.pm-v2-task-card.pm-v2-task--done {
  border-color: rgba(34,197,94,0.25);
}

.pm-v2-task-card.pm-v2-task--claimed {
  opacity: 0.6;
  border-color: rgba(255,255,255,0.04);
}

.pm-v2-task-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.pm-v2-task-body {
  flex: 1;
  min-width: 0;
}

.pm-v2-task-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 2px;
}

.pm-v2-task-desc {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-bottom: 8px;
}

.pm-v2-task-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pm-v2-task-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  overflow: hidden;
}

.pm-v2-task-progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: width 0.5s cubic-bezier(0.22,1,0.36,1);
}

.pm-v2-task-progress-text {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.pm-v2-task-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pm-v2-task-action {
  margin-top: 4px;
}

.pm-v2-task-claimed-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  padding: 3px 10px;
  border-radius: 20px;
}

.pm-v2-task-locked-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--pm-text-dim);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Reward Chips ── */

.pm-v2-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255,255,255,0.07);
  color: var(--pm-text);
  border: 1px solid rgba(255,255,255,0.1);
}

.pm-v2-reward-chip.spark    { background: rgba(245,158,11,0.15); color: #f59e0b; border-color: rgba(245,158,11,0.3); }
.pm-v2-reward-chip.coin     { background: rgba(99,102,241,0.15); color: #818cf8; border-color: rgba(99,102,241,0.3); }
.pm-v2-reward-chip.xp       { background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.25); }
.pm-v2-reward-chip.vip-bonus{ background: rgba(168,85,247,0.15); color: #c084fc; border-color: rgba(168,85,247,0.3); }

/* ── Achievement List ── */

.pm-v2-ach-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-v2-ach-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: background 0.15s;
}
.pm-v2-ach-card:hover { background: var(--pm-card-hover); }

.pm-v2-ach-icon { font-size: 1.6rem; flex-shrink: 0; }
.pm-v2-ach-body { flex: 1; min-width: 0; }

.pm-v2-ach-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 2px;
}

.pm-v2-ach-desc {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
  margin-bottom: 10px;
}

.pm-v2-ach-tiers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.pm-v2-ach-pip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--pm-text-dim);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s;
}

.pm-v2-ach-pip.done {
  background: rgba(245,158,11,0.18);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.35);
}

.pm-v2-ach-pip.current {
  background: rgba(168,85,247,0.2);
  color: #c084fc;
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 0 2px rgba(168,85,247,0.15);
}

/* ── Gift Form ── */

.pm-v2-gift-form {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pm-v2-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-v2-form-row label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-v2-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: #fff;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.pm-v2-input:focus {
  border-color: var(--pm-accent);
  background: rgba(168,85,247,0.06);
}

.pm-v2-input::placeholder { color: rgba(255,255,255,0.25); }

select.pm-v2-input option { background: #1e1b2e; color: #e8e6f0; }

/* ── Gift Catalog Grid ── */

.pm-v2-gift-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.pm-v2-catalog-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pm-v2-catalog-card:hover {
  background: rgba(168,85,247,0.12);
  border-color: var(--pm-accent);
}

.pm-v2-catalog-icon { font-size: 1.4rem; flex-shrink: 0; }

.pm-v2-catalog-copy { display: flex; flex-direction: column; gap: 2px; }
.pm-v2-catalog-copy strong { font-size: 0.82rem; color: #e8e6f0; }
.pm-v2-catalog-copy small  { font-size: 0.72rem; color: var(--pm-text-dim); }

/* ── Friend badge on public profile ── */

.pm-friend-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(74,222,128,0.15);
  border: 1px solid rgba(74,222,128,0.35);
  color: #4ade80;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Shop Grid ── */

.pm-v2-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.pm-v2-shop-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
}
.pm-v2-shop-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.35); }

.pm-v2-shop-card.common        { border-color: rgba(255,255,255,0.1); }
.pm-v2-shop-card.rare          { border-color: rgba(99,102,241,0.4); }
.pm-v2-shop-card.epic          { border-color: rgba(168,85,247,0.45); }
.pm-v2-shop-card.legendary     { border-color: rgba(245,158,11,0.5); box-shadow: 0 0 12px rgba(245,158,11,0.15); }
.pm-v2-shop-card.orbit_exclusive { border-color: rgba(249,115,22,0.5); box-shadow: 0 0 14px rgba(249,115,22,0.18); }

.pm-v2-shop-preview {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pm-v2-shop-info {
  padding: 10px 12px;
  flex: 1;
}

.pm-v2-shop-info .item-name {
  font-weight: 700;
  font-size: 0.84rem;
  color: #fff;
  margin-bottom: 3px;
}

.pm-v2-shop-info .item-desc {
  font-size: 0.74rem;
  color: var(--pm-text-dim);
  line-height: 1.4;
}

.pm-v2-shop-pricing {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.pm-v2-shop-actions {
  padding: 0 12px 12px;
  display: flex;
  gap: 6px;
}

.pm-v2-shop-locked {
  padding: 6px 12px 12px;
  font-size: 0.74rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Price Chips ── */

.pm-v2-price-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--pm-text-dim);
}

.pm-v2-price-chip.coin  { background: rgba(99,102,241,0.15); color: #818cf8; }
.pm-v2-price-chip.spark { background: rgba(245,158,11,0.15); color: #f59e0b; }
.pm-v2-price-chip.vip   { background: rgba(168,85,247,0.15); color: #c084fc; }
.pm-v2-price-chip.free  { background: rgba(34,197,94,0.12); color: #4ade80; }

/* ── Coins Hero ── */

.pm-v2-coins-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--pm-radius);
  margin-bottom: 20px;
}

.pm-v2-coins-balance {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #818cf8;
  line-height: 1;
  margin-bottom: 4px;
}

/* ── Sparks Hero ── */

.pm-v2-sparks-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(249,115,22,0.1));
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--pm-radius);
  margin-bottom: 20px;
}

.pm-v2-sparks-balance {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
  margin-bottom: 4px;
}

.pm-v2-multiplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(245,158,11,0.18);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
  margin-top: 8px;
}

/* ── Coin Packages ── */

.pm-v2-coin-packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.pm-v2-coin-pkg {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
}

.pm-v2-coin-pkg:hover {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.pm-v2-coin-pkg.popular {
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.25);
}

.pm-v2-pkg-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 0 8px 0 8px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
}

.pm-v2-pkg-coins {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #818cf8;
  line-height: 1;
}

.pm-v2-pkg-bonus {
  font-size: 0.76rem;
  color: #4ade80;
  font-weight: 600;
}

.pm-v2-pkg-price {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.pm-v2-pkg-inr {
  font-size: 0.74rem;
  color: var(--pm-text-dim);
}

/* ── Earn Grid ── */

.pm-v2-earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.pm-v2-earn-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 14px;
  transition: background 0.15s;
}
.pm-v2-earn-card:hover { background: var(--pm-card-hover); }

.pm-v2-earn-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.pm-v2-earn-copy { flex: 1; }
.pm-v2-earn-copy .earn-title { font-weight: 700; font-size: 0.84rem; color: #fff; margin-bottom: 3px; }
.pm-v2-earn-copy .earn-desc  { font-size: 0.76rem; color: var(--pm-text-dim); line-height: 1.4; }

/* ── Referral ── */

.pm-v2-referral-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 20px;
  margin-bottom: 16px;
}

.pm-v2-referral-code {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
}

.pm-v2-referral-code .code-text {
  flex: 1;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pm-accent);
  letter-spacing: 0.1em;
}

.pm-v2-referral-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-v2-referral-rewards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pm-v2-referral-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pm-v2-referral-stats .stat-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.pm-v2-referral-stats .stat-box .stat-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.pm-v2-referral-stats .stat-box .stat-lbl {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  margin-top: 3px;
}

/* ── History Rows ── */

.pm-v2-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pm-v2-history-row:last-child { border-bottom: none; }

.pm-v2-history-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.pm-v2-history-copy { flex: 1; min-width: 0; }
.pm-v2-history-copy .hist-title { font-size: 0.84rem; color: var(--pm-text); font-weight: 600; }
.pm-v2-history-copy .hist-note  { font-size: 0.74rem; color: var(--pm-text-dim); margin-top: 1px; }

.pm-v2-history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.pm-v2-gain  { font-size: 0.88rem; font-weight: 700; color: #4ade80; }
.pm-v2-spend { font-size: 0.88rem; font-weight: 700; color: #f87171; }

.pm-v2-history-ts { font-size: 0.7rem; color: var(--pm-text-dim); }

/* ── Mobile Responsive V2 ── */

@media (max-width: 620px) {
  .pm-v2-modal {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
  }

  .pm-v2-overlay {
    align-items: flex-end;
  }

  .pm-v2-header-inner {
    padding: 20px 16px 14px;
  }

  .pm-v2-body {
    padding: 16px 16px 24px;
  }

  .pm-v2-vip-grid {
    grid-template-columns: 1fr;
  }

  .pm-v2-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-v2-shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-v2-coin-packages {
    grid-template-columns: repeat(2, 1fr);
  }

  .pm-v2-earn-grid {
    grid-template-columns: 1fr;
  }
}

/* ── V2 Chests Row ── */

.pm-v2-chests-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.pm-v2-chest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pm-v2-chest-card.ready {
  border-color: var(--pm-accent-gold);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
  animation: pm-pulse-gold 2s infinite;
}

.pm-v2-chest-card.vip.ready {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
  animation: pm-pulse-blue 2s infinite;
}

@keyframes pm-pulse-gold {
  0%, 100% { border-color: rgba(245, 158, 11, 0.3); }
  50% { border-color: rgba(245, 158, 11, 0.8); }
}
@keyframes pm-pulse-blue {
  0%, 100% { border-color: rgba(56, 189, 248, 0.3); }
  50% { border-color: rgba(56, 189, 248, 0.8); }
}

.pm-v2-chest-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}

.pm-v2-chest-info { flex: 1; }
.pm-v2-chest-title { font-weight: 700; font-size: 0.95rem; color: var(--pm-text-bright); }
.pm-v2-chest-subtitle { font-size: 0.72rem; color: var(--pm-text-dim); margin-top: 2px; }

.pm-v2-chest-progress { margin-top: 8px; }
.pm-v2-chest-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.pm-v2-chest-fill { height: 100%; background: var(--pm-accent-gold); transition: width 0.5s; }
.pm-v2-chest-stats { font-size: 0.65rem; color: var(--pm-text-dim); margin-top: 4px; text-align: right; }

.pm-v2-chest-card.claimed { opacity: 0.6; filter: grayscale(0.5); }
.claimed-tag { font-size: 1.2rem; color: var(--pm-accent-green); font-weight: 800; }

/* ── Friends & Social ── */

.pm-v2-friends-outer { position: relative; height: 100%; }

.pm-v2-search-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pm-v2-search-add input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
}

.pm-v2-friend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pm-v2-friend-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  padding: 14px;
  transition: transform 0.2s;
}
.pm-v2-friend-card:hover { transform: translateY(-2px); background: var(--pm-card-hover); }

.pm-v2-friend-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.pm-v2-friend-name { font-weight: 700; color: var(--pm-text-bright); font-size: 0.95rem; }
.pm-v2-friend-tag { font-size: 0.72rem; color: var(--pm-text-dim); font-family: monospace; }
.pm-v2-friend-note { margin-top: 4px; font-size: 0.72rem; color: var(--pm-text-dim); }
.pm-v2-friend-tier { font-size: 0.7rem; font-weight: 800; color: var(--pm-accent); text-transform: uppercase; background: var(--pm-accent-soft); padding: 2px 6px; border-radius: 4px; }

.pm-v2-friend-vibe-progress { margin-bottom: 12px; }
.pm-v2-vibe-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.pm-v2-vibe-fill { height: 100%; background: linear-gradient(90deg, #ef4444, #ec4899); transition: width 0.5s; }
.pm-v2-vibe-count { font-size: 0.68rem; color: var(--pm-text-dim); margin-top: 4px; text-align: right; }

.pm-v2-friend-actions { display: flex; gap: 6px; }
.pm-v2-friend-actions .pm-v2-btn { flex: 1; padding: 6px; font-size: 0.75rem; }

.pm-v2-btn--chat { background: var(--pm-accent-soft); color: var(--pm-accent); border: 1px solid var(--pm-accent); }
.pm-v2-btn--vibe { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ── DM Chat Overlay ── */

.pm-v2-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pm-v2-chat-window {
  width: 100%;
  max-width: 400px;
  height: min(540px, calc(100vh - 80px));
  background: #14141e;
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.pm-v2-chat-header {
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--pm-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--pm-text-bright);
}

.pm-v2-chat-header button { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.2rem; }

.pm-v2-chat-back-btn {
  font-size: 0.85rem !important;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}
.pm-v2-chat-back-btn:hover { opacity: 1; background: rgba(255,255,255,0.08) !important; }

.pm-v2-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-v2-msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 0.85rem; position: relative; }
.pm-v2-msg.me { align-self: flex-end; background: var(--pm-accent); color: #fff; border-bottom-right-radius: 2px; }
.pm-v2-msg.them { align-self: flex-start; background: rgba(255,255,255,0.06); color: #fff; border-bottom-left-radius: 2px; }

.pm-v2-msg-img { max-width: 100%; border-radius: 8px; margin-top: 4px; display: block; border: 1px solid rgba(255,255,255,0.1); }
.pm-v2-msg-time { font-size: 0.65rem; color: rgba(255,255,255,0.5); margin-top: 4px; text-align: right; }

.pm-v2-chat-input-row {
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--pm-card-border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.pm-v2-chat-img-btn { cursor: pointer; font-size: 1.2rem; padding: 4px; border-radius: 50%; transition: background 0.2s; }
.pm-v2-chat-img-btn:hover { background: rgba(255,255,255,0.05); }

#pm-v2-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.pm-v2-chat-emoji-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.2s;
}
.pm-v2-chat-emoji-btn:hover { background: rgba(255,255,255,0.08); }

.pm-v2-dm-emoji-picker {
  padding: 8px 12px;
  background: rgba(20,20,35,0.97);
  border-top: 1px solid var(--pm-card-border);
  flex-wrap: wrap;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.pm-v2-dm-emoji-cell {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s;
}
.pm-v2-dm-emoji-cell:hover { background: rgba(255,255,255,0.1); }

/* ═══════════════════════════════════════════════════════════════
   PROFILE V2 — BUG FIXES & MISSING CLASSES
   ═══════════════════════════════════════════════════════════════ */

/* ── Button --modifier aliases (JS uses -- prefix convention) ── */

.pm-v2-btn--primary,
.pm-v2-btn.pm-v2-btn--primary {
  background: var(--pm-accent);
  color: #fff;
  border: none;
}
.pm-v2-btn--primary:hover:not(:disabled) { opacity: 0.88; }

.pm-v2-btn--secondary,
.pm-v2-btn.pm-v2-btn--secondary {
  background: rgba(255,255,255,0.07);
  color: var(--pm-text);
  border: 1px solid rgba(255,255,255,0.1);
}
.pm-v2-btn--secondary:hover:not(:disabled) { background: rgba(255,255,255,0.12); }

.pm-v2-btn--ghost,
.pm-v2-btn.pm-v2-btn--ghost {
  background: rgba(255,255,255,0.07);
  color: var(--pm-text);
  border: 1px solid rgba(255,255,255,0.1);
}
.pm-v2-btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,0.12); }

.pm-v2-btn--vip,
.pm-v2-btn.pm-v2-btn--vip {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #000;
  border: none;
}
.pm-v2-btn--vip:hover:not(:disabled) { opacity: 0.88; }

.pm-v2-btn--success,
.pm-v2-btn.pm-v2-btn--success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
}
.pm-v2-btn--success:hover:not(:disabled) { opacity: 0.88; }

.pm-v2-btn--danger,
.pm-v2-btn.pm-v2-btn--danger {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
}
.pm-v2-btn--danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }

.pm-v2-btn--claim,
.pm-v2-btn.pm-v2-btn--claim {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
}

.pm-v2-btn--buy,
.pm-v2-btn.pm-v2-btn--buy {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
}

/* Shared base for all --variant buttons */
.pm-v2-btn--primary,
.pm-v2-btn--secondary,
.pm-v2-btn--ghost,
.pm-v2-btn--vip,
.pm-v2-btn--success,
.pm-v2-btn--danger,
.pm-v2-btn--claim,
.pm-v2-btn--buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.pm-v2-btn--primary:active,
.pm-v2-btn--secondary:active,
.pm-v2-btn--ghost:active,
.pm-v2-btn--vip:active,
.pm-v2-btn--success:active,
.pm-v2-btn--danger:active,
.pm-v2-btn--claim:active,
.pm-v2-btn--buy:active { transform: scale(0.97); }

.pm-v2-btn--primary:disabled,
.pm-v2-btn--secondary:disabled,
.pm-v2-btn--ghost:disabled,
.pm-v2-btn--vip:disabled,
.pm-v2-btn--success:disabled,
.pm-v2-btn--danger:disabled,
.pm-v2-btn--claim:disabled,
.pm-v2-btn--buy:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Sidebar CTA block ── */

.pm-v2-sidebar-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

/* ── Header copy block ── */

.pm-v2-header-copy {
  flex: 1;
  min-width: 0;
}

/* ── VIP Badge (non-v2-modal uses pm-vip-badge, not pm-v2-vip-badge) ── */

.pm-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.pm-vip-badge--sm { padding: 2px 8px; font-size: 0.7rem; }
.pm-vip-badge--lg { padding: 6px 16px; font-size: 0.9rem; border-radius: 24px; }

.pm-vip-expiry {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 20px;
}

.pm-vip-expired {
  font-size: 0.72rem;
  color: #f87171;
}

/* ── VIP card inner elements (used in renderV2Vip) ── */

.pm-v2-vip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pm-v2-vip-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  flex: 1;
}

.pm-v2-vip-status {
  margin-top: 8px;
  font-size: 0.8rem;
}

/* Fix: VIP card current state — JS adds class pm-v2-vip-current, not is-current */
.pm-v2-vip-card.pm-v2-vip-current {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 8px 24px rgba(0,0,0,0.4);
}

/* ── Section head allows h3/h4 children ── */

.pm-v2-section-head h3,
.pm-v2-section-head h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.pm-v2-section-head h3 { font-size: 1.1rem; }
.pm-v2-section-head h4 { font-size: 0.95rem; }
.pm-v2-section-head p  { font-size: 0.82rem; color: var(--pm-text-dim); margin: 0; }

.pm-v2-subsection-head h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

/* ── Friends outer layout fix ── */

.pm-v2-friends-outer {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* ── Vibe progress bar ── */

.pm-v2-vibe-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pm-v2-vibe-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #f97316);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.pm-v2-friend-vibe-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pm-v2-vibe-count {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.pm-v2-friend-tier {
  font-size: 0.72rem;
  background: rgba(168,85,247,0.15);
  color: #c084fc;
  border: 1px solid rgba(168,85,247,0.3);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: capitalize;
  flex-shrink: 0;
}

/* ── Social section heading ── */

.pm-v2-social-section {
  margin-bottom: 20px;
}

.pm-v2-social-section h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 10px;
}

/* ── Section-head flex layout for add-friend row ── */

.pm-v2-section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

/* ── VIP card header flex fix ── */

.pm-v2-vip-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Mobile V2 sidebar CTA ── */

@media (max-width: 620px) {
  .pm-v2-sidebar-cta { flex-direction: column; }
}

/* ── V2 Remaining Fixes ── */

/* Coins/Sparks hero — balance is the number directly */
.pm-v2-coins-hero,
.pm-v2-sparks-hero {
  text-align: center;
}

/* Coin package label + vip bonus */
.pm-v2-pkg-label {
  font-size: 0.78rem;
  color: var(--pm-text-dim);
}
.pm-v2-pkg-vip-bonus {
  font-size: 0.72rem;
  color: #c084fc;
  font-weight: 600;
}

/* Shop owned state */
.pm-v2-shop-card.owned {
  opacity: 0.7;
  border-color: rgba(34,197,94,0.3);
}
.pm-v2-shop-card.owned::after {
  content: "Owned";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.64rem;
  font-weight: 800;
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(34,197,94,0.3);
}
.pm-v2-shop-card { position: relative; }

/* ── V2 Settings Page ── */

.pm-v2-settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pm-v2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--pm-text-dim, rgba(255,255,255,0.5));
}

.pm-v2-field span {
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.pm-v2-field input,
.pm-v2-field textarea,
.pm-v2-field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.pm-v2-field input:focus,
.pm-v2-field textarea:focus,
.pm-v2-field select:focus {
  border-color: var(--pm-accent, #a855f7);
}

.pm-v2-field textarea {
  min-height: 80px;
  resize: vertical;
}

.pm-v2-settings-status {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  line-height: 1.5;
}

.pm-v2-settings-status.error {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}

.pm-v2-settings-status.success {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.25);
  color: #4ade80;
}

.pm-v2-settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   TODAY AT A GLANCE — progress rings on overview
   ═══════════════════════════════════════════════════════════════ */

.pm-glance-section {
  margin: 20px 0;
}

.pm-glance-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}

.pm-glance-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pm-glance-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  position: relative;
  text-align: center;
}
.pm-glance-ring-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

.pm-glance-ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
}

.pm-glance-ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}

.pm-glance-ring-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.pm-glance-ring-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.3;
}

.pm-glance-ring-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(245,158,11,0.25);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.35);
  white-space: nowrap;
}

@media (max-width: 500px) {
  .pm-glance-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   STREAK HERO — daily login streak on tasks page
   ═══════════════════════════════════════════════════════════════ */

.pm-streak-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(249,115,22,0.07));
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 16px;
  margin-bottom: 12px;
}

.pm-streak-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-streak-fire-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.pm-streak-hero-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1.1;
}
.pm-streak-hero-val span {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}

.pm-streak-hero-sub {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.pm-streak-claimed-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pm-streak-claim-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 7-day streak calendar */

.pm-streak-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.pm-streak-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.2s ease;
}

.pm-streak-cal-day.done {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.25);
}

.pm-streak-cal-day.current {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.5);
  box-shadow: 0 0 12px rgba(245,158,11,0.15);
}

.pm-streak-cal-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pm-streak-cal-day.done .pm-streak-cal-label,
.pm-streak-cal-day.current .pm-streak-cal-label {
  color: #f59e0b;
}

.pm-streak-cal-pip {
  font-size: 1.1rem;
  line-height: 1;
}

.pm-streak-cal-reward {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
}

.pm-streak-cal-day.done .pm-streak-cal-reward,
.pm-streak-cal-day.current .pm-streak-cal-reward {
  color: #f59e0b;
}

@media (max-width: 480px) {
  .pm-streak-cal {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }
  .pm-streak-cal-day { padding: 7px 2px 6px; }
  .pm-streak-cal-reward { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   TASK SUMMARY BAR
   ═══════════════════════════════════════════════════════════════ */

.pm-task-summary {
  padding: 14px 16px;
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.18);
  border-radius: 14px;
  margin-bottom: 14px;
}

.pm-task-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pm-task-summary-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.pm-task-summary-pct {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #c084fc;
}

.pm-task-summary-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pm-task-summary-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #6366f1);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.pm-task-summary-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pm-task-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.pm-task-chip.done      { background: rgba(34,197,94,0.12); color: #4ade80; }
.pm-task-chip.claimed   { background: rgba(168,85,247,0.15); color: #c084fc; }
.pm-task-chip.remaining { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════════════════════════
   ACHIEVEMENT SUMMARY & TIER TRACK
   ═══════════════════════════════════════════════════════════════ */

.pm-ach-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.pm-ach-summary-stat {
  text-align: center;
  padding: 12px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
}

.pm-ach-summary-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.pm-ach-summary-lbl {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  font-weight: 600;
}

.pm-ach-overall-bar {
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pm-ach-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, #cd7f32, #c0c0c0, #f59e0b, #38bdf8);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Achievement card states */
.pm-v2-ach-card--ready {
  border-color: rgba(34,197,94,0.35) !important;
  background: rgba(34,197,94,0.04) !important;
}

.pm-v2-ach-card--maxed {
  border-color: rgba(56,189,248,0.3) !important;
  opacity: 0.8;
}

.pm-v2-ach-maxed-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 6px;
}

/* Tier track (replaces single pips) */
.pm-v2-ach-tier-track {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0;
}

.pm-v2-ach-pip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
  font-size: 0.7rem;
}

.pm-v2-ach-pip.done {
  box-shadow: 0 0 8px currentColor;
}

.pm-v2-ach-pip.current.ready {
  animation: pm-ach-pip-pulse 1.8s infinite;
}

@keyframes pm-ach-pip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 0 4px transparent; }
}

/* Ach card action column */
.pm-v2-ach-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   FRIENDS — avatar, vibe timeline
   ═══════════════════════════════════════════════════════════════ */

.pm-v2-friend-avatar-wrap {
  flex-shrink: 0;
}

.pm-v2-friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.pm-v2-friend-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(168,85,247,0.2);
  border: 1px solid rgba(168,85,247,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: #c084fc;
}

/* Vibe stage timeline */
.pm-vibe-timeline {
  display: flex;
  align-items: center;
  margin: 8px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pm-vibe-timeline::-webkit-scrollbar { display: none; }

.pm-vibe-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pm-vibe-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}

.pm-vibe-stage.reached .pm-vibe-stage-dot {
  border-color: transparent;
}

.pm-vibe-stage.current .pm-vibe-stage-dot {
  width: 13px;
  height: 13px;
  box-shadow: 0 0 8px currentColor;
}

.pm-vibe-stage-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
}

.pm-vibe-stage.reached .pm-vibe-stage-label {
  color: rgba(255,255,255,0.55);
}

.pm-vibe-stage.current .pm-vibe-stage-label {
  color: rgba(255,255,255,0.85);
}

.pm-vibe-stage-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  min-width: 12px;
  margin-bottom: 16px;
}

@media (max-width: 500px) {
  .pm-ach-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .pm-streak-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .pm-v2-ach-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .pm-v2-ach-action {
    margin-top: 4px;
  }
}

/* ── Gender Badge ── */
.pm-gender-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
.pm-gender-badge--male {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.pm-gender-badge--female {
  color: #f472b6;
  background: rgba(244, 114, 182, 0.15);
  border: 1px solid rgba(244, 114, 182, 0.35);
}

/* ── Gender Selector ── */
.pm-gender-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pm-gender-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}
.pm-gender-option input[type="radio"] {
  display: none;
}
.pm-gender-option:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
}
.pm-gender-option.active {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.pm-gender-symbol {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.pm-gender-symbol--male {
  color: #60a5fa;
}
.pm-gender-symbol--female {
  color: #f472b6;
}
.pm-gender-option.active .pm-gender-symbol--male {
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}
.pm-gender-option.active .pm-gender-symbol--female {
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.5);
}

/* ── History Tile Grid ── */
.pm-htile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}

.pm-htile-grid--catalog {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  margin-bottom: 16px;
}

.pm-htile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  cursor: default;
  text-align: center;
  transition: background 0.14s, border-color 0.14s;
  overflow: hidden;
}

.pm-htile[onclick], .pm-htile[data-catalog-id]:not([data-catalog-id=""]) {
  cursor: pointer;
}

.pm-htile:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.pm-htile:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 200px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.12);
  color: #e2e8f0;
  font-size: 0.68rem;
  line-height: 1.4;
  white-space: normal;
  z-index: 100;
  pointer-events: none;
}

.pm-htile.recv {
  border-color: rgba(34,197,94,0.18);
}

.pm-htile.sent {
  border-color: rgba(239,68,68,0.14);
}

.pm-htile--catalog {
  border-color: rgba(168,85,247,0.2);
  background: rgba(124,58,237,0.06);
}

.pm-htile--activity {
  border-color: rgba(99,102,241,0.18);
}

.pm-htile--new {
  border-color: rgba(168,85,247,0.5) !important;
  background: rgba(124,58,237,0.12) !important;
}

.pm-htile-new-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a855f7;
}

.pm-htile-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.pm-htile-amount {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pm-text-bright);
  line-height: 1.1;
  word-break: break-all;
}

.pm-htile-dir {
  font-size: 0.6rem;
  color: var(--pm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.pm-htile-ts {
  font-size: 0.58rem;
  color: var(--pm-text-dim);
  opacity: 0.7;
  line-height: 1;
}

/* ── Direct Gift Lottie Overlay ── */
.pm-gift-lottie-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.pm-gift-lottie-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 24px 18px;
  border-radius: 24px;
  background: rgba(20, 12, 40, 0.92);
  border: 1px solid rgba(168,85,247,0.3);
  box-shadow: 0 0 60px rgba(168,85,247,0.2);
}

.pm-gift-lottie-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f0e6ff;
  text-align: center;
  margin-bottom: 4px;
}

.pm-gift-lottie-hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

.pm-gift-lottie-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
  text-align: center;
}

.pm-gift-lottie-burst {
  position: relative;
  overflow: visible;
}

/* ── Gift Wall ── */
.pm-gift-wall {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(168,85,247,0.08) 0%, rgba(99,102,241,0.06) 100%);
  border: 1px solid rgba(168,85,247,0.2);
}

.pm-gift-wall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pm-gift-wall-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c084fc;
}

.pm-gift-wall-total {
  font-size: 0.68rem;
  color: var(--pm-text-dim);
  background: rgba(168,85,247,0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.pm-gift-wall-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-gift-wall-item {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.12s, background 0.12s;
}

.pm-gift-wall-item:hover {
  background: rgba(168,85,247,0.15);
  transform: scale(1.12);
}

.pm-gift-wall-emoji { font-size: 1.3rem; line-height: 1; }

.pm-gift-wall-empty {
  font-size: 0.74rem;
  color: var(--pm-text-dim);
  text-align: center;
  padding: 8px 0 4px;
  opacity: 0.6;
}

/* ── Public Profile Badges (stylish) ── */
.pm-pub-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-pub-badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  min-width: 64px;
  flex: 0 0 auto;
  cursor: default;
  transition: background 0.13s, transform 0.12s, border-color 0.13s;
  position: relative;
  overflow: hidden;
}

.pm-pub-badge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(251,191,36,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.pm-pub-badge-card:hover {
  background: rgba(251,191,36,0.07);
  border-color: rgba(251,191,36,0.35);
  transform: translateY(-2px);
}

.pm-pub-badge-card:hover::before { opacity: 1; }

.pm-pub-badge-icon {
  font-size: 1.7rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.pm-pub-badge-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--pm-text-dim);
  text-align: center;
  line-height: 1.2;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Public Profile Rank Cards (stylish) ── */
.pm-pub-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.pm-pub-rank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s, border-color 0.13s;
}

.pm-pub-rank-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background: radial-gradient(ellipse at 50% 0%, currentColor 0%, transparent 70%);
  pointer-events: none;
}

.pm-pub-rank-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.pm-pub-rank-num {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.pm-pub-rank-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pm-text-dim);
  margin-top: 3px;
}

.pm-pub-rank-note {
  font-size: 0.6rem;
  color: var(--pm-text-dim);
  opacity: 0.65;
}

/* ── Gift DM badge (floating bottom-right notification) ── */
.pm-gift-dm-badge {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 9300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(14,8,28,0.96);
  border: 1px solid rgba(168,85,247,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  max-width: 280px;
  cursor: pointer;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.pm-gift-dm-badge.show {
  transform: translateY(0);
  opacity: 1;
}

.pm-gift-dm-badge-icon { font-size: 1.4rem; flex-shrink: 0; }

.pm-gift-dm-badge-text {
  font-size: 0.74rem;
  color: #e2e8f0;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Gift notification card inside DM chat ── */
.pm-v2-gift-dm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168,85,247,0.12) 0%, rgba(99,102,241,0.08) 100%);
  border: 1px solid rgba(168,85,247,0.25);
  align-self: center;
  max-width: 90%;
}

.pm-v2-gift-dm-icon { font-size: 1.6rem; flex-shrink: 0; }

.pm-v2-gift-dm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.pm-v2-gift-dm-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c084fc;
}

.pm-v2-gift-dm-msg {
  font-size: 0.72rem;
  color: var(--pm-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Ledger ── */
.pm-ledger {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

.pm-ledger-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.015);
  transition: background 0.12s;
  cursor: default;
}

.pm-ledger-row:last-child { border-bottom: none; }

.pm-ledger-row[onclick] { cursor: pointer; }

.pm-ledger-row:hover { background: rgba(255,255,255,0.04); }

.pm-ledger-row--in  { border-left: 3px solid rgba(34,197,94,0.5); }
.pm-ledger-row--out { border-left: 3px solid rgba(239,68,68,0.4); }
.pm-ledger-row--new { background: rgba(124,58,237,0.08); border-left-color: rgba(168,85,247,0.7); }

.pm-ledger-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.pm-ledger-emoji { font-size: 1.15rem; line-height: 1; }

.pm-ledger-dir-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #0f0f1a;
}
.pm-ledger-dir-dot.in  { background: #22c55e; }
.pm-ledger-dir-dot.out { background: #ef4444; }

.pm-ledger-body { min-width: 0; }

.pm-ledger-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pm-text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-ledger-sub {
  font-size: 0.68rem;
  color: var(--pm-text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-ledger-tag {
  font-family: monospace;
  font-size: 0.65rem;
  opacity: 0.7;
}

.pm-ledger-msg {
  font-size: 0.66rem;
  color: var(--pm-text-dim);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-ledger-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.pm-ledger-amount {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.pm-ledger-amount.in  { color: #4ade80; }
.pm-ledger-amount.out { color: #f87171; }

.pm-ledger-ts {
  font-size: 0.62rem;
  color: var(--pm-text-dim);
  opacity: 0.7;
  white-space: nowrap;
}

.pm-ledger-new-pip {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(168,85,247,0.25);
  color: #c084fc;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pm-ledger-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--pm-text-dim);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}

.pm-ledger-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.pm-ledger-tab {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--pm-text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pm-ledger-tab.active {
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.4);
  color: #d8b4fe;
}

/* ── Gift Catalog ── */
.pm-gc-wrap { margin-bottom: 20px; }

.pm-gc-head {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pm-text-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-gc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(168,85,247,0.15);
  color: #c084fc;
  font-size: 0.66rem;
  font-weight: 700;
}

.pm-gc-sections { display: flex; flex-direction: column; gap: 18px; }

.pm-gc-group-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
}
.pm-gc-group-label--friendship { color: #f472b6; background: rgba(244,114,182,0.12); }
.pm-gc-group-label--energy     { color: #facc15; background: rgba(250,204,21,0.10); }
.pm-gc-group-label--lifestyle  { color: #34d399; background: rgba(52,211,153,0.10); }
.pm-gc-group-label--assets     { color: #fbbf24; background: rgba(251,191,36,0.10); }
.pm-gc-group-label--vip        { color: #c084fc; background: rgba(192,132,252,0.12); }

.pm-gc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.pm-gc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px 10px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
  color: var(--pm-text);
  overflow: hidden;
}

.pm-gc-card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.pm-gc-card:hover .pm-gc-card-glow { opacity: 1; }

.pm-gc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.pm-gc-card:active { transform: translateY(0); }

.pm-gc-card.active {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* Per-category card theming */
.pm-gc-card--friendship { border-color: rgba(244,114,182,0.18); }
.pm-gc-card--friendship .pm-gc-card-glow { background: radial-gradient(ellipse at 50% 0%, rgba(244,114,182,0.14) 0%, transparent 70%); }
.pm-gc-card--friendship:hover  { border-color: rgba(244,114,182,0.5); background: rgba(244,114,182,0.07); }
.pm-gc-card--friendship.active { border-color: rgba(244,114,182,0.7); background: rgba(244,114,182,0.13); box-shadow: 0 0 0 3px rgba(244,114,182,0.15); }

.pm-gc-card--energy { border-color: rgba(250,204,21,0.18); }
.pm-gc-card--energy .pm-gc-card-glow { background: radial-gradient(ellipse at 50% 0%, rgba(250,204,21,0.16) 0%, transparent 70%); }
.pm-gc-card--energy:hover  { border-color: rgba(250,204,21,0.5); background: rgba(250,204,21,0.07); }
.pm-gc-card--energy.active { border-color: rgba(250,204,21,0.7); background: rgba(250,204,21,0.13); box-shadow: 0 0 0 3px rgba(250,204,21,0.15); }

.pm-gc-card--lifestyle { border-color: rgba(52,211,153,0.18); }
.pm-gc-card--lifestyle .pm-gc-card-glow { background: radial-gradient(ellipse at 50% 0%, rgba(52,211,153,0.14) 0%, transparent 70%); }
.pm-gc-card--lifestyle:hover  { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.07); }
.pm-gc-card--lifestyle.active { border-color: rgba(52,211,153,0.7); background: rgba(52,211,153,0.13); box-shadow: 0 0 0 3px rgba(52,211,153,0.15); }

.pm-gc-card--assets { border-color: rgba(251,191,36,0.18); }
.pm-gc-card--assets .pm-gc-card-glow { background: radial-gradient(ellipse at 50% 0%, rgba(251,191,36,0.16) 0%, transparent 70%); }
.pm-gc-card--assets:hover  { border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.07); }
.pm-gc-card--assets.active { border-color: rgba(251,191,36,0.7); background: rgba(251,191,36,0.13); box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }

.pm-gc-card--vip { border-color: rgba(192,132,252,0.22); }
.pm-gc-card--vip .pm-gc-card-glow { background: radial-gradient(ellipse at 50% 0%, rgba(192,132,252,0.18) 0%, transparent 70%); }
.pm-gc-card--vip:hover  { border-color: rgba(192,132,252,0.6); background: rgba(124,58,237,0.10); }
.pm-gc-card--vip.active { border-color: rgba(192,132,252,0.8); background: rgba(124,58,237,0.18); box-shadow: 0 0 0 3px rgba(192,132,252,0.18); }

.pm-gc-emoji {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.15s;
}
.pm-gc-card:hover .pm-gc-emoji { transform: scale(1.12); }

.pm-gc-name {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--pm-text-bright);
  line-height: 1.2;
  margin-top: 1px;
}

.pm-gc-cost {
  font-size: 0.58rem;
  color: var(--pm-text-dim);
  line-height: 1;
  opacity: 0.85;
}

/* Balance bar */
.pm-gc-balance-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.pm-gc-balance-item { display: flex; align-items: center; gap: 5px; }
.pm-gc-balance-item.spark { color: #fcd34d; }
.pm-gc-balance-item.coin  { color: #fbbf24; }
.pm-gc-balance-sep { color: var(--pm-text-dim); opacity: 0.4; }

/* Gift Center send form */
.pm-gc-form {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 20px;
}

.pm-gc-form-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pm-text-dim);
  margin-bottom: 14px;
}

.pm-gc-send-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: var(--pm-font-heading, inherit);
  cursor: pointer;
  margin-top: 12px;
  transition: opacity 0.14s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(168,85,247,0.25);
}

.pm-gc-send-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(168,85,247,0.35); }
.pm-gc-send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Public Profile Gift Overlay Modal ── */
.pm-pub-gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background 0.25s, backdrop-filter 0.25s;
  pointer-events: none;
}

.pm-pub-gift-overlay.open {
  background: rgba(0,0,0,0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.pm-pub-gift-overlay.closing {
  background: rgba(0,0,0,0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}

.pm-pub-gift-modal {
  width: 100%;
  max-width: 540px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: rgba(14, 8, 28, 0.97);
  border: 1px solid rgba(168,85,247,0.25);
  border-bottom: none;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.pm-pub-gift-overlay.open .pm-pub-gift-modal {
  transform: translateY(0);
}

.pm-pub-gift-overlay.closing .pm-pub-gift-modal {
  transform: translateY(100%);
  transition: transform 0.22s ease-in;
}

.pm-pub-gift-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.pm-pub-gift-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-pub-gift-modal-icon {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(168,85,247,0.4));
}

.pm-pub-gift-modal-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pm-text-bright);
  line-height: 1.2;
}

.pm-pub-gift-modal-sub {
  font-size: 0.75rem;
  color: var(--pm-text-dim);
  margin-top: 1px;
}

.pm-pub-gift-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--pm-text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.pm-pub-gift-modal-close:hover { background: rgba(255,255,255,0.12); color: var(--pm-text-bright); }

.pm-pub-gift-modal-balance {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
  background: rgba(255,255,255,0.015);
}

.pm-pub-gift-modal-catalog {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  overscroll-behavior: contain;
}
.pm-pub-gift-modal-catalog::-webkit-scrollbar { width: 4px; }
.pm-pub-gift-modal-catalog::-webkit-scrollbar-track { background: transparent; }
.pm-pub-gift-modal-catalog::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.pm-pub-gift-modal-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.01);
}

.pm-pub-gift-note-input {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 0.82rem !important;
  color: var(--pm-text-bright) !important;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.pm-pub-gift-note-input:focus { border-color: rgba(168,85,247,0.5) !important; }
.pm-pub-gift-note-input::placeholder { color: var(--pm-text-dim); opacity: 0.6; }

.pm-pub-gift-send-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--pm-font-heading, inherit);
  cursor: pointer;
  transition: opacity 0.14s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 18px rgba(168,85,247,0.3);
  letter-spacing: 0.01em;
}
.pm-pub-gift-send-btn:hover  { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(168,85,247,0.4); }
.pm-pub-gift-send-btn:active { transform: translateY(0); }
.pm-pub-gift-send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

@media (min-width: 540px) {
  .pm-pub-gift-overlay { align-items: center; }
  .pm-pub-gift-modal {
    border-radius: 24px;
    border-bottom: 1px solid rgba(168,85,247,0.25);
    max-height: 80dvh;
    transform: scale(0.94) translateY(12px);
  }
  .pm-pub-gift-overlay.open .pm-pub-gift-modal { transform: scale(1) translateY(0); }
  .pm-pub-gift-overlay.closing .pm-pub-gift-modal { transform: scale(0.94) translateY(12px); }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATION SHOP — Drop Effects, Chat Effects, Entrance Anims
   ═══════════════════════════════════════════════════════════════ */

/* ── Equipped badge ── */
.pm-v2-equipped-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}
.pm-v2-shop-card.equipped { border-color: rgba(34,197,94,0.35); }

/* ── Emote pack preview ── */
.pm-v2-emote-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  padding: 6px;
  font-size: 1.3rem;
  min-height: 64px;
}

/* ── Drop effect preview ── */
.pm-v2-drop-preview { display: flex; align-items: center; justify-content: center; min-height: 64px; }
.pm-v2-drop-demo {
  display: inline-block;
  font-size: 2rem;
  animation-duration: 1.4s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

/* ── Chat effect preview ── */
.pm-v2-chat-demo {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ── Entrance anim preview ── */
.pm-v2-entrance-preview { display: flex; align-items: center; justify-content: center; min-height: 64px; }
.pm-v2-entrance-demo {
  display: inline-block;
  font-size: 2rem;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

/* ── Drop effect animations (missing ones) ── */
.drop-meteor { animation-name: pm-drop-meteor !important; }
@keyframes pm-drop-meteor {
  0%   { transform: translateY(-60px) rotate(-45deg) scale(0.3); opacity: 0; }
  30%  { transform: translateY(0) rotate(-45deg) scale(1.2); opacity: 1; filter: brightness(2); }
  60%  { transform: translateY(8px) rotate(0deg) scale(1); filter: brightness(1); }
  100% { transform: translateY(-20px) scale(0.6); opacity: 0; }
}

.drop-bloom { animation-name: pm-drop-bloom !important; }
@keyframes pm-drop-bloom {
  0%   { transform: scale(0.1); opacity: 0; filter: blur(4px); }
  40%  { transform: scale(1.3); opacity: 1; filter: blur(0); }
  100% { transform: scale(0.7); opacity: 0; }
}

.drop-glow { animation-name: pm-drop-glow !important; }
@keyframes pm-drop-glow {
  0%   { transform: scale(0.4); opacity: 0; filter: brightness(4); }
  30%  { transform: scale(1.1); opacity: 1; filter: brightness(1.8); }
  100% { transform: scale(0.8); opacity: 0; filter: brightness(0.5); }
}

.drop-launch { animation-name: pm-drop-launch !important; }
@keyframes pm-drop-launch {
  0%   { transform: translateY(60px) scale(0.2); opacity: 0; }
  25%  { transform: translateY(-10px) scale(1.2); opacity: 1; }
  60%  { transform: translateY(0) scale(1); }
  100% { transform: translateY(-50px) scale(0.5); opacity: 0; }
}

.drop-vortex { animation-name: pm-drop-vortex !important; }
@keyframes pm-drop-vortex {
  0%   { transform: scale(0.1) rotate(0deg); opacity: 0; }
  40%  { transform: scale(1.2) rotate(360deg); opacity: 1; }
  100% { transform: scale(0.6) rotate(720deg); opacity: 0; }
}

.drop-crown { animation-name: pm-drop-crown !important; }
@keyframes pm-drop-crown {
  0%   { transform: translateY(-30px) scale(0.5); opacity: 0; filter: brightness(3); }
  30%  { transform: translateY(0) scale(1.15); opacity: 1; filter: brightness(1.5); }
  70%  { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(0.7) translateY(-20px); opacity: 0; }
}

/* ── Chat Effects ── */
.chat-effect-fire {
  background: linear-gradient(135deg, rgba(251,113,133,0.15), rgba(249,115,22,0.15));
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 8px;
  color: #fb923c;
  text-shadow: 0 0 8px rgba(249,115,22,0.5);
}

.chat-effect-galaxy {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.15));
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 8px;
  color: #c084fc;
  text-shadow: 0 0 10px rgba(168,85,247,0.6);
  animation: pm-chat-galaxy-shimmer 3s ease-in-out infinite;
}
@keyframes pm-chat-galaxy-shimmer {
  0%, 100% { text-shadow: 0 0 8px rgba(168,85,247,0.4); }
  50%       { text-shadow: 0 0 16px rgba(168,85,247,0.9), 0 0 4px rgba(56,189,248,0.5); }
}

.chat-effect-neon {
  border: 1px solid rgba(168,85,247,0.5);
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(168,85,247,0.4), inset 0 0 6px rgba(168,85,247,0.05);
  color: #e879f9;
  animation: pm-chat-neon-pulse 2s ease-in-out infinite;
}
@keyframes pm-chat-neon-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(168,85,247,0.3); }
  50%       { box-shadow: 0 0 12px rgba(168,85,247,0.7), 0 0 4px rgba(236,72,153,0.4); }
}

.chat-effect-gold {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.08));
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 8px;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(245,158,11,0.5);
}

/* ── Entrance Animations ── */
@keyframes pm-entrance-sparks {
  0%   { transform: scale(0) translateY(20px); opacity: 0; filter: brightness(4); }
  40%  { transform: scale(1.3) translateY(-8px); opacity: 1; filter: brightness(2); }
  70%  { transform: scale(0.95) translateY(0); filter: brightness(1); }
  100% { transform: scale(1); opacity: 1; }
}
.entrance-sparks { animation: pm-entrance-sparks 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards; }

@keyframes pm-entrance-flame {
  0%   { transform: translateX(-30px) scale(0.6); opacity: 0; filter: blur(4px) brightness(3); }
  50%  { transform: translateX(4px) scale(1.1); opacity: 1; filter: blur(0) brightness(1.5); }
  100% { transform: translateX(0) scale(1); opacity: 1; filter: brightness(1); }
}
.entrance-flame { animation: pm-entrance-flame 0.6s ease-out forwards; }

@keyframes pm-entrance-galaxy {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; filter: blur(8px); }
  60%  { transform: scale(1.15) rotate(8deg); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.entrance-galaxy { animation: pm-entrance-galaxy 0.8s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* Preview loop versions (in-shop demo) */
.pm-v2-entrance-demo.entrance-sparks { animation: pm-entrance-sparks 1.5s cubic-bezier(0.34,1.56,0.64,1) infinite; }
.pm-v2-entrance-demo.entrance-flame  { animation: pm-entrance-flame 1.5s ease-in-out infinite; }
.pm-v2-entrance-demo.entrance-galaxy { animation: pm-entrance-galaxy 2s cubic-bezier(0.34,1.56,0.64,1) infinite; }
.pm-v2-drop-demo { animation-duration: 1.8s; animation-iteration-count: infinite; }
