{# Cross-user contamination guard. localStorage is browser-wide; if User A uploads a portfolio and User B logs in on the same browser, the stale `cassandra.pie` would otherwise render as User B's holdings. We stamp the logged-in user's id in localStorage on every authenticated page load and wipe per-user keys if the id changed since last time. Theme stays — it's cosmetic. #} {# Apply saved theme before stylesheet renders to avoid a flash. #}