/* ==========================================================================
   首页 v3「工作台三栏」+ 顶栏 / 页脚 / 移动端
   --------------------------------------------------------------------------
   加载位置：theme-xiaoyi.css 之后（最后一层），只覆盖、不改旧文件。
   覆盖范围：
     1. 首页 .hv3（全新结构，原有 .home 规则不再命中）
     2. 顶栏 #masthead 的导航与登录区（全站生效，与首页一致）
     3. 页脚 footer 内部结构（三列 + 版权行）
     4. 移动端首页单列化 + 底部 Tabbar 五项
   回滚：删除本文件 + 还原 index.html / app.js / views/home.js。
   ========================================================================== */

/* ==========================================================================
   V1. 首页骨架（通栏）
   ========================================================================== */
.hv3 {
  /* 上移 32px 抵消 #app 的 96px 顶距 → 首屏紧贴顶栏；左右破格铺满视口 */
  margin: -32px calc(50% - 50vw) 0;
  background: #fff;
}
.hv3-wrap {
  max-width: 1208px;      /* 内容净宽 1144，与改动前的 #app 内容宽一致 */
  margin: 0 auto;
  padding: 0 32px;
}
/* 顶部公告条全站移除（公告已挪进首页右栏卡片轮播；移动端同样不显示） */
#noticeBar { display: none !important; }
body:has(.hv3) #app { padding-top: 96px; }
/* noticeBar 隐藏后 #app 顶距按「无公告」版本会变，这里统一回正常值 */
body:has(.hv3) #app { padding-bottom: 0; }
body:has(.hv3) > footer { margin-top: 0; }

/* ==========================================================================
   V2. 首屏 Hero（保留顶部色彩）
   ========================================================================== */
.hv3-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 0 34px;
  background:
    radial-gradient(780px 380px at 2% -16%, rgba(17, 17, 17, .26), transparent 64%),
    radial-gradient(680px 340px at 90% -18%, rgba(106, 43, 240, .20), transparent 66%),
    radial-gradient(560px 280px at 46% 116%, rgba(20, 184, 166, .15), transparent 70%),
    linear-gradient(180deg, #e9f1ff 0%, #f4f9ff 54%, #ffffff 100%);
}
.hv3-hero::before {
  content: ""; position: absolute; left: -8%; right: -8%; top: -40%; height: 120%;
  background: radial-gradient(42% 46% at 30% 30%, rgba(255, 255, 255, .85), transparent 68%);
  pointer-events: none;
}
.hv3-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17, 17, 17, .16) 20%, rgba(17, 17, 17, .16) 80%, transparent);
}
.hv3-hero .heroIn {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 468px;
  gap: 40px;
  align-items: center;
}
/* 首屏与三栏同一左右边距：logo / 标题 / 左栏 三条左边缘对齐 */
.hv3-hero .hv3-wrap { max-width: none; padding: 0 clamp(20px, 2.2vw, 40px); }

.hv3 .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--brand-ink);
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(17, 17, 17, .16);
  border-radius: 999px; padding: 3px 11px; margin-bottom: 12px;
  letter-spacing: .02em;
}
.hv3 .eyebrow i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px rgba(17, 17, 17, .16); display: block;
}
.hv3-hero h1 {
  font-size: clamp(26px, 2.4vw, 33px);
  line-height: 1.32; letter-spacing: -.03em;
  margin: 0 0 10px; font-weight: 800; color: var(--ink);
}
.hv3-hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #111111, #6a2bf0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hv3-hero .sub {
  font-size: 13px; color: var(--ink-2); margin: 0 0 18px;
  max-width: 470px; line-height: 1.75;
}
.hv3 .stats { display: flex; }
.hv3 .stats > div {
  padding-right: 24px; margin-right: 24px;
  border-right: 1px solid rgba(17, 17, 17, .14);
}
.hv3 .stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hv3 .stats b {
  display: block; font-size: 22px; line-height: 1.2;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.hv3 .stats span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 搜索卡（全站唯一搜索入口） ---------- */
.hv3 .scard {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: var(--r-panel);
  padding: 16px 16px 13px;
  box-shadow: 0 24px 50px -22px rgba(17, 17, 17, .45), 0 2px 6px rgba(13, 19, 32, .05);
}
.hv3 .scard .top {
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px 13px; border-bottom: 1px solid rgba(13, 19, 32, .07);
}
.hv3 .scard .top .s-ico { width: 17px; height: 17px; color: var(--brand); flex: none; display: block; }
.hv3 .scard .top .s-ico svg { width: 100%; height: 100%; display: block; }
.hv3 .scard input {
  border: 0; outline: 0; background: transparent; flex: 1; min-width: 0;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
}
.hv3 .scard input::placeholder { color: var(--ink-3); }
.hv3 .scard .key {
  font-size: 10.5px; color: var(--ink-3); flex: none;
  border: 1px solid var(--rule-2); border-bottom-width: 2px;
  border-radius: var(--r-micro); padding: 1px 5px;
}
.hv3 .scard .bot { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.hv3 .seg {
  position: relative; display: flex;
  background: var(--seg-bg);
  border-radius: calc(var(--r-ctl) + 2px); padding: 3px; gap: 2px; flex: none;
}
.hv3 .seg .seg-thumb { display: none; }
.hv3 .seg .seg-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 12px;
  font-family: inherit; font-size: 12.5px; color: var(--ink-2);
  background: transparent; border: 0; cursor: pointer;
  border-radius: var(--r-ctl); white-space: nowrap;
  transition: background-color .12s, color .12s;
}
.hv3 .seg .seg-btn.is-on { background: var(--select-solid); color: var(--select-solid-ink); font-weight: 600; }
.hv3 .seg .seg-btn:hover { background: var(--seg-hover); color: var(--ink); }
.hv3 .go {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--select-solid);
  color: var(--select-solid-ink); border: 0; font-family: inherit; font-size: 12.5px; font-weight: 600;
  height: 34px; padding: 0 16px; border-radius: var(--r-ctl); cursor: pointer;
  box-shadow: none;
  transition: transform .16s, box-shadow .16s;
}
.hv3 .go:hover { transform: translateY(-1px); box-shadow: 0 12px 20px -8px rgba(17, 17, 17, .95); }
.hv3 .go svg { width: 13px; height: 13px; display: block; }
/* 搜索卡下方「大家在搜」：一行浅描边芯片 */
.hv3 .hotl {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 12px; font-size: 11.5px; color: var(--ink-3);
}
.hv3 .hotl b { font-weight: 400; color: var(--ink-3); margin-right: 1px; }
.hv3 .hotl a {
  color: var(--ink-2); text-decoration: none; font-size: 11px;
  background: #fff;
  border: 1px solid rgba(13, 19, 32, .12);
  border-radius: 999px; padding: 3px 11px;
  transition: color .16s, border-color .16s;
}
.hv3 .hotl a:hover { color: var(--brand); border-color: rgba(17, 17, 17, .4); }
.hv3 .hotl .hw-type {
  display: inline-block; font-size: 9.5px; padding: 0 4px; margin-right: 4px;
  border-radius: 3px; background: var(--brand-wash); color: var(--brand);
}

/* ==========================================================================
   V2b. 滚动后吸顶的搜索条
   ========================================================================== */
.hv3-sticky {
  position: fixed; left: 0; right: 0; top: 64px; z-index: 80;
  height: 56px; display: flex; align-items: center; justify-content: center;
  padding: 0 32px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 8px 20px -16px rgba(13, 19, 32, .45);
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform .24s cubic-bezier(.4, 0, .2, 1), opacity .18s ease;
}
.hv3-sticky.show { transform: none; opacity: 1; pointer-events: auto; }
.hv3-sticky .sl {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 560px; height: 34px;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: var(--r-ctl); padding: 0 11px;
  font-size: 12.5px; color: var(--ink-3); cursor: text;
}
.hv3-sticky .sl svg { width: 14px; height: 14px; color: var(--brand); flex: none; }
.hv3-sticky .sl .key {
  margin-left: auto; font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--rule-2); border-bottom-width: 2px;
  border-radius: var(--r-micro); padding: 0 5px;
}

/* ==========================================================================
   V3. 工作台三栏
   ========================================================================== */
.hv3-wb {
  background: var(--paper-2);
  padding: 20px 0 34px;
  border-bottom: 1px solid rgba(13, 19, 32, .06);
}
/* 三栏工作台撑满视口宽度（首屏 hero 仍保持 1144 居中，避免标题行过长） */
.hv3-wb .hv3-wrap { max-width: none; padding: 0 clamp(20px, 2.2vw, 40px); }
.hv3 .wbGrid {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

/* ---------- 左栏 ---------- */
.hv3 .rail {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  padding: 14px 10px;
  position: sticky; top: 128px;   /* 顶栏 64 + 吸顶搜索条 56 + 8 */
  align-self: start;
}
.hv3 .rail .grp {
  font-size: 10px; letter-spacing: .08em; color: var(--ink-3);
  padding: 6px 10px 4px; font-weight: 700;
}
.hv3 .rail a {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--r-ctl);
  font-size: 12.5px; color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: background .16s, color .16s;
}
.hv3 .rail a:hover { background: var(--paper-2); }
.hv3 .rail a svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.hv3 .rail a.on { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
.hv3 .rail a.on svg { color: var(--brand); }
.hv3 .rail a.on::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.hv3 .rail .num {
  margin-left: auto; font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.hv3 .rail hr { border: 0; border-top: 1px solid var(--rule); margin: 10px 8px; }
.hv3 .mini-stat {
  margin: 8px 4px 2px; padding: 11px 12px;
  background: linear-gradient(150deg, #f5f9ff, #f5f5f5);
  border: 1px solid rgba(17, 17, 17, .10);
  border-radius: var(--r-card);
}
.hv3 .mini-stat div {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--ink-3); padding: 2.5px 0;
}
.hv3 .mini-stat div b { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- 中栏 / 通用面板 ---------- */
.hv3 .col { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hv3 .side { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-self: start; }
.hv3 .panel {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  padding: 16px 16px 12px;
}
.hv3 .panel.mini { padding: 14px 12px 12px; }
.hv3 .ph { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0 2px; }
.hv3 .ph h2 {
  font-size: 15px; margin: 0; letter-spacing: -.01em; font-weight: 700; color: var(--ink);
}
.hv3 .panel.mini .ph h2 { font-size: 13.5px; }
.hv3 .ph .more {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--ink-3); text-decoration: none;
}
.hv3 .ph .more:hover { color: var(--brand); }
.hv3 .ph .more svg { width: 12px; height: 12px; }

/* ---------- 行式列表 ---------- */
.hv3 .r {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-ctl);
  text-decoration: none; color: inherit;
  transition: background .16s, transform .16s;
}
.hv3 .r:hover { background: var(--paper-2); transform: translateX(2px); }
.hv3 .r .ico {
  width: 28px; height: 28px; border-radius: var(--r-ctl); flex: none;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 3px 8px -4px rgba(13, 19, 32, .35);
}
.hv3 .panel.mini .r { padding: 7px 8px; }
.hv3 .panel.mini .r .ico { width: 26px; height: 26px; border-radius: var(--r-ctl); }
.hv3 .r .ico svg { width: 13px; height: 13px; display: block; }
.hv3 .panel.mini .r .ico svg { width: 12px; height: 12px; }
.hv3 .t-blue   { background: linear-gradient(135deg, #1f6feb, #4a9bff 60%, #7cc4ff); }
.hv3 .t-violet { background: linear-gradient(135deg, #7c3aed, #a855f7 60%, #d18bff); }
.hv3 .t-teal   { background: linear-gradient(135deg, #0d9488, #14b8a6 60%, #5eead4); }
.hv3 .t-gold   { background: linear-gradient(135deg, #f59e0b, #fbbf24 60%, #fde68a); }
.hv3 .t-gray   { background: linear-gradient(135deg, #8a8a8a, #b0b0b0 60%, #cbd5e1); }
.hv3 .r .m { min-width: 0; flex: 1; }
.hv3 .r .m b {
  display: block; font-size: 12.5px; font-weight: 500;
  color: var(--ink); letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv3 .panel.mini .r .m b { font-size: 12px; }
.hv3 .r .m i {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 2px;
}
.hv3 .panel.mini .r .m i { font-size: 10.5px; }
.hv3 .r .m .tg {
  font-size: 10px; padding: 1px 5px; border-radius: var(--r-micro);
  background: var(--paper-3); color: var(--ink-2); flex: none;
}
/* 下载次数：下载榜的「上榜依据」 */
.hv3 .r .m .dl {
  font-size: 10px; padding: 1px 5px; border-radius: var(--r-micro); flex: none;
  background: var(--brand-wash); color: var(--brand-ink); font-weight: 600;
}
/* 品牌 · 车型标签（固件榜 / 最近更新）
   不设 max-width：车型名长短不一，硬截会变成「其他 · 07…」，
   交给副行的 flex-wrap 换行更清楚 */
.hv3 .r .m .md {
  font-size: 10px; padding: 1px 5px; border-radius: var(--r-micro); flex: none;
  background: #e8e8e8; color: var(--brand-ink); font-weight: 600;
  white-space: nowrap;
}
.hv3 .r .m .sz { font-size: 10.5px; color: var(--ink-3); flex: none; }
/* 行尾时间（最近更新） */
.hv3 .r .end { white-space: nowrap; }
.hv3 .panel.mini .r .end { font-size: 10.5px; color: var(--ink-3); }
.hv3 .r .end {
  display: flex; align-items: center; gap: 7px; flex: none;
  font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.hv3 .r .end svg { width: 12px; height: 12px; color: var(--ink-3); opacity: .7; transition: .16s; }
.hv3 .r:hover .end svg { color: var(--brand); opacity: 1; }

/* 时效标签（复用 app.js 的 relTimeBadge，class 为 badge upd-*） */
.hv3 .r .m .badge {
  font-size: 10px; padding: 1px 5px; border-radius: var(--r-micro); flex: none;
  background: var(--paper-3); color: var(--ink-2);
}
.hv3 .r .m .badge.upd-today { background: var(--green-wash); color: var(--green); }
.hv3 .r .m .badge.upd-3d    { background: #fdf4e7; color: #b45309; }
.hv3 .r .m .badge.upd-7d    { background: #f3edff; color: #6a2bf0; }
.hv3 .r .m .badge.upd-14d   { background: #fdecf4; color: #c2185b; }

/* ---------- 社区 ---------- */
.hv3 .post {
  display: flex; gap: 10px; padding: 10px; border-radius: var(--r-ctl);
  text-decoration: none; color: inherit;
  transition: background .16s;
}
.hv3 .post:hover { background: var(--paper-2); }
.hv3 .post .av {
  width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 1px;
  background: linear-gradient(135deg, #7c3aed, #d18bff);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(13, 19, 32, .06);
  overflow: hidden;
}
.hv3 .post .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hv3 .post:nth-child(3n+2) .av { background: linear-gradient(135deg, #0d9488, #5eead4); }
.hv3 .post:nth-child(3n+3) .av { background: linear-gradient(135deg, #f59e0b, #fde68a); }
.hv3 .post .m { min-width: 0; }
.hv3 .post .m .h {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; margin-bottom: 3px;
}
.hv3 .post .m .h b { font-weight: 600; color: var(--ink); }
.hv3 .post .m .h span { color: var(--ink-3); font-size: 10.5px; }
.hv3 .post .m p {
  margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 右栏：公告 ---------- */
.hv3 .notice {
  position: relative; overflow: hidden;
  border-radius: var(--r-panel); padding: 16px;
  background: linear-gradient(140deg, #111111, #3f7dff 55%, #6a2bf0);
  color: #fff;
  box-shadow: 0 14px 30px -18px rgba(17, 17, 17, .9);
}
.hv3 .notice::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.hv3 .notice .t {
  position: relative; display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; margin-bottom: 6px;
}
.hv3 .notice .t svg { width: 14px; height: 14px; }
.hv3 .notice p {
  position: relative; margin: 0; font-size: 11.5px; line-height: 1.65;
  color: rgba(255, 255, 255, .86);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  transition: opacity .26s ease;
}
.hv3 .notice p.fade { opacity: 0; }
.hv3 .notice a {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; font-size: 11.5px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 4px 11px;
}
.hv3 .notice a:hover { background: rgba(255, 255, 255, .28); }
.hv3 .notice a svg { width: 11px; height: 11px; }

/* ---------- 右栏：热门搜索 ---------- */
.hv3 .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; }
.hv3 .chips a {
  font-size: 11px; color: var(--ink-2); text-decoration: none;
  background: var(--paper-2); border: 1px solid transparent;
  border-radius: 999px; padding: 4px 10px;
}
.hv3 .chips a:hover { color: var(--brand); background: var(--brand-wash); border-color: rgba(17, 17, 17, .2); }

/* ---------- 空态 ---------- */
.hv3-empty {
  display: block; padding: 18px 6px; text-align: center;
  font-size: 12px; color: var(--ink-3);
}

/* ---------- 移动端快捷入口（桌面不显示） ---------- */
.hv3 .quick { display: none; }

/* ==========================================================================
   V4. 顶栏：导航顺序 + 登录区
   ========================================================================== */
/* 导航轨道改为透明，项自成形（与首页左侧栏同一套语言） */
/* 导航紧跟 Logo 左对齐（不居中）：品牌不伸展、导航紧随其后，右侧按钮靠右 */
.masthead-brand { flex: 0 0 auto; }
.masthead-nav { flex: 0 0 auto; margin-left: 28px; }
.masthead-actions { flex: 1 1 auto; margin-left: auto; }
.nav-panel {
  background: transparent;
  padding: 0;
  gap: 2px;
  border-radius: 0;
}
.nav-panel > a {
  position: relative;
  padding: 8px 14px; border-radius: var(--r-ctl);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.nav-panel > a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 2px; border-radius: 2px; background: transparent;
  transition: background .18s;
}
.nav-panel > a:hover { color: var(--brand-ink); background: rgba(13, 19, 32, .04); }
.nav-panel > a.active {
  color: var(--brand); background: var(--brand-wash);
  font-weight: 600; box-shadow: none;
}
.nav-panel > a.active::after { display: block; background: var(--brand); }

/* 登录区：登录（描边） + 注册（实心渐变） */
.masthead-actions { gap: 8px; }
.masthead-actions .masthead-login {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: 38px; padding: 0 17px; flex: none;
  border-radius: 999px; border: 1px solid rgba(13, 19, 32, .14);
  background: #fff; color: var(--ink-2);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: .16s;
}
.masthead-actions .masthead-login:hover {
  border-color: rgba(17, 17, 17, .55); color: var(--brand);
}
.masthead-actions .masthead-cta {
  width: auto; height: 38px; padding: 0 16px; flex: none;
  border-radius: 999px; border: 0;
  background: linear-gradient(135deg, #111111, #3d86ff);
  color: #fff; font-family: var(--font-body);
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(17, 17, 17, .85);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform .16s, box-shadow .16s;
}
.masthead-actions .masthead-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(17, 17, 17, .9); }
.masthead-actions .masthead-cta svg { width: 12px; height: 12px; }

/* 登录后：头像胶囊（两行：昵称 + 身份） */
.masthead-actions .nav-user {
  width: auto; height: 40px; padding: 4px 10px 4px 4px; gap: 8px;
  border-radius: 999px; background: #fff; border: 1px solid var(--rule-2);
  justify-content: flex-start;
}
.masthead-actions .nav-user:hover {
  border-color: rgba(17, 17, 17, .35);
  box-shadow: 0 8px 18px -12px rgba(17, 17, 17, .7);
}
.masthead-actions .nav-user-avatar { width: 30px; height: 30px; font-size: 12.5px; }
.nav-user-meta { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.nav-user-meta b {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-user-meta i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.masthead-actions .nav-user .chev { width: 12px; height: 12px; color: var(--ink-3); margin-left: 1px; }

/* 账户下拉面板 */
.user-wrap { position: relative; display: inline-flex; }
.u-pop {
  display: none;
  position: absolute; right: 0; top: calc(100% + 12px); width: 252px;
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--r-panel); overflow: hidden; z-index: 120;
  box-shadow: 0 28px 56px -22px rgba(13, 19, 32, .45);
}
.user-wrap.open .u-pop { display: block; }
.u-pop .hd {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px;
  background: linear-gradient(150deg, rgba(17, 17, 17, .08), rgba(106, 43, 240, .06));
}
.u-pop .hd .u-av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700;
  background: var(--grad-blue); overflow: hidden;
}
.u-pop .hd .u-av img { width: 100%; height: 100%; object-fit: cover; }
.u-pop .hd b { display: block; font-size: 13px; color: var(--ink); }
.u-pop .hd span { font-size: 11px; color: var(--ink-3); }
.u-pop .bdgs { display: flex; gap: 6px; padding: 10px 14px 8px; }
.u-pop .bdgs i {
  font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: var(--r-micro);
  background: var(--brand-wash); color: var(--brand); font-weight: 600;
}
.u-pop .bdgs i.g { background: #fdf4e7; color: #b45309; }
.u-pop .list { padding: 4px 8px 8px; }
.u-pop .list a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-ctl);
  font-size: 12.5px; color: var(--ink-2); text-decoration: none;
}
.u-pop .list a:hover { background: var(--paper-2); color: var(--brand); }
.u-pop .list a svg { width: 14px; height: 14px; color: var(--ink-3); }
.u-pop .list a:hover svg { color: var(--brand); }
.u-pop .list a .n { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.u-pop .out {
  display: block; text-align: center; font-size: 12px; color: var(--ink-3);
  text-decoration: none; padding: 10px; border-top: 1px solid var(--rule);
}
.u-pop .out:hover { color: #c62828; background: #fdf4f4; }

/* ==========================================================================
   V5. 页脚：深色星空 + 三列 + 版权行
   --------------------------------------------------------------------------
   覆盖 X16「品牌蓝渐变单行条」：本站 v3 设计稿的底栏是深色星空，
   与顶部浅蓝形成「亮—灰—暗」三段收口。结构换成四列 + 底部版权行。
   ========================================================================== */
footer {
  padding: 0;
  margin-top: 0;
  text-align: left;
  background: #0a1020;
  color: rgba(255, 255, 255, .62);
  border-radius: 0;
  box-shadow: none;
}
footer::before {
  content: ""; position: absolute; inset: 0; height: auto;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(420px 220px at 12% 0%, rgba(17, 17, 17, .30), transparent 66%),
    radial-gradient(380px 200px at 88% 8%, rgba(106, 43, 240, .22), transparent 68%),
    radial-gradient(1.6px 1.6px at 18% 26%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1.4px 1.4px at 34% 62%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(1.8px 1.8px at 63% 34%, rgba(255, 255, 255, .42), transparent),
    radial-gradient(1.3px 1.3px at 82% 58%, rgba(255, 255, 255, .3), transparent),
    radial-gradient(1.5px 1.5px at 47% 82%, rgba(255, 255, 255, .3), transparent);
  opacity: 1;
}
footer::after { content: none; }
.f3 { position: relative; z-index: 1; max-width: 1208px; margin: 0 auto; padding: 32px 32px 0; }
.f3-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px; padding-bottom: 24px;
}
.f3-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 9px; }
.f3-brand .mark {
  width: 22px; height: 22px; border-radius: var(--r-ctl); flex: none; overflow: hidden;
  background: linear-gradient(135deg, #111111, #7cc4ff);
  display: flex; align-items: center; justify-content: center;
}
.f3-brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.f3 p.f3-desc {
  margin: 0; font-size: 11.5px; line-height: 1.8;
  color: rgba(255, 255, 255, .5); max-width: 300px;
}
.f3 h4 { font-size: 11.5px; color: #fff; margin: 0 0 9px; font-weight: 600; letter-spacing: .02em; }
.f3 ul { list-style: none; margin: 0; padding: 0; }
.f3 ul li { margin-bottom: 6px; }
.f3 ul a { font-size: 11.5px; color: rgba(255, 255, 255, .55); text-decoration: none; }
.f3 ul a:hover { color: #fff; }
.f3-bot {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 13px 0 15px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 11px; color: rgba(255, 255, 255, .38);
}
.f3-bot .sep { width: 1px; height: 10px; background: rgba(255, 255, 255, .16); }
.f3-bot .rt { margin-left: auto; display: flex; gap: 14px; }
.f3-bot a { color: rgba(255, 255, 255, .45); text-decoration: none; }
.f3-bot a:hover { color: #fff; }
#footerText { max-width: none; margin: 0; display: inline; }

/* ==========================================================================
   V6. 响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .hv3 .wbGrid { grid-template-columns: 168px minmax(0, 1fr); }
  .hv3 .side { display: none; }
  .hv3-hero .heroIn { grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; }
}

@media (max-width: 900px) {
  .hv3 { margin-top: -22px; }
  body:has(.hv3) #app { padding-top: 84px; }
  .hv3-wrap { padding: 0 16px; }
  /* 移动端回到 16px（桌面那条 clamp 会盖掉上面的简写） */
  .hv3-wb .hv3-wrap { padding: 0 16px; }
  .hv3-hero .hv3-wrap { padding: 0 16px; }
  .hv3-hero { padding: 20px 0 18px; }
  .hv3-hero .heroIn { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hv3-hero h1 { font-size: 25px; }
  .hv3-hero .sub { font-size: 12.5px; margin-bottom: 14px; }
  .hv3 .stats b { font-size: 19px; }
  .hv3 .stats > div { padding-right: 18px; margin-right: 18px; }
  .hv3 .scard { border-radius: var(--r-panel); padding: 13px 13px 11px; }
  .hv3-wb { padding: 14px 0 90px; }
  .hv3 .wbGrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hv3 .rail { display: none; }
  .hv3 .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 2px; }
  .hv3 .quick a {
    display: flex; align-items: center; gap: 9px;
    background: #fff; border: 1px solid var(--rule); border-radius: 13px;
    padding: 11px 12px; text-decoration: none; color: inherit;
  }
  .hv3 .quick .qico {
    width: 30px; height: 30px; border-radius: var(--r-ctl); flex: none;
    display: grid; place-items: center; color: #fff;
  }
  .hv3 .quick .qico svg { width: 14px; height: 14px; }
  .hv3 .quick b { font-size: 12px; display: block; font-weight: 600; }
  .hv3 .quick span { font-size: 9.5px; color: var(--ink-3); }
  .hv3 .side { display: grid; gap: 12px; }
  .hv3 .panel { border-radius: var(--r-card); padding: 14px 12px 10px; }
  .f3 { padding: 22px 16px 0; }
  .f3-top { grid-template-columns: 1fr 1fr 1fr; gap: 14px; padding-bottom: 16px; }
  .f3-top > div:first-child { grid-column: 1 / -1; }
  .f3 p.f3-desc { max-width: none; }
  .f3-bot { font-size: 10px; gap: 8px; }
}

/* 底部 TAB 改为五项后，等分更宽裕 */
#tabbar .tab-item span { white-space: nowrap; }

/* 品牌英文名：桌面与中文同排，窄屏只留中文 */
.brand-en { font-style: normal; font-weight: 600; }

/* ---------- 移动端：汉堡 + 抽屉式导航（设计稿手机 2） ---------- */
@media (max-width: 768px) {
  .brand-en { display: none; }
  /* 顶栏顺序：品牌 → 登录/注册 → 汉堡（与设计稿手机端一致） */
  .masthead-brand { order: 1; }
  .masthead-actions { order: 2; margin-left: auto; }
  .masthead-nav { order: 3; display: flex !important; }
  .nav-toggle {
    display: inline-flex !important;
    width: 38px; height: 38px; padding: 0;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border-radius: var(--r-ctl); background: var(--paper-2); border: 1px solid var(--rule);
  }
  .nav-toggle-bar {
    display: block; width: 16px; height: 2px; border-radius: 1px;
    background: var(--ink-2);
  }
  /* ⚠️ #masthead 带 backdrop-filter → 它成了 fixed 后代的包含块，
     所以 top:0/bottom:0 只会撑到顶栏的 60px 高（抽屉变成一条）。
     这里必须显式给 height:100dvh，并先取消 bottom。 */
  .nav-panel {
    position: fixed; left: 0; top: 0; bottom: auto;
    height: 100dvh; width: 82%; max-width: 320px;
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 10px 18px;
    border-radius: 0; transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 24px 0 60px -20px rgba(13, 19, 32, .5);
    z-index: 95; overflow-y: auto;
    backdrop-filter: none;
  }
  .nav-panel.open { transform: none; }
  .nav-panel > a {
    padding: 11px 14px; border-radius: var(--r-ctl);
    font-size: 14px; font-weight: 500; color: var(--ink-2);
  }
  .nav-panel > a.active { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
  /* ⚠️ 必须带 .active 才压得住 V4 的 `.nav-panel > a.active::after{display:block}` */
  .nav-panel > a::after,
  .nav-panel > a.active::after { display: none; }
  /* 抽屉打开时收起底部 TAB，避免两层导航叠在屏幕上 */
  body:has(.nav-panel.open) #tabbar { display: none !important; }
  /* 抽屉打开时压一层遮罩（低于 #masthead 的 90，保证抽屉仍在最上层） */
  body:has(.nav-panel.open)::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(9, 14, 26, .45); z-index: 89;
  }
  /* 窄屏把两颗按钮收窄，给汉堡腾位置 */
  .masthead-actions .masthead-login { height: 34px; padding: 0 13px; font-size: 12.5px; }
  .masthead-actions .masthead-cta { height: 34px; padding: 0 12px; font-size: 12.5px; }
  .masthead-actions .masthead-cta svg { width: 11px; height: 11px; }
  .masthead-actions { gap: 6px; }
}

/* 移动端抽屉顶部的账户块（桌面隐藏） */
.nav-account { display: none; }
@media (max-width: 900px) {
  .nav-account {
    display: block;
    padding: 12px 10px;
    margin: 0 0 6px;
    border-bottom: 1px solid var(--rule);
  }
  .na-user { display: flex; align-items: center; gap: 10px; }
  .na-av {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
    display: grid; place-items: center; background: var(--grad-blue);
    color: #fff; font-weight: 700; font-size: 15px;
  }
  .na-av img { width: 100%; height: 100%; object-fit: cover; }
  .na-meta { display: flex; flex-direction: column; line-height: 1.2; }
  .na-meta b { font-size: 13.5px; color: var(--ink); }
  .na-meta i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
  .na-guest { display: flex; flex-direction: column; gap: 9px; }
  .na-guest-t { font-size: 11.5px; color: var(--ink-3); }
  .na-btns { display: flex; gap: 8px; }
  .na-login, .na-reg {
    flex: 1; height: 34px; border-radius: 999px;
    font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  }
  .na-login { background: #fff; border: 1px solid var(--rule-2); color: var(--ink-2); }
  .na-reg { background: linear-gradient(135deg, #111111, #3d86ff); border: 0; color: #fff; }
  /* 窄屏胶囊只留头像 + 昵称，身份那行收掉 */
  .masthead-actions .nav-user-meta i { display: none; }
  .masthead-actions .nav-user { padding: 4px 8px 4px 4px; height: 38px; }
  .hv3-sticky { top: 60px; height: 50px; padding: 0 16px; }
  .hv3-sticky .sl { max-width: none; }
}

/* ==========================================================================
   V7. 深色主题
   ========================================================================== */
[data-theme="dark"] .hv3 { background: #0b0b0c; }
[data-theme="dark"] .hv3-hero {
  background:
    radial-gradient(780px 380px at 2% -16%, rgba(17, 17, 17, .34), transparent 64%),
    radial-gradient(680px 340px at 90% -18%, rgba(106, 43, 240, .26), transparent 66%),
    linear-gradient(180deg, #101827 0%, #12161d 60%, #0b0b0c 100%);
}
[data-theme="dark"] .hv3-hero::after { background: linear-gradient(90deg, transparent, rgba(90, 140, 255, .22) 20%, rgba(90, 140, 255, .22) 80%, transparent); }
[data-theme="dark"] .hv3 .eyebrow { background: rgba(255, 255, 255, .08); border-color: rgba(90, 140, 255, .28); color: #9dc0ff; }
[data-theme="dark"] .hv3 .scard { background: rgba(24, 30, 40, .86); border-color: rgba(255, 255, 255, .1); }
[data-theme="dark"] .hv3-wb { background: #0f1319; border-bottom-color: rgba(255, 255, 255, .06); }
[data-theme="dark"] .hv3 .panel,
[data-theme="dark"] .hv3 .rail { background: #151a22; border-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .hv3 .seg .seg-thumb { display: none; }
[data-theme="dark"] .hv3 .r:hover,
[data-theme="dark"] .hv3 .post:hover { background: rgba(255, 255, 255, .05); }
[data-theme="dark"] .hv3 .r .m .tg { background: rgba(255, 255, 255, .08); color: var(--ink-2); }
[data-theme="dark"] .hv3 .chips a { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .u-pop { background: #171c24; border-color: rgba(255, 255, 255, .1); }
[data-theme="dark"] .u-pop .list a:hover { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .masthead-actions .masthead-login { background: transparent; border-color: rgba(255, 255, 255, .18); }
[data-theme="dark"] .masthead-actions .nav-user { background: #171c24; border-color: rgba(255, 255, 255, .14); }
[data-theme="dark"] .nav-panel > a:hover { background: rgba(255, 255, 255, .06); }
