Build a cookie consent banner with Tailwind CSS: a fixed bottom bar with a short explanation, an "Accept all" primary button, a "Reject non-essential" secondary button and a "Manage preferences" link that opens a dialog with per-category toggles (necessary locked on, analytics, marketing) each with a one-line purpose. Persist the choice, let the banner be dismissed without a choice only after preferences are set, and keep the dialog keyboard-accessible with focus trapping.
提示词保持英文原文——直接粘贴进 Claude、Cursor、v0 或任何 AI 编程工具即可使用。