/* Click · Perfil: estadísticas + acceso directo al chat dentro de identidad */
.profile-v396-identity-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  width:100%;
  margin:16px 0 2px;
  padding:9px 4px;
  border-top:1px solid rgba(255,255,255,.16);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.profile-v396-identity-stat{
  min-width:0;
  min-height:54px;
  padding:6px 5px;
  border:0;
  border-right:1px solid rgba(255,255,255,.12);
  background:transparent;
  color:inherit;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  cursor:pointer;
  font:inherit;
  border-radius:10px;
}
.profile-v396-identity-stat:last-child{border-right:0}
.profile-v396-identity-stat b{font-size:18px;line-height:1;color:#fff;font-weight:900}
.profile-v396-identity-stat span{font-size:9px;line-height:1.2;color:rgba(255,255,255,.74);font-weight:800;letter-spacing:.01em}
.profile-v396-identity-stat:hover{background:rgba(255,255,255,.07);text-decoration:none}
.profile-v396-identity-stat:focus-visible{outline:2px solid #c9b5ff;outline-offset:2px}

.profile-v396-actions{
  width:100%;
}
.profile-v396-actions .profile-v396-follow-form{min-width:0}
.profile-v396-message-btn{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid rgba(255,255,255,.20)!important;
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
  cursor:pointer;
}
.profile-v396-message-btn:hover{background:rgba(255,255,255,.17)!important;transform:translateY(-1px)}

/* Los contadores ya viven dentro de la tarjeta principal; este módulo conserva solo nivel/puntos. */
.profile-v396-level-only-card{
  padding:16px 18px!important;
  min-height:0!important;
  border-radius:22px;
  background:linear-gradient(145deg,rgba(78,68,151,.88),rgba(38,35,100,.91));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 12px 28px rgba(3,5,28,.16);
}
.profile-v396-level-only-card .profile-v396-level-only{
  min-height:0!important;
  width:100%;
  padding:0!important;
  border:0!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr);
  gap:5px 12px;
  align-items:center;
  text-align:left!important;
}
.profile-v396-level-only-card .profile-v396-level-only b{font-size:15px;color:#fff}
.profile-v396-level-only-card .profile-v396-level-only span{font-size:10px;color:rgba(255,255,255,.72)}
.profile-v396-level-only-card .profile-v396-level-only i{grid-column:1/-1;width:100%;height:7px;margin-top:4px;border-radius:99px;overflow:hidden;background:rgba(255,255,255,.12)}
.profile-v396-level-only-card .profile-v396-level-only i em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8f68ff,#cf78ff)}

@media (min-width:901px){
  .profile-v396-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important}
  .profile-v396-actions .profile-v396-more-actions{min-width:52px}
}
@media (max-width:900px){
  .profile-v396-identity-stats{margin-top:14px;padding:8px 2px}
  .profile-v396-identity-stat{min-height:50px}
  .profile-v396-identity-stat b{font-size:17px}
  .profile-v396-identity-stat span{font-size:9px}
  .profile-v396-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;gap:8px!important;flex-wrap:nowrap!important}
  .profile-v396-actions>form{min-width:0!important}
  .profile-v396-actions .profile-v396-message-btn{width:100%!important;min-width:0!important}
  .profile-v396-actions .profile-v396-more-actions{flex:0 0 auto!important}
}
@media (max-width:480px){
  .profile-v396-identity-stats{margin-top:12px}
  .profile-v396-identity-stat{min-height:46px;padding:5px 2px}
  .profile-v396-identity-stat b{font-size:15px}
  .profile-v396-identity-stat span{font-size:8px}
  .profile-v396-actions{gap:6px!important}
  .profile-v396-message-btn span{display:inline}
}

/* En tema claro global, mantener legibilidad dentro de la tarjeta personalizada del perfil. */
html[data-theme="light"] .profile-v396-identity-stat b,
html[data-theme="light"] .profile-v396-message-btn{color:inherit}


/* V2 · botones del perfil más estéticos en PC y móvil */
.profile-v396-actions{
  width:100%;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px!important;
  align-items:stretch!important;
  margin-top:14px;
}
.profile-v396-actions > form,
.profile-v396-actions > details,
.profile-v396-actions > a,
.profile-v396-actions > button{
  min-width:0;
}
.profile-v396-actions .profile-v396-follow-form,
.profile-v396-actions .profile-v396-follow-form .profile-v396-btn,
.profile-v396-actions .profile-v396-more-actions,
.profile-v396-actions .profile-v396-more-summary,
.profile-v396-actions .profile-v396-message-btn{
  width:100%;
}
.profile-v396-actions .profile-v396-btn,
.profile-v396-actions .profile-v396-more-summary{
  min-height:48px;
  padding:0 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16)!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:800;
  letter-spacing:-.01em;
  box-shadow:0 10px 22px rgba(8,7,32,.18);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  text-decoration:none;
  white-space:nowrap;
}
.profile-v396-actions .profile-v396-btn:hover,
.profile-v396-actions .profile-v396-more-summary:hover,
.profile-v396-actions .profile-v396-more-actions[open] > .profile-v396-more-summary{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(8,7,32,.24);
}
.profile-v396-actions .profile-v396-btn.primary{
  background:linear-gradient(135deg,#8a57ff 0%, #a151ff 55%, #c85cff 100%)!important;
  border-color:transparent!important;
  color:#fff!important;
}
.profile-v396-actions .profile-v396-btn.primary:hover{filter:brightness(1.04)}
.profile-v396-message-btn,
.profile-v396-more-summary{
  background:rgba(255,255,255,.09)!important;
  color:#fff!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.profile-v396-message-btn:hover,
.profile-v396-more-summary:hover,
.profile-v396-more-actions[open] > .profile-v396-more-summary{
  background:rgba(255,255,255,.14)!important;
  border-color:rgba(255,255,255,.24)!important;
}
.profile-v396-btn-icon{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:14px;
  line-height:1;
  flex:0 0 24px;
}
.profile-v396-btn-icon-chat{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
}
.profile-v396-btn-label{display:inline-block; overflow:hidden; text-overflow:ellipsis}
.profile-v396-more-actions{
  position:relative;
}
.profile-v396-more-summary{
  list-style:none;
}
.profile-v396-more-summary::-webkit-details-marker{display:none}
.profile-v396-btn-dots{
  display:inline-flex;
  align-items:center;
  gap:4px;
  justify-content:center;
  min-width:20px;
}
.profile-v396-btn-dots i{
  width:5px;
  height:5px;
  border-radius:999px;
  background:currentColor;
  display:block;
  opacity:.92;
  box-shadow:0 0 0 3px rgba(255,255,255,.04);
}
.profile-v396-more-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:220px;
  z-index:20;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(43,31,94,.98),rgba(31,23,68,.98));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 18px 38px rgba(0,0,0,.32);
  padding:8px;
}
.profile-v396-more-menu form + form{margin-top:6px}
.profile-v396-more-menu button{
  width:100%;
  min-height:42px;
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  color:#fff;
  font:inherit;
  font-weight:700;
  text-align:left;
  padding:0 14px;
}
.profile-v396-more-menu button:hover{background:rgba(255,255,255,.12)}
.profile-v396-more-menu button.danger{color:#ffd6df; background:rgba(255,96,132,.10)}
.profile-v396-more-menu button.danger:hover{background:rgba(255,96,132,.18)}

@media (max-width:900px){
  .profile-v396-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-more-summary{
    min-height:46px;
    padding:0 12px;
    gap:8px;
    border-radius:14px;
    font-size:15px;
  }
  .profile-v396-more-menu{
    right:0;
    left:auto;
    min-width:200px;
    max-width:min(84vw,240px);
  }
}
@media (max-width:560px){
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-more-summary{
    min-height:44px;
    padding:0 10px;
    font-size:14px;
    gap:7px;
  }
  .profile-v396-btn-icon{width:22px;height:22px;flex-basis:22px;font-size:13px}
  .profile-v396-btn-dots i{width:4px;height:4px}
  .profile-v396-more-menu{
    top:calc(100% + 6px);
    min-width:188px;
  }
}
html[data-theme="light"] .profile-v396-message-btn,
html[data-theme="light"] .profile-v396-more-summary{
  color:inherit!important;
  background:rgba(88,64,160,.08)!important;
  border-color:rgba(88,64,160,.18)!important;
}
html[data-theme="light"] .profile-v396-btn-icon{background:rgba(88,64,160,.10)}


/* V15 · botón Seguir/Siguiendo compacto y estético */
.profile-v396-follow-form .profile-v396-btn{
  white-space:nowrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  line-height:1!important;
  gap:7px!important;
}
.profile-v396-follow-form .profile-v396-btn.is-following{
  background:linear-gradient(135deg,rgba(132,89,255,.88),rgba(107,74,219,.90))!important;
  border:1px solid rgba(255,255,255,.20)!important;
  box-shadow:0 9px 20px rgba(80,51,185,.20),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
.profile-v396-follow-form .profile-v396-btn.is-following:hover{
  background:linear-gradient(135deg,rgba(119,78,238,.96),rgba(92,62,202,.96))!important;
  border-color:rgba(255,255,255,.28)!important;
}
.profile-v396-follow-check{
  width:20px;
  height:20px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  flex:0 0 20px;
  background:rgba(255,255,255,.16);
  font-size:12px;
  font-weight:1000;
  line-height:1;
}
@media(max-width:560px){
  .profile-v396-follow-form .profile-v396-btn{
    padding-inline:8px!important;
    font-size:13px!important;
    letter-spacing:-.02em!important;
  }
  .profile-v396-follow-check{
    width:18px;
    height:18px;
    flex-basis:18px;
    font-size:11px;
  }
}

/* V16 · mantener los 3 botones SIEMPRE dentro de la tarjeta */
.profile-v396-actions{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  grid-template-columns:minmax(0,1.08fr) minmax(0,1fr) minmax(0,.92fr)!important;
  gap:7px!important;
  padding:0 1px!important;
  overflow:visible!important;
}
.profile-v396-actions > *,
.profile-v396-actions > form,
.profile-v396-actions > details{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.profile-v396-actions .profile-v396-btn,
.profile-v396-actions .profile-v396-more-summary,
.profile-v396-actions .profile-v396-follow-form .profile-v396-btn,
.profile-v396-actions .profile-v396-message-btn{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding-left:9px!important;
  padding-right:9px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.profile-v396-actions .profile-v396-btn-label,
.profile-v396-actions .profile-v396-follow-form .profile-v396-btn > span:last-child,
.profile-v396-actions .profile-v396-more-summary .profile-v396-btn-label{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.profile-v396-actions .profile-v396-more-actions{
  min-width:0!important;
  width:100%!important;
}
.profile-v396-actions .profile-v396-more-menu{
  right:0!important;
  max-width:min(86vw,220px)!important;
}

@media(max-width:560px){
  .profile-v396-actions{
    grid-template-columns:minmax(0,1.05fr) minmax(0,1fr) minmax(0,.88fr)!important;
    gap:5px!important;
    padding:0!important;
  }
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-more-summary,
  .profile-v396-actions .profile-v396-follow-form .profile-v396-btn,
  .profile-v396-actions .profile-v396-message-btn{
    min-height:43px!important;
    padding-left:7px!important;
    padding-right:7px!important;
    gap:5px!important;
    border-radius:13px!important;
    font-size:12.5px!important;
  }
  .profile-v396-follow-check,
  .profile-v396-btn-icon{
    width:18px!important;
    height:18px!important;
    flex:0 0 18px!important;
    font-size:10px!important;
  }
  .profile-v396-btn-dots{
    min-width:14px!important;
    gap:3px!important;
  }
  .profile-v396-btn-dots i{
    width:4px!important;
    height:4px!important;
  }
}

@media(max-width:380px){
  .profile-v396-actions{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.78fr)!important;
    gap:4px!important;
  }
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-more-summary{
    padding-left:5px!important;
    padding-right:5px!important;
    font-size:11.5px!important;
  }
  .profile-v396-message-btn .profile-v396-btn-icon{display:none!important}
  .profile-v396-more-summary .profile-v396-btn-dots{display:none!important}
}

/* V18 · botones legibles y proporcionados: Siguiendo | Mensaje | ••• */
.profile-v396-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) 48px!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  padding:0!important;
  align-items:stretch!important;
}
.profile-v396-actions > form,
.profile-v396-actions > details,
.profile-v396-actions > button,
.profile-v396-actions > a{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.profile-v396-actions .profile-v396-btn,
.profile-v396-actions .profile-v396-message-btn,
.profile-v396-actions .profile-v396-more-summary,
.profile-v396-actions .profile-v396-follow-form .profile-v396-btn{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  padding:0 10px!important;
  gap:6px!important;
  border-radius:14px!important;
  font-size:13px!important;
  line-height:1!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
.profile-v396-actions .profile-v396-btn-label,
.profile-v396-actions .profile-v396-follow-form .profile-v396-btn > span:last-child{
  display:inline-block!important;
  min-width:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
.profile-v396-follow-check,
.profile-v396-btn-icon{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  font-size:10px!important;
}
.profile-v396-actions .profile-v396-more-actions{
  width:48px!important;
  min-width:48px!important;
  max-width:48px!important;
}
.profile-v396-actions .profile-v396-more-summary{
  width:48px!important;
  min-width:48px!important;
  max-width:48px!important;
  padding:0!important;
  justify-content:center!important;
  gap:0!important;
  overflow:hidden!important;
}
.profile-v396-more-summary .profile-v396-btn-label{
  display:none!important;
}
.profile-v396-btn-dots{
  display:inline-flex!important;
  min-width:22px!important;
  gap:4px!important;
  justify-content:center!important;
}
.profile-v396-btn-dots i{
  width:5px!important;
  height:5px!important;
}

@media(max-width:560px){
  .profile-v396-actions{
    grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) 44px!important;
    gap:6px!important;
  }
  .profile-v396-actions .profile-v396-more-actions,
  .profile-v396-actions .profile-v396-more-summary{
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
  }
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-message-btn,
  .profile-v396-actions .profile-v396-follow-form .profile-v396-btn{
    min-height:44px!important;
    padding:0 8px!important;
    gap:5px!important;
    font-size:12px!important;
  }
  .profile-v396-message-btn .profile-v396-btn-icon{
    display:inline-flex!important;
  }
}

@media(max-width:380px){
  .profile-v396-actions{
    grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) 42px!important;
    gap:5px!important;
  }
  .profile-v396-actions .profile-v396-more-actions,
  .profile-v396-actions .profile-v396-more-summary{
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
  }
  .profile-v396-actions .profile-v396-btn,
  .profile-v396-actions .profile-v396-message-btn,
  .profile-v396-actions .profile-v396-follow-form .profile-v396-btn{
    padding:0 6px!important;
    font-size:11.5px!important;
  }
  .profile-v396-message-btn .profile-v396-btn-icon{
    display:none!important;
  }
}
