Explain the purpose of the ::part and ::slotted pseudo-elements.

::part styles custom elements’ shadow DOM, while ::slotted styles elements passed into slots within Web Components.