/* =========================================================
   悦宇玩机 · 设计系统
   深空科技风 / 克制用色 / 玻璃质感 / 细网格
   ========================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(var(--accent-rgb), .28); color: var(--text-strong); }

/* ---------- 2. Tokens ---------- */
/* 兜底 token：与 themes.css 的 aurora 保持一致，
   即使主题文件加载失败也能正常渲染。themes.css 会按 data-theme 覆盖。 */
:root {
  /* 排版与结构 */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --header-h: 68px;
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Consolas, monospace;

  /* 底色 */
  --bg: #05070d;
  --bg-soft: #080b13;
  --bg-elev: #0b0f1a;
  --panel: rgba(255, 255, 255, .032);
  --panel-2: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .14);

  /* 文字 */
  --text: #e9eefb;
  --text-2: #b9c2d6;
  --text-strong: #ffffff;
  --muted: #7f8aa3;
  --muted-2: #5c6478;

  /* 强调色 */
  --accent: #3ddcff;
  --accent-rgb: 61, 220, 255;
  --accent-2: #7b6bff;
  --accent-2-rgb: 123, 107, 255;
  --accent-3: #37e0a0;
  --accent-3-rgb: 55, 224, 160;
  --accent-text: #8ceaff;
  --accent-weak: rgba(61, 220, 255, .07);
  --accent-weak-2: rgba(61, 220, 255, .12);
  --accent-line: rgba(61, 220, 255, .32);
  --on-accent: #04060c;
  --on-grad: #05080f;

  --grad: linear-gradient(120deg, #3ddcff 0%, #6a9dff 45%, #7b6bff 100%);
  --grad-soft: linear-gradient(120deg, rgba(61, 220, 255, .16), rgba(123, 107, 255, .16));
  --glow-a: rgba(61, 220, 255, .16);
  --glow-b: rgba(123, 107, 255, .16);
  --glow-c: rgba(55, 224, 160, .07);
  --hero-glow: rgba(61, 220, 255, .13);

  /* 状态色 */
  --danger: #ff6b6b;
  --danger-rgb: 255, 107, 107;
  --danger-text: #ffb3b3;
  --warn: #ffb347;
  --warn-rgb: 255, 179, 71;
  --warn-text: #ffcd85;
  --good-text: #6ff0bd;

  /* 表面与阴影 */
  --wash-rgb: 255, 255, 255;
  --inset-hi: rgba(255, 255, 255, .45);
  --shadow-rgb: 0, 0, 0;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .85);
  --shadow-card: 0 4px 18px -12px rgba(0, 0, 0, .9);
  --shadow-card-hover: 0 22px 50px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(61, 220, 255, .12);
  --shadow-glow: 0 0 0 1px rgba(61, 220, 255, .25), 0 18px 50px -18px rgba(61, 220, 255, .35);

  --header-bg: rgba(5, 7, 13, .72);
  --footer-bg: rgba(6, 8, 14, .6);
  --nav-mobile-bg: rgba(7, 9, 16, .97);
  --stat-bg: rgba(8, 11, 19, .72);
  --info-row-bg: rgba(10, 14, 22, .8);
  --auth-card-bg: rgba(10, 13, 21, .82);
  --admin-side-bg: rgba(7, 9, 15, .85);
  --admin-top-bg: rgba(6, 8, 14, .7);

  /* 代码与滚动条 */
  --code-bg: rgba(255, 255, 255, .07);
  --code-fg: #a5e9ff;
  --pre-bg: rgba(0, 0, 0, .45);
  --scroll-track: #070a11;
  --scroll-thumb: #1d2432;
  --scroll-thumb-hover: #2a3346;

  /* 背景网格 */
  --grid-line: rgba(255, 255, 255, .035);
  --grid-opacity: .8;

  /* 控件 */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8aa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* 主题预览色（切换面板中的迷你示意图） */
  --theme-color: #05070d;
  --pv-bg: #05070d;
  --pv-card: #0e1421;
  --pv-line: rgba(255, 255, 255, .12);
  --pv-accent: #3ddcff;
  --pv-accent2: #7b6bff;
  --pv-text: #e9eefb;
}

/* ---------- 3. 背景层 ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* 用 clip 而不是 hidden：hidden 会让 body 变成滚动容器，iOS 上会让 sticky 页头失效 */
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 12% -8%, var(--glow-a), transparent 65%),
    radial-gradient(760px 500px at 86% 4%, var(--glow-b), transparent 62%),
    radial-gradient(900px 700px at 50% 110%, var(--glow-c), transparent 65%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 5%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 5%, transparent 78%);
  opacity: var(--grid-opacity);
}

/* ---------- 4. 布局 ---------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 900px; }
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.section-title .bar { width: 4px; height: 22px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 18px rgba(var(--accent-rgb), .6); }
.section-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13.5px; transition: .2s; white-space: nowrap; }
.link-more:hover { color: var(--accent); gap: 10px; }

/* ---------- 5. 顶部导航 ---------- */
.site-header {
  position: -webkit-sticky;
  position: sticky; top: 0; z-index: 60;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  color: var(--on-accent); font-weight: 800; font-size: 15px; letter-spacing: -.5px;
  box-shadow: 0 6px 20px -6px rgba(var(--accent-rgb), .75), inset 0 1px 0 var(--inset-hi);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: .3px; }
.brand-sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: 1.6px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 13px; border-radius: 9px; font-size: 14px; color: var(--text-2);
  transition: .2s; position: relative;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text-strong); background: transparent; }
.nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px;
  border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px rgba(var(--accent-rgb), .7);
}
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 13px; transition: .22s; cursor: text; min-width: 190px;
}
.header-search:hover { border-color: var(--line-strong); color: var(--text-2); }
.header-search kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; padding: 2px 6px;
  border-radius: 5px; border: 1px solid var(--line); color: var(--muted-2); background: rgba(var(--wash-rgb), .03);
}
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px; color: var(--text-2); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: .22s cubic-bezier(.4, 0, .2, 1); white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); background: rgba(var(--wash-rgb), .09); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: var(--on-accent); border: none; font-weight: 650;
  box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb), .8);
}
.btn-primary:hover { box-shadow: 0 14px 38px -10px rgba(var(--accent-rgb), .95); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 15.5px; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger-text); border-color: rgba(var(--danger-rgb), .3); background: rgba(var(--danger-rgb), .09); }
.btn-danger:hover { background: rgba(var(--danger-rgb), .16); border-color: rgba(var(--danger-rgb), .5); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 7. 徽标 / 标签 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text-2); font-size: 13px; transition: .2s; cursor: pointer;
}
.chip:hover { border-color: rgba(var(--accent-rgb), .35); color: var(--text); background: rgba(var(--accent-rgb), .07); }
.chip.active { border-color: rgba(var(--accent-rgb), .5); color: var(--on-accent); background: var(--accent); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px; line-height: 1.5;
  background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-accent { color: var(--accent-text); border-color: rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .1); }
.badge-good { color: var(--good-text); border-color: rgba(var(--accent-3-rgb), .3); background: rgba(var(--accent-3-rgb), .1); }
.badge-warn { color: var(--warn-text); border-color: rgba(var(--warn-rgb), .3); background: rgba(var(--warn-rgb), .1); }
.badge-mute { color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ---------- 8. Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -60px; width: min(780px, 100%); height: 460px;
  transform: translateX(-50%); z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow), transparent 62%);
  filter: blur(30px);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .75; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .25);
  background: rgba(var(--accent-rgb), .07); color: var(--accent-text); font-size: 12.5px; letter-spacing: .3px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: 34px;                                   /* 老浏览器回退（不认识 clamp 时用这行） */
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.14; font-weight: 750;
  letter-spacing: -.035em; margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.hero p.lead { color: var(--muted); font-size: 15px; font-size: clamp(14.5px, 1.6vw, 16.5px); max-width: 620px; margin: 0 auto 38px; }
.hero-search { max-width: 660px; margin: 0 auto; position: relative; }
.hero-search form {
  display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 20px;
  border-radius: 16px; border: 1px solid rgba(var(--wash-rgb), .1);
  background: rgba(var(--wash-rgb), .045); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: rgba(var(--wash-rgb), .045); backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px -30px rgba(var(--shadow-rgb), .9), inset 0 1px 0 rgba(var(--wash-rgb), .07);
  transition: .25s;
}
.hero-search form:focus-within { border-color: rgba(var(--accent-rgb), .5); box-shadow: var(--shadow-glow); }
.hero-search input {
  flex: 1; min-width: 0; height: 44px; background: none; border: none; outline: none;
  font-size: 15.5px; color: var(--text);
}
.hero-search input::placeholder { color: var(--muted-2); }
.hero-tags { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; color: var(--muted-2); font-size: 12.5px; }
.hero-tags a { color: var(--text-2); border-bottom: 1px dashed rgba(var(--wash-rgb), .18); padding-bottom: 1px; transition: .2s; }
.hero-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* 数据条 */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 64px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--line);
}
.stat { background: var(--stat-bg); padding: 22px 24px; text-align: left; }
.stat-num { font-size: 27px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-num span { font-size: 14px; color: var(--muted-2); font-weight: 500; margin-left: 3px; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; letter-spacing: .4px; }

/* ---------- 9. 软件卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 16px; }
/* 网格子项允许收缩，避免长标题在窄屏撑破容器 */
.grid > *, .list-layout > *, .split-2 > *, .split-admin > *, .split-cat > *, .split-half > * { min-width: 0; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: .26s cubic-bezier(.4, 0, .2, 1); overflow: hidden;
}
.card::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, -10%), rgba(var(--accent-rgb), .13), transparent 72%);
  opacity: 0; transition: .3s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .32); background: rgba(var(--wash-rgb), .05); box-shadow: var(--shadow-card-hover); }
.card:hover::after { opacity: 1; }
.card-top { display: flex; align-items: flex-start; gap: 13px; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--on-grad);
  box-shadow: inset 0 1px 0 var(--inset-hi), 0 8px 18px -10px rgba(var(--shadow-rgb), .9);
}
.card-title { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-2); }
.card-foot .meta { display: inline-flex; align-items: center; gap: 5px; }
.card-foot .spacer { margin-left: auto; }
.card-arrow { color: var(--muted-2); transition: .2s; }
.card:hover .card-arrow { color: var(--accent); transform: translateX(3px); }
.card-featured { background: linear-gradient(160deg, rgba(var(--accent-rgb), .055), rgba(var(--accent-2-rgb), .035)); }
.card-featured::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), .55), rgba(var(--accent-2-rgb), .22) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.card-flag { position: absolute; top: 0; right: 0; font-size: 10.5px; letter-spacing: .6px; padding: 3px 10px; border-bottom-left-radius: 9px; background: rgba(var(--accent-rgb), .16); color: var(--accent-text); border-left: 1px solid rgba(var(--accent-rgb), .2); border-bottom: 1px solid rgba(var(--accent-rgb), .2); }

/* 横向列表行 */
.rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.row {
  display: flex; align-items: center; gap: 16px; padding: 15px 20px;
  border-bottom: 1px solid var(--line); transition: .18s;
}
.row:last-child { border-bottom: none; }
.row:hover { background: rgba(var(--wash-rgb), .035); }
.row-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: var(--on-grad); flex-shrink: 0; }
.row-main { min-width: 0; flex: 1; overflow: hidden; }
.row-title { display: block; max-width: 100%; font-size: 14.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12px; color: var(--muted-2); margin-top: 2px; display: flex; gap: 12px; flex-wrap: wrap; }
.row-right { font-size: 12px; color: var(--muted-2); white-space: nowrap; }

/* ---------- 10. 分类卡 ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
  transition: .22s;
}
.cat:hover { border-color: rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .05); transform: translateY(-2px); }
.cat-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-text); border: 1px solid rgba(var(--accent-rgb), .14); flex-shrink: 0; }
.cat-name { font-size: 13.8px; font-weight: 550; }
.cat-count { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* ---------- 11. 列表页 ---------- */
.page-head { padding: 48px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.page-head h1 { font-size: 30px; font-weight: 720; letter-spacing: -.028em; }
.page-head .lead { color: var(--muted); font-size: 14px; margin-top: 8px; }
/* 面包屑：允许换行，单项不拆字；最后一项（当前页标题）超出时省略 */
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 12.5px; color: var(--muted-2); margin-bottom: 14px; }
.crumb > * { white-space: nowrap; flex: 0 0 auto; }
.crumb > span:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumb a:hover { color: var(--accent); }
.list-layout { display: grid; grid-template-columns: 232px 1fr; gap: 32px; align-items: start; }
.split-2 { grid-template-columns: 1fr 320px; }
.split-admin { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.split-cat { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.split-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
position: -webkit-sticky;
.side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 22px; }
.side-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 16px; }
.side-title { font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; font-weight: 600; }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.side-list a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-2); transition: .16s;
}
.side-list a:hover { background: var(--panel-2); color: var(--text); }
.side-list a.active { background: rgba(var(--accent-rgb), .1); color: var(--accent-text); font-weight: 550; }
.side-list .n { margin-left: auto; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .result { font-size: 13px; color: var(--muted); }
.toolbar .result b { color: var(--text); font-variant-numeric: tabular-nums; }
.sorts { display: flex; gap: 4px; margin-left: auto; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.sorts a { padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--muted); transition: .18s; }
.sorts a:hover { color: var(--text); }
.sorts a.active { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(var(--wash-rgb), .07) inset; }

.search-inline { display: flex; gap: 8px; width: 100%; }
.search-inline .input { flex: 1; }

/* ---------- 12. 表单控件 ---------- */
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(var(--wash-rgb), .03); color: var(--text);
  font-size: 14px; outline: none; transition: .2s;
}
.textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.65; resize: vertical; font-family: inherit; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); background: rgba(var(--wash-rgb), .05); }
.select { appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- 13. 详情页 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 336px; gap: 34px; align-items: start; }
.detail-hero { display: flex; gap: 18px; align-items: flex-start; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(var(--wash-rgb), .05), rgba(var(--wash-rgb), .015)); }
.detail-icon { width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--on-grad); flex-shrink: 0; box-shadow: inset 0 1px 0 var(--inset-hi), 0 14px 30px -16px rgba(var(--shadow-rgb), .95); }
.detail-title { font-size: 26px; font-weight: 720; letter-spacing: -.025em; line-height: 1.3; }
.detail-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.panel-title { font-size: 15px; font-weight: 650; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.prose { font-size: 14.5px; color: var(--text-2); line-height: 1.85; }
.prose p { margin: 0 0 12px; }
.prose h3, .prose h4, .prose h5 { color: var(--text); margin: 22px 0 10px; font-size: 15.5px; font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 20px; list-style: revert; }
.prose li { margin-bottom: 5px; }
.prose code { font-family: var(--mono); font-size: 12.8px; padding: 2px 6px; border-radius: 5px; background: rgba(var(--wash-rgb), .07); color: var(--code-fg); }
.prose pre { background: var(--pre-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; margin-bottom: 14px; }
.prose pre code { background: none; padding: 0; color: var(--text-2); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(var(--accent-rgb), .3); }
.prose strong { color: var(--text); }

position: -webkit-sticky;
.dl-card { position: sticky; top: calc(var(--header-h) + 20px); }
.dl-btn { height: 54px; font-size: 16px; width: 100%; }
.dl-note { font-size: 12px; color: var(--muted-2); margin-top: 10px; text-align: center; }
.info-list { margin-top: 18px; display: flex; flex-direction: column; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--info-row-bg); font-size: 13px; }
.info-row .k { color: var(--muted); }
.info-row .v { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.notice {
  display: flex; gap: 10px; padding: 13px 15px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  border: 1px solid rgba(var(--warn-rgb), .22); background: rgba(var(--warn-rgb), .07); color: var(--warn-text);
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice.blue { border-color: rgba(var(--accent-rgb), .22); background: rgba(var(--accent-rgb), .07); color: var(--accent-text); }

/* ---------- 14. 分页 / 空态 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; color: var(--text-2);
  transition: .18s; font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: rgba(var(--accent-rgb), .4); color: var(--text); }
.pager .cur { background: var(--grad); color: var(--on-accent); border: none; font-weight: 650; }
.pager .gap { border: none; background: none; color: var(--muted-2); }
.empty { text-align: center; padding: 78px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 13.5px; }

/* ---------- 15. 页脚 ---------- */
.site-footer { margin-top: 90px; border-top: 1px solid var(--line); background: var(--footer-bg); }
.footer-inner { padding: 48px 0 30px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 12px; max-width: 300px; line-height: 1.75; }
.footer-col h4 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; font-size: 13.5px; color: var(--text-2); padding: 5px 0; transition: .18s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0 26px; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted-2); flex-wrap: wrap; }
.footer-bottom .disclaimer { max-width: 720px; line-height: 1.7; }

/* 备案信息：独占一行，排在页脚最底部 */
.footer-legal {
  flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 14px; margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--muted-2);
}
.footer-legal a {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--muted-2); transition: color .18s; border-bottom: 1px solid transparent;
}
.footer-legal a:hover { color: var(--accent); }
.footer-legal-sep { opacity: .45; }
.footer-legal-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: .85; }

/* ---------- 16. 登录页 ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 396px; padding: 34px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--auth-card-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line); background: var(--auth-card-bg); backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head .brand-mark { margin: 0 auto 16px; width: 44px; height: 44px; border-radius: 13px; font-size: 18px; }
.auth-head h1 { font-size: 20px; font-weight: 680; letter-spacing: -.01em; }
.auth-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* 登录页「记住这台设备」 */
.check-row {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer; user-select: none;
  font-size: 12.5px; line-height: 1.65; color: var(--muted); margin: -2px 0 -2px;
}
.check-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 15px; height: 15px; margin: 3px 0 0; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 4px;
  background: rgba(var(--wash-rgb), .05); cursor: pointer; position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.check-row input[type="checkbox"]:hover { border-color: rgba(var(--accent-rgb), .5); }
.check-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.check-row input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px;
  width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; border: 1px solid rgba(var(--danger-rgb), .3); background: rgba(var(--danger-rgb), .1); color: var(--danger-text); }
.alert.ok { border-color: rgba(var(--accent-3-rgb), .3); background: rgba(var(--accent-3-rgb), .1); color: var(--good-text); }

/* ---------- 17. 后台 ---------- */
.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  border-right: 1px solid var(--line); background: var(--admin-side-bg);
  position: -webkit-sticky;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-side-head { padding: 20px 20px 18px; border-bottom: 1px solid var(--line); }
.admin-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.admin-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  font-size: 13.8px; color: var(--text-2); transition: .16s;
}
.admin-nav a:hover { background: var(--panel-2); color: var(--text); }
.admin-nav a.active { background: rgba(var(--accent-rgb), .1); color: var(--accent-text); font-weight: 550; box-shadow: inset 2px 0 0 var(--accent); }
.admin-nav .sep { margin: 12px 0 6px; padding: 0 12px; font-size: 10.5px; letter-spacing: 1.2px; color: var(--muted-2); text-transform: uppercase; }
.admin-side-foot { padding: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-2); }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  border-bottom: 1px solid var(--line); background: var(--admin-top-bg);
  position: -webkit-sticky;
  -webkit-backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30;
}
.admin-top h1 { font-size: 16px; font-weight: 620; }
.admin-top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.admin-content { padding: 26px 28px 60px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 18px 20px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad-soft); filter: blur(8px); }
.kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: rgba(var(--wash-rgb), .025); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(var(--wash-rgb), .028); }
.table .t-title { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.table .t-title .mini { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--on-grad); flex-shrink: 0; }
.table .t-name { font-weight: 550; }
.table .t-slug { font-size: 11.5px; color: var(--muted-2); font-family: var(--mono); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.admin-toolbar .input, .admin-toolbar .select { height: 38px; width: auto; min-width: 150px; }
.admin-toolbar .grow { flex: 1; min-width: 180px; }
.pill-form { display: inline; }

.form-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 26px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.icon-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-picker label { cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.icon-picker span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); transition: .16s;
}
.icon-picker input:checked + span { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), .1); }

/* ---------- 18. 工具类 ---------- */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .detail-layout { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; }
  .dl-card { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-search { display: none; }
  .nav.open {
    display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px;
    background: var(--nav-mobile-bg); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  }
  .nav.open a { padding: 12px 14px; }
  .list-layout { grid-template-columns: 1fr; }
  .split-admin { grid-template-columns: 1fr; }
  .split-cat { grid-template-columns: 1fr; }
  .split-half { grid-template-columns: 1fr; }
  .side { position: static; }
  .side-block:first-child { overflow-x: auto; }
  .side-list { flex-direction: row; flex-wrap: wrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-body { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav .sep { display: none; }
  .admin-content { padding: 18px 16px 50px; }
  .admin-top { padding: 0 16px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 64px 0 48px; }
  .hero-search form { padding: 6px 6px 6px 14px; }
  .hero-search .btn { padding: 0 16px; }
  .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .section-title { font-size: 21px; }
  .page-head h1 { font-size: 24px; }
  .detail-hero { flex-direction: column; padding: 22px; }
  .detail-title { font-size: 21px; }
  .panel { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .table { font-size: 12.5px; }
  .table th, .table td { padding: 10px 11px; }
}

/* ---------- 20. 打印 / 可达性 ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; border: 2px solid var(--scroll-track); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* ---------- 21. 主题切换器 ---------- */
.theme-picker { position: relative; flex-shrink: 0; }

.theme-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px 0 11px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-2);
  font-size: 13px; cursor: pointer; -webkit-appearance: none;
  transition: border-color .22s, background .22s, color .22s;
}
.theme-btn:hover { border-color: var(--line-strong); color: var(--text); background: var(--panel-2); }
.theme-btn[aria-expanded="true"] {
  border-color: var(--accent-line); color: var(--text); background: var(--accent-weak);
}
.theme-btn-dots { display: inline-flex; gap: 3px; }
.theme-btn-dots i {
  display: block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 7px rgba(var(--accent-rgb), .65);
  transition: transform .3s cubic-bezier(.34, 1.4, .64, 1);
}
.theme-btn-dots i:nth-child(2) { background: var(--accent-2); box-shadow: none; }
.theme-btn-dots i:nth-child(3) { background: var(--accent-3); box-shadow: none; }
.theme-btn:hover .theme-btn-dots i:nth-child(1) { transform: translateY(-1px); }
.theme-btn[aria-expanded="true"] .theme-btn-dots i:nth-child(1) { transform: translateY(-1px); }
.theme-btn[aria-expanded="true"] .theme-btn-dots i:nth-child(3) { transform: translateY(1px); }

/* 弹出面板 */
.theme-pop {
  position: absolute; right: 0; top: calc(100% + 14px); width: 384px;
  padding: 16px; border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  z-index: 90;
  opacity: 0; visibility: hidden;
  transform: translateY(-9px) scale(.975);
  transform-origin: top right;
  transition: opacity .18s ease, transform .26s cubic-bezier(.34, 1.32, .64, 1), visibility .18s;
}
.theme-pop.open { opacity: 1; visibility: visible; transform: none; }
/* 顶部一道微光，增加质感 */
.theme-pop::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

.theme-pop-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 13px; padding: 0 3px;
}
.theme-pop-head b { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.theme-pop-hint { font-size: 11px; color: var(--muted-2); letter-spacing: .2px; }

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.theme-opt {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 8px; border-radius: 13px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: transparent;
  -webkit-appearance: none; font: inherit;
  transition: border-color .2s, background .2s, transform .2s;
}
.theme-opt:hover { border-color: var(--line-strong); background: rgba(var(--wash-rgb), .045); }
.theme-opt:active { transform: scale(.985); }
.theme-opt[aria-checked="true"] {
  border-color: var(--accent-line);
  background: var(--accent-weak);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* 迷你页面预览（颜色由各主题的 --pv-* 提供） */
.theme-pv {
  display: block; height: 74px; border-radius: 9px; overflow: hidden;
  background: var(--pv-bg); border: 1px solid var(--pv-line);
  padding: 7px 8px;
}
.theme-pv-bar {
  display: block; height: 10px; border-radius: 3px;
  background: var(--pv-card); border: 1px solid var(--pv-line);
}
.theme-pv-hero {
  display: block; margin-top: 8px; width: 58%; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--pv-accent), var(--pv-accent2));
}
.theme-pv-line {
  display: block; margin-top: 5px; width: 80%; height: 3px; border-radius: 2px;
  background: var(--pv-text); opacity: .26;
}
.theme-pv-cards { display: flex; gap: 5px; margin-top: 8px; }
.theme-pv-cards i {
  display: block; flex: 1; height: 15px; border-radius: 4px;
  background: var(--pv-card); border: 1px solid var(--pv-line);
}

.theme-opt-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 1px; }
.theme-opt-name { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.theme-opt-tag {
  font-size: 9.5px; letter-spacing: .3px; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; white-space: nowrap;
}
.theme-opt[aria-checked="true"] .theme-opt-tag { color: var(--accent-text); border-color: var(--accent-line); }

.theme-check {
  position: absolute; top: 13px; right: 13px;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 10px; font-weight: 800; line-height: 1;
  opacity: 0; transform: scale(.5); transition: opacity .2s, transform .24s cubic-bezier(.34, 1.4, .64, 1);
  box-shadow: 0 2px 9px rgba(var(--accent-rgb), .55);
}
.theme-opt[aria-checked="true"] .theme-check { opacity: 1; transform: none; }

/* 切换主题时的柔和过渡（避免整页硬闪） */
html.theme-switching body,
html.theme-switching .site-header,
html.theme-switching .site-footer,
html.theme-switching .card,
html.theme-switching .panel,
html.theme-switching .row,
html.theme-switching .rows,
html.theme-switching .cat,
html.theme-switching .btn,
html.theme-switching .chip,
html.theme-switching .input,
html.theme-switching .select,
html.theme-switching .textarea,
html.theme-switching .theme-pop,
html.theme-switching .theme-opt,
html.theme-switching .admin-side,
html.theme-switching .admin-top,
html.theme-switching .table th,
html.theme-switching .table td,
html.theme-switching .stat,
html.theme-switching .kpi {
  transition: background-color .34s ease, border-color .34s ease, color .26s ease, box-shadow .34s ease !important;
}

@media (max-width: 860px) {
  .theme-btn-text { display: none; }
  .theme-btn { padding: 0 11px; }
  .theme-pop {
    position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 8px);
    width: auto; transform-origin: top center;
  }
}
@media (max-width: 420px) {
  .theme-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .theme-opt-name { font-size: 12px; }
  .theme-pop { padding: 13px; }
}

/* =========================================================
   22. 移动端与浏览器兼容加固
   目标：iOS Safari / Android Chrome / 微信内置浏览器 / 旧版 WebView 均可用
   ========================================================= */

/* ---------- 22.1 基础：点击高亮、文本缩放、媒体元素 ---------- */
html {
  -webkit-tap-highlight-color: transparent;   /* 去掉安卓点击时的蓝色块 */
  -webkit-text-size-adjust: 100%;             /* 防 iOS 横屏自动放大字号 */
  text-size-adjust: 100%;
}
img, svg, video, canvas, iframe { max-width: 100%; }
img, video { height: auto; }

/* ---------- 22.2 刘海屏 / 圆角屏安全区（配合 viewport-fit=cover） ---------- */
@supports (padding: env(safe-area-inset-left)) {
  .wrap {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .site-header { padding-top: env(safe-area-inset-top); }
  .nav.open { top: calc(var(--header-h) + env(safe-area-inset-top)); }
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
  .auth-wrap { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .admin-content { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
}

/* ---------- 22.3 iOS 上输入框字号 < 16px 会强制放大页面 ---------- */
@media (max-width: 860px) {
  .input, .select, .textarea, .hero-search input { font-size: 16px; }
  .input, .select, .textarea { min-height: 44px; }
  .select { height: auto; padding-top: 9px; padding-bottom: 9px; }
}

/* ---------- 22.4 表格：窄屏横向滚动，不撑破页面 ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
@media (max-width: 860px) {
  /* 7 列的表格在手机上必须横滑，否则每列会被压成一字一行 */
  .table { min-width: 820px; }
  .table td, .table th { white-space: nowrap; }
  .table .t-title { min-width: 220px; }
  .table-wrap { border-radius: var(--radius-sm); }
}

/* ---------- 22.5 长串（网址、英文名）不撑破容器 ---------- */
.prose, .prose p, .prose li, .prose a, .info-row .v, .detail-sub,
.card-title, .card-sub, .table .t-name, .footer-brand p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.prose a, .info-row .v, .table .t-slug { overflow-wrap: anywhere; }

/* ---------- 22.6 触屏设备：取消 hover 造成的「点完卡住」 ---------- */
/* 只撤销位移类效果，不动背景/边框，避免影响 .btn-primary 等在触屏上的底色 */
@media (hover: none) {
  .btn:hover, .chip:hover, .theme-opt:hover, .cat:hover, .card:hover { transform: none; }
  .btn-primary:hover { filter: none; }
  .card:hover .card-arrow { transform: none; }
  .link-more:hover { gap: 6px; }
}

/* ---------- 22.7 触摸目标不小于 44px（拇指可点） ---------- */
@media (pointer: coarse) {
  .nav-toggle { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .theme-btn { min-height: 40px; }
  .nav a { padding: 13px 14px; }
  .footer-col a { padding: 8px 0; }
  .footer-legal a { padding: 4px 0; }
  .theme-opt { min-height: 44px; }
}

/* ---------- 22.8 移动端地址栏伸缩导致的 100vh 跳动 ---------- */
/* 注意：admin-side 的高度只在桌面固定，手机上必须放到文档流里，否则会撑出一屏空白 */
@supports (height: 100dvh) {
  body { min-height: 100dvh; }
  .auth-wrap { min-height: calc(100dvh - var(--header-h)); }
  .admin-body { min-height: 100dvh; }
  .nav.open { max-height: calc(100dvh - var(--header-h)); }
}
@media (min-width: 861px) {
  @supports (height: 100dvh) {
    .admin-side { height: 100dvh; }
  }
}

/* ---------- 22.9 移动端菜单：可滚动，长菜单不会被截断 ---------- */
@media (max-width: 860px) {
  .nav.open {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .theme-pop { top: calc(var(--header-h) + env(safe-area-inset-top) + 8px); }
}

/* ---------- 22.10 低端机 / 移动网络：减少重滤镜与常驻动画 ---------- */
@media (max-width: 860px) {
  body::after { display: none; }                       /* 全屏网格层，手机上几乎看不见却要重绘 */
  .card { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero::before { animation: none; filter: blur(20px); }
}

/* ---------- 22.11 极窄屏（iPhone SE / 老安卓 360 以下） ---------- */
@media (max-width: 380px) {
  .wrap {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .header-inner { gap: 10px; }
  .brand-sub { display: none; }
  .header-right { gap: 7px; }
  .hero { padding: 52px 0 40px; }
  .hero h1 { font-size: 27px; }
  .hero p.lead { font-size: 14px; }
  .hero-search form { padding: 5px 5px 5px 14px; gap: 8px; }
  .hero-search .btn { padding: 0 14px; }
  .stat { padding: 18px 16px; }
  .stat-num { font-size: 24px; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 3px; }
  .footer-legal-sep { display: none; }
  .theme-pop { left: 8px; right: 8px; padding: 12px; }
  .theme-grid { gap: 7px; }
  .theme-pv { height: 60px; }
  .btn { padding: 0 16px; }
  .detail-hero { padding: 18px; }
  .panel { padding: 16px; }
}

/* ---------- 22.12 横屏矮视口（手机横放） ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 44px 0 32px; }
  .hero-badge { margin-bottom: 16px; }
  .auth-wrap { padding: 22px 20px; }
  .nav.open { max-height: calc(100vh - var(--header-h)); }
  .admin-side { height: auto; }
}

/* ---------- 22.13 横向滚动容器统一收敛滚动行为 ---------- */
@media (max-width: 860px) {
  .rows, .table-wrap, .side-block:first-child { overscroll-behavior-x: contain; }
}

/* ---------- 22.14 侧栏在手机上的排列调整 ---------- */
/* 横向 flex 排列时每项宽度由长标题决定，窄屏会撑破容器，因此按页面区分处理 */

/* 首页「热门排行」：标题长，改为纵向列表并省略 */
@media (max-width: 860px) {
  .split-2 .side-block:first-child { overflow-x: visible; }
  .split-2 .side-list { flex-direction: column; flex-wrap: nowrap; gap: 1px; }
  .split-2 .side-list a { max-width: 100%; }
  .split-2 .side-list a > span { min-width: 0; }
  .split-2 .side-list a > span:first-child { flex-shrink: 0; }
  .split-2 .side-list a > span:nth-child(2) {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .split-2 .side-list .n { flex-shrink: 0; }
}

/* 软件库 / 分类页的分类栏：改为横向滑动，避免占掉半屏高度 */
@media (max-width: 860px) {
  .list-layout:not(.split-2) .side-block { overflow: hidden; }
  .list-layout:not(.split-2) .side-list {
    flex-direction: row; flex-wrap: nowrap; gap: 6px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .list-layout:not(.split-2) .side-list a {
    flex: 0 0 auto; white-space: nowrap; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: 999px;
  }
  .list-layout:not(.split-2) .side-list a > span,
  .list-layout:not(.split-2) .side-list a > svg { flex-shrink: 0; white-space: nowrap; }
  .list-layout:not(.split-2) .side-list .n { margin-left: 2px; }
}

/* ---------- 22.15 列表行在窄屏收紧内边距，给标题留出空间 ---------- */
@media (max-width: 480px) {
  .row { padding: 13px 14px; gap: 12px; }
  .row-icon { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
  .row-right { font-size: 11.5px; }
  .row-meta { gap: 8px; }
}

/* ---------- 22.16 后台在手机上的布局 ---------- */
@media (max-width: 860px) {
  .admin-side {
    position: relative; height: auto; min-width: 0; overflow: hidden;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .admin-body { grid-template-columns: minmax(0, 1fr); }
  .admin-side-head { padding: 12px 16px; }
  .admin-side-head .brand-sub { display: none; }

  /* 用户名与退出按钮浮到顶部条右侧，省掉一整行的纵向空间 */
  .admin-side-foot {
    position: absolute; top: 0; right: 12px; height: 56px;
    display: flex; align-items: center; padding: 0;
    border-top: none; background: none;
  }
  .admin-side-foot .flex { gap: 8px; }

  /* 导航改为横向滑动条 */
  .admin-nav {
    flex: 0 0 auto; flex-direction: row; overflow-x: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    padding: 8px 12px 10px; gap: 4px;
  }
  .admin-nav a { flex: 0 0 auto; white-space: nowrap; padding: 9px 13px; font-size: 13px; }
  .admin-nav .sep { display: none; }

  .admin-top { height: 54px; gap: 10px; }
  .admin-top h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-top .right { gap: 8px; flex-shrink: 0; }
  .admin-content { padding: 16px 14px 44px; }
  .admin-toolbar { gap: 8px; }
  .admin-toolbar .grow, .admin-toolbar .input, .admin-toolbar .select { min-width: 120px; }
  .form-card { padding: 18px 16px; border-radius: var(--radius); }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; }
  .kpis { gap: 10px; }
}

/* ---------- 22.17 老浏览器回退（不支持 overflow-x: clip 时） ---------- */
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }
}

/* ---------- 23. 防爬虫蜜罐 ----------
   页脚那个「看不见的链接」：人类不可见、不可聚焦、读屏器也读不到，
   但抓取 HTML 的机器人会把每个 a[href] 都请求一遍，一碰就暴露。 */
.hp-trap {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 24. 日志表格（访问日志 / 拦截日志 / 入侵记录） ---------- */
.table-log td {
  vertical-align: top;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 1.55;
}
.table-log tbody tr:hover { background: rgba(61, 220, 255, .04); }
.table-log summary {
  list-style: none;
  outline: none;
}
.table-log summary::-webkit-details-marker { display: none; }
.table-log summary::before {
  content: '▸ ';
  color: var(--muted-2);
}
.table-log details[open] summary::before { content: '▾ '; }
.table-log details[open] summary { color: var(--accent, #3DDCFF); }
.table-log a { color: var(--accent, #3DDCFF); text-decoration: none; }
.table-log a:hover { text-decoration: underline; }

/* 日志表格的列不允许被压扁：
   以前只用 white-space: nowrap 管住了表头，单元格里的徽章会被压成一字一行，
   右侧「首末时间 / 操作」直接挤出可视区，看着就像「记录显示不全」。
   现在所有单元格默认不换行，需要换行的长文本（路径、UA、请求头）显式加 .cell-wrap。 */
.table-log th { white-space: normal; }
.table-log td { white-space: nowrap; }
.table-log .cell-wrap { white-space: normal; }
/* 日志表列多，左右内边距收到 12px，省出来的宽度留给「路径」这一列 */
.table-log th,
.table-log td { padding-left: 12px; padding-right: 12px; }

/* ---------- 25. 路径后面的中文页面名 ---------- */
.path-cn {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid rgba(var(--accent-rgb), .26);
  background: rgba(var(--accent-rgb), .08);
  color: var(--accent-text);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 550;
  line-height: 1.65;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 1px;
}

/* ---------- 26. 入侵者画像：表格改卡片行 ----------
   7 列的表格放在 1fr 栏里一定会被压扁，横滑又会把「操作」藏起来。
   改成可换行的卡片行，任何宽度下所有信息都在。 */
.atk-list { display: flex; flex-direction: column; gap: 8px; }
.atk {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 11px 13px;
}
.atk-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.atk-ip { font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.atk-head .badge { font-size: 11px; padding: 2px 7px; }
.atk-stat {
  margin-left: auto; font-size: 11.5px; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.atk-stat b { color: var(--text-2); font-weight: 600; }
.atk-kinds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.atk-kinds .badge { font-size: 11px; padding: 2px 7px; }
.atk-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 8px; font-size: 10.5px; color: var(--muted-2);
}
.atk-time { white-space: nowrap; }
.atk-actions { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .atk-stat { margin-left: 0; width: 100%; }
  .atk-actions { margin-left: 0; width: 100%; }
}

/* ---------- 27. 后台两栏：中等宽度就合并 ----------
   后台内容区 = 视口 − 240px 侧栏 − 56px 内边距。
   在 1000px 左右的窗口里，1.35fr 那一栏只剩 400px，日志表格必被截断，
   所以提前到 1180px 就收成单栏，给表格完整宽度。 */
.split-admin { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 1180px) {
  .split-admin { grid-template-columns: minmax(0, 1fr); }
}
/* 日志型页面（入侵记录 / 防爬虫日志）里的表格是 5–6 列，
   1.35fr 栏在 1440px 以下都装不满；这些页面到 1440px 就整页单栏，表格拿满宽度。 */
@media (max-width: 1439px) {
  .split-admin.split-logs { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 28. 后台侧栏列表在手机上保持纵向 ----------
   热门页面 / 分类分布都是「左侧名称 + 右侧数字」，
   拉成横向 wrap 会把数字挤到屏幕外，看着像数据丢了。 */
@media (max-width: 860px) {
  .admin-content .side-list { flex-direction: column; flex-wrap: nowrap; }
  .admin-content .side-list > div { min-width: 0; }
  .admin-content .side-list .n { margin-left: auto; flex-shrink: 0; }
}

/* =========================================================
   悦宇玩机 · 主题包（Theme Packs）
   六套配色：3 深 3 浅，全部通过 CSS 变量切换
   加载顺序：main.css 之后（覆盖 :root 兜底值）
   ========================================================= */

/* ---------------------------------------------------------
   1. 深空青金 Aurora（默认）
   冷调深空底 + 青蓝青金渐变，科技感
   --------------------------------------------------------- */
html[data-theme="aurora"] {
  color-scheme: dark;

  --bg: #05070d;
  --bg-soft: #080b13;
  --bg-elev: #0b0f1a;
  --panel: rgba(255, 255, 255, .032);
  --panel-2: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .14);

  --text: #e9eefb;
  --text-2: #b9c2d6;
  --text-strong: #ffffff;
  --muted: #7f8aa3;
  --muted-2: #5c6478;

  --accent: #3ddcff;
  --accent-rgb: 61, 220, 255;
  --accent-2: #7b6bff;
  --accent-2-rgb: 123, 107, 255;
  --accent-3: #37e0a0;
  --accent-3-rgb: 55, 224, 160;
  --accent-text: #8ceaff;
  --accent-weak: rgba(61, 220, 255, .07);
  --accent-weak-2: rgba(61, 220, 255, .12);
  --accent-line: rgba(61, 220, 255, .32);
  --on-accent: #04060c;
  --on-grad: #05080f;

  --grad: linear-gradient(120deg, #3ddcff 0%, #6a9dff 45%, #7b6bff 100%);
  --grad-soft: linear-gradient(120deg, rgba(61, 220, 255, .16), rgba(123, 107, 255, .16));
  --glow-a: rgba(61, 220, 255, .16);
  --glow-b: rgba(123, 107, 255, .16);
  --glow-c: rgba(55, 224, 160, .07);
  --hero-glow: rgba(61, 220, 255, .13);

  --danger: #ff6b6b;
  --danger-rgb: 255, 107, 107;
  --danger-text: #ffb3b3;
  --warn: #ffb347;
  --warn-rgb: 255, 179, 71;
  --warn-text: #ffcd85;
  --good-text: #6ff0bd;

  --wash-rgb: 255, 255, 255;
  --inset-hi: rgba(255, 255, 255, .45);
  --shadow-rgb: 0, 0, 0;

  --header-bg: rgba(5, 7, 13, .72);
  --footer-bg: rgba(6, 8, 14, .6);
  --nav-mobile-bg: rgba(7, 9, 16, .97);
  --stat-bg: rgba(8, 11, 19, .72);
  --info-row-bg: rgba(10, 14, 22, .8);
  --auth-card-bg: rgba(10, 13, 21, .82);
  --admin-side-bg: rgba(7, 9, 15, .85);
  --admin-top-bg: rgba(6, 8, 14, .7);

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .85);
  --shadow-card: 0 4px 18px -12px rgba(0, 0, 0, .9);
  --shadow-card-hover: 0 22px 50px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(61, 220, 255, .12);
  --shadow-glow: 0 0 0 1px rgba(61, 220, 255, .25), 0 18px 50px -18px rgba(61, 220, 255, .35);

  --code-bg: rgba(255, 255, 255, .07);
  --code-fg: #a5e9ff;
  --pre-bg: rgba(0, 0, 0, .45);

  --scroll-track: #070a11;
  --scroll-thumb: #1d2432;
  --scroll-thumb-hover: #2a3346;

  --grid-line: rgba(255, 255, 255, .035);
  --grid-opacity: .8;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8aa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #05070d;
  --pv-bg: #05070d;
  --pv-card: #0e1421;
  --pv-line: rgba(255, 255, 255, .12);
  --pv-accent: #3ddcff;
  --pv-accent2: #7b6bff;
  --pv-text: #e9eefb;
}

/* ---------------------------------------------------------
   2. 曜石鎏金 Obsidian
   近黑底 + 香槟金，克制的奢华感
   --------------------------------------------------------- */
html[data-theme="obsidian"] {
  color-scheme: dark;

  --bg: #08070a;
  --bg-soft: #0b0a0e;
  --bg-elev: #100e13;
  --panel: rgba(255, 246, 232, .035);
  --panel-2: rgba(255, 246, 232, .062);
  --line: rgba(255, 243, 224, .085);
  --line-strong: rgba(255, 243, 224, .16);

  --text: #f5f0e6;
  --text-2: #cfc4b2;
  --text-strong: #fffdf8;
  --muted: #9c9081;
  --muted-2: #6e655a;

  --accent: #dcb877;
  --accent-rgb: 220, 184, 119;
  --accent-2: #b07f3e;
  --accent-2-rgb: 176, 127, 62;
  --accent-3: #8fae6a;
  --accent-3-rgb: 143, 174, 106;
  --accent-text: #e8c98d;
  --accent-weak: rgba(220, 184, 119, .08);
  --accent-weak-2: rgba(220, 184, 119, .13);
  --accent-line: rgba(220, 184, 119, .34);
  --on-accent: #1a1206;
  --on-grad: #1a1206;

  --grad: linear-gradient(120deg, #efd49a 0%, #d8ad67 45%, #b07f3e 100%);
  --grad-soft: linear-gradient(120deg, rgba(220, 184, 119, .16), rgba(176, 127, 62, .14));
  --glow-a: rgba(220, 184, 119, .13);
  --glow-b: rgba(176, 127, 62, .11);
  --glow-c: rgba(143, 174, 106, .05);
  --hero-glow: rgba(220, 184, 119, .12);

  --danger: #ef6f5e;
  --danger-rgb: 239, 111, 94;
  --danger-text: #ffb4a8;
  --warn: #e4a94a;
  --warn-rgb: 228, 169, 74;
  --warn-text: #f2cf95;
  --good-text: #a8cf8a;

  --wash-rgb: 255, 246, 232;
  --inset-hi: rgba(255, 255, 255, .5);
  --shadow-rgb: 0, 0, 0;

  --header-bg: rgba(8, 7, 10, .74);
  --footer-bg: rgba(9, 8, 11, .62);
  --nav-mobile-bg: rgba(10, 9, 13, .97);
  --stat-bg: rgba(13, 11, 15, .74);
  --info-row-bg: rgba(16, 14, 19, .82);
  --auth-card-bg: rgba(14, 12, 17, .84);
  --admin-side-bg: rgba(10, 9, 13, .88);
  --admin-top-bg: rgba(9, 8, 11, .72);

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .9);
  --shadow-card: 0 4px 18px -12px rgba(0, 0, 0, .95);
  --shadow-card-hover: 0 22px 50px -26px rgba(0, 0, 0, .95), 0 0 0 1px rgba(220, 184, 119, .14);
  --shadow-glow: 0 0 0 1px rgba(220, 184, 119, .28), 0 18px 50px -18px rgba(220, 184, 119, .3);

  --code-bg: rgba(255, 246, 232, .07);
  --code-fg: #f0d9a8;
  --pre-bg: rgba(0, 0, 0, .5);

  --scroll-track: #0b0a0d;
  --scroll-thumb: #262019;
  --scroll-thumb-hover: #37302a;

  --grid-line: rgba(255, 243, 224, .04);
  --grid-opacity: .75;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239c9081' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #08070a;
  --pv-bg: #08070a;
  --pv-card: #171310;
  --pv-line: rgba(255, 243, 224, .14);
  --pv-accent: #dcb877;
  --pv-accent2: #b07f3e;
  --pv-text: #f5f0e6;
}

/* ---------------------------------------------------------
   3. 墨玉青岚 Jade
   深墨绿底 + 翡翠与青碧，东方温润
   --------------------------------------------------------- */
html[data-theme="jade"] {
  color-scheme: dark;

  --bg: #050a09;
  --bg-soft: #07100f;
  --bg-elev: #0a1614;
  --panel: rgba(214, 255, 240, .035);
  --panel-2: rgba(214, 255, 240, .06);
  --line: rgba(214, 255, 240, .08);
  --line-strong: rgba(214, 255, 240, .15);

  --text: #e6f4f0;
  --text-2: #b2c9c3;
  --text-strong: #f4fffb;
  --muted: #7d938e;
  --muted-2: #5a6d69;

  --accent: #46d9ae;
  --accent-rgb: 70, 217, 174;
  --accent-2: #2f9fd6;
  --accent-2-rgb: 47, 159, 214;
  --accent-3: #d4c46a;
  --accent-3-rgb: 212, 196, 106;
  --accent-text: #7fe9c8;
  --accent-weak: rgba(70, 217, 174, .08);
  --accent-weak-2: rgba(70, 217, 174, .13);
  --accent-line: rgba(70, 217, 174, .32);
  --on-accent: #04100c;
  --on-grad: #050f0c;

  --grad: linear-gradient(120deg, #46d9ae 0%, #3fb8c9 50%, #2f9fd6 100%);
  --grad-soft: linear-gradient(120deg, rgba(70, 217, 174, .16), rgba(47, 159, 214, .14));
  --glow-a: rgba(70, 217, 174, .15);
  --glow-b: rgba(47, 159, 214, .13);
  --glow-c: rgba(212, 196, 106, .05);
  --hero-glow: rgba(70, 217, 174, .13);

  --danger: #ef7a6d;
  --danger-rgb: 239, 122, 109;
  --danger-text: #ffb6ac;
  --warn: #d9bd5e;
  --warn-rgb: 217, 189, 94;
  --warn-text: #f0dfa0;
  --good-text: #86e9c4;

  --wash-rgb: 214, 255, 240;
  --inset-hi: rgba(255, 255, 255, .45);
  --shadow-rgb: 0, 0, 0;

  --header-bg: rgba(5, 10, 9, .74);
  --footer-bg: rgba(6, 12, 11, .62);
  --nav-mobile-bg: rgba(7, 14, 13, .97);
  --stat-bg: rgba(8, 16, 15, .74);
  --info-row-bg: rgba(10, 20, 18, .82);
  --auth-card-bg: rgba(9, 18, 16, .84);
  --admin-side-bg: rgba(7, 14, 13, .88);
  --admin-top-bg: rgba(6, 12, 11, .72);

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .88);
  --shadow-card: 0 4px 18px -12px rgba(0, 0, 0, .92);
  --shadow-card-hover: 0 22px 50px -26px rgba(0, 0, 0, .92), 0 0 0 1px rgba(70, 217, 174, .14);
  --shadow-glow: 0 0 0 1px rgba(70, 217, 174, .26), 0 18px 50px -18px rgba(70, 217, 174, .3);

  --code-bg: rgba(214, 255, 240, .07);
  --code-fg: #9defd4;
  --pre-bg: rgba(0, 0, 0, .45);

  --scroll-track: #060d0c;
  --scroll-thumb: #172724;
  --scroll-thumb-hover: #233a36;

  --grid-line: rgba(214, 255, 240, .035);
  --grid-opacity: .8;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d938e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #050a09;
  --pv-bg: #050a09;
  --pv-card: #0c1a17;
  --pv-line: rgba(214, 255, 240, .13);
  --pv-accent: #46d9ae;
  --pv-accent2: #2f9fd6;
  --pv-text: #e6f4f0;
}

/* ---------------------------------------------------------
   4. 雾凇冷白 Frost
   冷白底 + 宝蓝紫，通透干净
   --------------------------------------------------------- */
html[data-theme="frost"] {
  color-scheme: light;

  --bg: #f5f7fb;
  --bg-soft: #eef2f8;
  --bg-elev: #ffffff;
  --panel: rgba(255, 255, 255, .78);
  --panel-2: rgba(255, 255, 255, .95);
  --line: rgba(19, 29, 48, .09);
  --line-strong: rgba(19, 29, 48, .17);

  --text: #0f1726;
  --text-2: #39445a;
  --text-strong: #000000;
  --muted: #697588;
  --muted-2: #98a2b3;

  --accent: #2563eb;
  --accent-rgb: 37, 99, 235;
  --accent-2: #7c3aed;
  --accent-2-rgb: 124, 58, 237;
  --accent-3: #0d9488;
  --accent-3-rgb: 13, 148, 136;
  --accent-text: #1d4ed8;
  --accent-weak: rgba(37, 99, 235, .08);
  --accent-weak-2: rgba(37, 99, 235, .13);
  --accent-line: rgba(37, 99, 235, .34);
  --on-accent: #ffffff;
  --on-grad: #0b1220;

  --grad: linear-gradient(120deg, #2563eb 0%, #4f7ff5 45%, #7c3aed 100%);
  --grad-soft: linear-gradient(120deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
  --glow-a: rgba(37, 99, 235, .055);
  --glow-b: rgba(124, 58, 237, .05);
  --glow-c: rgba(13, 148, 136, .03);
  --hero-glow: rgba(37, 99, 235, .055);

  --danger: #dc2626;
  --danger-rgb: 220, 38, 38;
  --danger-text: #b91c1c;
  --warn: #b45309;
  --warn-rgb: 180, 83, 9;
  --warn-text: #92400e;
  --good-text: #047857;

  --wash-rgb: 19, 29, 48;
  --inset-hi: rgba(255, 255, 255, .9);
  --shadow-rgb: 19, 29, 48;

  --header-bg: rgba(245, 247, 251, .9);
  --footer-bg: rgba(238, 242, 248, .7);
  --nav-mobile-bg: rgba(255, 255, 255, .97);
  --stat-bg: rgba(255, 255, 255, .9);
  --info-row-bg: rgba(255, 255, 255, .92);
  --auth-card-bg: rgba(255, 255, 255, .88);
  --admin-side-bg: rgba(255, 255, 255, .9);
  --admin-top-bg: rgba(255, 255, 255, .86);

  --shadow: 0 24px 50px -28px rgba(19, 29, 48, .3);
  --shadow-card: 0 2px 10px -6px rgba(19, 29, 48, .18), 0 12px 26px -22px rgba(19, 29, 48, .3);
  --shadow-card-hover: 0 18px 38px -24px rgba(19, 29, 48, .34), 0 0 0 1px rgba(37, 99, 235, .16);
  --shadow-glow: 0 0 0 1px rgba(37, 99, 235, .28), 0 14px 34px -16px rgba(37, 99, 235, .3);

  --code-bg: rgba(19, 29, 48, .06);
  --code-fg: #1d4ed8;
  --pre-bg: rgba(19, 29, 48, .055);

  --scroll-track: #eef2f8;
  --scroll-thumb: #c8d0dd;
  --scroll-thumb-hover: #aab4c5;

  --grid-line: rgba(19, 29, 48, .045);
  --grid-opacity: .55;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23697588' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #f5f7fb;
  --pv-bg: #f5f7fb;
  --pv-card: #ffffff;
  --pv-line: rgba(19, 29, 48, .12);
  --pv-accent: #2563eb;
  --pv-accent2: #7c3aed;
  --pv-text: #0f1726;
}

/* ---------------------------------------------------------
   5. 宣纸暖白 Paper
   米白纸感 + 赭石朱砂，温和耐看
   --------------------------------------------------------- */
html[data-theme="paper"] {
  color-scheme: light;

  --bg: #f7f4ed;
  --bg-soft: #f2ece1;
  --bg-elev: #fffdf8;
  --panel: rgba(255, 255, 255, .74);
  --panel-2: rgba(255, 255, 255, .94);
  --line: rgba(64, 50, 33, .12);
  --line-strong: rgba(64, 50, 33, .22);

  --text: #221b12;
  --text-2: #4a4034;
  --text-strong: #000000;
  --muted: #7b6f5e;
  --muted-2: #a2978a;

  --accent: #b0532c;
  --accent-rgb: 176, 83, 44;
  --accent-2: #8a6b3d;
  --accent-2-rgb: 138, 107, 61;
  --accent-3: #5f7a45;
  --accent-3-rgb: 95, 122, 69;
  --accent-text: #96431f;
  --accent-weak: rgba(176, 83, 44, .08);
  --accent-weak-2: rgba(176, 83, 44, .13);
  --accent-line: rgba(176, 83, 44, .32);
  --on-accent: #fffaf2;
  --on-grad: #1f1509;

  --grad: linear-gradient(120deg, #c2653a 0%, #b0532c 45%, #8a6b3d 100%);
  --grad-soft: linear-gradient(120deg, rgba(176, 83, 44, .13), rgba(138, 107, 61, .13));
  --glow-a: rgba(176, 83, 44, .055);
  --glow-b: rgba(138, 107, 61, .05);
  --glow-c: rgba(95, 122, 69, .03);
  --hero-glow: rgba(176, 83, 44, .05);

  --danger: #b4302a;
  --danger-rgb: 180, 48, 42;
  --danger-text: #96241f;
  --warn: #9a6512;
  --warn-rgb: 154, 101, 18;
  --warn-text: #7f5210;
  --good-text: #3f6b3a;

  --wash-rgb: 64, 50, 33;
  --inset-hi: rgba(255, 255, 255, .85);
  --shadow-rgb: 64, 50, 33;

  --header-bg: rgba(247, 244, 237, .9);
  --footer-bg: rgba(242, 236, 225, .72);
  --nav-mobile-bg: rgba(255, 253, 248, .97);
  --stat-bg: rgba(255, 253, 248, .88);
  --info-row-bg: rgba(255, 253, 248, .92);
  --auth-card-bg: rgba(255, 253, 248, .9);
  --admin-side-bg: rgba(255, 253, 248, .9);
  --admin-top-bg: rgba(255, 253, 248, .86);

  --shadow: 0 24px 50px -28px rgba(64, 50, 33, .3);
  --shadow-card: 0 2px 10px -6px rgba(64, 50, 33, .16), 0 12px 26px -22px rgba(64, 50, 33, .28);
  --shadow-card-hover: 0 18px 38px -24px rgba(64, 50, 33, .32), 0 0 0 1px rgba(176, 83, 44, .16);
  --shadow-glow: 0 0 0 1px rgba(176, 83, 44, .26), 0 14px 34px -16px rgba(176, 83, 44, .28);

  --code-bg: rgba(64, 50, 33, .07);
  --code-fg: #96431f;
  --pre-bg: rgba(64, 50, 33, .06);

  --scroll-track: #f0eade;
  --scroll-thumb: #cfc4b2;
  --scroll-thumb-hover: #b8ab97;

  --grid-line: rgba(64, 50, 33, .05);
  --grid-opacity: .5;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b6f5e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #f7f4ed;
  --pv-bg: #f7f4ed;
  --pv-card: #fffdf8;
  --pv-line: rgba(64, 50, 33, .16);
  --pv-accent: #b0532c;
  --pv-accent2: #8a6b3d;
  --pv-text: #221b12;
}

/* ---------------------------------------------------------
   6. 樱雾玫瑰 Blush
   浅雾粉底 + 玫瑰与藕紫，柔和不甜腻
   --------------------------------------------------------- */
html[data-theme="blush"] {
  color-scheme: light;

  --bg: #fbf6f8;
  --bg-soft: #f7edf1;
  --bg-elev: #fffdfe;
  --panel: rgba(255, 255, 255, .76);
  --panel-2: rgba(255, 255, 255, .95);
  --line: rgba(74, 40, 54, .1);
  --line-strong: rgba(74, 40, 54, .19);

  --text: #251a1f;
  --text-2: #4d3b43;
  --text-strong: #000000;
  --muted: #857079;
  --muted-2: #a9949d;

  --accent: #c2557f;
  --accent-rgb: 194, 85, 127;
  --accent-2: #a86a9b;
  --accent-2-rgb: 168, 106, 155;
  --accent-3: #4f8a7b;
  --accent-3-rgb: 79, 138, 123;
  --accent-text: #a63f68;
  --accent-weak: rgba(194, 85, 127, .08);
  --accent-weak-2: rgba(194, 85, 127, .13);
  --accent-line: rgba(194, 85, 127, .32);
  --on-accent: #fff9fb;
  --on-grad: #241119;

  --grad: linear-gradient(120deg, #d9709a 0%, #c2557f 45%, #a86a9b 100%);
  --grad-soft: linear-gradient(120deg, rgba(194, 85, 127, .13), rgba(168, 106, 155, .13));
  --glow-a: rgba(194, 85, 127, .055);
  --glow-b: rgba(168, 106, 155, .05);
  --glow-c: rgba(79, 138, 123, .03);
  --hero-glow: rgba(194, 85, 127, .05);

  --danger: #c0392b;
  --danger-rgb: 192, 57, 43;
  --danger-text: #9d2c20;
  --warn: #9c6a12;
  --warn-rgb: 156, 106, 18;
  --warn-text: #82540f;
  --good-text: #3f7365;

  --wash-rgb: 74, 40, 54;
  --inset-hi: rgba(255, 255, 255, .88);
  --shadow-rgb: 74, 40, 54;

  --header-bg: rgba(251, 246, 248, .9);
  --footer-bg: rgba(247, 237, 241, .72);
  --nav-mobile-bg: rgba(255, 253, 254, .97);
  --stat-bg: rgba(255, 253, 254, .88);
  --info-row-bg: rgba(255, 253, 254, .92);
  --auth-card-bg: rgba(255, 253, 254, .9);
  --admin-side-bg: rgba(255, 253, 254, .9);
  --admin-top-bg: rgba(255, 253, 254, .86);

  --shadow: 0 24px 50px -28px rgba(74, 40, 54, .28);
  --shadow-card: 0 2px 10px -6px rgba(74, 40, 54, .15), 0 12px 26px -22px rgba(74, 40, 54, .26);
  --shadow-card-hover: 0 18px 38px -24px rgba(74, 40, 54, .3), 0 0 0 1px rgba(194, 85, 127, .16);
  --shadow-glow: 0 0 0 1px rgba(194, 85, 127, .26), 0 14px 34px -16px rgba(194, 85, 127, .28);

  --code-bg: rgba(74, 40, 54, .06);
  --code-fg: #a63f68;
  --pre-bg: rgba(74, 40, 54, .055);

  --scroll-track: #f7edf1;
  --scroll-thumb: #d5c2ca;
  --scroll-thumb-hover: #c0a8b2;

  --grid-line: rgba(74, 40, 54, .045);
  --grid-opacity: .5;

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23857079' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --theme-color: #fbf6f8;
  --pv-bg: #fbf6f8;
  --pv-card: #fffdfe;
  --pv-line: rgba(74, 40, 54, .14);
  --pv-accent: #c2557f;
  --pv-accent2: #a86a9b;
  --pv-text: #251a1f;
}

/* ---------------------------------------------------------
   7. 切换面板里的迷你预览
   每个选项用自己的配色，不受当前主题影响
   --------------------------------------------------------- */
.theme-opt[data-theme-value="aurora"] {
  --pv-bg: #05070d; --pv-card: #0e1421; --pv-line: rgba(255, 255, 255, .12);
  --pv-accent: #3ddcff; --pv-accent2: #7b6bff; --pv-text: #e9eefb;
}
.theme-opt[data-theme-value="obsidian"] {
  --pv-bg: #08070a; --pv-card: #171310; --pv-line: rgba(255, 243, 224, .14);
  --pv-accent: #dcb877; --pv-accent2: #b07f3e; --pv-text: #f5f0e6;
}
.theme-opt[data-theme-value="jade"] {
  --pv-bg: #050a09; --pv-card: #0c1a17; --pv-line: rgba(214, 255, 240, .13);
  --pv-accent: #46d9ae; --pv-accent2: #2f9fd6; --pv-text: #e6f4f0;
}
.theme-opt[data-theme-value="frost"] {
  --pv-bg: #f5f7fb; --pv-card: #ffffff; --pv-line: rgba(19, 29, 48, .12);
  --pv-accent: #2563eb; --pv-accent2: #7c3aed; --pv-text: #0f1726;
}
.theme-opt[data-theme-value="paper"] {
  --pv-bg: #f7f4ed; --pv-card: #fffdf8; --pv-line: rgba(64, 50, 33, .16);
  --pv-accent: #b0532c; --pv-accent2: #8a6b3d; --pv-text: #221b12;
}
.theme-opt[data-theme-value="blush"] {
  --pv-bg: #fbf6f8; --pv-card: #fffdfe; --pv-line: rgba(74, 40, 54, .14);
  --pv-accent: #c2557f; --pv-accent2: #a86a9b; --pv-text: #251a1f;
}
