/* ============================================================================
   NiuNiuCMS 官网 · store.css（单一样式表，手写原生 CSS，零框架零 CDN）
   结构：0 设计变量 / 1 基础 / 2 通用件 / 3 吸顶导航 / 4 Hero / 5 快速开始
        6 六大亮点 / 7 双模式部署 / 8 性能数据 / 9 模板功能 / 10 插件生态
        11 开发者体验 / 12 主题与全球化 / 13 底部 CTA / 14 页脚
        15 内页适配（doc/tpl/feedback/msg）/ 16 响应式
   ========================================================================== */

/* ---------- 0. 设计变量（色板/间距/圆角/阴影 全令牌化） ---------- */
:root {
  --grad-brand: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #a855f7 100%);
  --blue: #3b82f6; --indigo: #6366f1; --purple: #a855f7;
  --green: #10b981; --orange: #f59e0b; --cyan: #06b6d4;
  --ink: #0f172a; --text: #475569; --muted: #94a3b8;
  --bg-soft: #f8fafc; --bg-softer: #f1f5f9; --card: #fff; --line: #e2e8f0;
  --code-bg: #0f172a;
  --hero-grad: linear-gradient(180deg, #eff6ff 0%, #f5f3ff 100%);
  --nav-bg: rgba(255, 255, 255, .82);
  --shadow-1: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-2: 0 10px 30px rgba(59, 130, 246, .15);
  --r-btn: 10px; --r-sm: 12px; --r-lg: 16px;
  --sec-pad: 88px;           /* 区块上下留白 */
}
/* 深色模式（导航月亮按钮切换，localStorage 记忆）——只覆盖令牌即可全站生效 */
[data-theme="dark"] {
  --ink: #e2e8f0; --text: #94a3b8; --muted: #64748b;
  --bg-soft: #0b1220; --bg-softer: #0f172a; --card: #111a2c; --line: #1e293b;
  --hero-grad: linear-gradient(180deg, #0d1730 0%, #171233 100%);
  --nav-bg: rgba(10, 16, 30, .82);
  --shadow-1: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ---------- 1. 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }                       /* 锚点平滑滚动 */
body {
  margin: 0; background: var(--card); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.3px; margin: 0; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--indigo); }
img { max-width: 100%; }
[id] { scroll-margin-top: 84px; }                       /* 锚点定位避开吸顶导航 */

/* ---------- 2. 通用件 ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sec { padding: var(--sec-pad) 0; }                      /* 区块统一上下 88px */
.sec-white { background: var(--card); }
.sec-soft { background: var(--bg-soft); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.sec-head h2 { font-size: 34px; font-weight: 800; }
.sec-head p { margin: 12px 0 0; font-size: 16px; color: var(--text); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--r-btn); border: 0; font: inherit;
  font-weight: 600; font-size: 15px; cursor: pointer; text-align: center;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px rgba(99, 102, 241, .35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-lg { padding: 15px 34px; font-size: 16px; }
.btn-sm { padding: 7px 16px; font-size: 14px; }

/* 卡片通用 hover（上浮 + 品牌投影） */
.lift { transition: transform .2s, box-shadow .2s; }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

/* ---------- 3. 吸顶导航 ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.topnav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }
.topnav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 17px; }
.logo:hover { color: var(--ink); }
.logo-ic {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad-brand);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; box-shadow: 0 2px 8px rgba(99, 102, 241, .4);
}
.logo-ver { font-size: 12px; font-weight: 700; color: var(--blue); background: rgba(59, 130, 246, .1); padding: 1px 7px; border-radius: 999px; }

.nav-menu { display: flex; gap: 4px; margin: 0 auto; }   /* 中部菜单 */
.nav-menu a { padding: 8px 14px; border-radius: 8px; color: var(--text); font-size: 14.5px; font-weight: 500; }
.nav-menu a:hover, .nav-menu a.is-active { color: var(--blue); background: rgba(59, 130, 246, .08); }

.nav-act { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--r-btn); border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
.nav-cta { padding: 9px 20px; font-size: 14px; }         /* 「立即下载」用 .btn-primary */

/* ---------- 4. Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-grad); text-align: center; padding: 96px 0 84px; }
.hero::before, .hero::after {                           /* 两团低透明度径向光斑 */
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; left: -140px; top: -160px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .16), transparent); }
.hero::after { width: 560px; height: 560px; right: -160px; bottom: -200px;
  background: radial-gradient(closest-side, rgba(168, 85, 247, .14), transparent); }
.hero .wrap { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--indigo); background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .2);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: 56px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; }
.hero .lead { font-size: 18px; color: var(--text); max-width: 680px; margin: 20px auto 34px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero 下 4 张半透明特性小卡 */
.hero-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 60px; text-align: left; }
.hero-feat {
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-sm); padding: 18px 20px; backdrop-filter: blur(6px);
  transition: transform .2s, box-shadow .2s;
}
.hero-feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
[data-theme="dark"] .hero-feat { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.hero-feat .hf-ic { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--grad-brand); margin-bottom: 12px; }
.hero-feat .hf-ic svg { width: 18px; height: 18px; }
.hero-feat h4 { font-size: 15px; font-weight: 700; }
.hero-feat p { margin: 4px 0 0; font-size: 13px; color: var(--text); }

/* ---------- 5. 快速开始（深色代码块） ---------- */
.codewin { background: var(--code-bg); border-radius: var(--r-sm); box-shadow: var(--shadow-1);
  max-width: 780px; margin: 0 auto; text-align: left; overflow: hidden; }
.codewin-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px 0; }
.codewin-bar i { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.codewin-bar i:nth-child(1) { background: #f87171; }
.codewin-bar i:nth-child(2) { background: #fbbf24; }
.codewin-bar i:nth-child(3) { background: #34d399; }
.codewin-bar em { font-style: normal; font-size: 12px; color: #64748b; margin-left: 8px; }
.codewin pre { margin: 0; padding: 20px 24px 24px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 14px; line-height: 1.9; color: #f1f5f9; }
.c-cmt { color: #64748b; }       /* 注释 */
.c-str { color: #86efac; }       /* 字符串 */
.c-flag { color: #93c5fd; }      /* 参数/标志 */

/* ---------- 6. 六大亮点 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 28px; box-shadow: var(--shadow-1); }
.feat-ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feat-ic svg { width: 24px; height: 24px; }
.feat-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feat-card p { margin: 0; font-size: 14px; color: var(--text); }
.tone-blue   { background: rgba(59, 130, 246, .1);  color: var(--blue); }
.tone-indigo { background: rgba(99, 102, 241, .1);  color: var(--indigo); }
.tone-purple { background: rgba(168, 85, 247, .1);  color: var(--purple); }
.tone-green  { background: rgba(16, 185, 129, .1);  color: var(--green); }
.tone-orange { background: rgba(245, 158, 11, .1);  color: var(--orange); }
.tone-cyan   { background: rgba(6, 182, 212, .1);   color: var(--cyan); }

/* ---------- 7. 双模式部署 ---------- */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 30px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.mode-card h3 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.mode-tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: rgba(59, 130, 246, .1); color: var(--blue); }
.mode-card ul { list-style: none; margin: 18px 0 22px; padding: 0; flex: 1; }
.mode-card li { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--text); }
.mode-card li svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 4px; }
.mode-note { border-top: 1px dashed var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- 8. 性能数据 ---------- */
.perf-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.perf-num {
  font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -1px;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.perf-row h4 { font-size: 15px; font-weight: 700; margin-top: 10px; }
.perf-row p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 9. 模板功能 ---------- */
.tplfeat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tplfeat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--shadow-1); }
.tplfeat-ic { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 16px; }
.tplfeat-ic svg { width: 22px; height: 22px; }
.tplfeat h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.tplfeat ul { list-style: none; margin: 0; padding: 0; }
.tplfeat li { position: relative; padding: 4px 0 4px 18px; font-size: 13.5px; color: var(--text); }
.tplfeat li::before { content: ""; position: absolute; left: 0; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--blue)); }

/* ---------- 10. 插件生态 ---------- */
.eco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eco-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 22px; box-shadow: var(--shadow-1); }
.eco-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.eco-ic { width: 42px; height: 42px; border-radius: 10px; background: rgba(99, 102, 241, .1);
  color: var(--indigo); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; flex: none; }
.eco-top h3 { font-size: 15.5px; font-weight: 700; flex: 1; }
.eco-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(99, 102, 241, .08); color: var(--indigo); flex: none; }
.eco-card p { margin: 0 0 12px; font-size: 13.5px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eco-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.eco-empty { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--r-lg); }

/* ---------- 11. 开发者体验（左右交替双栏） ---------- */
.dx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.dx-row:last-child { margin-bottom: 0; }
.dx-row.flip .dx-txt { order: 2; }                       /* 第二组左右互换 */
.dx-txt h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.dx-txt p { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.dx-txt ul { margin: 14px 0 0; padding: 0; list-style: none; }
.dx-txt li { position: relative; padding: 5px 0 5px 24px; font-size: 14px; color: var(--text); }
.dx-txt li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.dx-row .codewin { max-width: none; margin: 0; }

/* ---------- 12. 主题与全球化 ---------- */
.i18n-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.i18n-list { list-style: none; margin: 0; padding: 0; }
.i18n-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px; color: var(--text); }
.i18n-list li:last-child { border-bottom: 0; }
.i18n-list b { color: var(--ink); font-weight: 700; flex: none; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.lang-chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; color: var(--text); text-align: center; transition: border-color .2s, color .2s, transform .2s; }
.lang-chip:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ---------- 13. 底部 CTA ---------- */
.cta { position: relative; background: var(--grad-brand); text-align: center; padding: 88px 0; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0;                 /* 5% 白色点阵 */
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 20px 20px; opacity: .5; }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { color: #fff; font-size: 40px; font-weight: 800; }
.cta p { color: rgba(255, 255, 255, .8); font-size: 17px; margin: 14px 0 30px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { color: var(--indigo); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.btn-ghostw { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .8); }
.btn-ghostw:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-2px); }

/* ---------- 14. 页脚 ---------- */
.foot { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 0; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.foot-brand p { font-size: 13.5px; color: var(--text); margin: 12px 0 0; max-width: 300px; }
.foot h5 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot ul a { display: block; padding: 4px 0; font-size: 14px; color: var(--text); }
.foot ul a:hover { color: var(--blue); }
.foot-bar { border-top: 1px solid var(--line); padding: 18px 0; }
.foot-bar .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); }

/* ---------- 15. 内页适配（文档/模板/反馈/提示页 与新设计系统同源） ---------- */
.page-hero { background: var(--hero-grad); padding: 56px 0 40px; text-align: center; }
.page-hero h1 { font-size: 36px; font-weight: 800; }
.page-hero p { margin: 10px 0 0; color: var(--text); font-size: 15.5px; }
.page-body { padding: 56px 0 var(--sec-pad); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); padding: 24px; }
.doc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.doc-nav { list-style: none; margin: 0; padding: 0; }
.doc-nav a { display: block; padding: 9px 14px; border-radius: 9px; color: var(--text); font-size: 14.5px; }
.doc-nav a:hover, .doc-nav a.active { background: rgba(59, 130, 246, .08); color: var(--blue); }
.doc-nav-empty { padding: 9px 14px; font-size: 14.5px; color: var(--muted); }
.doc-body h1 { font-size: 26px; margin-bottom: 14px; }
.doc-body h2 { font-size: 20px; margin: 26px 0 10px; }
.doc-body h3 { font-size: 16px; margin: 20px 0 8px; }
.doc-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--bg-softer); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.doc-body pre { background: var(--code-bg); color: #f1f5f9; border-radius: var(--r-sm);
  padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.8; }
.doc-body pre code { background: none; border: 0; color: inherit; padding: 0; }
.doc-body blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--blue);
  background: rgba(59, 130, 246, .06); border-radius: 0 9px 9px 0; color: var(--text); }

/* 模板市场卡片（每行 4 个；图标直出 template/<dir>/icon.png，等比缩放绝不溢出容器） */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tpl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.tpl-thumb { height: 150px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 14px; }
.tpl-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.tpl-thumb .tpl-ic { margin-bottom: 0; }
.tpl-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; margin-bottom: 14px; }
.tpl-card h3 { font-size: 17px; font-weight: 700; }
.tpl-card .muted { font-size: 13.5px; margin: 6px 0 12px; flex: 1; }
.tpl-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

/* 海报墙（/?hb&page=N）：4 列竖版海报卡 + 搜索条 + 验证码行 */
.hb-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 26px; }
.hb-search .field { max-width: 360px; }
.hb-captcha { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.hb-captcha-in { max-width: 150px; }
.hb-gate-msg { text-align: center; color: #b45309; font-size: 13.5px; margin: -12px 0 22px; }
.hb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.hb-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; }
.hb-thumb { position: relative; aspect-ratio: 2 / 3; background: var(--bg-softer); overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.hb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-noimg { color: var(--muted); font-size: 13px; }
.hb-badge { position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px;
  background: rgba(10, 16, 30, .62); color: #fff; font-size: 11.5px; font-weight: 700; }
.hb-badge.hb-db { top: auto; bottom: 8px; background: rgba(16, 185, 129, .88); }
.hb-card figcaption { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 5px; }
.hb-name { font-size: 14px; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-brief { font-size: 12px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-meta { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.hb-empty { text-align: center; padding: 26px 18px; color: var(--text); }
@media (max-width: 1080px) { .hb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 翻页条（模板市场每页 16 个） */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pg-num, .pg-btn { min-width: 40px; padding: 8px 14px; border-radius: var(--r-btn); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 14px; text-align: center; transition: border-color .2s, color .2s; }
.pg-num:hover, .pg-btn:hover { border-color: var(--blue); color: var(--blue); }
.pg-num.is-cur { background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 700; }
.pg-btn.is-off { opacity: .45; pointer-events: none; }
.pg-dots { color: var(--muted); padding: 0 2px; }
.pg-info { font-size: 13px; color: var(--muted); margin-left: 6px; }

/* 表单 */
.field { width: 100%; border: 1px solid var(--line); border-radius: var(--r-btn);
  background: var(--card); color: var(--ink); padding: 11px 14px; font: inherit; transition: border-color .2s, box-shadow .2s; }
.field:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
textarea.field { resize: vertical; min-height: 180px; }
.captcha-img { vertical-align: middle; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.captcha-arith { font-size: 18px; letter-spacing: 2px; color: var(--ink); font-weight: 700; }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

.msg-panel { max-width: 560px; margin: 72px auto; text-align: center; padding: 48px 32px; }
.msg-panel h2 { font-size: 22px; margin-bottom: 22px; }

/* ---------- 16. 响应式：≤1024 降两列，≤640 降一列并隐藏菜单 ---------- */
@media (max-width: 1024px) {
  :root { --sec-pad: 64px; }
  .hero h1 { font-size: 42px; }
  .hero-feats, .feat-grid, .tplfeat-grid { grid-template-columns: repeat(2, 1fr); }
  .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .perf-row { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .mode-grid, .dx-row, .i18n-grid { grid-template-columns: 1fr; gap: 24px; }
  .dx-row.flip .dx-txt { order: 0; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cta h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .nav-menu { display: none; }                           /* 菜单隐藏，保留 Logo + 下载 */
  .hero h1 { font-size: 32px; }
  .hero-feats, .feat-grid, .tplfeat-grid, .eco-grid, .tpl-grid,
  .perf-row, .mode-grid, .dx-row, .i18n-grid { grid-template-columns: 1fr; }
  .hero-feats { text-align: left; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .sec-head h2 { font-size: 26px; }
  .doc-layout { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
}

/* ---------- 17. 后台（admin.php 左右布局：暗色侧栏 + 浅色主区；与官网同一令牌体系） ---------- */
.adm-shell { display: flex; min-height: 100vh; background: var(--bg-soft); }
.adm-side {
  width: 224px; flex: none; background: var(--code-bg); color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.adm-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  color: #fff; font-weight: 800; font-size: 15.5px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.adm-brand:hover { color: #fff; }
.adm-brand .logo-ic { width: 30px; height: 30px; font-size: 15px; }
.adm-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-nav a { display: block; padding: 9px 14px; border-radius: 9px; color: #cbd5e1; font-size: 14px; transition: background .2s, color .2s; }
.adm-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.adm-nav a.is-active { background: var(--grad-brand); color: #fff; font-weight: 600; }
.adm-side-ft { padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 6px; }
.adm-side-ft a { color: #94a3b8; font-size: 13px; }
.adm-side-ft a:hover { color: #fff; }
.adm-main { flex: 1; min-width: 0; }
.adm-top {
  background: var(--nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 14px 28px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
}
.adm-top h1 { font-size: 18px; font-weight: 700; }
.adm-top .ver { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.adm-body { padding: 24px 28px 56px; max-width: 1160px; }

/* 后台通用件（视图沿用 card/stat/grid/bar/flash 类名，样式在此统一收口） */
.adm-main .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); padding: 20px 22px; margin: 16px 0; }
.adm-main h2 { font-size: 20px; font-weight: 800; margin: 6px 0 14px; }
.adm-main h3 { font-size: 15.5px; font-weight: 700; margin: 16px 0 8px; }
.adm-main .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.adm-main .stat {
  font-size: 26px; font-weight: 800; background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.adm-main .bar { background: var(--bg-softer); border-radius: 6px; height: 10px; overflow: hidden; }
.adm-main .bar i { display: block; height: 100%; background: var(--grad-brand); }
.flash { background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .35); color: #065f46;
  border-radius: var(--r-sm); padding: 10px 14px; margin: 14px 0; font-size: 14px; }
.adm-main table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-main th { text-align: left; background: var(--bg-softer); color: var(--ink); font-weight: 600; }
.adm-main th, .adm-main td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-main tr:hover td { background: rgba(59, 130, 246, .03); }
.adm-main input, .adm-main select, .adm-main textarea {
  font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r-btn);
  padding: 7px 11px; background: var(--card); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.adm-main input:focus, .adm-main select:focus, .adm-main textarea:focus {
  outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.adm-main button {
  font: inherit; font-size: 14px; background: var(--grad-brand); color: #fff; border: 0;
  border-radius: var(--r-btn); padding: 7px 16px; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.adm-main button:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.adm-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 8px; }
.adm-quick a { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 16px; color: var(--ink); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s, color .2s; }
.adm-quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--blue); }

/* 后台登录页（独立壳，不带侧栏） */
.login-page { min-height: 100vh; background: var(--hero-grad); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 34px 30px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.login-card label { display: block; font-size: 13px; color: var(--text); margin: 12px 0 4px; }
.login-card input { width: 100%; font: inherit; font-size: 14.5px; border: 1px solid var(--line);
  border-radius: var(--r-btn); padding: 10px 13px; background: var(--card); color: var(--ink); }
.login-card input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.login-err { color: #dc2626; font-size: 13.5px; margin: 10px 0 0; }
.login-btn { width: 100%; margin-top: 20px; padding: 11px; font: inherit; font-weight: 600;
  background: var(--grad-brand); color: #fff; border: 0; border-radius: var(--r-btn); cursor: pointer;
  transition: transform .2s, box-shadow .2s; }
.login-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.login-ft { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* ---------- 18. 安装向导（install.php 复用同一设计系统） ---------- */
.inst-hero { background: var(--hero-grad); border-bottom: 1px solid var(--line); padding: 34px 0; text-align: center; }
.inst-hero h1 { font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 12px; }
.inst-hero p { color: var(--text); margin: 8px 0 0; font-size: 14px; }
.inst-wrap { max-width: 880px; margin: 0 auto; padding: 30px 24px 80px; }
.inst-env { width: 100%; border-collapse: collapse; font-size: 14px; }
.inst-env td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.inst-env tr:last-child td { border-bottom: 0; }
.inst-ok { color: var(--green); font-weight: 600; }
.inst-bad { color: #dc2626; font-weight: 600; }
.inst-form label { display: block; font-size: 13px; color: var(--text); margin: 14px 0 4px; font-weight: 600; }
.inst-form .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.inst-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inst-form input { width: 100%; font: inherit; font-size: 14.5px; border: 1px solid var(--line);
  border-radius: var(--r-btn); padding: 10px 13px; background: var(--card); color: var(--ink);
  transition: border-color .2s, box-shadow .2s; }
.inst-form input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.inst-tip { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.inst-links a { margin-right: 14px; }
.inst-msg { border-radius: var(--r-sm); padding: 12px 16px; font-size: 14px; margin: 14px 0; }
.inst-msg.err { background: rgba(220, 38, 38, .07); border: 1px solid rgba(220, 38, 38, .3); color: #b91c1c; }
.inst-msg.good { background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .35); color: #065f46; }

/* 后台/安装 响应式：≤860 侧栏变顶栏横滚，表单栅格降单列 */
@media (max-width: 860px) {
  .adm-shell { flex-direction: column; }
  .adm-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .adm-brand { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .08); padding: 12px 16px; white-space: nowrap; }
  .adm-nav { flex-direction: row; padding: 8px; overflow-x: auto; }
  .adm-nav a { white-space: nowrap; }
  .adm-side-ft { border-top: 0; border-left: 1px solid rgba(255, 255, 255, .08); padding: 8px 12px; margin-left: auto; flex-direction: row; gap: 12px; }
  .adm-body { padding: 18px 16px 48px; }
  .inst-form .row, .inst-form .row2 { grid-template-columns: 1fr; }
}

/* ---------- 19. 后台界面扩展（文件按钮/状态徽章/筛选胶囊/栅格表单/宽屏/Quill） ---------- */
/* 文件选择按钮：隐藏原生 input，自定义描边按钮 + 文件名回显 */
.filebox { display: inline-flex; align-items: center; gap: 10px; }
.filebtn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px;
  border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--card);
  color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s; }
.filebtn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.filebtn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.filename { font-size: 13px; color: var(--muted); }
.upl-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upl-dir { flex: 1; min-width: 220px; }
/* 状态徽章（带圆点，同官网色系令牌） */
.statchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.statchip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-running, .st-done { background: rgba(16, 185, 129, .12); color: #047857; }
.st-pending { background: rgba(245, 158, 11, .14); color: #b45309; }
.st-error { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.st-timeout { background: rgba(168, 85, 247, .12); color: var(--purple); }
.st-stopped { background: var(--bg-softer); color: var(--muted); }
/* worker 程序存活徽章 */
.worker-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.worker-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.worker-badge i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.worker-badge.on { background: rgba(16, 185, 129, .12); color: #047857; }
.worker-badge.on i { animation: wkpulse 1.6s ease-in-out infinite; }
.worker-badge.off { background: rgba(220, 38, 38, .08); color: #b91c1c; }
.worker-hint { font-size: 12.5px; color: var(--muted); }
/* 队列汇总（多任务：并发槽位 / 队列深度 / 上限，用于 admin/rsync.html；数千条排队时看总量而非 200 行列表） */
.queue-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-summary .statchip b { font-weight: 800; }
.queue-hint { font-size: 12.5px; color: var(--muted); }
/* 分区值来源徽章（后台覆盖 / 文件默认，用于 ?c=macapi 插件设置） */
.tag-on, .tag-off { display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; vertical-align: middle; }
.tag-on { background: rgba(37, 99, 235, .12); color: var(--blue); }
.tag-off { background: var(--bg-softer); color: var(--muted); }
/* 插件设置：卡片内小节标题 + 动态行 */
.card h4 { margin: 14px 0 8px; font-size: 14px; }
.nva-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.nva-row .btn-plain { padding: 7px 14px; }
@keyframes wkpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* 筛选胶囊 */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pills a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font-size: 13.5px; transition: all .2s; }
.filter-pills .pill-n { font-size: 11.5px; font-weight: 700; background: var(--bg-softer); color: var(--muted);
  border-radius: 999px; padding: 1px 7px; }
.filter-pills a.on .pill-n { background: rgba(255, 255, 255, .24); color: #fff; }
.filter-pills a:hover { border-color: var(--blue); color: var(--blue); }
.filter-pills a.on { background: var(--grad-brand); color: #fff; border-color: transparent; font-weight: 600; }
/* 栅格表单 + 分组 fieldset + 单元格工具类 */
.frm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.frm-grid label { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; }
.frm-grid label input, .frm-grid label select { width: 100%; margin-top: 5px; font-weight: 400; }
.frm-grid .frm-wide { grid-column: 1 / -1; }
.frm-sub { border: 1px dashed var(--line); border-radius: var(--r-sm); margin: 16px 0 4px; padding: 6px 16px 14px; }
.frm-sub legend { font-size: 13px; color: var(--muted); padding: 0 8px; }
.frm-note { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.h-sub { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.cell-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.cell-nowrap { white-space: nowrap; }
.cell-ellipsis, .cell-err { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.cell-err { color: #b91c1c; }
.cell-progress { min-width: 200px; }
.prog-txt { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.prog-txt .fail { color: #b91c1c; }
.tbl-scroll { overflow-x: auto; }
.tbl-scroll table { min-width: 760px; }
.tbl-wide table { min-width: 1040px; }   /* 宽表（安装登记等 10 列）：宁可横向滚动，不把中文挤成竖排 */
.btn-plain { background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-btn); padding: 7px 16px; font: inherit; font-size: 14px; cursor: pointer; margin-left: 8px; }
.btn-plain:hover { border-color: var(--blue); color: var(--blue); }
/* 宽屏（2K/4K）适配：放宽主区与侧栏，避免内容挤在窄条 */
@media (min-width: 1600px) {
  .adm-body { max-width: 1440px; }
  .adm-side { width: 248px; }
  .frm-grid { grid-template-columns: repeat(4, 1fr); }
}
/* Quill 编辑器融入设计系统 */
.adm-main .ql-toolbar { border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--bg-soft); }
.adm-main .ql-container { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px;
  font-size: 14.5px; }
.adm-main .ql-editor { min-height: 340px; background: var(--card); color: var(--ink); }
.adm-main .ql-snow .ql-stroke { stroke: var(--text); }
.adm-main .ql-snow .ql-fill { fill: var(--text); }
.adm-main .ql-snow.ql-toolbar button:hover .ql-stroke { stroke: var(--blue); }
@media (max-width: 860px) {
  .frm-grid { grid-template-columns: 1fr; }
  .upl-card { align-items: stretch; }
}

/* ---------- 20. 模态框（资源站等表单弹窗；纯原生，走设计令牌） ---------- */
.modal-mask { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000;
  background: rgba(15, 23, 42, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal-mask.show { display: flex; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25); width: 100%; max-width: 880px;
  max-height: calc(100vh - 12vh - 12vh); display: flex; flex-direction: column;
  animation: modalin .18s ease; }
body.modal-open { overflow: hidden; }   /* 弹窗打开时锁背景滚动 */
@keyframes modalin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px; border-bottom: 1px solid var(--line); }
.modal-head b { font-size: 16px; color: var(--ink); }
.modal-body { padding: 18px 22px 4px; flex: 1; min-height: 0; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; }
/* 关闭钮：覆盖 .adm-main button 的渐变默认样式 */
.adm-main .modal-x { background: none; border: 0; color: var(--muted); font-size: 22px;
  line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.adm-main .modal-x:hover { background: var(--bg-softer); color: #b91c1c; transform: none; box-shadow: none; }
.modal-foot .btn-plain { margin-left: 0; }
@media (max-width: 640px) { .modal-body { max-height: 62vh; padding: 14px 16px 2px; } }

/* ---------- 21. 插件设置页（?c=macapi：/?macapi 静态段管理） ---------- */
/* 概览条：替代一堆 readonly input，用「标签 + 值」信息块排版 */
.set-sub { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; }
.set-sub code { background: var(--bg-softer); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }
.set-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.set-stat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; background: var(--bg-softer); }
.set-stat span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.set-stat b { font-size: 14.5px; font-weight: 700; color: var(--ink); word-break: break-all; }
.set-stat b.ok { color: #047857; }
.set-stat b.warn { color: #b45309; }
.set-stat b.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
/* 锚点分区导航（吸顶在后台顶栏之下） */
.set-nav { position: sticky; top: 58px; z-index: 15; display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 0; margin: 0 0 4px; background: linear-gradient(180deg, var(--bg-soft) 78%, transparent); }
.set-nav a { font-size: 13px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-weight: 600; transition: border-color .2s, color .2s, transform .2s; }
.set-nav a:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
/* 分区卡片：标题行 + 右上角动作区（保存 / 恢复默认同表单） */
.adm-main .set-card { scroll-margin-top: 118px; }
.set-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px dashed var(--line); }
.adm-main .set-head h3 { margin: 0; font-size: 15.5px; }
.set-head .set-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.adm-main .btn-sm { padding: 6px 15px; font-size: 13.5px; }
.adm-main .btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); box-shadow: none; }
.adm-main .btn-ghost:hover { border-color: var(--blue); color: var(--blue); box-shadow: none; }
.adm-main .btn-icon { padding: 6px 12px; font-size: 13.5px; }
.adm-main .btn-danger { background: transparent; border: 1px solid rgba(220, 38, 38, .32); color: #b91c1c; box-shadow: none; }
.adm-main .btn-danger:hover { border-color: #dc2626; color: #fff; background: #dc2626; box-shadow: none; }
/* 字段栅格（比 frm-grid 更宽松：默认两列，长字段整行） */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.set-grid .full { grid-column: 1 / -1; }
.set-grid label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.set-grid label em { font-style: normal; font-weight: 400; color: var(--muted); }
.set-grid label input, .set-grid label textarea { width: 100%; margin-top: 6px; font-weight: 400; }
.set-grid textarea { resize: vertical; line-height: 1.55; }
.set-grid textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
.hint code { background: var(--bg-softer); border-radius: 6px; padding: 1px 6px; font-size: 12px; }
/* 系统设置 · 云端接口实时预览（?c=settings）：逐行「字段名 + 生效值 + 来源徽章」 */
.set-preview { margin: 15px 0 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-softer); padding: 11px 13px; }
.set-preview-head { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.set-preview-head code { background: var(--card); border-radius: 6px; padding: 1px 6px; font-size: 12px; }
.set-preview-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 4px 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.set-preview-row:first-of-type { border-top: 0; }
.set-preview-row > span { flex: 0 0 118px; color: var(--muted); font-weight: 600; }
.set-preview-row > code { flex: 1; min-width: 200px; font-family: ui-monospace, Consolas, monospace;
  font-size: 12px; color: var(--ink); word-break: break-all; }
/* 系统设置 · 吸底保存条 */
.set-savebar { position: sticky; bottom: 0; z-index: 12; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin: 0 0 18px; padding: 11px 15px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--card); box-shadow: var(--shadow-1); }
.set-savebar .hint { margin: 0; }
.set-savebar button { margin-left: auto; }
/* 主操作按钮（系统设置的「保存站点配置 / 更新密码」）：显式主色，避免被次级样式覆盖后与卡片同色不可见 */
.adm-main button.btn-save { background: var(--grad-brand); color: #fff; border: 0; font-weight: 600;
  padding: 9px 20px; box-shadow: 0 4px 14px rgba(99, 102, 241, .28); }
.adm-main button.btn-save:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }
/* 导航动态行 */
.nva-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) auto; gap: 10px;
  align-items: end; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; margin: 0 0 10px; background: var(--card); }
.nva-row label { font-size: 12px; font-weight: 600; color: var(--muted); }
.nva-row input { width: 100%; margin-top: 5px; font-size: 13.5px; }
.adm-main .nva-add { width: 100%; border: 1px dashed var(--line); background: transparent; color: var(--muted);
  padding: 9px; font-size: 13.5px; box-shadow: none; }
.adm-main .nva-add:hover { border-color: var(--blue); color: var(--blue); box-shadow: none; }
/* 富文本容器（Quill 嵌入卡片内，去掉重复边框） */
.editor-wrap { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--card); }
.editor-wrap .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); background: var(--bg-softer); }
.editor-wrap .ql-container.ql-snow { border: 0; font-size: 14px; font-family: inherit; }
.editor-wrap .ql-editor { min-height: 150px; line-height: 1.7; }
/* 折叠区（高级结构 / 其它端版本） */
details.acc { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-softer); margin: 0 0 12px; }
details.acc > summary { cursor: pointer; padding: 12px 15px; font-size: 14px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 9px; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: "▸"; color: var(--muted); transition: transform .18s; }
details.acc[open] > summary::before { transform: rotate(90deg); }
details.acc > summary .tag-on, details.acc > summary .tag-off { margin-left: auto; }
details.acc .acc-body { padding: 0 15px 15px; }
/* JSON 编辑块 */
.json-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.json-head .json-msg { font-size: 12.5px; color: var(--muted); }
.json-head .json-msg.bad { color: #b91c1c; }
.json-head .json-msg.good { color: #047857; }
.json-area { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  line-height: 1.55; resize: vertical; }
@media (max-width: 900px) {
  .set-grid { grid-template-columns: 1fr; }
  .nva-row { grid-template-columns: 1fr; }
  .set-head .set-actions { margin-left: 0; width: 100%; }
  .set-nav { top: 0; position: static; }
}

/* ===== §22 前台「在线求片」表单（/?qiupian，用户需求） ===== */
.qp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.qp-field { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; margin: 0 0 14px; }
.qp-field em { font-style: normal; font-weight: 400; color: var(--muted); }
.qp-field .field { width: 100%; margin-top: 6px; }
.qp-field select.field { padding: 9px 10px; }
textarea.field { resize: vertical; min-height: 84px; font-family: inherit; }
.qp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 0; }
.qp-actions .hint { margin: 0; }

/* ===== §23 后台「资源站管理」?c=sources（用户需求：表单美化 + 面板内批量排序） ===== */
/* 次级按钮：**只在本页（.src-page）落地**。原因：.adm-main button 特异性(0,1,1) 高于 .btn-plain(0,1,0)，
   若写成全局规则，会把别处「保存站点配置 / 更新密码」这类**主操作**也压成卡片白底——
   吸底保存条本身也是卡片底色，结果白底白条看起来就像"没有保存按钮"（用户反馈，已修）。 */
.adm-main .src-page .btn-plain, .adm-main .src-page a.btn-plain { background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.adm-main .src-page .btn-plain:hover, .adm-main .src-page a.btn-plain:hover { border-color: var(--blue);
  color: var(--blue); transform: none; box-shadow: none; }
.adm-main .src-page .src-del:hover { border-color: #dc2626; color: #dc2626; }
.adm-main a.src-a { display: inline-block; text-decoration: none; line-height: 1.35; }
/* 排序单元格：位置序号 + rank 输入 */
.src-pos { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px;
  margin-right: 6px; border-radius: 7px; background: var(--bg-softer); border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--muted); }
.adm-main input.src-rank { width: 58px; padding: 5px 7px; font-size: 13px; text-align: center; }
.adm-main table.src-table td { font-size: 13.5px; }
.src-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px;
  background: var(--bg-softer); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.src-dim { color: var(--muted); }
/* 表单：分区头（沿用 set-head 视觉，去掉卡片外框后的紧凑版） */
.set-head.src-sec { margin: 18px 0 12px; padding-bottom: 8px; }
.set-head.src-sec:first-child { margin-top: 0; }
.hint-inline { font-size: 12px; color: var(--muted); font-weight: 400; }
.modal-head .src-head-hint { margin-left: 10px; margin-right: auto; font-size: 12px; color: var(--muted); }
.modal-head .src-head-hint em, .set-grid label em { font-style: normal; color: var(--muted); font-weight: 400; }
.modal-head .src-head-hint em { color: #dc2626; font-weight: 700; }
.set-grid label > code { background: var(--bg-softer); border-radius: 6px; padding: 1px 6px;
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.set-grid label em { display: inline; }
.set-grid select { width: 100%; margin-top: 6px; font-weight: 400; border: 1px solid var(--line);
  border-radius: var(--r-btn); background: var(--card); color: var(--ink); padding: 9px 11px; font: inherit; }
.src-foot-hint { margin-right: auto; font-size: 12.5px; color: var(--muted); }
