<!-- LOVABLE:BEGIN -->
> [!IMPORTANT]
> This project is connected to [Lovable](https://lovable.dev). Avoid rewriting
> published git history — force pushing, or rebasing/amending/squashing commits
> that are already pushed — as it rewrites history on Lovable's side and the
> user will likely lose their project history.
>
> Commits you push to the connected branch sync back to Lovable and show up in
> the editor, so keep the branch in a working state.
<!-- LOVABLE:END -->

## Rules

- Organizer privileges come only from `public.user_roles` read through the `has_role` security-definer function — never from a column on `profiles`, and never from browser storage — so privileges cannot be escalated from the client.
- AI tribute generation lives in a `requireSupabaseAuth` server function and is refused unless the signed-in account holds `organizer` or `admin`, so a fresh signup cannot spend AI credits.
- Lovable AI Gateway calls stay server-side in `*.server.ts` modules and stream; the browser only calls the server function that returns the finished draft.
- Long organizer-supplied bilingual copy lives in a shared `src/lib/` module that both the on-page section and its dedicated print route render, so the screen text and the paper text can never drift apart.
- A print-ready document is a real route with A4 `@page` rules and print CSS that hides site chrome, and its language comes from the URL — this keeps paper output faithful instead of relying on a client-side PDF renderer.
- A section that must be readable in one language on its own keeps a local language state (null = follow the site language), so reading one section in another language never changes the whole site.
- AI-generated decorative pictures are composed with the subject inside the central 40% of the frame and wide empty margins, because every display slot crops them with `object-cover`; without that margin the subject is clipped by the container edge.


