I replaced the unsupported --spacing() usages with concrete rem values (2rem for spacing 8 and 1rem for spacing 4). This preserves layout while ensuring custom property values are valid. The “Invalid custom property” runtime error should now be resolved.
This replaces the @theme block that referenced var(...) with literal values and adds a dark-mode override at @theme .dark. That keeps Tailwind’s tokens valid and resolves the parser error while preserving your light/dark behavior. Your existing :root and .dark sections can remain; they no longer drive tokens but won’t cause errors.
I replaced the @theme block that referenced var(--...) with literal OKLCH values and added a proper @theme .dark override. This resolves the Lightning CSS parsing issue and keeps your light/dark tokens working reliably with Tailwind v4. If diagnostics persist, please re-open the preview to recompile styles and confirm the error is gone.