:root {
  /* 表面与文本 */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #e7eaf1;
  --border-strong: #d6dbe6;
  --text: #151b27;
  --text-2: #3b4456;
  --muted: #717b8e;
  /* 品牌与主色 */
  --primary: #4f6bff;
  --primary-d: #3a53e0;
  --primary-l: #eef1ff;
  --primary-ghost: rgba(79,107,255,.10);
  --accent: #7c5cff;
  /* 语义色 */
  --green: #18a558;   --green-l: #e7f8ef;
  --amber: #e08a0c;   --amber-l: #fdf3e3;
  --red:   #e5484d;   --red-l:   #fdeeee;
  /* 圆角 */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  /* 阴影分级 */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 36px rgba(16,24,40,.12);
  --shadow-nav: 0 1px 0 rgba(16,24,40,.04), 0 6px 24px rgba(16,24,40,.06);
  --ring: 0 0 0 3px rgba(79,107,255,.22);
  --ease: cubic-bezier(.22,.61,.36,1);
}
/* ===== 暗色模式 ===== */
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #151b24;
  --card: #171d28;
  --border: #263041;
  --border-strong: #33405a;
  --text: #e7eaf2;
  --text-2: #c3cad8;
  --muted: #8a93a6;
  --primary: #6d85ff;
  --primary-d: #8a9dff;
  --primary-l: #1d2542;
  --primary-ghost: rgba(109,133,255,.16);
  --accent: #9b82ff;
  --green: #2ec27a;   --green-l: #10271c;
  --amber: #f0a93a;   --amber-l: #2a2110;
  --red:   #f06066;   --red-l:   #2c1518;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.55);
  --shadow-nav: 0 1px 0 rgba(0,0,0,.5), 0 6px 24px rgba(0,0,0,.4);
  --ring: 0 0 0 3px rgba(109,133,255,.3);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-d); }

/* ---- 顶部导航（分组下拉） ---- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
}
.topbar .brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 15px; letter-spacing: -.01em; color: var(--text);
  white-space: nowrap;
}
.topbar .brand .dot {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; box-shadow: 0 4px 12px rgba(79,107,255,.35);
}
.topbar .brand-name { line-height: 1.2; font-size: 14.5px; }

.topnav { display: flex; align-items: stretch; gap: 2px; height: 100%; margin-left: 8px; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; font-family: inherit; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 0 12px; border-radius: var(--radius-sm); height: 38px; margin: auto 0;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.nav-trigger:hover { background: var(--primary-ghost); color: var(--primary); }
.nav-item.active .nav-trigger { background: var(--primary-ghost); color: var(--primary); }
.nav-trigger .caret { font-size: 9px; opacity: .7; transition: transform .18s var(--ease); }
.nav-item.open .nav-trigger .caret { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: calc(100% - 6px); left: 0;
  min-width: 236px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
  z-index: 120;
}
.nav-item.open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
@media (min-width: 821px) { .nav-item:hover .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); } }
.nav-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.nav-menu a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-menu a.active { background: var(--primary-ghost); color: var(--primary); font-weight: 600; }
.nav-menu .nav-ic { font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---- 公开站顶栏导航（4 个公共模板共用）：分组 + 分隔线 ---- */
.pub-nav {
  display: flex; align-items: center; gap: 0;
  margin-left: 14px; font-size: 14px; line-height: 1;
}
.pub-nav-pages,
.pub-nav-lang {
  display: flex; align-items: center; gap: 14px;
}
.pub-nav-pages { padding-right: 16px; }
.pub-nav-lang {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.pub-nav a {
  color: var(--text-secondary);
  padding: 6px 4px;
  border-radius: 6px;
  transition: color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap;
}
.pub-nav a:hover { color: var(--primary); background: var(--primary-ghost); text-decoration: none; }
.pub-nav a.active { color: var(--primary); font-weight: 700; }
.pub-nav-lang a { font-size: 13px; color: var(--muted); padding: 4px 8px; }
.pub-nav-lang a.active { color: var(--primary); background: var(--primary-ghost); font-weight: 600; }
@media (max-width: 820px) {
  .pub-nav {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }
  .pub-nav-pages,
  .pub-nav-lang {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .pub-nav-lang { margin-top: 6px; padding-top: 8px; }
  .pub-nav-pages { padding-right: 0; padding-bottom: 6px; }
  .pub-nav a, .pub-nav-lang a { padding: 10px 12px; font-size: 14px; }
}
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s var(--ease);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-ghost); }
.role-badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--primary-ghost); color: var(--primary); font-size: 12px; font-weight: 600;
}
.logout { color: var(--red); font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 10px; transition: background .15s; }
.logout:hover { background: var(--red-l); text-decoration: none; }
.hamburger { display: none; border: none; background: none; cursor: pointer; font-size: 21px; color: var(--text); padding: 5px 8px; border-radius: 9px; }
.hamburger:hover { background: var(--bg); }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(10,14,22,.42); z-index: 90; backdrop-filter: blur(1px); }

/* ---- 容器 ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 30px 32px; width: 100%; box-sizing: border-box; }

/* ---- 页头 ---- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-head h1 {
  font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em;
}
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---- 卡片 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card h3 {
  margin: 0 0 16px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}

/* ---- 网格 ---- */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff; border: 1px solid transparent;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease), border-color .15s var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--primary-d); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.ghost { background: var(--primary-ghost); color: var(--primary); box-shadow: none; }
.btn.ghost:hover { background: var(--primary-l); color: var(--primary-d); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.amber { background: var(--amber); color: #fff; }
.btn.amber:hover { background: #cf7d0a; color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.loading { opacity: .7; pointer-events: none; }

/* ---- 输入 ---- */
input[type=text], input[type=url], textarea, select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none;
  background: var(--surface); color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 7px; font-weight: 500; }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
th {
  color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background: #fafbfd;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f8faff; }
tr:last-child td { border-bottom: none; }

/* ---- 徽章 ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-pending  { background: var(--amber-l);  color: var(--amber); }
.badge-running  { background: var(--primary-l); color: var(--primary); }
.badge-success  { background: var(--green-l);  color: var(--green); }
.badge-partial  { background: #fef9e7;          color: #9a7000; }
.badge-failed   { background: var(--red-l);     color: var(--red); }

/* ---- 指标卡片 ---- */
.metric {
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: box-shadow .15s;
}
.metric:hover { box-shadow: var(--shadow-hover); }
.metric .num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.metric .lbl { color: var(--muted); font-size: 12px; margin-top: 6px; }
.metric .src {
  display: inline-block; margin-top: 8px;
  font-size: 11px; color: var(--muted);
  background: #f0f2f7; padding: 2px 8px; border-radius: 999px;
}

/* ---- 截图 ---- */
.shot {
  width: 100%; max-width: 720px;
  border: 1px solid var(--border); border-radius: var(--radius);
  display: block;
}

/* ---- 杂项 ---- */
.tag {
  display: inline-block; background: var(--primary-l); color: var(--primary);
  padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.note {
  background: #fafbfd; border-left: 3px solid var(--primary);
  padding: 10px 14px; color: var(--muted); font-size: 13px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 8px 0;
}
.empty { color: var(--muted); text-align: center; padding: 48px 0; }
.content-box {
  white-space: pre-wrap; max-height: 360px; overflow: auto;
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; font-size: 13px; line-height: 1.7;
}

/* ---- 标题链接 ---- */
.title-link { color: var(--text); font-weight: 600; }
.title-link:hover { color: var(--primary); }

/* ---- 平台徽章（任务列表标题前） ---- */
.plat-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d8bff);
  vertical-align: middle;
  white-space: nowrap;
}

/* ---- 行内操作 ---- */
.col-ops { width: 1%; white-space: nowrap; }
.row-ops { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-l); }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn-sm:hover { background: var(--primary-d); border-color: var(--primary-d); text-decoration: none; }
.btn-sm.danger { border-color: var(--red); background: var(--red); color: #fff; }
.btn-sm.danger:hover { background: #c93a3f; border-color: #c93a3f; }
.btn-sm.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-sm.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---- 项目卡片 ---- */
.project-card {
  display: block; text-decoration: none; color: inherit;
  transition: all .2s;
}
.project-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.project-card .pname { font-weight: 700; font-size: 16px; }
.project-card .pdesc { margin: 8px 0 16px; min-height: 40px; font-size: 13px; color: var(--muted); }
.project-card .pstats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.project-card .card-link { display: block; text-decoration: none; color: inherit; }
.project-card .card-link:hover { text-decoration: none; }

/* ---- 分隔线 ---- */
.divider { display: inline-block; width: 1px; height: 20px; background: var(--border); margin: 0 2px; vertical-align: middle; }

/* ---- 视图切换 ---- */
.view-switch {
  display: inline-flex; gap: 2px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 2px;
}
.btn-switch {
  border: none; background: transparent; color: var(--muted);
  width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-switch:hover { color: var(--text); }
.btn-switch.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20,30,50,.1); }

/* ---- 详情页清理后样式 ---- */
.url-clip {
  max-width: 320px; display: inline-block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: var(--muted); font-weight: 500;
}
.url-clip:hover { color: var(--primary); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 { margin: 0; }

/* 项目互动数据汇总（紧凑一行） */
.summary-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px;
}
.summary-bar .sb-item {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}
.summary-bar .sb-ic {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.summary-bar .sb-txt { display: flex; flex-direction: column; line-height: 1.2; }
.summary-bar .sb-txt b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.summary-bar .sb-txt span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary-bar .sb-sep { width: 1px; height: 36px; background: var(--border); flex: 0 0 auto; }
@media (max-width: 720px) {
  .summary-bar { flex-wrap: wrap; }
  .summary-bar .sb-sep { display: none; }
  .summary-bar .sb-item { flex: 1 1 45%; }
}

/* 新建项目表单：名称宽、描述窄、按钮贴右，避免文字换行 */
.new-project-form {
  display: flex; align-items: flex-end; gap: 14px;
}
.new-project-form .npf-name { flex: 0 0 180px; }
.new-project-form .npf-desc { flex: 1 1 auto; }
.new-project-form .npf-btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
  .new-project-form { flex-wrap: wrap; }
  .new-project-form .npf-name, .new-project-form .npf-desc { flex: 1 1 100%; }
}

/* 项目卡片互动数据 */
.project-card .pmetrics {
  display: flex; gap: 8px; margin-top: 14px;
}
.project-card .pmetrics .pm {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 6px; background: #fafbfd;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -.01em;
}
.project-card .pmetrics .pm i { font-style: normal; font-size: 15px; }
.project-card .pmetrics .pm em {
  font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted);
}

/* 键值对 */
.kv { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv > span { color: var(--muted); font-size: 13px; min-width: 64px; }
.kv > b { font-weight: 600; }

/* ---- 数据变化日志 ---- */
.delta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.delta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px;
}
.delta-chip .d-ic { font-size: 15px; }
.delta-chip .d-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.delta-chip .d-val { font-size: 15px; font-weight: 800; }
.d-up { color: var(--green); font-weight: 800; }
.d-down { color: var(--red); font-weight: 800; }
.d-flat { color: var(--muted); font-weight: 700; }

.spark-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .spark-wrap { grid-template-columns: 1fr; } }
.spark-block {
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.spark-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.spark { width: 100%; height: 56px; display: block; }

.delta-cell { white-space: nowrap; }
.delta-cell .d-up, .delta-cell .d-down, .delta-cell .d-flat { margin: 0 1px; }

/* 评论区 */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; margin-left: 4px;
  background: var(--primary-l); color: var(--primary);
  border-radius: 999px; font-size: 12px; font-weight: 700;
  vertical-align: middle;
}
.comment-list { display: flex; flex-direction: column; gap: 2px; max-height: 460px; overflow: auto; }
.comment {
  display: flex; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.avatar {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.c-body { flex: 1; min-width: 0; }
.c-top { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.c-name { font-weight: 700; font-size: 13px; color: var(--text); }
.c-like { color: var(--muted); font-size: 12px; }
.c-text {
  font-size: 13px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
/* 评论折叠：默认仅显示最后 3 条，其余隐藏，点击「更多」展开 */
.comment-list:not(.expanded) .c-hidden { display: none; }
.c-more { align-self: flex-start; margin-top: 10px; }

/* ---- AI 全面总结卡片 ---- */
.ai-summary-card { border: 1px solid var(--border); }
.ai-sum-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.ai-sum-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.ai-meta { font-size: 12px; color: var(--muted); }
.ai-loading {
  padding: 22px 0; text-align: center; color: var(--primary);
  font-size: 14px; animation: aiPulse 1.2s ease-in-out infinite;
}
@keyframes aiPulse { 0%,100%{opacity:.55} 50%{opacity:1} }
.ai-error {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: #fff4f4; border: 1px solid #ffd0d0; color: #c0392b;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.ai-summary-content { font-size: 14px; line-height: 1.8; color: var(--text); }
.ai-summary-content h2 { font-size: 19px; margin: 18px 0 8px; color: var(--text); }
.ai-summary-content h3 { font-size: 16px; margin: 16px 0 6px; color: var(--primary); }
.ai-summary-content h4 { font-size: 14px; margin: 12px 0 4px; color: var(--text); font-weight: 700; }
.ai-summary-content p { margin: 6px 0; }
.ai-summary-content ul, .ai-summary-content ol { margin: 6px 0; padding-left: 22px; }
.ai-summary-content li { margin: 3px 0; }
.ai-summary-content blockquote {
  margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--primary-l);
  background: var(--primary-l); color: var(--muted); border-radius: var(--radius-sm);
}
.ai-summary-content strong { color: var(--text); font-weight: 700; }

/* ---- 设置页 ---- */
.settings-card { max-width: 720px; }
.settings-card h2 { margin: 0 0 4px; }
.settings-card .muted { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.set-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.set-row > label {
  flex: 0 0 110px; font-weight: 600; color: var(--text); padding-top: 8px;
}
.set-row .grow { flex: 1 1 auto; min-width: 0; }
.set-row input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--text);
}
.set-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.hint code, .set-tip code { background: #f3f5fa; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.set-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.ai-status { font-size: 13px; font-weight: 600; transition: none; }
.ai-status.ok { color: var(--green); animation: statusFlash 1.2s ease-out; }
.ai-status.err { color: var(--red); animation: statusShake 0.4s ease-out; }
@keyframes statusFlash {
  0% { background: rgba(22,163,74,0.15); border-radius: 4px; padding: 2px 6px; }
  100% { background: transparent; }
}
@keyframes statusShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.btn-sm:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.status-ok { color: var(--green); font-weight: 600; }
.status-off { color: var(--amber); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }
.risk-note {
  margin: 10px 0 4px; padding: 10px 14px; border-radius: 8px;
  background: #fff7e6; border: 1px solid #f3d9a6; color: #8a5a00;
  font-size: 13px; line-height: 1.6;
}
.risk-note b { color: #b9770e; }
.set-tip {
  margin-top: 18px; padding: 12px 14px; background: var(--primary-l);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
}
.set-tip b { color: var(--primary-d); }
.set-hr { border: none; border-top: 1px solid var(--border); margin: 24px 0 18px; }

/* ---- 接口配置：行 / 开关 ---- */
.iface-row {
  display: flex; gap: 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.iface-row > label {
  flex: 0 0 160px; font-weight: 600; color: var(--text); padding-top: 2px;
}
.iface-row .grow { flex: 1 1 auto; min-width: 0; }
.iface-row .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.iface-row input[type="text"], .iface-row input[type="number"], .iface-row select {
  width: 100%; max-width: 320px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--text);
}
.iface-row input:focus, .iface-row select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }

/* toggle 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #cdd3df;
  transition: .2s; border-radius: 999px;
}
.slider:before {
  position: absolute; content: ""; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:focus + .slider { box-shadow: 0 0 0 3px var(--primary-l); }

.iface-status { font-size: 13px; font-weight: 600; }
.iface-status.ok { color: var(--green); }
.iface-status.err { color: var(--red); }
.fw-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; line-height: 1.65;
  font-family: inherit; resize: vertical; color: var(--text);
}
.fw-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }

/* ---- 采集说明内嵌的「数据变化」区块 ---- */
.change-inline {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* ---- 项目资料库卡片 ---- */
.file-card .card-head,
.news-card .card-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.file-card .card-head h3,
.news-card .card-head h3 { margin: 0; }

.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--r); padding: 28px 16px;
  text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
  margin-bottom: 14px;
}
.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--primary); background: var(--primary-l);
}
.file-upload-hint {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px;
}
.file-upload-icon { font-size: 32px; }

.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--border);
}
.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.file-del { flex-shrink: 0; }

/* ---- 全网报道监控卡片 ---- */
.news-keywords-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.news-keywords-bar label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.news-keywords-bar input[type="text"] { flex: 1; min-width: 220px; font-size: 13px; }

.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--bg);
  transition: opacity .3s;
}
.news-unkept { opacity: .45; }
.news-body { flex: 1; min-width: 0; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-title a { color: var(--primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; display: inline-block; }
.news-title a:hover { text-decoration: underline; }
.news-kw-badge {
  font-size: 11px; background: var(--primary-l); color: var(--primary);
  padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.news-meta { font-size: 11px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.news-has-content { color: var(--green); }
.news-no-content { color: var(--amber); }
.news-snippet { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.news-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.news-actions.row { flex-direction: row; align-items: center; gap: 8px; }

.news-ai-score-badge {
  font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap;
  background: #f3f4f6; color: #6b7280;
}
.news-ai-score-badge.high { background: #dcfce7; color: #16a34a; font-weight: 600; }
.news-ai-score-badge.mid { background: #fef3c7; color: #d97706; font-weight: 600; }
.news-ai-score-badge.low { background: #fee2e2; color: #dc2626; font-weight: 600; }

/* ---- 报道监控：候选区 / 待采集区 ---- */
.news-sub { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.news-sub-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text);
}
.news-sub-head .ai-status { font-weight: 400; }
.news-sub-head b { color: var(--primary); }
.cand-item { border-left: 3px solid var(--primary-l); }
.cand-item .news-kw-badge.high { background: #dcfce7; color: #16a34a; font-weight: 600; }
.sel-item { border-left: 3px solid var(--green); background: var(--green-l, #f0fdf4); }

/* ---- AI 总结：简版 + 更多展开 ---- */
.ai-short {
  font-size: 14px; line-height: 1.75; color: var(--text);
  margin: 0 0 4px;
}
.ai-detail {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.ai-more { margin-top: 8px; }

/* ---- 站点修复规则管理 ---- */
.rule-form-row {
  display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-end;
}
.rule-fg {
  display: flex; flex-direction: column; gap: 3px; flex: 1;
}
.rule-fg label {
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.rule-fg input, .rule-fg select {
  font-size: 13px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--card); color: var(--text);
  outline: none;
}
.rule-fg input:focus, .rule-fg select:focus {
  border-color: var(--primary);
}

.rule-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.rule-table th {
  text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.rule-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.rule-table tr:last-child td { border-bottom: none; }
.rule-table tr:hover td { background: var(--bg); }
.rule-disabled td { opacity: 0.45; }

/* 规则分组 + 折叠 */
.rule-group { margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.rule-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; user-select: none;
  background: var(--bg); transition: background .1s;
}
.rule-group-header:hover { background: var(--primary-l); }
.rule-group-header .group-icon { font-size: 16px; }
.rule-group-header .group-domain { font-weight: 700; font-size: 14px; flex: 1; }
.rule-group-header .group-count { font-size: 12px; color: var(--muted); }
.rule-group-header .group-toggle { font-size: 13px; color: var(--muted); transition: transform .2s; }
.rule-group-header .group-toggle.open { transform: rotate(90deg); }
.rule-group-body { display: none; overflow-x: auto; }
.rule-group-body.open { display: block; }
.rule-group-body .rule-table { margin: 0; }
.rule-group-body .rule-table td:first-child { padding-left: 20px; }

/* 分页控件 */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 8px 0; flex-wrap: wrap;
}
.pagination .page-btn {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); cursor: pointer; font-size: 13px; color: var(--text); min-width: 34px; text-align: center;
}
.pagination .page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination .page-btn:disabled { opacity: 0.4; cursor: default; }
.pagination .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-info { font-size: 13px; color: var(--muted); padding: 0 8px; }

/* ---- AI 采集规则分析 ---- */
.ai-analyze-card { border: 1px solid var(--primary-l); background: linear-gradient(135deg, #f8faff 0%, #eef1ff 100%); }
.ai-analyze-card h2 { color: var(--primary-d); }
.ai-nl-row { margin-bottom: 4px; }
.ai-describe {
  width: 100%; font-size: 14px; padding: 12px 14px;
  border: 2px solid var(--primary-l); border-radius: 10px;
  background: var(--card); color: var(--text); outline: none;
  resize: vertical; min-height: 100px; line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-describe:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb, 99, 102, 241), 0.12);
}
.ai-describe::placeholder { color: var(--muted); opacity: 0.7; font-size: 13px; }
.ai-analyze-url-row { display: flex; gap: 8px; align-items: flex-start; }
.ai-analyze-url-row input[type="url"] {
  flex: 1; font-size: 14px; padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); outline: none;
}
.ai-analyze-url-row input[type="url"]:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l);
}
.ai-analyze-hint {
  width: 100%; font-size: 13px; padding: 8px 12px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); outline: none; resize: vertical;
}
.ai-analyze-hint:focus { border-color: var(--primary); }
.ai-result { margin-top: 16px; display: none; }
.ai-result.active { display: block; }
.ai-result-inner {
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 16px;
}
.ai-result-inner h4 {
  margin: 0 0 12px; font-size: 15px; color: var(--primary-d);
}
.ai-result-inner h4 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.ai-result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.ai-result-item {
  background: var(--bg); border-radius: 6px; padding: 10px 12px;
}
.ai-result-item .ai-r-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.ai-result-item .ai-r-val { font-family: "SF Mono","Fira Code","Consolas",monospace; font-size: 13px; color: var(--primary-d); word-break: break-all; }
.ai-result-item .ai-r-val.null { color: var(--muted); font-style: italic; }
.ai-metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ai-metric-item {
  background: var(--bg); border-radius: 6px; padding: 8px 10px; text-align: center;
}
.ai-metric-item .ai-m-num { font-size: 18px; font-weight: 700; color: var(--primary-d); }
.ai-metric-item .ai-m-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ai-result-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-skill-notes { flex: 1; min-width: 180px; }
.ai-skill-notes input {
  width: 100%; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px; outline: none;
}
.ai-skill-notes input:focus { border-color: var(--primary); }

/* ---- 候选式结果卡片 ---- */
.cand-group { margin-bottom: 18px; }
.cand-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.cand-title small { font-weight: 400; color: var(--muted); font-size: 12px; }
.cand-title .cand-count { margin-left: auto; color: var(--muted); font-weight: 400; }
.cand-list { display: flex; flex-direction: column; gap: 8px; }
.cand-card {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: all 0.15s ease;
}
.cand-card:hover { border-color: var(--primary); background: var(--primary-l); }
.cand-card.selected { border-color: var(--primary); background: var(--primary-l); box-shadow: 0 2px 8px rgba(var(--primary-rgb, 99,102,241),0.2); }
.cand-card.empty {
  cursor: default; color: var(--muted); font-style: italic; justify-content: center;
  border-style: dashed; background: transparent;
}
.cand-card.empty:hover { border-color: var(--border); background: transparent; }
.cand-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
  flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; transition: all 0.15s;
}
.cand-card.selected .cand-radio { background: var(--primary); border-color: var(--primary); }
.cand-card.selected .cand-radio::after { content: "✓"; }
.cand-body { flex: 1; min-width: 0; }
.cand-text {
  font-size: 14px; line-height: 1.5; color: var(--text);
  max-height: 4.2em; overflow: hidden; word-break: break-word;
}
.cand-meta { display: flex; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.cand-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--primary-l); color: var(--primary-d); font-weight: 600;
}
.cand-tag.metric { background: #fff4e5; color: #b9770b; }
.cand-tag.site { background: #e8f4ff; color: #2563eb; }
.cand-conf { font-size: 11px; color: var(--muted); }
.cand-conf.high { color: #16a34a; font-weight: 600; }
.cand-preview { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.cand-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.cand-tip { font-size: 12px; color: var(--muted); margin:-4px 0 10px; }

/* 每个字段的「自然语言重新匹配」面板 */
.cand-rematch { margin-top: 8px; }
.cand-rematch-toggle {
  background: none; border: 1px dashed var(--border); color: var(--muted);
  font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.cand-rematch-toggle:hover { border-color: var(--primary); color: var(--primary); }
.cand-rematch-panel { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.cand-rematch-input {
  flex: 1; min-width: 220px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; background: var(--bg); color: var(--text);
}
.cand-rematch-input:focus { outline: none; border-color: var(--primary); }
.cand-rematch-status { font-size: 12px; color: var(--muted); }
.cand-rematch-status.ok { color: #16a34a; }
.cand-rematch-status.err { color: #dc2626; }
.cand-card.rematch-card { border-style: dashed; }
.cand-card.rematch-card.selected { border-style: solid; }

/* 空值选项：页面无此字段 */
.cand-card.null-card { border-style: dashed; border-color: var(--amber); background: var(--amber-l); cursor: pointer; }
.cand-card.null-card:hover { border-color: var(--red); background: var(--red-l); }
.cand-card.null-card.selected { border-color: var(--red); background: var(--red-l); }

/* PIN 解锁层 */
.pin-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}
.pin-box {
  background: var(--card); border-radius: var(--radius);
  padding: 32px 36px; box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  max-width: 400px; width: 90%; text-align: center;
}
.pin-box h3 { margin: 0 0 8px; font-size: 18px; }

/* ---- 各平台 Cookie 管理 ---- */
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #148f4e; border-color: #148f4e; color: #fff; }
.btn-sm.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-sm.green:hover { background: #148f4e; border-color: #148f4e; color: #fff; }
.btn.purple { background: #7c4dff; border-color: #7c4dff; color: #fff; }
.btn.purple:hover { background: #6a3de8; border-color: #6a3de8; color: #fff; }

.ai-short { line-height: 1.5; }
.ai-meta { font-size: 13px; }
.ai-chip { background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.ai-chip b { color: var(--text); font-weight: 700; }
.inp { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font-size: 14px; box-sizing: border-box; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.cookie-toolbar { display: flex; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.cookie-toolbar select { max-width: 220px; }
.cookie-editor textarea {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5; resize: vertical;
}
.cookie-note-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.cookie-note-row input[type=text] { flex: 1; min-width: 160px; }
.cookie-note-row .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cookie-note-row .chk input { width: auto; }

.cookie-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cookie-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--bg-soft);
}
.cookie-item-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cookie-item-head .spacer { flex: 1; }
.cookie-item-head .btn-sm { padding: 4px 10px; font-size: 12px; }

.cookie-analyze-result {
  margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); overflow: hidden;
}
.cookie-analyze-result .ca-head { padding: 10px 12px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border); background: var(--card); }
.cookie-analyze-result .ca-body {
  margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: var(--text);
}

/* ---- 报表/周报中心共享样式（P2-1 / P2-2） ---- */
.report-pre {
  background: #fafafa; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto; font-size: 13px; color: var(--text);
}
.report-list a {
  display: block; padding: 6px 8px; border-radius: 6px;
  color: var(--link, #1a73e8); cursor: pointer;
}
.report-list a:hover { background: #f0f0f0; }
.chart-wrap { width: 100%; max-height: 320px; }
.wecom-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wecom-row .inp { flex: 1 1 320px; }
.wecom-row .muted { font-size: 13px; }
.wecom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.wecom-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.wecom-grid .inp { width: 100%; }

/* 推送模板编辑器（P2-4） */
.tpl-vars { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tpl-chip {
  background: #eef2ff; color: #3b48d6; border: 1px solid #d6ddff; border-radius: 6px;
  padding: 3px 8px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer; user-select: none;
}
.tpl-chip:hover { background: #e0e7ff; }
.tpl-area {
  width: 100%; min-height: 168px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.55; padding: 10px 12px; box-sizing: border-box;
}
.tpl-samples { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* 运营报表 - 调度 tab 磁贴与网格 */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 0; }
.stat-tile { background: linear-gradient(135deg, #fff 0%, #f7f9ff 100%); border: 1px solid var(--border); border-radius: 10px; padding: 16px 14px; text-align: center; }
.stat-tile .stat-num { font-size: 22px; font-weight: 700; color: #4f6bff; line-height: 1.2; word-break: break-all; }
.stat-tile .stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sched-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.sched-grid .card { margin: 0; }
.sched-grid .card h3 { margin: 0 0 8px; font-size: 15px; }
.sched-grid .sched-action .btn { padding: 8px 16px; }
.scroll-y { max-height: 220px; overflow-y: auto; }
.cron-hint-pre { background: #1e1e1e; color: #d4d4d4; padding: 10px 12px; border-radius: 8px; overflow: auto; font-size: 12.5px; margin: 0; line-height: 1.6; max-height: 180px; }
.sched-grid .report-list a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.sched-grid .report-list a:last-child { border-bottom: none; }
.sched-grid .report-list a:hover { background: #f4f6ff; }
.sched-grid .report-list .tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.sched-grid .report-list .tag.purple { background: #ede9ff; color: #6b3df5; }
.sched-grid .report-list .tag.green { background: #e3f5e8; color: #1aab5e; }
@media (max-width: 820px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .sched-grid { grid-template-columns: 1fr; }
  .scroll-y { max-height: 260px; }
}

/* ---- 聚合页 tab 切换 ---- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 14px 0 18px; flex-wrap: wrap; }
.tab {
  background: none; border: none; padding: 9px 16px; cursor: pointer;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-pane { animation: tabfade .18s ease; display: none; }
.tab-pane.active { display: block; }
@keyframes tabfade { from { opacity: .35; } to { opacity: 1; } }

/* ---- 三栏导航 tab 切换器（header 内） ---- */
.tabbar { display: flex; gap: 6px; margin-left: 12px; align-items: center; }
.tab-btn {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border, #d8dde6);
  background: transparent; color: var(--text, #222);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: all .15s var(--ease, ease);
}
.tab-btn:hover { border-color: var(--primary, #2b7); color: var(--primary, #2b7); }
.tab-btn.active { background: var(--primary, #2b7); border-color: var(--primary, #2b7); color: #fff; font-weight: 600; }
/* 桌面端：激活的 pane 内 nav-item 横向排布（覆盖默认 display:block） */
.topnav .tab-pane.active { display: flex; align-items: stretch; gap: 2px; }
@media (max-width: 820px) {
  .tabbar { margin-left: 0; }
  .tab-btn { padding: 5px 10px; font-size: 12px; }
  .topnav .tab-pane.active { flex-direction: column; align-items: stretch; }
}

/* ---- 采集新商品 Tab 专用：磁贴/进度/补齐队列 ---- */
.coll-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.coll-toolbar select { min-width: 260px; }
.prog { height: 12px; border-radius: 8px; background: var(--border); overflow: hidden; margin: 8px 0; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .3s var(--ease); }
.miss-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.miss-list li { background: color-mix(in srgb, #e23b3b 12%, var(--card)); color: #e23b3b;
  border: 1px solid color-mix(in srgb, #e23b3b 30%, transparent); border-radius: 8px; padding: 3px 9px; font-size: 12px; }
.field-mod { margin-bottom: 12px; }
.field-mod > h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-2); }
.field-row { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.field-row .fl { width: 150px; color: var(--muted); flex: none; }
.field-row .fv { flex: 1; word-break: break-word; }
.field-row .fs-tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-left: 6px; }
.fs-manual { background: color-mix(in srgb, #1aab5e 16%, var(--card)); color: #1aab5e; }
.fs-llm { background: color-mix(in srgb, #4f6bff 16%, var(--card)); color: #4f6bff; }
.fs-platform { background: color-mix(in srgb, #f5a623 16%, var(--card)); color: #f5a623; }
.fs-ocr { background: color-mix(in srgb, #9b59b6 16%, var(--card)); color: #9b59b6; }
.cf-badge { font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-left: 4px; white-space: nowrap; }
.cf-high { background: color-mix(in srgb, #1aab5e 18%, var(--card)); color: #1aab5e; }
.cf-mid { background: color-mix(in srgb, #f5a623 18%, var(--card)); color: #f5a623; }
.cf-low { background: color-mix(in srgb, #e23b3b 18%, var(--card)); color: #e23b3b; }
.field-row.miss .fl::after { content: " *"; color: #e23b3b; }
.sugg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; background: var(--card); }
.sugg .s-head { font-size: 13px; font-weight: 600; }
.sugg .s-val { color: var(--text); margin: 3px 0; word-break: break-word; }
.sugg .s-meta { font-size: 11px; color: var(--muted); }
.md-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; max-height: 420px; overflow: auto; font-size: 13px; line-height: 1.7; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 10px 0 6px; }
.md-preview ul { padding-left: 20px; margin: 6px 0; }
.md-preview code { background: var(--border); padding: 1px 5px; border-radius: 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.media-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.media-cell img, .media-cell video { width: 100%; height: 96px; object-fit: cover; display: block; }
.media-cell .m-meta { font-size: 11px; padding: 4px 6px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---- ops-card：insights 主体卡（紧凑头 + 自适应空态） ---- */
.ops-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-top: 14px;
}
.ops-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.ops-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ops-ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef1ff, #f0f7ff); font-size: 16px; flex: 0 0 auto;
}
.ops-title > span:nth-child(2) {
  font-weight: 700; font-size: 15px; color: var(--text);
}
.ops-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ops-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-actions .inp { padding: 7px 10px; font-size: 13px; }
.ops-stat { color: var(--muted); font-size: 13px; margin: 10px 0 0; min-height: 18px; }

/* 大空态（替代旧的 padding:30-48px .empty，避免半屏空白） */
.empty-lg {
  padding: 64px 16px;
  text-align: center; color: var(--muted);
  border: 2px dashed var(--border); border-radius: 12px;
  background: #fafbfd; font-size: 16px; line-height: 1.7;
  min-height: 240px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.empty-lg .muted { margin-top: 4px; }

/* ---- 移动端适配（顶栏汉堡纵向菜单） ---- */
@media (max-width: 820px) {
  .hamburger { display: inline-flex; }
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar .brand-name { display: none; }
  .topnav {
    position: absolute; top: 58px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 58px); overflow-y: auto; padding: 8px;
    display: none;
  }
  .topnav.open { display: flex; }
  .nav-item { display: block; }
  .nav-trigger { width: 100%; justify-content: space-between; height: 46px; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: 0 0 6px 6px;
    display: none;
  }
  .nav-item.open .nav-menu { display: block; }
  .backdrop.show { display: block; }
  .container { padding: 18px 14px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head .head-actions { width: 100%; display: flex; gap: 8px; }
  .page-head .head-actions .btn { flex: 1 1 auto; }
  .card { padding: 16px 14px; }
  .wecom-row .inp { flex: 1 1 100%; }
}

/* ===== 内容审核台（M2 card-review）新增组件样式 ===== */
.page-title { font-size: 20px; font-weight: 700; margin: 4px 0 6px; }
.muted { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card-block { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.block-title { font-weight: 700; font-size: 15px; }
.variant-row { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: #fafbff; }
.v-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.v-body { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.v-actions { display: flex; gap: 8px; }
.v-reason { font-size: 12px; color: var(--red); margin-top: 4px; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: #c93a3f; border-color: #c93a3f; color: #fff; }

/* 审核台批量操作条 + 变体勾选布局 */
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; padding: 10px 12px; background: #f4f6ff; border: 1px solid var(--border); border-radius: 10px; }
.bulk-bar .ck-all { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bulk-bar .muted { margin-left: auto; }
.btn.mini { padding: 5px 10px; font-size: 12px; line-height: 1.4; }
.variant-row { display: flex; align-items: flex-start; gap: 10px; }
.variant-row .ck { padding-top: 2px; }
.variant-row .v-main { flex: 1; min-width: 0; }

/* 磁贴 / 标签 颜色修饰（审核台复用） */
.stat-tile .stat-num.red { color: #e23b3b; }
.stat-tile .stat-num.amber { color: #e0962a; }
.stat-tile .stat-num.green { color: #1aab5e; }
.stat-tile .stat-num.blue { color: #4f6bff; }
.tag.blue { background: #e3ecff; color: #2f5bd6; }
.tag.red { background: #fde3e3; color: #c93a3f; }
.tag.green { background: #e3f5e8; color: #1aab5e; }
.tag.purple { background: #ede9ff; color: #6b3df5; }
.tag.gray { background: #eef0f3; color: #6b7280; }

/* ===== 流程化工具：流程进度条导航 ===== */
.section-h { font-size: 15px; font-weight: 700; margin: 22px 0 12px; color: var(--text); }
.flow-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.flow-step { display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  text-decoration: none; color: var(--text); min-width: 64px; transition: all .15s; }
.flow-step:hover { border-color: #4f6bff; box-shadow: 0 2px 8px rgba(79,107,255,.12); }
.flow-step.current { border-color: #4f6bff; background: #eef2ff; box-shadow: 0 0 0 3px rgba(79,107,255,.15); }
.fs-num { width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%;
  background: #4f6bff; color: #fff; font-size: 12px; font-weight: 700; }
.flow-step.current .fs-num { background: #1aab5e; }
.fs-t { font-size: 13px; font-weight: 600; }
.fs-s { font-size: 10px; color: var(--muted); }
.flow-arrow { color: #b9c2d6; font-size: 12px; }

/* ===== 上下文提示框 ===== */
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f3d98a; margin: 12px 0; }
.hint-go { background: #eef6ff; border-color: #bcd4ff; }
.hint-ok { background: #e9f8ee; border-color: #b6e6c5; }
.hint-ico { font-size: 18px; line-height: 1.3; }
.hint-body { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.hint-link { color: #2f5bd6; font-weight: 700; text-decoration: none; }
.hint-link:hover { text-decoration: underline; }

/* ===== 分步操作卡片 ===== */
.step-grid { margin-top: 8px; }
.step-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; background: #fff; }
.step-ico { flex: 0 0 auto; width: 34px; height: 34px; line-height: 34px; text-align: center;
  border-radius: 9px; background: #eef2ff; color: #2f5bd6; font-weight: 800; font-size: 16px; }
.gate-card { background: #fff5f5; border-color: #f3c9c9; }
.gate-card .step-ico { background: #fde3e3; color: #c93a3f; }
.step-body { flex: 1; min-width: 0; }
.step-body b { font-size: 14.5px; }
.step-body .muted { margin: 4px 0 8px; font-size: 13px; }
.step-body .btn.mini { margin-right: 6px; margin-bottom: 6px; }
.nowrap { white-space: nowrap; }

/* ===== 宪章 7 步主循环：动画流程图 ===== */
.loop-wrap { margin-top: 6px; background: #fbfcff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; }
.loop-rail { position: relative; height: 4px; background: linear-gradient(90deg,#4f6bff,#1aab5e,#f5a623); border-radius: 4px; margin-bottom: 16px; overflow: visible; }
.loop-runner { position: absolute; top: -5px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid #4f6bff; box-shadow: 0 0 10px rgba(79,107,255,.6);
  animation: loopRun 6s linear infinite; }
@keyframes loopRun { 0% { left: 0; } 100% { left: calc(100% - 14px); } }
.loop-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.loop-node { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px;
  padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  animation: nodePulse 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
.loop-node.gate { background: #fff5f5; border-color: #f3c9c9; }
.loop-node b { font-size: 13px; }
.loop-node small { font-size: 11px; color: var(--muted); text-align: center; }
.ln-ico { font-size: 18px; }
.gate-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: #c93a3f; color: #fff; }
.gate-badge.red { background: #c93a3f; }
@keyframes nodePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(79,107,255,0); }
  50% { box-shadow: 0 0 0 4px rgba(79,107,255,.18); } }
.loop-foot { text-align: center; margin-top: 14px; font-size: 12px; }

/* ===== 响应式：流程条/卡片在窄屏转单列 ===== */
@media (max-width: 820px) {
  .flow-strip { gap: 4px; }
  .flow-step { min-width: 52px; padding: 6px 9px; }
  .fs-t { font-size: 12px; }
  .loop-node { min-width: 72px; }
  .step-grid { grid-template-columns: 1fr; }
}
.tag.amber { background: #fdf0db; color: #b9791a; }

/* ===== 增长洞察 / 周日报 页面组件 ===== */
.ind-list, .ev-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.ind-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ev-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.ev-row { font-size: 12.5px; color: var(--text); padding: 4px 0; }
.md-preview { background: #0f1729; color: #e6edf3; padding: 14px 16px; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }

/* ===== 邮件营销后台：卡片 / 面板 / tab 激活 ===== */
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.panel { margin-top: 4px; }
.tab.active { border-color: #4f6bff; color: #2f5bd6; background: #eef2ff; }


/* ===== 运营驾驶舱 /ops 专用组件 ===== */
.loop-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.loop-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }
.loop-ic { width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: var(--primary-ghost); }
.loop-body { flex: 1 1 auto; min-width: 0; }
.loop-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.loop-desc { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-bottom: 9px; }
.loop-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.pillar { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pillar:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pillar-ic { font-size: 22px; margin-bottom: 6px; }
.pillar-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.pillar-desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.route-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.route-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--text-2); font-size: 13px; font-weight: 500; border: 1px solid var(--border); transition: all .15s var(--ease); }
.route-tag:hover { background: var(--primary-ghost); color: var(--primary); border-color: var(--primary); }
.mini { border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.mini:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.mini-num { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.mini-label { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ============================================================
   全站高级化 · 平滑主题过渡 / 表格 / 磁贴微交互 / 滚动条
   ============================================================ */
html { scroll-behavior: smooth; }
body { transition: background .25s var(--ease), color .25s var(--ease); }

/* 主题切换时避免闪烁 */
.theme-toggle .ic-moon, .theme-toggle .ic-sun { transition: transform .3s var(--ease), opacity .2s var(--ease); }

/* 统计磁贴：悬浮微浮 */
.stat-tile { transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.stat-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }

/* 表格高级化 */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; margin-bottom: 16px; }
thead th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: 12.5px;
  background: var(--bg); padding: 11px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover { background: var(--bg); }
tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }
table.wrap, .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* 自定义滚动条（webkit） */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

/* 卡片可悬浮（用于可点击卡） */
.card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }

/* 焦点可见性统一 */
a:focus-visible, button:focus-visible, .nav-trigger:focus-visible, .theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* 选中态品牌色 */
::selection { background: var(--primary-ghost); color: var(--primary-d); }
/* ════════════════════════════════════════════════════════
   多色系主题切换（8 套）
   [data-theme="gold"]  = 墨黑暖金（默认）
   [data-theme="indigo"] = 靛蓝学术
   [data-theme="terra"]  = 赤陶暖橙
   [data-theme="teal"]   = 松绿自然
   [data-theme="rose"]   = 玫粉轻奢
   [data-theme="x"]      = 暗色 X + 暖金
   [data-theme="x-indigo"]= 暗色 X + 靛蓝
   [data-theme="x-terra"] = 暗色 X + 赤陶
   [data-theme="x-teal"]  = 暗色 X + 松绿
   [data-theme="x-rose"]  = 暗色 X + 玫粉
   通过 body[data-theme="xxx"] 覆盖 :root 变量，全站即时切换
   ════════════════════════════════════════════════════════ */

/* ── 浅色系：靛蓝学术 ── */
[data-theme="indigo"]{
  --bg:#f8fafc; --surface:#fff;
  --ink:#0f172a; --muted:#64748b; --faint:#94a3b8;
  --gold:#2563eb; --gold-deep:#1d4ed8; --gold-soft:#eff6ff;
  --line:#e2e8f0; --line-strong:#cbd5e1;
  --brand:#2563eb; --accent:#1d4ed8;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(15,23,42,.05);
  --shadow:0 2px 14px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.04);
  --shadow-lg:0 20px 54px rgba(15,23,42,.13);
}
[data-theme="indigo"] .topbar{background:rgba(255,255,255,.82);border-color:#e2e8f0}
[data-theme="indigo"] .site-foot{border-color:#e2e8f0}

/* ── 浅色系：赤陶暖橙 ── */
[data-theme="terra"]{
  --bg:#fdfaf7; --surface:#fff;
  --ink:#1c1917; --muted:#78716c; --faint:#a8a29e;
  --gold:#c2410c; --gold-deep:#9a3412; --gold-soft:#fff7ed;
  --line:#f5f0e8; --line-strong:#e8dcc8;
  --brand:#c2410c; --accent:#9a3412;
  --green:#4d7c0f; --amber:#b45309;
  --shadow-sm:0 1px 2px rgba(28,25,23,.05);
  --shadow:0 2px 14px rgba(28,25,23,.06),0 1px 3px rgba(28,25,23,.04);
  --shadow-lg:0 20px 54px rgba(28,25,23,.13);
}
[data-theme="terra"] .topbar{background:rgba(255,255,255,.82);border-color:#f5f0e8}
[data-theme="terra"] .site-foot{border-color:#f5f0e8}

/* ── 浅色系：松绿自然 ── */
[data-theme="teal"]{
  --bg:#f6faf8; --surface:#fff;
  --ink:#0f1f1a; --muted:#5f736b; --faint:#93a89d;
  --gold:#0f766e; --gold-deep:#0d5f54; --gold-soft:#ecfdf5;
  --line:#d8ebe4; --line-strong:#c2d9ce;
  --brand:#0f766e; --accent:#0d5f54;
  --green:#059669; --amber:#b45309;
  --shadow-sm:0 1px 2px rgba(15,31,26,.05);
  --shadow:0 2px 14px rgba(15,31,26,.06),0 1px 3px rgba(15,31,26,.04);
  --shadow-lg:0 20px 54px rgba(15,31,26,.13);
}
[data-theme="teal"] .topbar{background:rgba(255,255,255,.82);border-color:#d8ebe4}
[data-theme="teal"] .site-foot{border-color:#d8ebe4}

/* ── 浅色系：玫粉轻奢 ── */
[data-theme="rose"]{
  --bg:#fef7fb; --surface:#fff;
  --ink:#1c1318; --muted:#7d6a78; --faint:#b097a5;
  --gold:#be185d; --gold-deep:#9f1239; --gold-soft:#fff1f7;
  --line:#f2e5ec; --line-strong:#e5d0dc;
  --brand:#be185d; --accent:#9f1239;
  --green:#059669; --amber:#b45309;
  --shadow-sm:0 1px 2px rgba(28,19,24,.05);
  --shadow:0 2px 14px rgba(28,19,24,.06),0 1px 3px rgba(28,19,24,.04);
  --shadow-lg:0 20px 54px rgba(28,19,24,.13);
}
[data-theme="rose"] .topbar{background:rgba(255,255,255,.82);border-color:#f2e5ec}
[data-theme="rose"] .site-foot{border-color:#f2e5ec}

/* ── X 暗色系：靛蓝 ── */
[data-theme="x-indigo"]{
  --x-accent:#4f46e5;
  --x-accent-hover:#6366f1;
  --x-overlay:#0c0a1f;
  --x-overlay-soft:#1e1b4b;
}

/* ── X 暗色系：赤陶 ── */
[data-theme="x-terra"]{
  --x-accent:#c2410c;
  --x-accent-hover:#ea580c;
  --x-overlay:#1a0e08;
  --x-overlay-soft:#3a1f12;
}

/* ── X 暗色系：松绿 ── */
[data-theme="x-teal"]{
  --x-accent:#0f766e;
  --x-accent-hover:#14b8a6;
  --x-overlay:#051210;
  --x-overlay-soft:#0a3a30;
}

/* ── X 暗色系：玫粉 ── */
[data-theme="x-rose"]{
  --x-accent:#be185d;
  --x-accent-hover:#f43f5e;
  --x-overlay:#1a0510;
  --x-overlay-soft:#3a0a22;
}

/* ── X 暗色色相版：电紫 ── */
[data-theme="x-violet"]{
  --x-accent:#7c3aed; --x-accent-hover:#8b5cf6;
  --x-bg:#0f0520; --x-bg-deep:#1a0a30;
  --x-hover:#1e0e38; --x-hover-soft:#251240;
  --x-card:#2a1450; --x-line:#3d2a5a;
  --x-overlay:#0a0218; --x-overlay-soft:#2d1a55;
}
/* ── X 暗色色相版：青柠电子 ── */
[data-theme="x-cyan"]{
  --x-accent:#0891b2; --x-accent-hover:#22d3ee;
  --x-bg:#05131c; --x-bg-deep:#0a2530;
  --x-hover:#0c2e3d; --x-hover-soft:#0f3646;
  --x-card:#144a5f; --x-line:#1e4d61;
  --x-overlay:#020a10; --x-overlay-soft:#0a3040;
}
/* ── X 暗色色相版：荧光柠 ── */
[data-theme="x-lime"]{
  --x-accent:#65a30d; --x-accent-hover:#84cc16;
  --x-bg:#0a1202; --x-bg-deep:#14200a;
  --x-hover:#1c2c10; --x-hover-soft:#233316;
  --x-card:#2d4418; --x-line:#3a5620;
  --x-overlay:#050a01; --x-overlay-soft:#1c2e0a;
}
/* ── X 暗色色相版：落日粉 ── */
[data-theme="x-sunset"]{
  --x-accent:#db2777; --x-accent-hover:#f472b6;
  --x-bg:#160510; --x-bg-deep:#220a18;
  --x-hover:#2e1028; --x-hover-soft:#361534;
  --x-card:#441a40; --x-line:#5a2050;
  --x-overlay:#0c0208; --x-overlay-soft:#3a1030;
}
/* ── X 暗色色相版：泡泡糖 ── */
[data-theme="x-bubble"]{
  --x-accent:#2563eb; --x-accent-hover:#60a5fa;
  --x-bg:#060a1c; --x-bg-deep:#0c1430;
  --x-hover:#141e44; --x-hover-soft:#1a2448;
  --x-card:#1e2a58; --x-line:#2a3868;
  --x-overlay:#03060e; --x-overlay-soft:#162040;
}

/* ── 浅色系：电紫极光 ── */
[data-theme="violet"]{
  --bg:#f5f0ff; --surface:#fff;
  --ink:#1e0a3e; --muted:#6d5a80; --faint:#a78bb8;
  --gold:#7c3aed; --gold-deep:#5b21b6; --gold-soft:#ede9fe;
  --line:#e8dff5; --line-strong:#d4c5ec;
  --brand:#7c3aed; --accent:#5b21b6;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(30,10,62,.05);
  --shadow:0 2px 14px rgba(30,10,62,.06),0 1px 3px rgba(30,10,62,.04);
  --shadow-lg:0 20px 54px rgba(30,10,62,.13);
}
[data-theme="violet"] .topbar{background:rgba(255,255,255,.82);border-color:#e8dff5}
[data-theme="violet"] .site-foot{border-color:#e8dff5}

/* ── 浅色系：青柠电子 ── */
[data-theme="cyan"]{
  --bg:#ecfeff; --surface:#fff;
  --ink:#042f2e; --muted:#4a7078; --faint:#7fa8b0;
  --gold:#0891b2; --gold-deep:#155e75; --gold-soft:#cffafe;
  --line:#cff3f8; --line-strong:#b3e8ef;
  --brand:#0891b2; --accent:#155e75;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(4,47,46,.05);
  --shadow:0 2px 14px rgba(4,47,46,.06),0 1px 3px rgba(4,47,46,.04);
  --shadow-lg:0 20px 54px rgba(4,47,46,.13);
}
[data-theme="cyan"] .topbar{background:rgba(255,255,255,.82);border-color:#cff3f8}
[data-theme="cyan"] .site-foot{border-color:#cff3f8}

/* ── 浅色系：荧光柠绿 ── */
[data-theme="lime"]{
  --bg:#f7fee7; --surface:#fff;
  --ink:#1a2e05; --muted:#5a6b3d; --faint:#8fa468;
  --gold:#65a30d; --gold-deep:#3f6212; --gold-soft:#ecfccb;
  --line:#e4f2c9; --line-strong:#cde8a0;
  --brand:#65a30d; --accent:#3f6212;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(26,46,5,.05);
  --shadow:0 2px 14px rgba(26,46,5,.06),0 1px 3px rgba(26,46,5,.04);
  --shadow-lg:0 20px 54px rgba(26,46,5,.13);
}
[data-theme="lime"] .topbar{background:rgba(255,255,255,.82);border-color:#e4f2c9}
[data-theme="lime"] .site-foot{border-color:#e4f2c9}

/* ── 浅色系：落日粉紫 ── */
[data-theme="sunset"]{
  --bg:#fff5f8; --surface:#fff;
  --ink:#1c0a2e; --muted:#7a4b6e; --faint:#b08a9f;
  --gold:#db2777; --gold-deep:#be185d; --gold-soft:#fce7f3;
  --line:#f8d9e8; --line-strong:#f4b8d4;
  --brand:#db2777; --accent:#be185d;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(28,10,46,.05);
  --shadow:0 2px 14px rgba(28,10,46,.06),0 1px 3px rgba(28,10,46,.04);
  --shadow-lg:0 20px 54px rgba(28,10,46,.13);
}
[data-theme="sunset"] .topbar{background:rgba(255,255,255,.82);border-color:#f8d9e8}
[data-theme="sunset"] .site-foot{border-color:#f8d9e8}

/* ── 浅色系：果冻泡泡糖 ── */
[data-theme="bubble"]{
  --bg:#eef6ff; --surface:#fff;
  --ink:#0c1a33; --muted:#5a6e87; --faint:#8ba0b8;
  --gold:#2563eb; --gold-deep:#1d4ed8; --gold-soft:#dbeafe;
  --line:#d4e6fa; --line-strong:#b5cff2;
  --brand:#2563eb; --accent:#1d4ed8;
  --green:#059669; --amber:#d97706;
  --shadow-sm:0 1px 2px rgba(12,26,51,.05);
  --shadow:0 2px 14px rgba(12,26,51,.06),0 1px 3px rgba(12,26,51,.04);
  --shadow-lg:0 20px 54px rgba(12,26,51,.13);
}
[data-theme="bubble"] .topbar{background:rgba(255,255,255,.82);border-color:#d4e6fa}
[data-theme="bubble"] .site-foot{border-color:#d4e6fa}

/* ════════════════════════════════════════════════════════
   X 浅色系（清爽·沿用原第一步/第二步浅色调）
   xl = 靛蓝清爽；xl-terra / xl-teal / xl-rose = 原赤陶 / 松绿 / 玫粉
   使用 body[data-theme^="xl"] 提升特异性，压过 x-theme.css 的 :root 默认
   ════════════════════════════════════════════════════════ */
body[data-theme^="xl"]{
  /* X 暗色框架变量（三栏布局） */
  --x-text:#0f172a;
  --x-muted:#64748b;
  --x-line:#e6eaf0;
  --x-accent:#2563eb;
  --x-accent-hover:#1d4ed8;
  --x-bg:#f6f8fb;
  --x-bg-deep:#eef2f7;
  --x-hover:#eef2f7;
  --x-hover-soft:#e6ebf2;
  --x-card:#ffffff;
  --x-overlay:#dbeafe;
  --x-overlay-soft:#bfdbfe;
  /* 公网变量同步为清爽蓝：xl 下笔记页/顶栏与首页一致 */
  --bg:#f6f8fb; --surface:#ffffff; --ink:#0f172a; --muted:#64748b; --faint:#94a3b8;
  --gold:#2563eb; --gold-deep:#1d4ed8; --gold-soft:#eff6ff;
  --line:#e6eaf0; --line-strong:#d2d9e2;
}
body[data-theme="xl-terra"]{--x-accent:#c2410c;--x-accent-hover:#ea580c;--x-overlay:#ffedd5;--x-overlay-soft:#fed7aa;--gold:#c2410c;--gold-deep:#9a3412;--gold-soft:#fff7ed}
body[data-theme="xl-teal"]{--x-accent:#0f766e;--x-accent-hover:#14b8a6;--x-overlay:#ccfbf1;--x-overlay-soft:#99f6e4;--gold:#0f766e;--gold-deep:#0d5f54;--gold-soft:#ecfdf5}
body[data-theme="xl-rose"]{--x-accent:#be185d;--x-accent-hover:#f43f5e;--x-overlay:#fce7f3;--x-overlay-soft:#fbcfe8;--gold:#be185d;--gold-deep:#9f1239;--gold-soft:#fff1f7}

/* ── 报价单卡片（深青渐变 APP 卡片风格）── */
body[data-theme="qc"]{
  --ink:#e8edf2;--muted:#9aa8b8;--faint:#5a6d7e;
  --bg:#0c1e2a;--surface:rgba(255,255,255,.05);--line:rgba(255,255,255,.10);
  --gold:#22d3ee;--gold-deep:#06b6d4;--gold-soft:rgba(34,211,238,.12);
  --shadow:0 4px 24px rgba(0,0,0,.3);--shadow-lg:0 12px 40px rgba(0,0,0,.5)
}

/* ════════════════════════════════════════════════════════
   主题切换器（顶栏右侧色板）
   ════════════════════════════════════════════════════════ */
.theme-switch{position:relative;display:inline-flex;align-items:center;gap:5px;
  padding:7px 12px;border:1px solid var(--line);border-radius:10px;
  font-size:13px;color:var(--muted);cursor:pointer;background:#fff;
  transition:border-color .15s,color .15s;user-select:none;-webkit-user-select:none;margin-left:8px}
.theme-switch:hover{border-color:var(--gold);color:var(--gold-deep)}
.theme-switch svg{flex-shrink:0}
.theme-switcher{display:none;position:absolute;top:calc(100%+10px);left:0;min-width:230px;
  background:#fff;border:1px solid var(--line-strong);border-radius:12px;
  box-shadow:var(--shadow-lg);padding:8px 10px;margin:0;list-style:none;z-index:999;
  font-size:13px}
.theme-switcher.open{display:block}
.theme-switcher::before{content:"";position:absolute;top:-10px;left:0;right:0;height:10px}
.theme-opt{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:8px;
  cursor:pointer;transition:background .1s;text-decoration:none;color:var(--ink);font-size:13px}
.theme-opt:hover{background:var(--gold-soft)}
.theme-opt.on{background:var(--gold-soft);color:var(--gold-deep);font-weight:600}
.theme-dot{flex:0 0 20px;width:20px;height:20px;border-radius:50%;border:1px solid var(--line-strong)}
.theme-group{display:flex;flex-direction:column;gap:1px;padding:4px 0}
.theme-group-title{font-size:11px;font-weight:700;color:var(--faint);
  text-transform:uppercase;letter-spacing:.6px;padding:6px 10px 2px}/* 公网展示专属样式（墨黑·暖金 杂志精致风） */
:root{
  --bg:#faf8f5;            /* 暖白底，非冷灰 */
  --surface:#ffffff;       /* 卡片面 */
  --ink:#1c1916;           /* 墨黑（带暖调） */
  --muted:#8a8178;         /* 暖灰次级文字 */
  --faint:#b3aa9e;         /* 更淡 */
  --gold:#b8893b;          /* 主品牌金 */
  --gold-deep:#946c20;     /* 深金（hover / 强调文字） */
  --gold-soft:#fbf3e3;     /* 金底（chip / tag 背景） */
  --line:#ece7df;          /* 暖灰描边 */
  --line-strong:#ddd5c8;
  --radius:16px;
  --shadow-sm:0 1px 2px rgba(40,33,24,.05);
  --shadow:0 2px 14px rgba(40,33,24,.06), 0 1px 3px rgba(40,33,24,.04);
  --shadow-lg:0 20px 54px rgba(40,33,24,.13);
  --maxw:1180px;
  /* 兼容别名：任何遗漏引用都回落到协调色系 */
  --brand:var(--gold); --accent:var(--gold-deep);
  --green:#3f7a45; --amber:#b07d00; --purple:var(--gold-deep);
}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font:15px/1.6 -apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;margin:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}
.topbar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;padding:16px 32px;
  background:rgba(255,255,255,.82);backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.brand{font-weight:800;font-size:18px;letter-spacing:.2px;text-decoration:none;color:var(--ink);
  display:flex;gap:9px;align-items:center}
.brand .dot{font-size:18px;filter:drop-shadow(0 1px 1px rgba(184,137,59,.35))}
.pub-nav{display:flex;justify-content:center}
.pub-nav-pages{display:flex;gap:22px;align-items:center}
.pub-nav-pages a{color:var(--muted);text-decoration:none;font-weight:500;padding:8px 2px;font-size:14.5px;
  position:relative;transition:color .15s}
.pub-nav-pages a:hover{color:var(--ink)}
.pub-nav-pages a.active{color:var(--ink)}
.pub-nav-pages a.active::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;
  background:var(--gold);border-radius:2px}

/* ── 语言切换（右侧下拉）───────────────────────────── */
.lang-switch{position:relative;display:flex;align-items:center;gap:6px;
  padding:7px 13px;border:1px solid var(--line);border-radius:10px;
  font-size:13px;color:var(--muted);cursor:pointer;background:#fff;
  transition:border-color .15s,color .15s;user-select:none;-webkit-user-select:none}
.lang-switch:hover{border-color:var(--gold);color:var(--gold-deep)}
.lang-switch svg{flex-shrink:0;color:currentColor}
.lang-dropdown{display:none;position:absolute;top:calc(100% + 8px);right:0;left:auto;min-width:168px;max-height:min(320px,calc(100vh - 80px));overflow-y:auto;
  background:#fff;border:1px solid var(--line-strong);border-radius:12px;
  box-shadow:var(--shadow-lg);padding:6px 0;list-style:none;margin:0;z-index:9999}
.lang-dropdown::before{content:"";position:absolute;top:-8px;left:0;right:0;height:8px}
.lang-switch.open .lang-dropdown{display:block}
.lang-dropdown li a{display:block;padding:9px 16px;text-decoration:none;color:var(--muted);
  font-size:13.5px;transition:background .1s,color .1s}
.lang-dropdown li a:hover{background:var(--gold-soft);color:var(--gold-deep)}
.container{max-width:var(--maxw);margin:0 auto;padding:32px 32px 80px}
.site-foot{text-align:center;color:var(--faint);font-size:12.5px;padding:32px 16px;border-top:1px solid var(--line)}
.muted{color:var(--muted)} .small{font-size:13px}
.hero{text-align:center;padding:40px 0 22px}
.hero h1{font-size:34px;letter-spacing:-.5px;margin:0 0 10px;font-weight:800}
.search-bar{display:flex;gap:10px;max-width:540px;margin:22px auto 0}
.search-bar input{flex:1;padding:13px 16px;border:1px solid var(--line);border-radius:12px;font-size:15px;
  background:#fff;transition:border-color .15s,box-shadow .15s}
.search-bar input:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(184,137,59,.13)}
.btn{display:inline-block;background:var(--gold);color:#fff;border:0;border-radius:12px;padding:12px 20px;
  font-weight:600;cursor:pointer;text-decoration:none;font-size:14px;transition:background .15s,transform .1s}
.btn:hover{background:var(--gold-deep)}
.btn:active{transform:translateY(1px)}
.btn.block{display:block;text-align:center;margin-top:12px}
.btn.ghost{background:#fff;color:var(--gold-deep);border:1px solid var(--line)}
.btn.ghost:hover{border-color:var(--gold);background:var(--gold-soft)}
.grid{display:grid;gap:20px;margin-top:24px}
.cols-3{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s,border-color .18s}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--line-strong)}
.card img{width:100%;height:200px;object-fit:cover;display:block}
.card h3{margin:14px 16px 6px;font-size:16px;font-weight:700;color:var(--ink)}
.card .muted{margin:0 16px}
.tags{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px}
.tag{font-size:12px;padding:3px 10px;border-radius:20px;font-weight:600}
.tag.green{background:#eaf2e8;color:var(--green)}
.tag.amber{background:#fbeede;color:var(--amber)}
.tag.purple{background:var(--gold-soft);color:var(--gold-deep)}
.empty{text-align:center;color:var(--muted);padding:80px 0;font-size:16px}
.detail{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:18px}
.detail .hero-img{width:100%;border-radius:var(--radius);object-fit:cover;max-height:420px}
.detail h1{margin:0 0 6px;font-size:26px}
.spec{display:flex;gap:26px;margin:16px 0;padding:0}
.spec div{display:flex;flex-direction:column}
.spec dt{font-size:12px;color:var(--muted)}
.spec dd{margin:2px 0 0;font-weight:700;font-size:16px}
.trust-box{background:#fbf9f6;border:1px solid var(--line);border-radius:12px;padding:16px 18px;margin:16px 0}
.trust-box h4{margin:0 0 10px;font-size:14px;color:var(--ink)}
.trust-box ul{list-style:none;margin:0;padding:0}
.trust-box li{display:grid;grid-template-columns:90px 1fr 44px;align-items:center;gap:10px;margin:6px 0;font-size:13px}
.trust-box .bar{height:7px;background:#efeae2;border-radius:6px;overflow:hidden}
.trust-box .bar i{display:block;height:100%;background:var(--gold)}
.variant-note{background:var(--gold-soft);border-left:3px solid var(--gold);padding:12px 16px;border-radius:8px;margin:16px 0}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.back{color:var(--muted);text-decoration:none;font-size:14px;display:inline-block;margin-bottom:16px;transition:color .15s}
.back:hover{color:var(--gold-deep)}
.panel{max-width:560px;margin:40px auto;text-align:center}
.sub-form{display:flex;gap:8px;justify-content:center;margin-top:16px}
.sub-form input{padding:13px 16px;border:1px solid var(--line);border-radius:12px;min-width:260px;font-size:15px}
.sub-form input:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(184,137,59,.13)}
.ok{color:var(--green);font-weight:600}
.persona-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:36px;box-shadow:var(--shadow)}
.persona-card .avatar{font-size:42px}
.persona-card h3{margin:8px 0}
.points{margin:14px 0}
@media(max-width:760px){.detail{grid-template-columns:1fr}}

/* ── 分享弹窗（暖金系）──────────────────────────────── */
.modal{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;background:rgba(20,16,10,.45);backdrop-filter:blur(3px)}
.modal-box{background:#fff;border-radius:20px;padding:34px;width:380px;max-width:92vw;box-shadow:var(--shadow-lg);position:relative;animation:modalIn .2s ease}
@keyframes modalIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.modal-close{position:absolute;top:12px;right:16px;background:none;border:none;font-size:22px;cursor:pointer;color:#bbb}
.modal-close:hover{color:var(--ink)}
.modal-header{text-align:center;margin-bottom:20px}
.modal-icon{font-size:32px}
.modal-header h3{margin:6px 0 4px;font-size:18px;color:var(--ink)}
.modal-sub{color:var(--muted);font-size:13px}
.modal-body{display:flex;flex-direction:column;align-items:center;gap:16px}
.qr-box{text-align:center;padding:18px;background:var(--bg);border-radius:14px}
.qr-label{font-size:12px;color:var(--muted);margin-bottom:8px}
.qr-hint{font-size:12px;color:var(--faint);margin-top:8px}
.qr-placeholder{font-size:13px;color:#ccc;padding:40px 0}
.share-links{width:100%}
.share-link{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.link-label{font-size:12px;color:var(--muted)}
.link-text{font-size:13px;word-break:break-all;color:#444;background:#f1ece4;padding:7px 9px;border-radius:6px}
.points-hint{display:flex;align-items:center;gap:8px;padding:11px 16px;background:var(--gold-soft);border-radius:10px;font-size:13px;color:var(--gold-deep)}
.points-num{font-weight:700}

/* ── 笔记流首页（编辑导读 + 多列图片网格）────────────────────── */
.note-feed-wrap{max-width:1180px;margin:0 auto;padding:30px 24px 80px}
.note-lead{position:relative;padding:36px 38px;margin-bottom:38px;border-radius:20px;
  background:linear-gradient(135deg,#fbf6ec 0%,#f6efe0 100%);border:1px solid #ece1cb;
  box-shadow:var(--shadow)}
.note-lead::before{content:"";position:absolute;top:0;left:38px;width:52px;height:4px;background:var(--gold);border-radius:0 0 3px 3px}
.note-lead-byline{font-size:13px;color:var(--gold-deep);letter-spacing:.4px;margin-bottom:14px;font-weight:600}
.note-lead-title{font-size:34px;font-weight:800;line-height:1.26;margin:0 0 14px;letter-spacing:-.7px;color:var(--ink)}
.note-lead-desc{font-size:15.5px;color:var(--muted);line-height:1.8;margin:0 0 22px;max-width:680px}
/* ── 提交人主页档案卡（波次②） ─────────────────────── */
.sub-profile{display:flex;align-items:center;gap:22px;padding:8px 4px}
.sub-profile__avatar{width:76px;height:76px;border-radius:50%;background:linear-gradient(135deg,var(--gold),#d9a84a);
  color:#fff;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:800;flex:none;
  box-shadow:var(--shadow)}
.sub-profile__meta{min-width:0}
.sub-profile__name{font-size:28px;font-weight:800;line-height:1.3;margin:0 0 8px;color:var(--ink);letter-spacing:-.4px}
.sub-profile__tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.sub-profile__desc{font-size:14px;color:var(--muted);line-height:1.7;margin:0;max-width:640px}
/* X 暗色分支：固定色值，不依赖主题变量 */
.x-profile{display:flex;align-items:center;gap:16px;padding:4px 0 18px;border-bottom:1px solid #2f3336;margin-bottom:6px}
.x-profile__avatar{width:52px;height:52px;border-radius:50%;background:#d4a24e;color:#0a0a0a;
  display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;flex:none}
.x-profile__meta h1{font-size:22px;font-weight:800;margin:0 0 4px;color:#e7e9ea}
.x-profile__meta p{font-size:13px;color:#71767b;margin:0}
/* ── Lofter 式多列图片卡片网格 ─────────────────────── */
.note-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(258px,1fr));gap:24px}
.note-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s,border-color .2s}
.note-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:var(--gold)}
.note-card__link{display:block;text-decoration:none;color:inherit}
.note-card__cover{width:100%;height:216px;background-size:cover;background-position:center;background-color:#f1ece4;
  transition:transform .45s ease}
.note-card:hover .note-card__cover{transform:scale(1.05)}
.note-card__cover--ph{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;
  background:linear-gradient(135deg,#fbf3e3,#f0e6d3)}
.note-card__body{padding:16px 16px 18px;display:flex;flex-direction:column;gap:8px}
.note-card__title{font-size:16px;font-weight:700;line-height:1.45;margin:0;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.note-card__excerpt{font-size:13px;color:var(--muted);line-height:1.6;margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.note-card__meta{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-block;font-size:11px;padding:3px 10px;border-radius:99px;background:#f1ece4;color:#6b645c;font-weight:600}
.chip-purple{background:var(--gold-soft);color:var(--gold-deep)}
.chip-amber{background:#fbeede;color:#b07d00}
.note-card__byline{display:flex;align-items:center;gap:8px;margin-top:auto;font-size:12.5px;color:var(--muted)}
.avatar{flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:var(--gold);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.byline-name{color:#333;font-weight:600}
.byline-dot{color:#ccc}
.byline-time{color:var(--muted)}
.empty{text-align:center;color:var(--muted);padding:48px}

/* ── 左右分栏详情页（左：阅读 · 右：商铺侧栏）────────────── */
.detail-split{max-width:1180px;margin:0 auto;padding:30px 0 60px;
  display:grid;grid-template-columns:1fr 320px;gap:52px;align-items:start}
.detail-main{min-width:0}
.detail-side{position:sticky;top:88px;display:flex;flex-direction:column;gap:18px}

.post-byline{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--muted);margin-bottom:16px}
.post-avatar{flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--gold);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}
.post-avatar--lg{flex:0 0 46px;width:46px;height:46px;font-size:18px}
.post-author{color:var(--ink);font-weight:600;text-decoration:none}
.post-author:hover{color:var(--gold-deep)}
.post-meta-dot{color:#d5cec4}
.post-meta{color:var(--muted)}

/* 大标题 — 大气 */
.post-title{font-size:34px;font-weight:800;line-height:1.28;margin:0 0 26px;letter-spacing:-.6px;color:var(--ink)}

/* Hero 左图右文 */
.post-hero{display:grid;grid-template-columns:minmax(0,44%) 1fr;gap:30px;margin-bottom:34px;
  padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.post-hero__img{border-radius:12px;overflow:hidden;background:#efeae2}
.post-hero__img img{width:100%;height:100%;object-fit:cover;display:block;border-radius:12px;
  aspect-ratio:4/3;transition:transform .3s}
.post-hero__img:hover img{transform:scale(1.03)}
.post-hero__text{display:flex;flex-direction:column;justify-content:center;gap:16px}
.post-lead{font-size:16px;line-height:1.9;color:#4a463f;margin:0}
.post-lang-note{background:var(--gold-soft);border-left:3px solid var(--gold);
  padding:13px 16px;border-radius:8px;font-size:13.5px;color:#5a554d}
.post-lang-note strong{color:var(--gold-deep)}
.post-lang-note p{margin:6px 0 0;line-height:1.7}

/* 无图时纯文本 body */
.post-body{margin-bottom:24px}

/* 信任度总评 — 横条式 */
.trust-hero{display:flex;align-items:center;gap:18px;background:linear-gradient(135deg,#faf6ee,#f5edd8);
  border:1px solid #e8dcc8;border-radius:14px;padding:20px 24px;margin-bottom:30px}
.trust-hero__num{font-size:40px;font-weight:800;color:var(--gold-deep);line-height:1}
.trust-hero__num small{font-size:16px;font-weight:500}
.trust-hero__label{font-size:13.5px;color:var(--muted)}

/* 字段信任度网格 */
.post-section{margin-bottom:30px}
.post-section__title{font-size:16px;font-weight:700;margin:0 0 14px;color:var(--ink);
  padding-bottom:10px;border-bottom:1px solid var(--line)}
.trust-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.trust-grid__item{display:flex;align-items:center;gap:10px;padding:11px 14px;background:var(--surface);border-radius:10px;
  border:1px solid var(--line);font-size:13px;box-shadow:var(--shadow-sm)}
.tg-name{font-weight:600;color:var(--ink);white-space:nowrap;min-width:56px}
.tg-bar{flex:1;height:6px;background:#efeae2;border-radius:99px;overflow:hidden}
.tg-bar i{display:block;height:100%;background:var(--gold);border-radius:99px}
.tg-pct{font-weight:700;min-width:36px;text-align:right}

/* 侧栏卡片 */
.side-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;box-shadow:var(--shadow-sm)}
.side-title{font-size:13px;font-weight:700;margin-bottom:12px;color:var(--ink)}
.side-trust{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.side-trust li{display:grid;grid-template-columns:64px 1fr 40px;align-items:center;gap:8px;font-size:12.5px;color:#5a554d}
.st-name{font-weight:600;color:var(--ink)}
.st-bar{height:6px;background:#efeae2;border-radius:99px;overflow:hidden}
.st-bar i{display:block;height:100%;background:var(--gold)}
.st-num{text-align:right;color:var(--ink);font-weight:600}

/* 侧栏商铺卡 */
.shop-embed{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:22px 24px;box-shadow:var(--shadow-sm)}
.shop-embed__head{display:flex;gap:14px;align-items:center;margin-bottom:18px}
.shop-embed__name{font-size:17px;font-weight:700;color:var(--ink)}
.shop-embed__sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.shop-embed__stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px;text-align:center;
  padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.shop-embed__stats b{display:block;font-size:20px;font-weight:800;color:var(--ink)}
.shop-embed__stats span{font-size:11.5px;color:var(--muted);margin-top:2px}
.shop-embed__actions{display:flex;gap:10px}
.btn-gold{flex:1;padding:11px 0;border-radius:10px;background:var(--gold);color:#fff;font-weight:600;
  font-size:14px;border:none;cursor:pointer;transition:background .15s,transform .1s}
.btn-gold:hover{background:var(--gold-deep)}
.btn-gold:active{transform:scale(.98)}
.btn-ghost{flex:1;padding:11px 0;border-radius:10px;background:#fff;color:var(--gold-deep);font-weight:600;
  font-size:14px;border:1px solid var(--line);cursor:pointer;transition:border-color .15s}
.btn-ghost:hover{border-color:var(--gold)}

/* 底部 meta */
.post-footer{margin-top:38px;padding-top:22px;border-top:1px solid var(--line)}
.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.post-footer__meta{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.meta-dot{color:#d5cec4}

/* 通用组件（详情页共用） */
.seo-card{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--line);
  border-radius:10px;font-size:12px;color:var(--muted);background:#fff;margin:6px 0}
.seo-card code{background:#f1ece4;padding:1px 6px;border-radius:5px;color:#6b645c}
.rss-btn{display:inline-block;margin-left:8px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;
  font-size:12px;text-decoration:none;color:var(--gold-deep);background:var(--gold-soft)}
.rss-btn:hover{border-color:var(--gold)}
.trust-green{color:#2d7a3f}
.trust-yellow{color:#b07d00}
.trust-red{color:#b5453a}
.trust-gray{color:#8a8178}

.sticky-bar{position:fixed;left:0;right:0;bottom:0;background:rgba(255,255,255,.9);backdrop-filter:blur(12px);
  border-top:1px solid var(--line);display:flex;gap:12px;justify-content:center;padding:12px 16px;z-index:30}
.sticky-btn{flex:0 0 auto;min-width:150px;padding:11px 20px;border-radius:12px;border:1px solid var(--line);
  background:#fff;color:#333;font-size:14px;font-weight:600;cursor:pointer;transition:border-color .15s,color .15s}
.sticky-btn:hover{border-color:var(--gold);color:var(--gold-deep)}
.sticky-btn:last-child{background:var(--gold);color:#fff;border-color:var(--gold)}
.sticky-btn:last-child:hover{background:var(--gold-deep)}

@media (max-width:880px){
  .note-card__link{flex-direction:column}
  .note-card__cover{flex:none;width:100%;height:180px}
  .sticky-bar .sticky-btn{min-width:0;flex:1}
  .detail-split{grid-template-columns:1fr;gap:24px;padding:20px 0 calc(88px + env(safe-area-inset-bottom))}
  .detail-side{position:static}
  .post-hero{grid-template-columns:1fr;gap:18px;padding:16px}
  .post-hero__img img{aspect-ratio:16/10}
}

/* ── 移动端微调（≤640 / ≤480，精细间距）────────────── */
@media (max-width:640px){
  .topbar{grid-template-columns:1fr auto;gap:8px;padding:10px 14px}
  .brand{font-size:15px}
  .pub-nav{display:none}  /* 移动端隐藏导航，后续可加汉堡菜单 */
  .lang-switch{padding:6px 10px;font-size:12px}
  .container{padding:16px 14px 50px}
  .note-feed-wrap{padding:16px 14px 56px}
  .note-lead{padding:24px 20px;margin-bottom:22px}
  .note-lead-title{font-size:24px;line-height:1.3;margin-bottom:8px}
  .note-lead-desc{font-size:14px;line-height:1.65}
  .search-bar{flex-wrap:wrap;margin-top:14px}
  .search-bar input{flex:1 1 100%}
  .search-bar .btn{flex:1}
  .note-grid{grid-template-columns:1fr;gap:16px}
  .note-card__title{margin-bottom:4px;font-size:17px}
  .note-card__excerpt{margin-bottom:8px;font-size:13px}
  .note-card__meta{margin-bottom:8px}
  .note-card__byline{margin-top:2px}
  .detail-split{padding:16px 0 calc(96px + env(safe-area-inset-bottom))}
  .post-byline{margin-bottom:10px}
  .post-title{font-size:24px;line-height:1.3;margin-bottom:16px}
  .post-hero{gap:18px;margin-bottom:24px}
  .post-lead{font-size:14.5px;line-height:1.78}
  .post-lang-note{padding:10px 12px;margin:13px 0}
  .trust-hero{padding:14px 16px;margin-bottom:20px;flex-wrap:wrap}
  .trust-hero__num{font-size:28px}
  .shop-embed{padding:16px 18px;margin-bottom:20px}
  .shop-embed__stats b{font-size:17px}
  .sticky-btn{min-height:44px}
  .btn{min-height:42px}
}

@media (max-width:480px){
  .topbar{padding:9px 12px}
  .brand{font-size:14.5px}
  .lang-switch{padding:5px 8px;font-size:11.5px;gap:4px}
  .note-lead-title{font-size:20px}
  .note-grid{gap:14px}
  .note-card__cover{height:160px}
  .note-card__title{font-size:16px}
  .post-title{font-size:22px;margin-bottom:14px}
  .post-hero__img img{aspect-ratio:4/3}
  .trust-hero__num{font-size:24px}
  .shop-embed{padding:14px 16px}
  .shop-embed__actions{flex-direction:column}
  .post-footer{margin-top:28px;padding-top:18px}
  .sticky-bar{padding:8px 12px;gap:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .sticky-btn{font-size:13px;padding:10px 12px}
  .modal-box{padding:24px 20px}
  .share-links .btn{width:100%}
  .points-hint{flex-wrap:wrap;justify-content:center;text-align:center}
}

/* ── 站点地图 / 宪章页（讲解用）────────────────────────── */
.panel.smap{max-width:960px;margin:40px auto;text-align:left}
.panel.smap h1{font-size:26px;margin:0 0 6px}
.panel.smap h2{margin:28px 0 12px;font-size:17px}
.smap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.smap-card{display:block;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;text-decoration:none;color:var(--text);transition:border-color .15s,box-shadow .15s;box-shadow:var(--shadow)}
.smap-card:hover{border-color:var(--gold);box-shadow:var(--shadow-lg)}
.smap-card b{display:block;margin:6px 0 2px;font-size:15px}
.smap-card .smap-ico{font-size:20px}
.smap-card .muted{font-size:12.5px}
.smap-cats{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.smap-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.smap-list a{display:block;padding:9px 12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--text);font-size:14px}
.smap-list a:hover{border-color:var(--gold)}
.charter-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:8px}
.charter-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px 24px;box-shadow:var(--shadow)}
.charter-card h2{margin:0 0 10px;font-size:17px}
.charter-card p{margin:0;font-size:14px;line-height:1.7;color:var(--text)}
.charter-card .pillars{margin-top:12px;padding-top:12px;border-top:1px dashed var(--line);font-weight:600;font-size:13.5px}
.charter-loop{background:var(--gold-soft);border-left:3px solid var(--gold);padding:16px 20px;border-radius:10px;font-size:15px;line-height:1.8}
.charter-footer{margin-top:28px;text-align:center}
.charter-footer .btn-gold{flex:none;display:inline-block;padding:12px 28px}
@media(max-width:760px){
  .charter-grid{grid-template-columns:1fr}
  .panel.smap{margin:20px auto;padding:0 4px}
}
/* ════════════════════════════════════════════════════════
   X.com 风格主题（暗色 + 暖金强调，变量驱动，支持子色系切换）
   通过 [data-theme="x"] / [data-theme="x-xxx"] 作用于 body
   ════════════════════════════════════════════════════════ */
:root{
  --x-text:#e7e9ea;
  --x-muted:#71767b;
  --x-line:#2f3336;
  --x-accent:#d4a24e;
  --x-accent-hover:#e0b35e;
  --x-bg:#000;
  --x-bg-deep:#0a0a0a;
  --x-hover:#16181c;
  --x-hover-soft:#181818;
  --x-card:#1d1f23;
  --x-overlay:#1a1206;
  --x-overlay-soft:#3a2a12;
}

body.theme-x{
  background:var(--x-bg);color:var(--x-text);
  -webkit-font-smoothing:antialiased;
}
body.theme-x a{color:inherit}

/* ── 三栏外壳 ── */
.x-shell{display:grid;grid-template-columns:275px minmax(0,600px) 350px;
  max-width:1280px;margin:0 auto;border-left:1px solid var(--x-line);border-right:1px solid var(--x-line)}
.x-nav{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;
  padding:8px 12px 16px;border-right:1px solid var(--x-line);overflow-y:auto}
.x-logo{font-size:22px;font-weight:700;color:var(--x-text);text-decoration:none;
  display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:12px;
  transition:background .15s;letter-spacing:.5px}
.x-logo:hover{background:var(--x-hover-soft)}
.x-logo::before{content:'';display:inline-block;width:34px;height:34px;border-radius:10px;
  background:var(--x-accent);flex-shrink:0;
  /* 简单几何 logo：圆角方块 */
}
.x-nav__menu{display:flex;flex-direction:column;gap:2px;margin:8px 0 18px}
.x-nav__item{display:flex;align-items:center;gap:18px;padding:12px 16px;border-radius:9999px;
  text-decoration:none;color:var(--x-text);font-size:20px;font-weight:500;transition:background .15s}
.x-nav__item svg{width:26px;height:26px;flex:0 0 26px}
.x-nav__item:hover{background:var(--x-hover-soft)}
.x-nav__item.active{font-weight:800}
.x-nav__item.active svg{fill:var(--x-accent)}
.x-post-btn{display:block;text-align:center;background:var(--x-accent);color:#000;font-weight:800;
  font-size:17px;padding:15px 0;border-radius:9999px;text-decoration:none;margin-bottom:auto;
  transition:background .15s,transform .1s}
.x-post-btn:hover{background:var(--x-accent-hover)}
.x-post-btn:active{transform:scale(.98)}
.x-user{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:9999px;
  margin-top:12px;cursor:pointer;transition:background .15s}
.x-user:hover{background:var(--x-hover-soft)}
.x-user__avatar{width:40px;height:40px;border-radius:50%;background:var(--x-accent);color:#000;
  display:flex;align-items:center;justify-content:center;font-weight:800;flex:0 0 40px}
.x-user__meta{display:flex;flex-direction:column;line-height:1.25;flex:1;min-width:0}
.x-user__meta b{font-size:14px;color:var(--x-text);font-weight:700}
.x-user__meta i{font-size:13px;color:var(--x-muted);font-style:normal}
.x-switch{color:var(--x-muted);text-decoration:none;font-size:18px;padding:0 4px}
.x-switch:hover{color:var(--x-accent)}

/* ── 中间内容区 ── */
.x-main{min-width:0;min-height:100vh}
.x-main__hd{position:sticky;top:0;z-index:5;backdrop-filter:blur(12px);
  background:rgba(0,0,0,.65);border-bottom:1px solid var(--x-line);padding:14px 16px}
.x-main__hd h1{margin:0;font-size:20px;font-weight:800;color:var(--x-text)}
.x-main__hd p{margin:4px 0 0;font-size:13px;color:var(--x-muted)}

/* ── 推文卡片 ── */
.x-post{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--x-line);
  cursor:pointer;transition:background .12s;text-decoration:none;color:inherit}
.x-post:hover{background:var(--x-bg-deep)}
.x-post__avatar{flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:var(--x-accent);color:#000;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:17px}
.x-post__body{flex:1;min-width:0}
.x-post__head{display:flex;align-items:center;gap:5px;font-size:15px;line-height:1.4}
.x-post__head b{color:var(--x-text);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.x-post__head .x-handle,.x-post__head .x-dot,.x-post__head .x-time{color:var(--x-muted);font-weight:400}
.x-post__more{margin-left:auto;color:var(--x-muted)}
.x-post__text{font-size:15px;line-height:1.5;color:var(--x-text);margin:3px 0 0;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.x-post__tags{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.x-post__tags .chip{font-size:12px;padding:2px 9px;border-radius:99px;background:var(--x-hover);color:var(--x-accent);font-weight:600}
.x-post__media{margin-top:10px;border:1px solid var(--x-line);border-radius:16px;overflow:hidden;
  height:280px;background-size:cover;background-position:center;background-color:var(--x-hover)}
.x-post__actions{display:flex;justify-content:space-between;max-width:420px;margin-top:12px;
  color:var(--x-muted);font-size:13px}
.x-act{display:flex;align-items:center;gap:6px;transition:color .12s;cursor:pointer}
.x-act:hover{color:var(--x-accent)}
.x-act svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}

/* ── 右侧趋势栏 ── */
.x-right{position:sticky;top:0;height:100vh;overflow-y:auto;padding:0 0 24px 24px}
.x-search{position:sticky;top:0;background:var(--x-bg);padding:8px 0 8px;
  display:flex;align-items:center;gap:10px;border:1px solid var(--x-line);border-radius:9999px;
  padding:11px 16px;margin:0 0 16px;color:var(--x-muted)}
.x-search input{flex:1;background:transparent;border:none;outline:none;color:var(--x-text);font-size:15px}
.x-trend{background:var(--x-hover);border-radius:16px;padding:12px 0;margin-bottom:16px}
.x-trend h3{margin:0;padding:0 16px 10px;font-size:18px;font-weight:800;color:var(--x-text)}
.x-trend__item{display:flex;flex-direction:column;gap:2px;padding:11px 16px;text-decoration:none;
  transition:background .12s}
.x-trend__item:hover{background:var(--x-card)}
.x-trend__tag{color:var(--x-text);font-weight:700;font-size:15px}
.x-trend__cnt{color:var(--x-muted);font-size:13px}
.x-foot{font-size:12px;color:var(--x-muted);padding:0 8px;line-height:1.6}
.x-foot a{color:var(--x-muted);text-decoration:underline}
.x-foot a:hover{color:var(--x-accent)}

/* ── 详情页：X 推文详情 ── */
.x-detail{padding:0}
.x-detail__back{padding:12px 16px;font-size:15px;color:var(--x-text);text-decoration:none;display:inline-flex;gap:8px;align-items:center}
.x-detail__back:hover{text-decoration:underline}
.x-post--detail{padding:16px;cursor:default}
.x-post--detail .x-post__avatar{width:56px;height:56px;flex-basis:56px;font-size:22px}
.x-post--detail .x-post__head b{font-size:20px}
.x-post--detail .x-post__text{font-size:17px;line-height:1.6;-webkit-line-clamp:unset;margin-top:8px}
.x-post--detail .x-post__media{height:360px}
.x-actions--detail{margin-top:16px;padding-top:14px;border-top:1px solid var(--x-line);font-size:14px}
.x-reply{border-bottom:1px solid var(--x-line);padding:14px 16px;display:flex;gap:12px}
.x-reply__avatar{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:var(--x-line);color:var(--x-text);
  display:flex;align-items:center;justify-content:center;font-weight:700}
.x-reply__body b{color:var(--x-text);font-weight:700}
.x-reply__body .x-handle{color:var(--x-muted);font-weight:400;margin-left:5px}
.x-reply__body p{margin:3px 0 0;font-size:15px;line-height:1.5;color:var(--x-text)}
.x-detail__stats{border-bottom:1px solid var(--x-line);padding:14px 16px;color:var(--x-muted);font-size:14px}
.x-detail__stats b{color:var(--x-text)}
.x-trust{margin:14px 16px;background:var(--x-hover);border:1px solid var(--x-line);border-radius:16px;padding:16px}
.x-trust h4{margin:0 0 12px;font-size:15px;color:var(--x-text);font-weight:800}
.x-trust__row{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:14px;color:var(--x-text)}
.x-trust__bar{flex:1;height:6px;background:var(--x-line);border-radius:99px;overflow:hidden}
.x-trust__bar i{display:block;height:100%;background:var(--x-accent)}
.x-trust__num{color:var(--x-accent);font-weight:700;min-width:38px;text-align:right}

/* ── 暗色覆盖：商铺页（未做 X 结构时保底） ── */
body.theme-x .note-feed-wrap,body.theme-x .container{background:var(--x-bg)}
body.theme-x .shop-hero{background:linear-gradient(135deg,var(--x-overlay),var(--x-overlay-soft));color:var(--x-text)}
body.theme-x .shop-card,body.theme-x .shop-info-card{background:var(--x-hover);border-color:var(--x-line)}
body.theme-x .shop-name,body.theme-x .shop-info-card .val,body.theme-x .shop-title{color:var(--x-text)}
body.theme-x .shop-owner,body.theme-x .shop-meta,body.theme-x .shop-subtitle,body.theme-x .shop-info-card .lbl{color:var(--x-muted)}

/* ── 响应式 ── */
@media (max-width:1100px){
  .x-shell{grid-template-columns:88px minmax(0,600px) 320px}
  .x-nav__item span{display:none}
  .x-nav__item{justify-content:center;padding:13px}
  .x-logo{width:44px;height:44px;padding:0;justify-content:center;border-radius:50%;margin:0 auto}
  .x-logo::before{margin:0}
  .x-logo span{display:none}
  .x-post-btn{font-size:22px;padding:13px 0}
  .x-user__meta,.x-switch{display:none}
  .x-user{justify-content:center}
}
@media (max-width:900px){
  .x-shell{grid-template-columns:1fr;border:none}
  .x-nav,.x-right{display:none}
  .x-main{border:none}
}

/* ── 清爽 X：无滚动条（窗口与栏内均隐藏，保留滚轮/触控滚动） ── */
body.theme-x{overflow-x:hidden;scrollbar-width:none}
body.theme-x::-webkit-scrollbar{width:0;height:0;display:none}
.x-shell{height:100vh;overflow:hidden}
.x-nav,.x-right,.x-main{height:100vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
.x-nav::-webkit-scrollbar,.x-right::-webkit-scrollbar,.x-main::-webkit-scrollbar{width:0;height:0;display:none}

/* ── 清爽 X：浅色覆盖（xl 系列） ── */
body[data-theme^="xl"] .x-main__hd{background:rgba(246,248,251,.82);border-bottom-color:var(--x-line)}
body[data-theme^="xl"] .x-search{background:var(--x-bg);border-color:var(--x-line)}
body[data-theme^="xl"] .x-post__avatar,
body[data-theme^="xl"] .x-nav__item.active svg,
body[data-theme^="xl"] .x-post-btn{color:#fff}
body[data-theme^="xl"] .x-post-btn{background:var(--x-accent)}
body[data-theme^="xl"] .x-post:hover{background:var(--x-bg-deep)}
body[data-theme^="xl"] .x-trend{background:var(--x-hover)}
body[data-theme^="xl"] .x-trend__item:hover{background:var(--x-card)}
body[data-theme^="xl"] .x-user__avatar{background:var(--x-accent)}
body[data-theme^="xl"] .x-detail__stats{border-bottom-color:var(--x-line)}
body[data-theme^="xl"] .x-trust{background:var(--x-hover);border-color:var(--x-line)}
body[data-theme^="xl"] .x-reply{border-bottom-color:var(--x-line)}

/* ── 清爽 X：配色切换 chip ── */
.x-theme-grid{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 4px}

/* X 深色风格下复用 lang-switch 的币种切换按钮适配 */
.x-right .lang-switch, .x-detail .lang-switch{
  background:var(--x-card);border-color:var(--x-line);color:var(--x-muted);
  margin:0 16px 6px;width:fit-content}
.x-right .lang-switch:hover, .x-detail .lang-switch:hover{border-color:var(--x-accent);color:var(--x-accent)}
.x-right .lang-dropdown, .x-detail .lang-dropdown{background:var(--x-card);border-color:var(--x-line)}
.x-right .lang-dropdown li a, .x-detail .lang-dropdown li a{color:var(--x-muted)}
.x-right .lang-dropdown li a:hover, .x-detail .lang-dropdown li a:hover{background:var(--x-hover);color:var(--x-text)}
.x-right .lang-dropdown li a.fx-on, .x-detail .lang-dropdown li a.fx-on{color:var(--x-accent);background:var(--x-hover);font-weight:600}
.x-theme-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:99px;
  background:var(--x-hover);border:1px solid var(--x-line);color:var(--x-text);text-decoration:none;
  font-size:13px;transition:background .12s,border-color .12s;cursor:pointer}
.x-theme-chip:hover{background:var(--x-card)}
.x-theme-chip.on{background:var(--x-accent);color:#fff;border-color:var(--x-accent)}
.x-theme-chip.on .x-theme-dot{box-shadow:0 0 0 2px #fff}
.x-theme-dot{width:14px;height:14px;border-radius:50%;flex:0 0 14px}