Smart Picture-in-Picture mode with all YouTube controls and functions
Smart Picture-in-Picture mode for YouTube with full playback controls and navigation.

Enable detailed logging in DevTools console:
localStorage.setItem('YOUTUBE_PIP_DEBUG', 'true');
Then reload the page. Logs include timestamps and are scoped by module.
MIT License — Free to use, modify, and distribute.
This userscript is not affiliated with, endorsed by, or officially connected to Google LLC or YouTube. It is an independent, third-party tool. Use at your own risk. YouTube's site structure and APIs may change at any time.