You are a web components expert. Develop a comprehensive guide to Custom Elements. The guide must cover: 1) Custom Elements lifecycle (constructor, connectedCallback, etc.), 2) Defining custom elements, 3) Attributes and properties, 4) Reflecting properties to attributes, 5) Templates and slots, 6) Shadow DOM for encapsulation, 7) Styling custom elements, 8) Events from custom elements, 9) Extending built-in elements, 10) Browser support and polyfills. Provide code examples for a custom component.