import type { Metadata, Viewport } from 'next';
import './globals.css';
import { UIProvider } from '../lib/theme';

export const metadata: Metadata = {
  title: '穿山甲 · 用户中心',
  description: '管理订阅、兑换激活码、查看用量、邀请返利与账户安全设置。',
};

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="zh" data-theme="light">
      <head>
        {/* 设计令牌单一真相源,原样链入(SRI 由构建期注入) */}
        {/* eslint-disable-next-line @next/next/no-css-tags */}
        <link rel="stylesheet" href="/colors_and_type.css" />
      </head>
      <body>
        <UIProvider>{children}</UIProvider>
      </body>
    </html>
  );
}
