/* Click · Perfil · menú compacto de configuración */
.profile-settings-control{
  position:absolute;
  top:22px;
  right:24px;
  z-index:24;
}

.profile-settings-trigger{
  width:50px;
  height:50px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:50%;
  display:grid;
  place-items:center;
  padding:0;
  background:rgba(255,255,255,.94);
  color:#6030cf;
  font-size:23px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(31,18,72,.20);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.profile-settings-trigger:hover,
.profile-settings-trigger[aria-expanded="true"]{
  transform:translateY(-1px) rotate(4deg);
  background:#fff;
  box-shadow:0 14px 34px rgba(83,42,170,.28);
}

.profile-settings-trigger:focus-visible{
  outline:3px solid rgba(147,92,255,.28);
  outline-offset:3px;
}

.profile-settings-popover{
  position:absolute;
  top:60px;
  right:0;
  width:278px;
  padding:10px;
  border:1px solid rgba(117,83,192,.22);
  border-radius:20px;
  background:rgba(255,255,255,.98);
  box-shadow:0 20px 54px rgba(26,15,62,.28);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  transform-origin:top right;
  animation:profileSettingsIn .16s ease-out;
}

.profile-settings-popover[hidden]{display:none!important}

@keyframes profileSettingsIn{
  from{opacity:0;transform:translateY(-6px) scale(.97)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.profile-settings-popover-title{
  padding:7px 10px 9px;
  color:#817796;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.profile-settings-popover a,
.profile-settings-popover button{
  width:100%;
  min-height:60px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:0;
  border-radius:14px;
  background:transparent;
  color:#2f2859;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
  font:inherit;
  transition:background .16s ease, transform .16s ease;
}

.profile-settings-popover a:hover,
.profile-settings-popover button:hover{
  background:#f4efff;
  transform:translateX(2px);
}

.profile-settings-option-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#eee7ff,#f8f5ff);
  color:#7543ea;
  font-size:19px;
  font-weight:900;
}

.profile-settings-popover strong{
  display:block;
  color:#342b62;
  font-size:13px;
  line-height:1.2;
}

.profile-settings-popover small{
  display:block;
  margin-top:3px;
  color:#8a829e;
  font-size:11px;
  line-height:1.35;
}

/* El dueño ya no necesita los tres botones inferiores. */
.profile-v396-identity-card > .profile-v396-actions:empty{
  display:none!important;
}

@media(max-width:760px){
  .profile-settings-control{
    top:12px;
    right:12px;
  }

  .profile-settings-trigger{
    width:44px;
    height:44px;
    font-size:20px;
    box-shadow:0 9px 22px rgba(31,18,72,.22);
  }

  .profile-settings-popover{
    top:52px;
    right:0;
    width:min(270px,calc(100vw - 34px));
    border-radius:18px;
  }
}

@media(max-width:430px){
  .profile-settings-control{
    top:10px;
    right:10px;
  }

  .profile-settings-trigger{
    width:42px;
    height:42px;
    font-size:19px;
  }

  .profile-settings-popover{
    top:49px;
    width:min(260px,calc(100vw - 24px));
    padding:8px;
  }
}


/* ===== FIX móvil: menú del engranaje fuera del recorte de la portada ===== */
.profile-v396-hero > .profile-settings-control{
  z-index:80;
}

.profile-v396-hero > .profile-settings-control .profile-settings-popover{
  z-index:81;
}

@media(max-width:760px){
  .profile-v396-hero > .profile-settings-control{
    top:12px;
    right:20px;
  }

  .profile-v396-hero > .profile-settings-control .profile-settings-popover{
    top:52px;
    right:0;
    width:min(286px,calc(100vw - 32px));
    max-height:calc(100vh - 150px);
    overflow-y:auto;
    overscroll-behavior:contain;
    border-radius:18px;
    box-shadow:0 22px 54px rgba(13,8,42,.38);
  }

  .profile-v396-hero > .profile-settings-control .profile-settings-popover a,
  .profile-v396-hero > .profile-settings-control .profile-settings-popover button{
    min-height:62px;
  }
}

@media(max-width:430px){
  .profile-v396-hero > .profile-settings-control{
    top:10px;
    right:15px;
  }

  .profile-v396-hero > .profile-settings-control .profile-settings-popover{
    top:49px;
    right:0;
    width:min(276px,calc(100vw - 24px));
    max-height:calc(100vh - 125px);
  }
}
