/* FrpDeck 1.0 —— 基础：字体、三套主题 × 深浅色、背景光晕、动效 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  /* --code 用于命令、配置、机器码；--mono 用于地址和数值，手机上换成正文字体（见 pages.css 末尾） */
  --code: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  --mono: var(--code);
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.3, 1.25, .5, 1);
  --std: cubic-bezier(.4, 0, .2, 1);
  /* 弹簧缓动：按弹簧公式采样（与 motion.js 同一套公式），回弹不超过 2.5%；不支持 linear() 的浏览器用近似曲线 */
  --sp-out: cubic-bezier(.16, 1, .3, 1);
  --sp-snap: cubic-bezier(.3, 1.25, .5, 1);
  --sp-soft: cubic-bezier(.22, 1, .36, 1);
  --top-h: 64px;
  color-scheme: dark;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --sp-out: linear(0, 0.0061 1.5%, 0.0229 3%, 0.0391 4%, 0.0586 5%, 0.1056 7%, 0.1462 8.5%, 0.2051 10.5%, 0.4092 17%, 0.5142 20.5%, 0.6098 24%, 0.6938 27.5%, 0.7561 30.5%, 0.8176 34%, 0.8677 37.5%, 0.9076 41%, 0.9425 45%, 0.9704 49.5%, 0.9906 54.5%, 1.0032 60%, 1.0095 66%, 1.0111 73.5%, 1.0035 99.5%, 1);
    --sp-snap: linear(0, 0.0066 1.5%, 0.0249 3%, 0.0527 4.5%, 0.1012 6.5%, 0.144 8%, 0.2071 10%, 0.4456 17%, 0.5587 20.5%, 0.6183 22.5%, 0.6603 24%, 0.7365 27%, 0.802 30%, 0.857 33%, 0.902 36%, 0.9433 39.5%, 0.9739 43%, 0.9981 47%, 1.0146 51.5%, 1.0233 56.5%, 1.0253 60.5%, 1.0241 65.5%, 1.0088 85%, 1);
    --sp-soft: linear(0, 0.0035 1%, 0.0201 2.5%, 0.0472 4%, 0.0821 5.5%, 0.1226 7%, 0.1666 8.5%, 0.3696 15%, 0.4581 18%, 0.5516 21.5%, 0.6331 25%, 0.6933 28%, 0.753 31.5%, 0.8023 35%, 0.8479 39%, 0.8875 43.5%, 0.9202 48.5%, 0.9457 54%, 0.9659 60.5%, 0.9787 67%, 0.9882 75%, 0.9946 85.5%, 0.9982 99.5%, 1);
    --spring: var(--sp-snap);
  }
}

/* ---------- 黑金香槟（默认） ---------- */
html, html[data-palette="gold"] {
  --bg: #0C0C0D; --bg-2: #121213; --surface: rgba(26, 25, 27, .94); --surface-2: rgba(255, 255, 255, .032); --surface-solid: #1C1B1E;
  --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .15); --hover: rgba(255, 255, 255, .05);
  --text: #EAE7E2; --muted: #A09A91; --faint: #78736B; --sheen: rgba(255, 255, 255, .035);
  --pri: #E6BE7A; --pri-2: #C99A4E; --pri-3: #FFF1D0; --on-pri: #1E1405; --sec: #7C8CF8;
  --good: #4ADE80; --warn: #FB923C; --crit: #F87171; --off: #6F6353;
  --glow1: rgba(230, 190, 122, .085); --glow2: rgba(124, 140, 248, .07); --glow3: rgba(251, 146, 60, .035);
  --logo-main: #E6BE7A; --logo-acc: #FFF1D0; --gold: #E6BE7A; --gold-ink: #1E1405;
  --heading: linear-gradient(110deg, #B0A290 0%, #EFE8DD 28%, #CFC3B1 52%, #EFE8DD 76%, #B0A290 100%);
  --btn: linear-gradient(180deg, #F3D49C, #D9A95A); --btn-shadow: 0 8px 24px -10px rgba(230, 190, 122, .65);
  --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 18px 44px -28px rgba(0, 0, 0, .75); --topbar: rgba(12, 12, 13, .8);
}
/* ---------- 深海青 ---------- */
html[data-palette="teal"] {
  --bg: #0A0D0F; --bg-2: #0F1315; --surface: rgba(23, 29, 33, .94); --surface-solid: #192024;
  --text: #E2EAEC; --muted: #8FA0A5; --faint: #66767B;
  --pri: #2DD4E4; --pri-2: #14B8C6; --pri-3: #D5FBFF; --on-pri: #03181B; --sec: #3B82F6;
  --good: #34D399; --warn: #FBBF24; --crit: #F87171; --off: #586C74;
  --glow1: rgba(20, 184, 166, .11); --glow2: rgba(59, 130, 246, .08); --glow3: rgba(34, 211, 238, .05);
  --logo-main: #2DD4E4; --logo-acc: #D5FBFF;
  --heading: linear-gradient(110deg, #9AAEB4 0%, #E8F0F1 28%, #B2C5CA 52%, #E8F0F1 76%, #9AAEB4 100%);
  --btn: linear-gradient(180deg, #5EE6F2, #22C3D6); --btn-shadow: 0 8px 24px -10px rgba(45, 212, 228, .6);
  --topbar: rgba(10, 13, 15, .8);
}
/* ---------- 钛银蓝 ---------- */
html[data-palette="titanium"] {
  --bg: #0B0C10; --bg-2: #101217; --surface: rgba(25, 28, 36, .94); --surface-solid: #1B1E27;
  --text: #E4E7EE; --muted: #98A0B2; --faint: #687084;
  --pri: #5B8CFF; --pri-2: #3D6CF0; --pri-3: #E2E8F4; --on-pri: #FFFFFF; --sec: #C3CCDC;
  --good: #34D399; --warn: #FBBF24; --crit: #F87171; --off: #5D6883;
  --glow1: rgba(91, 140, 255, .11); --glow2: rgba(56, 189, 248, .07); --glow3: rgba(195, 204, 220, .045);
  --logo-main: #5B8CFF; --logo-acc: #E2E8F4;
  --heading: linear-gradient(110deg, #96A2BA 0%, #E9ECF3 28%, #BCC5D5 52%, #E9ECF3 76%, #96A2BA 100%);
  --btn: linear-gradient(180deg, #7EA5FF, #4A7BF7); --btn-shadow: 0 8px 24px -10px rgba(91, 140, 255, .6);
  --topbar: rgba(11, 12, 16, .8);
}

/* ---------- 浅色 ---------- */
html[data-mode="light"] {
  color-scheme: light;
  --surface: rgba(255, 255, 255, .74); --surface-2: rgba(40, 30, 10, .028); --surface-solid: #FFFFFF;
  --line: rgba(40, 30, 10, .09); --line-2: rgba(40, 30, 10, .16); --hover: rgba(40, 30, 10, .04);
  --good: #16A34A; --crit: #DC2626; --gold: #A8792F; --gold-ink: #FFFFFF;
  --shadow: 0 20px 50px -28px rgba(60, 40, 10, .28); --sheen: rgba(255, 255, 255, 0);
}
html[data-mode="light"], html[data-mode="light"][data-palette="gold"] {
  --bg: #FAF7F2; --bg-2: #FFFFFF; --text: #2A2116; --muted: #7A6A55; --faint: #A89880; --off: #A89880;
  --pri: #A8792F; --pri-2: #8F6424; --pri-3: #E6BE7A; --on-pri: #FFFFFF; --sec: #5B6BE0; --warn: #EA7A1A;
  --glow1: rgba(230, 190, 122, .34); --glow2: rgba(124, 140, 248, .15); --glow3: rgba(251, 146, 60, .13);
  --logo-main: #A8792F; --logo-acc: #E6BE7A;
  --heading: linear-gradient(110deg, #5A4A34 0%, #2A2116 30%, #8A7658 55%, #2A2116 80%);
  --btn: linear-gradient(180deg, #C0913F, #A8792F); --btn-shadow: 0 8px 22px -10px rgba(168, 121, 47, .5);
  --topbar: rgba(250, 247, 242, .72);
}
html[data-mode="light"][data-palette="teal"] {
  --bg: #F2F9FA; --text: #0F2A30; --muted: #56727A; --faint: #8FA7AE; --off: #8FA7AE;
  --pri: #0B8797; --pri-2: #0A6F7C; --pri-3: #2DD4E4; --sec: #2563EB; --warn: #D97706;
  --line: rgba(10, 40, 50, .09); --line-2: rgba(10, 40, 50, .16); --hover: rgba(10, 40, 50, .04); --surface-2: rgba(10, 40, 50, .028);
  --glow1: rgba(45, 212, 228, .26); --glow2: rgba(59, 130, 246, .13); --glow3: rgba(20, 184, 166, .12);
  --logo-main: #0B8797; --logo-acc: #2DD4E4;
  --heading: linear-gradient(110deg, #33515A 0%, #0F2A30 30%, #56727A 55%, #0F2A30 80%);
  --btn: linear-gradient(180deg, #14A3B5, #0B8797); --btn-shadow: 0 8px 22px -10px rgba(11, 135, 151, .5);
  --topbar: rgba(242, 249, 250, .72);
}
html[data-mode="light"][data-palette="titanium"] {
  --bg: #F4F6FA; --text: #111827; --muted: #5B6478; --faint: #9AA3B5; --off: #9AA3B5;
  --pri: #3D6CF0; --pri-2: #2F5BD3; --pri-3: #8FB0FF; --sec: #64748B; --warn: #D97706;
  --line: rgba(15, 25, 50, .09); --line-2: rgba(15, 25, 50, .16); --hover: rgba(15, 25, 50, .04); --surface-2: rgba(15, 25, 50, .028);
  --glow1: rgba(91, 140, 255, .2); --glow2: rgba(56, 189, 248, .13); --glow3: rgba(148, 163, 184, .13);
  --logo-main: #3D6CF0; --logo-acc: #8FB0FF;
  --heading: linear-gradient(110deg, #3A4661 0%, #111827 30%, #5B6478 55%, #111827 80%);
  --btn: linear-gradient(180deg, #5B8CFF, #3D6CF0); --btn-shadow: 0 8px 22px -10px rgba(61, 108, 240, .5);
  --topbar: rgba(244, 246, 250, .74);
}

/* ---------- 基础元素 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01'; overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
::selection { background: color-mix(in srgb, var(--pri) 35%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--pri) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mini { font-size: 12.5px; }
.spacer { flex: 1; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
svg.i.fill { fill: currentColor; stroke: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Logo 着色 ---------- */
.fd-logo .lg-m { fill: var(--logo-main); }
.fd-logo .lg-a { fill: var(--logo-acc); }
.fd-logo { display: block; }

/* ---------- 背景：三团缓慢漂移的光晕（没有网格） ---------- */
.bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bgfx .g { position: absolute; border-radius: 50%; will-change: transform; }
.bgfx .g1 { width: 115vmax; height: 115vmax; left: 8%; top: -8%; background: radial-gradient(circle, var(--glow1), transparent 65%); animation: glowDrift1 22s ease-in-out infinite alternate; }
.bgfx .g2 { width: 100vmax; height: 100vmax; left: 92%; top: 26%; background: radial-gradient(circle, var(--glow2), transparent 65%); animation: glowDrift2 27s ease-in-out infinite alternate; }
.bgfx .g3 { width: 90vmax; height: 90vmax; left: 44%; top: 108%; background: radial-gradient(circle, var(--glow3), transparent 65%); animation: glowDrift3 31s ease-in-out infinite alternate; }
/* 工作页面：光晕挪到四角之外、再淡一点，保证表格和数字清楚 */
.bgfx.work .g1 { left: -6%; top: -30%; opacity: .75; }
.bgfx.work .g2 { left: 104%; top: 14%; opacity: .7; }
.bgfx.work .g3 { left: 40%; top: 122%; opacity: .65; }
@keyframes glowDrift1 { 0% { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-42%, -58%) scale(1.15); } }
@keyframes glowDrift2 { 0% { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-36%, -40%) scale(1.18); } }
@keyframes glowDrift3 { 0% { transform: translate(-50%, -50%) scale(1.1); } to { transform: translate(-62%, -42%) scale(1); } }

/* ---------- 动效 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes drawer { from { transform: translateX(104%); } to { transform: none; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes blink2 { 0%, 100% { opacity: 1; } 25%, 75% { opacity: .25; } 50% { opacity: 1; } }
@keyframes shimmer { 0% { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shine { 0% { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes textShine { 0% { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 换页：内容分块依次淡入上浮 */
.page > * { animation: fadeUp .55s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .04s; }
.page > *:nth-child(3) { animation-delay: .08s; }
.page > *:nth-child(4) { animation-delay: .12s; }
.page > *:nth-child(5) { animation-delay: .16s; }
.page > *:nth-child(6) { animation-delay: .2s; }
.page > *:nth-child(n+7) { animation-delay: .24s; }

/* 卡片网格：卡片依次弹入；所在的分页容器不再整体淡入，避免叠加 */
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.vgrid > .card, .lgrid > .card, .srv-grid > .card { animation: cardIn .85s var(--sp-out) both; }
.vgrid > .card:nth-child(2), .lgrid > .card:nth-child(2), .srv-grid > .card:nth-child(2) { animation-delay: .06s; }
.vgrid > .card:nth-child(3), .lgrid > .card:nth-child(3), .srv-grid > .card:nth-child(3) { animation-delay: .12s; }
.vgrid > .card:nth-child(4), .lgrid > .card:nth-child(4), .srv-grid > .card:nth-child(4) { animation-delay: .18s; }
.vgrid > .card:nth-child(5), .lgrid > .card:nth-child(5), .srv-grid > .card:nth-child(5) { animation-delay: .24s; }
.vgrid > .card:nth-child(n+6), .lgrid > .card:nth-child(n+6), .srv-grid > .card:nth-child(n+6) { animation-delay: .3s; }
.page > .paged-list:has(> .vgrid, > .lgrid, > .srv-grid) { animation: none; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; opacity: .8; }
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--hover) 40%, var(--surface-2) 80%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }

/* 标签页切到后台、或用户要求减少动态效果：动画全停 */
html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bgfx .g { animation: none !important; }
}
