/* Perfil propio, diseño nuevo (referencia del dueño 2026-10-02). Todo va
   dentro de #profileView .pv2-* para no tocar otras pantallas. Se carga al
   final del <head> para ganarle a mi-perfil.css. */

#profileView .pv2-header {
  position: relative;
  padding: 0 0 18px;
  overflow: visible;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  margin: 0 0 14px;
  text-align: left;
}

/* Portada */
#profileView .pv2-header .mp-profile-cover {
  height: auto;
  aspect-ratio: 2.45 / 1;
  max-height: none;
  border-radius: 26px 26px 0 0;
  background-color: #dbe4f3;
  background-size: cover;
  background-position: center;
  position: relative;
}
#profileView .pv2-header .mp-cover-edit-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(30, 41, 59, 0.48);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}

/* Foto + botones */
#profileView .pv2-identity-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  margin-top: -74px;
  position: relative;
  z-index: 2;
}
#profileView .pv2-header .mp-avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0;
  flex: 0 0 auto;
}
#profileView .pv2-header .mp-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
}
#profileView .pv2-header .mp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#profileView .pv2-header .mp-online-dot {
  position: absolute;
  left: 6px;
  right: auto;
  bottom: 10px;
  top: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid #fff;
  display: block;
}
#profileView .pv2-header .mp-avatar-edit-btn {
  position: absolute;
  right: -4px;
  bottom: 2px;
  top: auto;
  left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  border: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#profileView .pv2-header .mp-avatar-edit-btn svg { width: 20px; height: 20px; }
#profileView .pv2-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -16px;
}
#profileView .pv2-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  white-space: nowrap;
}
#profileView .pv2-gear-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  padding: 0;
}

/* Nombre, frase, datos */
#profileView .pv2-body {
  margin-top: 0;
  padding: 22px 20px 0;
  text-align: left;
  align-items: flex-start;
  display: block;
}
#profileView .pv2-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  text-align: left;
}
#profileView .pv2-name #profileName { overflow-wrap: anywhere; }
#profileView .pv2-verified { display: inline-flex; flex: 0 0 auto; }
#profileView .pv2-verified.hidden { display: none; }
#profileView .pv2-headline {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 1.02rem;
  font-weight: 500;
}
#profileView .pv2-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.8rem;
}
#profileView .pv2-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-left: 1px solid #e2e8f0;
  white-space: nowrap;
}
#profileView .pv2-meta-item:first-child { padding-left: 0; border-left: none; }
#profileView .pv2-meta-item.hidden { display: none; }
#profileView .pv2-meta-item + .pv2-meta-item.hidden + .pv2-meta-item { border-left: 1px solid #e2e8f0; }
#profileView .pv2-meta-item svg { color: #64748b; flex: 0 0 auto; width: 16px; height: 16px; }
#profileView .pv2-meta .mp-profile-id,
#profileView .pv2-meta #profileLocation {
  margin: 0;
  padding: 0;
  background: none;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
}
#profileView .pv2-online { color: #16a34a; font-weight: 600; }
#profileView .pv2-online i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
#profileView .pv2-body .mp-profile-bio {
  margin: 12px 0 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.45;
  text-align: left;
  max-width: none;
}
#profileView .pv2-body #avatarMessage:empty { display: none; }

/* Intereses */
.pv2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.pv2-chips.hidden { display: none; }
.pv2-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  line-height: 1.2;
}
.pv2-tone-slate { background: #f1f5f9; }
.pv2-tone-blue { background: #eef4ff; }
.pv2-tone-orange { background: #fff1ec; }
.pv2-tone-pink { background: #fdeef2; }
.pv2-tone-violet { background: #f3efff; }
.pv2-tone-green { background: #ecfdf3; }
.pv2-picker .pv2-chip { cursor: pointer; opacity: 0.65; font-family: inherit; }
.pv2-picker .pv2-chip-on { opacity: 1; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15); }

/* Contadores */
#profileView .pv2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 12px 0;
  padding: 0;
  border: none;
  background: none;
}
#profileView .pv2-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  min-width: 0;
}
#profileView .pv2-stat-posts { background: linear-gradient(180deg, #f7f4ff, #ffffff); }
#profileView .pv2-stat-friends { background: linear-gradient(180deg, #f2f7ff, #ffffff); }
#profileView .pv2-stat-followers { background: linear-gradient(180deg, #fff3f5, #ffffff); }
#profileView .pv2-stat-following { background: linear-gradient(180deg, #fff8ee, #ffffff); }
#profileView .pv2-stat-icon { display: flex; height: 32px; align-items: center; }
#profileView .pv2-stat-posts .pv2-stat-icon { color: #8b5cf6; }
#profileView .pv2-stat-friends .pv2-stat-icon { color: #3b82f6; }
#profileView .pv2-stat-followers .pv2-stat-icon { color: #f43f5e; }
#profileView .pv2-stat-following .pv2-stat-icon { color: #f59e0b; }
#profileView .pv2-stat strong {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
#profileView .pv2-stat > span:last-child {
  font-size: 0.66rem;
  letter-spacing: -0.01em;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Ver anuncio / Invitar */
#profileView .pv2-earn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 12px 0;
}
#profileView .pv2-earn-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 18px;
  border: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.22);
  min-width: 0;
}
#profileView .pv2-earn-ad { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 8px 18px rgba(249, 115, 22, 0.25); }
#profileView .pv2-earn-invite { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
/* "Mi galería VYNKO" (gallery.js): a lo ancho, debajo de los otros dos. */
#profileView .pv2-earn-gallery { grid-column: 1 / -1; background: linear-gradient(135deg, #0ea5e9, #7c3aed); box-shadow: 0 8px 18px rgba(124, 58, 237, 0.25); }
#profileView .pv2-earn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
#profileView .pv2-earn-text { display: flex; flex-direction: column; min-width: 0; }
#profileView .pv2-earn-text strong { font-size: 0.84rem; font-weight: 800; line-height: 1.2; }
#profileView .pv2-earn-text small { font-size: 0.74rem; opacity: 0.95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pestañas y cuadrícula */
#profileView .pv2-content { padding-top: 4px; }
#profileView .pv2-tabs {
  display: flex;
  justify-content: flex-start;
  border-top: none;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid #e8edf5;
  margin: 0 0 12px;
  padding: 0;
  background: none;
  border-radius: 0;
}
#profileView .pv2-tabs::-webkit-scrollbar { display: none; }
#profileView .pv2-tabs .mp-profile-content-tab {
  flex: 1 0 auto;
  max-width: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 12px 11px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
  width: auto;
  height: auto;
}
#profileView .pv2-tabs .mp-profile-content-tab svg { width: 19px; height: 19px; flex: 0 0 auto; }
#profileView .pv2-tabs .mp-profile-content-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: none;
}
#profileView .pv2-content .mp-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
#profileView .pv2-content .mp-post-tile {
  aspect-ratio: 1.3 / 1;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
#profileView .pv2-content .mp-post-tile::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
#profileView .pv2-content .mp-post-tile .mp-post-play-icon { display: none; }
#profileView .pv2-content .pv2-tile-views {
  position: absolute;
  left: 8px;
  bottom: 7px;
  right: auto;
  top: auto;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: none;
  padding: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
#profileView .pv2-content .pv2-tile-kind {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 380px) {
  #profileView .pv2-name { font-size: 1.4rem; }
  #profileView .pv2-edit-btn { padding: 0 13px; font-size: 0.88rem; }
  #profileView .pv2-header .mp-avatar-wrap,
  #profileView .pv2-header .mp-avatar { width: 100px; height: 100px; }
}

/* Promoción "Invita a 200 y gana" (public/promo-invite.js) */
.pi-card {
  background: linear-gradient(135deg, #1e1b4b, #4c1d95 55%, #be185d);
  color: #fff;
  border-radius: 22px;
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: 0 12px 28px rgba(76, 29, 149, 0.3);
}
.pi-top { display: flex; gap: 12px; align-items: center; }
.pi-gift { font-size: 2rem; }
.pi-top strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.pi-top small { display: block; opacity: 0.85; font-size: 0.78rem; margin-top: 3px; }
.pi-top small b { color: #fde68a; }
.pi-progress-label { margin: 14px 0 6px; font-size: 0.92rem; }
.pi-progress-label b { color: #fde68a; font-size: 1.05rem; }
.pi-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.pi-bar i { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #f472b6); }
.pi-sub { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 0.76rem; opacity: 0.9; }
.pi-win, .pi-done { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); font-size: 0.85rem; line-height: 1.4; }
.pi-win { background: rgba(251, 191, 36, 0.25); }
.pi-how { margin-top: 12px; width: 100%; padding: 11px; border: none; border-radius: 14px; background: #fff; color: #4c1d95; font-weight: 800; font-size: 0.9rem; cursor: pointer; font-family: inherit; }
.pi-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, 0.55); display: flex; align-items: flex-end; justify-content: center; }
.pi-sheet { position: relative; background: #fff; color: #0f172a; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; border-radius: 26px 26px 0 0; padding: 22px 20px 26px; }
.pi-sheet h3 { margin: 0 0 12px; font-size: 1.25rem; }
.pi-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: none; background: #f1f5f9; font-size: 1rem; cursor: pointer; }
.pi-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: pi; }
.pi-steps li { counter-increment: pi; position: relative; padding: 10px 0 10px 46px; font-size: 0.93rem; line-height: 1.45; border-bottom: 1px dashed #e2e8f0; }
.pi-steps li::before { content: counter(pi); position: absolute; left: 0; top: 10px; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pi-rules { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: #f8fafc; font-size: 0.84rem; color: #334155; }
.pi-rules ul { margin: 6px 0 0; padding-left: 18px; }
.pi-rules li { margin: 4px 0; line-height: 1.4; }
.pi-cta { margin-top: 16px; width: 100%; padding: 13px; border: none; border-radius: 16px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; font-family: inherit; }

/* Fila ID · ubicación · en línea: siempre en una sola línea (como la referencia). */
#profileView .pv2-meta { flex-wrap: nowrap; overflow: hidden; font-size: 0.78rem; }
#profileView .pv2-meta-item { padding: 0 8px; }
#profileView .pv2-meta-item svg { width: 15px; height: 15px; }
#profileView #profileLocationItem { min-width: 0; flex: 0 1 auto; }
#profileView #profileLocationItem #profileLocation { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#profileView .pv2-meta .mp-profile-id,
#profileView .pv2-meta #profileLocation { font-size: 0.78rem; }
#profileView .pv2-header .mp-avatar { padding: 0; background-clip: padding-box; }
#profileView .pv2-tabs .mp-profile-content-tab { padding: 11px 9px 10px; font-size: 0.82rem; gap: 5px; }
#profileView .pv2-tabs .mp-profile-content-tab svg { width: 17px; height: 17px; }

/* Anuncio de la promoción en Inicio y en VYNKO Play (public/promo-invite.js) */
.pi-feed-card { background: #fff; border-radius: 22px; overflow: hidden; margin: 0 0 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); cursor: pointer; }
.pi-feed-head { display: flex; flex-direction: column; padding: 12px 16px 10px; }
.pi-feed-head span { font-weight: 800; color: #0f172a; }
.pi-feed-head small { color: #64748b; font-size: 0.78rem; }
.pi-feed-card img { display: block; width: 100%; height: auto; }
.pi-feed-btn { display: block; width: calc(100% - 24px); margin: 12px; padding: 12px; border: none; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; font-weight: 800; font-size: 0.95rem; cursor: pointer; font-family: inherit; }
.pi-vph-tile { position: relative; overflow: hidden; padding: 0; border: none; }
.pi-vph-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pi-vph-label { position: absolute; bottom: 48px; left: 8px; background: rgba(15, 23, 42, 0.6); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pi-vph-cta { position: absolute; left: 8px; right: 8px; bottom: 8px; background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; font-size: 0.78rem; font-weight: 800; padding: 7px 6px; border-radius: 10px; text-align: center; }
