/* 首页字体：shadow DOM 里的 @font-face 不生效，所以在外层文档声明 */
@font-face{font-family:"Inter";src:url(/brand/fonts/inter-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"JBMono";src:url(/brand/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap}
/* 首页（自定义首页内容在 shadow DOM 里）显示时，把整站切到深色变量，让导航栏和页脚跟首页连成一体 */
html:has(.custom-home-content){color-scheme:dark;--background:#0a0a0b;--foreground:#f3f3f3;--card:#141416;--card-foreground:#f3f3f3;--popover:#18181b;--popover-foreground:#f3f3f3;--primary:#7c83ff;--primary-foreground:#fff;--secondary:#27272a;--secondary-foreground:#e4e6ff;--muted:#1c1c1f;--muted-foreground:#a1a1aa;--accent:#7c83ff;--accent-foreground:#fff;--border:#ffffff1a;--input:#ffffff2b;--ring:#7c83ff}
html:has(.custom-home-content) body{background:#0a0a0b}
/* 滚动后 new-api 的悬浮胶囊导航太窄，菜单会被截断；首页上把它放宽 */
html:has(.custom-home-content) header>div{min-width:min(960px,calc(100vw - 32px))}
html:has(.custom-home-content) header nav a.truncate{flex-shrink:0}
/* 登录、注册、找回密码页：和首页 B 一样的深色、钴蓝光晕、玻璃卡片 */
html:has(.grid.h-svh.max-w-none form){color-scheme:dark;--background:#0a0a0b;--foreground:#f3f3f3;--card:#141416;--card-foreground:#f3f3f3;--popover:#18181b;--popover-foreground:#f3f3f3;--primary:#7c83ff;--primary-foreground:#fff;--secondary:#27272a;--secondary-foreground:#e4e6ff;--muted:#1c1c1f;--muted-foreground:#a1a1aa;--accent:#7c83ff;--accent-foreground:#fff;--border:#ffffff1a;--input:#ffffff24;--ring:#7c83ff}
html:has(.grid.h-svh.max-w-none form) body{background:#0a0a0b}
.grid.h-svh.max-w-none:has(form){background:radial-gradient(55% 45% at 50% 0%,#3d45e852,transparent 72%),radial-gradient(30% 25% at 80% 12%,#ffd23f12,transparent 70%),radial-gradient(45% 50% at 50% 110%,#3d45e833,transparent 70%),#0a0a0b;color:#f3f3f3}
.grid.h-svh.max-w-none:has(form):before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.06;mix-blend-mode:overlay;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.grid.h-svh.max-w-none:has(form) .container>div{position:relative;border-radius:20px;border:1px solid transparent;background:linear-gradient(180deg,#151518e6,#0e0e10e6) padding-box,linear-gradient(150deg,#ffffff33,#ffffff0a 40%,#ffffff05 70%,#7c83ff59) border-box;box-shadow:inset 0 1px 0 #ffffff12,0 40px 100px -40px #000,0 0 90px -30px #3d45e880;backdrop-filter:blur(12px)}
@media(max-width:639px){.grid.h-svh.max-w-none:has(form) .container>div{border-radius:16px}}
.grid.h-svh.max-w-none:has(form) h1,.grid.h-svh.max-w-none:has(form) h2{letter-spacing:-.02em;font-weight:800}
.grid.h-svh.max-w-none:has(form) input{background:#0b0b0d;border-color:#ffffff1f;color:#f3f3f3;border-radius:10px}
.grid.h-svh.max-w-none:has(form) input:focus{border-color:#7c83ff;box-shadow:0 0 0 3px #7c83ff33}
.grid.h-svh.max-w-none:has(form) form button[type=submit]{border-radius:10px;background:linear-gradient(180deg,#9aa0ff,#7c83ff 55%,#5c64f0);border-color:#8b91ff;color:#fff;box-shadow:inset 0 1px 0 #ffffff66,0 0 0 1px #7c83ff55,0 12px 36px -10px #5c64ffcc}
.grid.h-svh.max-w-none:has(form) a{color:#c7caff}
.grid.h-svh.max-w-none:has(form)>a{color:#f3f3f3}
