<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->

# HARD RULE: Dialogs / modals

Every modal MUST use the shared `Modal` component at `src/components/ui/modal.tsx`. Never hand-roll a modal overlay. The non-negotiable standard it encodes:

- **Backdrop:** a **full-page gray shade** — `bg-ink/40` covering the whole viewport. **Never blur the background** (no `backdrop-blur`), never `bg-transparent`, never a flat heavy black.
- **Card:** `flex max-h-[90vh] flex-col` so it always fits the viewport.
- **Header:** `shrink-0`. **Body:** `flex-1 overflow-y-auto` — long content scrolls INSIDE the dialog and is never cut off at the bottom.
- Escape + click-outside close it; body scroll locks while open.

If you touch a dialog, migrate it to `<Modal>` if it isn't already. The existing connection dialogs already conform to these exact classes.

# HARD RULE: Every user-facing string is translatable (i18n)

The app is multilingual. Never hardcode a user-facing string in a component. All copy goes through the i18n dictionaries in `src/i18n/messages/<locale>.json` and is read via the `t()` helper. New UI must add its keys to every locale file. The active locale is chosen by the user and stored in the `rk_locale` cookie.
