/* GOLDTD 外贸行情主页 · 样式（第三期：HTX 合约交易台风 · 全宽流式自适应）
   - 默认深色：HTX 实拍色板 #0c0d0e 族 + 细隔线 #1b1d24 族 + 绿涨红跌 + 品牌蓝白点缀（#0173e5 / #d7ddeb）
   - 应用式布局：body 100vh flex 列（顶栏/跑马灯/主区/一行页脚），主区左右 flex 撑满
   - 浅色主题保留同一骨架，协调可用 */
:root {
  --bg: #f6f7f9;
  /* 顶栏/跑马灯固定深色（不随主题切换） */
  --tbf-bg: #161616;
  --tbf-border: #1b1d24;
  --tbf-inset: #1b1d24;
  --tbf-hover: #26282f;
  --tbf-text: #d7ddeb;
  --tbf-text2: #8b93a3;
  --tbf-text3: #5c6472;
  --panel: #ffffff;
  --panel2: #f3f5f8;
  --border: #e5e9ef;
  --border-focus: #c3cddb;
  --text: #161c28;
  --text2: #525d6e;
  --text3: #8d99ab;
  --up: #16a34a;   /* 绿涨 */
  --down: #dc2626; /* 红跌 */
  --up-bg: rgba(22, 163, 74, .08);
  --down-bg: rgba(220, 38, 38, .08);
  /* 品牌蓝白：--gold/--gold2 变量名保留（兼容旧引用），值已全部改为火币蓝系 */
  --gold: #0173e5;
  --gold2: #0173e5;
  --gold-soft: rgba(1, 115, 229, .10);
  --accent: #0173e5;
  --violet: #8b5cf6;
  --sel-row: #f3f5f8;
  --warn-row: #fdeeee;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --radius: 8px;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
}
/* 深色主题：完全对标火币 HTX 实拍色板（PIL 取色）
   层级：#161616 顶栏 → #2f2523 公告 → #161616 跑马灯 → #0c0d0e 页底 → #141517 面板 */
[data-theme="dark"] {
  --bg: #0c0d0e;
  --panel: #141517;
  --panel2: #1b1d24;
  --border: #1b1d24;
  --border-focus: #3a4150;
  --text: #d7ddeb;
  --text2: #8b93a3;
  --text3: #5c6472;
  --up: #00a171;
  --down: #e9404f;
  --up-bg: rgba(0, 161, 113, .12);
  --down-bg: rgba(233, 64, 79, .12);
  --accent: #0173e5;
  --sel-row: #1b1d24;
  --warn-row: #29191d;
  --gold: #2f8cff;   /* 深色下小面积强调用更亮的蓝 */
  --gold2: #2f8cff;
  --gold-soft: rgba(47, 140, 255, .16);
  --shadow: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.55 -apple-system, "Helvetica Neue", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  /* 应用式全屏骨架：顶栏 + 跑马灯 + 主区(flex:1) + 一行页脚 */
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
a { color: inherit; text-decoration: none; }
.num {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- 菜单栏（全宽通栏，固定深色 #161616，不随主题切换） ---------- */
.topbar { background: var(--tbf-bg); border-bottom: 1px solid var(--tbf-border); flex: none; z-index: 50; }
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 0 16px; height: 52px; }

/* logo：CSS 蓝色菱形标 + 全白粗字（顶栏固定深色，用 tbf 固定 token） */
.logo { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: .8px; color: var(--tbf-text); }
.logo-mark {
  width: 15px; height: 15px; border-radius: 4px 4px 4px 1px; transform: rotate(45deg);
  background: linear-gradient(135deg, #2f8cff, var(--accent));
  box-shadow: 0 1px 5px rgba(1, 115, 229, .5); flex: none;
}

.mainnav { display: flex; gap: 2px; flex: 1; }
.nav-item { position: relative; }
.nav-btn {
  display: inline-block;
  background: none; border: 0; cursor: pointer; color: var(--tbf-text);
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: .2px;
  padding: 8px 10px; border-radius: 6px; white-space: nowrap;
}
.nav-btn i { font-style: normal; font-size: 10px; color: var(--tbf-text3); margin-left: 2px; }
.nav-btn:hover, .nav-item:hover > .nav-btn { color: #fff; background: none; }
.nav-ai { display: inline-block; }
/* 下拉面板：顶栏固定深色 → 面板也固定深色 */
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: var(--tbf-inset); border: 1px solid var(--tbf-hover); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); padding: 6px; z-index: 60;
}
.dropdown.right { left: auto; right: 0; min-width: 150px; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }
/* 选中选项后强制收起，mouseleave 后移除该类恢复 hover 行为 */
.nav-item.dd-close:hover .dropdown, .nav-item.dd-close:focus-within .dropdown { display: none; }
.dropdown a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--tbf-text2); font-weight: 500; }
.dropdown a:hover { background: var(--tbf-hover); color: var(--tbf-text); }
.dropdown a.active { color: var(--accent); font-weight: 700; }
/* Products 分类面板（烨联式）：小标题 + 分类列表，深色固定 */
.dd-prods { min-width: 300px; padding: 8px; }
.dd-prods .dd-title {
  padding: 4px 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .6px;
  color: var(--tbf-text3); text-transform: uppercase;
}
.dd-prods a { display: flex; align-items: baseline; gap: 7px; white-space: normal; }
.dd-prods a::before { content: '›'; color: var(--accent); font-weight: 700; }

/* 右侧：搜索 → Log In → Sign Up → 灰白工具图标（顺序对标火币顶栏） */
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--tbf-inset); border: 1px solid transparent; border-radius: 6px;
  padding: 6px 10px; width: 180px;
}
.top-search:focus-within { border-color: #3a4150; }
.ts-icon { font-size: 12px; filter: grayscale(1); opacity: .7; }
.top-search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--tbf-text); font: inherit; font-size: 13px;
}
.top-search input::placeholder { color: var(--tbf-text3); }
.login-btn {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500;
  color: var(--tbf-text); padding: 7px 10px; white-space: nowrap;
}
.login-btn:hover { color: #fff; }
.signup-btn {
  background: var(--accent); border: 0; border-radius: 6px; cursor: pointer;
  color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 18px; white-space: nowrap;
}
.signup-btn:hover { filter: brightness(1.12); }
/* 已登录用户区：Hi, name + Log Out */
.user-box { display: inline-flex; align-items: center; gap: 6px; color: var(--tbf-text); font-size: 14px; white-space: nowrap; }
.ticon {
  background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1;
  padding: 7px 6px; color: var(--tbf-text2); filter: grayscale(1); opacity: .85;
}
.ticon:hover, .nav-item:hover > .ticon { opacity: 1; filter: grayscale(.4); }
.icon-wrap .dropdown { margin-top: 4px; }
.burger { display: none; background: none; border: 0; font-size: 22px; color: var(--tbf-text); cursor: pointer; }

/* ---------- 跑马灯（固定深色，与顶栏同 #161616） ---------- */
.ticker { background: var(--tbf-bg); border-bottom: 1px solid var(--tbf-border); overflow: hidden; flex: none; }
.ticker-track { display: inline-flex; gap: 36px; padding: 7px 0; white-space: nowrap; animation: marquee 36s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--tbf-text); }
.tk b { font-family: inherit; }
.tk .tname { color: var(--tbf-text2); font-family: -apple-system, "Helvetica Neue", "Segoe UI", Roboto, sans-serif; }

/* ---------- 布局骨架：100vw 全宽，主区 flex 撑满剩余高度 ---------- */
main { flex: 1; min-height: 0; display: flex; padding: 10px; width: 100%; }
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ============ 行情主区：左侧栏 + 主列 ============ */
.mkt { display: flex; gap: 10px; flex: 1; min-height: 0; width: 100%; }
.main-col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

/* ---- 左侧边栏（320px 弹性，内部滚动；火币合约列表风紧凑布局） ---- */
.sidebar {
  flex: 0 1 320px; min-width: 280px; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}

/* tab 行：激活 = 白字 + 蓝色下划线 */
/* tab 行：激活 = 白字 + 蓝色下划线；比 chips 大一号 */
.side-tabs { display: flex; gap: 4px; padding: 6px 8px 0; flex: none; }
.stab {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text3); padding: 6px 8px 8px; position: relative; white-space: nowrap;
}
.stab:hover { color: var(--text2); }
.stab.active { color: var(--text); }
.stab.active::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--accent);
}

/* 材质 chips：小字胶囊横排可滚动（隐藏滚动条），激活淡蓝底蓝字 */
.side-chips {
  display: flex; gap: 6px; padding: 8px 10px 2px; flex: none;
  overflow-x: auto; scrollbar-width: none;
}
.side-chips::-webkit-scrollbar { display: none; }
.schip {
  background: var(--panel2); border: 0; border-radius: 999px; cursor: pointer; flex: none;
  font: inherit; font-size: 11px; font-weight: 600; color: var(--text3); padding: 2px 9px;
}
.schip:hover { color: var(--text2); }
.schip.active { background: var(--gold-soft); color: var(--accent); }

.side-search { padding: 8px 10px 8px; border-bottom: 1px solid var(--border); flex: none; }
.side-search input {
  width: 100%; border: 1px solid transparent; border-radius: 6px; background: var(--panel2);
  color: var(--text); font: inherit; font-size: 13px; padding: 7px 12px;
}
.side-search input::placeholder { color: var(--text3); }
.side-search input:focus { outline: none; border-color: var(--border-focus); }

/* 排序列头：三列与数据行严格对齐（grid 同列宽），小灰字 + ⇅，激活蓝色高亮 */
.side-cols {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  gap: 6px; padding: 6px 12px 4px; flex: none; border-bottom: 1px solid var(--border);
}
.scol {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 10.5px;
  color: var(--text3); padding: 0; white-space: nowrap;
}
.scol:hover { color: var(--text2); }
.scol.active { color: var(--accent); }
.scol.active i { opacity: 1; }
.scol i { font-style: normal; font-size: 9px; opacity: .7; }
.scol-price { min-width: 68px; text-align: right; }
.scol-pct { min-width: 48px; text-align: right; }

.side-list { flex: 1; overflow-y: auto; padding: 4px; }
.side-list::-webkit-scrollbar { width: 5px; }
.side-list::-webkit-scrollbar-track { background: transparent; }
.side-list::-webkit-scrollbar-thumb { background: var(--panel2); border-radius: 3px; }
.side-list::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }

/* 品种行：三列 grid（名称区 / 最新价 / 涨跌幅），紧凑 ~52px，无分割线；选中 = 暗底 + 左侧蓝色竖条 */
.mi {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px;
  padding: 6px 6px 6px 4px; border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  position: relative; min-height: 46px;
}
.mi:hover { background: var(--panel2); }
.mi.on { background: var(--sel-row); border-color: transparent; }
.mi.on::before {
  content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px;
  border-radius: 2px; background: var(--accent);
}
.mi-l { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mi-star {
  flex: none; width: 14px; text-align: center; font-size: 12px; line-height: 1;
  color: var(--text3); cursor: pointer; user-select: none;
}
.mi-star:hover { color: var(--text2); }
.mi-star.on { color: var(--accent); }
.mi-n { font-weight: 600; font-size: 13px; min-width: 0; }
.mi-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mi-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-n small { display: block; color: var(--text3); font-weight: 500; font-size: 10.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-hot { font-size: 9px; flex: none; }
.mi-tag {
  flex: none; font-size: 9.5px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 3px; padding: 0 4px;
}
.mi-price {
  min-width: 68px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text);
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.mi-pct {
  min-width: 48px; text-align: right; font-size: 11px;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.mi-none { padding: 18px 12px; color: var(--text3); font-size: 13px; text-align: center; }

/* ---- 品种头条 ---- */
.head-panel {
  flex: none; display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; padding: 14px 18px; flex-wrap: wrap;
}
.h-name { font-size: 16px; font-weight: 800; }
.h-full { color: var(--text3); font-size: 12px; margin-top: 2px; }
.h-price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; }
.h-price { font-size: 32px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.h-chg { font-size: 14.5px; font-weight: 700; }
.head-chips { display: flex; gap: 26px; flex-wrap: wrap; }
/* chips：无边框两行式「灰标签 + 白值」（对标火币头部 24H高/24H低 排版） */
.chip { padding: 2px 0; min-width: 0; }
.chip span { display: block; font-size: 11px; color: var(--text3); letter-spacing: .2px; margin-bottom: 3px; }
.chip b { font-size: 13.5px; font-weight: 600; color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chip b.up { color: var(--up); }
.chip b.down { color: var(--down); }
.chip .stale { color: var(--text3); font-size: 12px; font-family: inherit; }

/* ---- 工具栏 + 主图（图表占满剩余高度） ---- */
.chart-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); flex: none; }
.seg { display: inline-flex; gap: 2px; }
.seg-btn {
  border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 12.5px;
  color: var(--text2); padding: 4px 12px; border-radius: 5px;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel2); color: var(--text); }
[data-theme="dark"] .seg-btn.active { background: var(--panel2); color: var(--text); }

/* 窄屏「☰ Markets」抽屉开关（桌面隐藏） */
.side-toggle {
  display: none; border: 1px solid var(--border); background: var(--panel2); color: var(--text);
  font: inherit; font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
}

.chart-wrap { flex: 1; min-height: 0; padding: 4px 8px 0; position: relative; }
/* GOLDTD 品牌加载遮罩：字母波浪式依次点亮（纯 CSS，克制的交易所质感） */
.chart-loading {
  position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  transition: opacity .28s ease;
}
.chart-loading.fade { opacity: 0; pointer-events: none; }
.cl-word { display: flex; gap: 10px; --cl-base: #525d6e; }
[data-theme="dark"] .cl-word { --cl-base: #d7ddeb; }
.cl-word span {
  font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--cl-base);
  /* 丝滑版：正弦浮动 + 流光扫过，负延迟让首帧即处于连续运动中 */
  background: linear-gradient(110deg, var(--cl-base) 40%, var(--accent) 50%, var(--cl-base) 60%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cl-float 2.6s cubic-bezier(.45, 0, .55, 1) -2.6s infinite,
             cl-shine 2.6s linear -2.6s infinite;
  will-change: transform;
}
.cl-word span:nth-child(2) { animation-delay: -2.47s, -2.47s; }
.cl-word span:nth-child(3) { animation-delay: -2.34s, -2.34s; }
.cl-word span:nth-child(4) { animation-delay: -2.21s, -2.21s; }
.cl-word span:nth-child(5) { animation-delay: -2.08s, -2.08s; }
.cl-word span:nth-child(6) { animation-delay: -1.95s, -1.95s; }
/* 浮动：缓入缓出两端速度为 0，循环点无顿挫 */
@keyframes cl-float {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50% { transform: translateY(-6px); opacity: 1; }
}
/* 流光：线性匀速扫过字母，光峰跟随浮动波峰 */
@keyframes cl-shine {
  0% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-word span { animation: none; -webkit-text-fill-color: currentColor; }
}

/* ---- 十字光标悬浮卡片（火币式） ---- */
.ch-tip {
  position: absolute; z-index: 20; pointer-events: none;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  padding: 8px 12px; font-size: 12px; line-height: 1.6; white-space: nowrap;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.ch-tip .ct-date { color: var(--text3); font-family: -apple-system, "Helvetica Neue", "Segoe UI", Roboto, sans-serif; margin-bottom: 2px; }
.ch-tip .ct-row { display: flex; justify-content: space-between; gap: 14px; }
.ch-tip .ct-k { color: var(--text2); }
.ch-tip .ct-v { color: var(--text); font-weight: 600; }
.ch-tip .ct-v.up { color: var(--up); }
.ch-tip .ct-v.down { color: var(--down); }
.ch-tip .ct-sep { border-top: 1px solid var(--border); margin: 5px 0; }
.chart-note { flex: none; padding: 7px 14px 9px; color: var(--text3); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--border); }

/* ---- 页脚：一行极简 ---- */
.footer {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 16px; border-top: 1px solid var(--border); background: var(--panel);
  color: var(--text3); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.footer a { color: var(--text2); }
.footer a:hover { color: var(--accent); }
.foot-sep { color: var(--border); }
.foot-note { overflow: hidden; text-overflow: ellipsis; }

/* ---- 悬浮 AI 气泡（蓝底白图标） ---- */
.ai-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: 22px; box-shadow: 0 4px 16px rgba(1, 115, 229, .45);
}
.ai-bubble span { font-size: 11px; font-weight: 800; color: #fff; }
.ai-bubble:hover { transform: scale(1.06); transition: transform .15s; }

/* ---- DEMO DATA 角标 ---- */
.demo-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 70;
  background: var(--down); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: 1px; padding: 5px 10px; border-radius: 6px; opacity: .92;
}

.toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--text); color: var(--bg); padding: 9px 18px; border-radius: 8px; font-size: 13px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .sidebar { flex-basis: 232px; }
  .head-panel { align-items: flex-start; flex-direction: column; gap: 12px; }
  .top-search { width: 130px; }
}

/* 窄屏（<900px）：左栏收成抽屉，图表区撑满 */
@media (max-width: 900px) {
  .side-toggle { display: inline-block; }
  .top-search { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90; width: 280px; min-width: 0;
    border-radius: 0; border-right: 1px solid var(--border);
    transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, .35);
  }
  body.side-open .sidebar { transform: none; }
  body.side-open::before {
    content: ''; position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .5);
  }
}

@media (max-width: 768px) {
  .mainnav { display: none; position: absolute; top: 52px; left: 0; right: 0; background: var(--tbf-bg); flex-direction: column; padding: 8px; border-bottom: 1px solid var(--tbf-border); z-index: 60; }
  .mainnav.open { display: flex; }
  .dropdown { position: static; box-shadow: none; border: 0; padding-left: 14px; }
  .nav-item:hover .dropdown { display: none; }
  .nav-item.open .dropdown { display: block; }
  .icon-wrap .dropdown { position: absolute; margin-top: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); border: 1px solid var(--tbf-hover); padding-left: 6px; }
  .icon-wrap:hover .dropdown { display: block; }
  .top-actions { margin-left: auto; }
  .login-btn { display: none; }
  .signup-btn { padding: 6px 12px; font-size: 13px; }
  .burger { display: block; }
  .topbar-inner { gap: 8px; }

  main { padding: 8px; }
  .h-price { font-size: 26px; }
  .h-chg { font-size: 13px; }
  .footer { font-size: 11px; }
  .seg-btn { padding: 4px 8px; font-size: 12px; }
  .ai-bubble { width: 48px; height: 48px; right: 14px; bottom: 14px; font-size: 19px; }
}

/* 超窄屏：页脚保持单行，隐藏次要文案 */
@media (max-width: 560px) {
  .footer .foot-note, .footer .foot-sep:last-of-type { display: none; }
  .head-chips { gap: 16px; }
}

/* ---------- 产品中心（products.html / product.html，主题随全站切换） ---------- */
body.pd-page { height: auto; min-height: 100vh; overflow: auto; }
body.pd-page .footer { margin-top: auto; }
.pd-wrap { display: block; flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 20px 48px; }
.pd-h1 { font-size: 30px; font-weight: 800; letter-spacing: -.4px; }
.pd-sub { color: var(--text2); margin-top: 6px; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.pd-card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.pd-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(1, 115, 229, .12); }
.pd-swatch {
  height: 84px; border-radius: 8px; margin-bottom: 12px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 210) 10% 74%), hsl(var(--h, 210) 9% 40%) 55%, hsl(var(--h, 210) 12% 62%));
}
.pd-swatch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .38) 46%, transparent 62%); }
.pd-swatch.checker {
  background-image: radial-gradient(circle at 9px 9px, rgba(255, 255, 255, .25) 3px, transparent 4px),
    linear-gradient(135deg, hsl(var(--h, 210) 10% 74%), hsl(var(--h, 210) 9% 40%) 55%, hsl(var(--h, 210) 12% 62%));
  background-size: 24px 24px, cover;
}
.pd-card h3 { font-size: 15.5px; font-weight: 700; }
.pd-card p { color: var(--text2); font-size: 13px; margin-top: 4px; }
/* 系列卡真图封面 */
.pd-thumb { height: 150px; border-radius: 8px; margin-bottom: 12px; overflow: hidden; background: var(--panel2); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pd-card:hover .pd-thumb img { transform: scale(1.04); }
/* 详情页封面头图 */
.pd-hero { margin-top: 18px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.pd-hero img { width: 100%; display: block; }
/* 纹理图格 */
.pd-tex { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pd-texitem { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
.pd-texitem:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(1, 115, 229, .10); }
.pd-texitem img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; display: block; }
.pd-texitem figcaption { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; font-size: 12px; color: var(--text3); }
.pd-texitem figcaption b { font-size: 13px; color: var(--text); letter-spacing: .3px; }
/* 放大查看（原始分辨率，不强行放大） */
.pd-lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 15, 22, .78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; cursor: zoom-out; }
.pd-lightbox[hidden] { display: none; }
.pd-lightbox img { max-width: min(92vw, 800px); max-height: 82vh; width: auto; height: auto; border-radius: 10px; box-shadow: 0 18px 60px rgba(0, 0, 0, .45); cursor: default; }
.pd-lightbox .pd-lbcode { color: #e8ecf3; font-size: 14px; letter-spacing: .4px; }
.pd-lbclose { position: absolute; top: 18px; right: 22px; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.pd-lbclose:hover { background: rgba(255, 255, 255, .24); }
/* JXTD 表面编号高亮 */
.pd-jx { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; color: var(--text3); background: var(--panel2); white-space: nowrap; }
.pd-jx.on { color: #fff; background: var(--accent); font-weight: 700; }
.pd-h2 { font-size: 22px; font-weight: 800; }
.pd-h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.pd-bc { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text3); margin-bottom: 14px; }
.pd-bc a:hover { color: var(--accent); }
.pd-intro { color: var(--text2); max-width: 780px; margin-top: 10px; }
.pd-sec { margin-top: 34px; }
.pd-sec > h2, .pd-tol h2 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.pd-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pd-feat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.pd-feat .fi { font-size: 22px; }
.pd-feat h3 { font-size: 14.5px; margin: 8px 0 4px; }
.pd-feat p { color: var(--text2); font-size: 13px; }
.pd-twrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pd-table th, .pd-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.pd-table th { white-space: nowrap; }
.pd-table th { background: var(--panel2); color: var(--text2); font-weight: 600; }
.pd-table tr:last-child td { border-bottom: 0; }
.pd-tol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pd-note { color: var(--text3); font-size: 12.5px; margin-top: 8px; }
.pd-cta { margin-top: 40px; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 30px 20px; }
.pd-qbtn { display: inline-block; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; padding: 13px 42px; border-radius: 9px; }
.pd-qbtn:hover { filter: brightness(1.12); }
.pd-cta p { color: var(--text2); font-size: 13px; margin-top: 10px; }
.pd-rel { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-rel a { background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; color: var(--text2); font-size: 13.5px; }
.pd-rel a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 768px) {
  .pd-wrap { padding: 20px 14px 36px; }
  .pd-h1 { font-size: 24px; }
  .pd-tol { grid-template-columns: 1fr; }
}

/* ---------- 产品中心两层架构（形态 + 装饰系列） ---------- */
/* 下拉分组：组间分隔线 + 面板可滚动 */
.dd-sep { height: 1px; background: var(--tbf-hover); margin: 6px 10px; }
.dd-prods { max-height: 78vh; overflow-y: auto; }
/* 形态卡：设计卡 swatch 纹样 */
.pd-swatch.stripes {
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 14px, transparent 14px 30px),
    linear-gradient(135deg, hsl(var(--h, 210) 10% 74%), hsl(var(--h, 210) 9% 40%) 55%, hsl(var(--h, 210) 12% 62%));
}
.pd-swatch.rainbow {
  background: linear-gradient(115deg, #d8b23c 0%, #c96a4e 30%, #8a5f7d 55%, #4e6d8c 78%, #3f7d6a 100%);
}
/* 形态卡核心口径行 */
.pd-card-spec { margin-top: 8px; font-size: 12px; color: var(--text3); letter-spacing: .2px; }
/* 总览两区分隔：装饰系列区上方留白 + 顶线 */
.pd-secfirst { margin-top: 26px; }
.pd-secdeco { margin-top: 46px; padding-top: 34px; border-top: 1px solid var(--border); }
/* 系列详情基材说明行 */
.pd-base { margin-top: 10px; font-size: 13px; color: var(--text2); }
.pd-base b { display: inline-block; background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-weight: 600; }
/* 形态详情 → 装饰系列交叉链接 */
.pd-xlink { display: flex; align-items: center; gap: 10px; margin-top: 34px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 15px 18px; font-size: 14px; font-weight: 600; color: var(--accent); transition: border-color .15s, box-shadow .15s; }
.pd-xlink:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(1, 115, 229, .10); }
.pd-xlink .xi { font-size: 16px; }

/* ---------- 工厂实力页 factory.html ---------- */
.fc-main { flex: 1; width: 100%; display: block; padding: 0; }
.fc-hero { position: relative; max-height: 460px; overflow: hidden; }
.fc-hero img { width: 100%; height: 460px; object-fit: cover; display: block; }
.fc-hero-ov {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 34px max(20px, calc((100% - 1080px) / 2 + 20px));
  background: linear-gradient(180deg, rgba(10, 14, 22, 0) 40%, rgba(10, 14, 22, .62) 100%);
}
.fc-hero-ov h1 { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.4px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.fc-hero-ov p { color: rgba(255, 255, 255, .92); margin-top: 8px; font-size: 15px; max-width: 640px; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
/* 数据条 */
.fc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  max-width: 1080px; margin: -28px auto 0; padding: 0 20px; position: relative; z-index: 2;
}
.fc-stat {
  background: var(--panel); border: 1px solid var(--border); padding: 18px 16px; text-align: center;
  box-shadow: var(--shadow);
}
.fc-stat:first-child { border-radius: 12px 0 0 12px; }
.fc-stat:last-child { border-radius: 0 12px 12px 0; }
.fc-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--accent); letter-spacing: -.3px; }
.fc-stat span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text2); }
.fc-body { padding-top: 8px; }
/* 图文格 */
.fc-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.fc-gallery-2 { grid-template-columns: 1fr 1fr; }
.fc-ph {
  margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.fc-ph img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.fc-ph figcaption { padding: 9px 14px; font-size: 12.5px; color: var(--text3); }
.fc-ph-wide { grid-column: 1 / -1; }
.fc-ph-wide img { aspect-ratio: 21 / 9; }
.fc-note { margin-top: 16px; font-size: 13.5px; }
/* 品质保障：左卡右图 */
.fc-qc { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 20px; align-items: stretch; }
.fc-qcgrid { grid-template-columns: 1fr 1fr; }
.fc-qcimg img { aspect-ratio: auto; height: 100%; min-height: 260px; }
@media (max-width: 900px) {
  .fc-qc { grid-template-columns: 1fr; }
  .fc-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fc-stat, .fc-stat:first-child, .fc-stat:last-child { border-radius: 12px; }
}
@media (max-width: 768px) {
  .fc-hero img { height: 300px; }
  .fc-hero { max-height: 300px; }
  .fc-hero-ov h1 { font-size: 25px; }
  .fc-gallery, .fc-gallery-2 { grid-template-columns: 1fr; }
}

/* ---------- 资讯页 news.html（火币社区风三栏 feed） ---------- */
.nw-layout { display: grid; grid-template-columns: 168px 1fr 264px; gap: 20px; margin-top: 24px; align-items: start; }
/* 左：分类 tab */
.nw-tabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.nw-tab {
  text-align: left; background: none; border: 0; border-radius: 9px; padding: 11px 14px;
  font-size: 14.5px; color: var(--text2); cursor: pointer; font-weight: 600;
}
.nw-tab:hover { background: var(--panel2); color: var(--text); }
.nw-tab.on { background: var(--gold-soft); color: var(--accent); }
/* 中：feed 卡片流 */
.nw-feed { display: flex; flex-direction: column; gap: 12px; }
.nw-card {
  display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; transition: border-color .15s, box-shadow .15s;
}
a.nw-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(1, 115, 229, .10); }
.nw-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  padding: 3px 9px; border-radius: 5px; margin-bottom: 8px;
}
.nw-tag-flash { color: var(--accent); background: var(--gold-soft); }
.nw-tag-notice { color: #b45309; background: rgba(245, 158, 11, .12); }
.nw-tag-news { color: var(--up); background: var(--up-bg); }
.nw-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.nw-card p { color: var(--text2); font-size: 13px; line-height: 1.65; margin-top: 6px; }
.nw-card time { display: block; margin-top: 10px; font-size: 12px; color: var(--text3); font-family: var(--mono); }
.nw-empty { color: var(--text3); font-size: 13px; padding: 30px 0; text-align: center; }
/* 右：侧栏 */
.nw-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.nw-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.nw-ph { font-size: 14px; font-weight: 800; }
.nw-psub { font-size: 12px; color: var(--text3); margin-top: 4px; }
.nw-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.nw-grades a {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 0;
  text-align: center; font-weight: 800; font-size: 14px; color: var(--text); font-family: var(--mono);
}
.nw-grades a:hover { color: var(--accent); border-color: var(--accent); }
.nw-links { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.nw-links a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text2); }
.nw-links a:hover { background: var(--panel2); color: var(--accent); }
@media (max-width: 980px) {
  .nw-layout { grid-template-columns: 1fr; }
  .nw-tabs { flex-direction: row; position: static; }
  .nw-side { position: static; }
}

/* ---------- 社区页 community.html（微博式单列帖子流，深浅色跟随整站） ---------- */
body.cm-page { height: auto; min-height: 100vh; overflow: auto; }
body.cm-page .footer { margin-top: auto; }
.cm-main { display: block; flex: 1; width: 100%; padding: 0; }
.cm-wrap { max-width: 680px; margin: 0 auto; padding: 30px 16px 48px; }
.cm-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.cm-sub { color: var(--text2); margin-top: 5px; font-size: 13.5px; }
/* feed 与加载动画 */
.cm-feed-wrap { position: relative; min-height: 220px; margin-top: 20px; }
.cm-loading { border-radius: 14px; }
.cm-feed { display: flex; flex-direction: column; gap: 14px; }
/* 帖子卡 */
.cm-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.cm-head { display: flex; align-items: center; gap: 11px; }
.cm-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.cm-avatar-txt {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 800;
}
.cm-avatar-sm { width: 28px; height: 28px; font-size: 13px; }
.cm-head-meta { display: flex; flex-direction: column; line-height: 1.3; }
.cm-head-meta b { font-size: 14.5px; }
.cm-head-meta time { font-size: 12px; color: var(--text3); }
.cm-text { margin-top: 11px; font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.cm-topic { color: var(--accent); font-weight: 600; }
/* 图片网格 */
.cm-imgs { display: grid; gap: 6px; margin-top: 11px; border-radius: 10px; overflow: hidden; }
.cm-imgs-1 { grid-template-columns: 1fr; }
.cm-imgs-2 { grid-template-columns: 1fr 1fr; }
.cm-imgs-3 { grid-template-columns: 1fr 1fr 1fr; }
.cm-imgs img {
  width: 100%; object-fit: cover; display: block; cursor: zoom-in;
  background: var(--panel2); border-radius: 8px; transition: filter .15s;
}
.cm-imgs img:hover { filter: brightness(1.06); }
.cm-imgs-1 img { max-height: 380px; }
.cm-imgs-2 img, .cm-imgs-3 img { aspect-ratio: 1 / 1; }
/* 底部互动行 */
.cm-foot { display: flex; gap: 22px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); }
.cm-stat { font-size: 13px; color: var(--text2); }
.cm-stat b { font-weight: 700; margin-left: 2px; }
/* 评论列表 */
.cm-cmts { margin-top: 12px; background: var(--panel2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.cm-cmt { display: flex; gap: 9px; }
.cm-cmt-body { min-width: 0; }
.cm-cmt-head { display: flex; align-items: baseline; gap: 8px; }
.cm-cmt-head b { font-size: 13px; }
.cm-cmt-head time { font-size: 11.5px; color: var(--text3); }
.cm-cmt-body p { font-size: 13px; color: var(--text2); line-height: 1.6; margin-top: 2px; word-break: break-word; }
/* 空态 / 加载更多 */
.cm-empty { text-align: center; padding: 56px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.cm-empty-ic { font-size: 34px; }
.cm-empty b { display: block; margin-top: 12px; font-size: 16px; }
.cm-empty p { color: var(--text3); font-size: 13px; margin-top: 5px; }
.cm-more {
  display: block; margin: 18px auto 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 30px; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--text2); cursor: pointer;
}
.cm-more:hover { color: var(--accent); border-color: var(--accent); }
/* news.html 搬家横幅 */
.nw-moved {
  display: flex; align-items: center; gap: 14px; margin-top: 22px;
  background: var(--gold-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 16px 18px;
}
.nw-moved .mi { font-size: 22px; }
.nw-moved b { font-size: 15px; }
.nw-moved p { color: var(--text2); font-size: 13px; margin-top: 2px; }
.nw-moved .go {
  margin-left: auto; flex: none; background: var(--accent); color: #fff; font-weight: 700;
  font-size: 13.5px; padding: 9px 20px; border-radius: 8px;
}
.nw-moved .go:hover { filter: brightness(1.12); }
@media (max-width: 560px) {
  .nw-moved { flex-wrap: wrap; }
  .nw-moved .go { margin-left: 0; }
}

/* ---------- Support 页 support.html（FAQ 手风琴 / 物流包装 / 联系我们） ---------- */
body.sp-page { height: auto; min-height: 100vh; overflow: auto; }
body.sp-page .footer { margin-top: auto; }
.sp-main { display: block; flex: 1; width: 100%; padding: 0; }
.sp-wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 48px; }
/* FAQ 手风琴（原生 details） */
.sp-faqs { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.sp-acc { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sp-acc summary {
  list-style: none; cursor: pointer; padding: 15px 18px; font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; user-select: none;
}
.sp-acc summary::-webkit-details-marker { display: none; }
.sp-acc summary::before { content: '▸'; color: var(--accent); font-size: 13px; transition: transform .18s; flex: none; }
.sp-acc[open] summary::before { transform: rotate(90deg); }
.sp-acc summary:hover { color: var(--accent); }
.sp-acc-body { padding: 0 18px 16px 40px; }
.sp-acc-body p { color: var(--text2); font-size: 13.5px; line-height: 1.7; }
.sp-ailink { color: var(--accent); font-weight: 700; white-space: nowrap; }
.sp-ailink:hover { text-decoration: underline; }
/* 物流区 */
.sp-loggrid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; margin-top: 20px; align-items: start; }
.sp-logimgs { margin-top: 0; }
.sp-mt { margin-top: 22px; }
.sp-cts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.sp-ct {
  background: var(--gold-soft); color: var(--accent); border-radius: 9px;
  padding: 9px 16px; font-weight: 800; font-size: 14px; font-family: var(--mono);
}
.sp-feats { margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sp-feats h3 { margin: 0 0 8px; }
.sp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-chips span {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 13px; font-weight: 700; font-size: 13px; font-family: var(--mono);
}
/* 联系我们卡片 */
.sp-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.sp-contact {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  transition: border-color .15s, box-shadow .15s;
}
a.sp-contact:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(1, 115, 229, .10); }
.sp-contact .ci { font-size: 26px; }
.sp-contact b { font-size: 15.5px; margin-top: 8px; }
.sp-contact p { color: var(--text2); font-size: 13px; }
.sp-wa { border-color: #25d36655; }
.sp-wa b { color: #25d366; }
a.sp-wa:hover { border-color: #25d366; box-shadow: 0 6px 18px rgba(37, 211, 102, .14); }
.sp-off { opacity: .62; cursor: default; }
@media (max-width: 768px) {
  .sp-loggrid { grid-template-columns: 1fr; }
  .sp-contacts { grid-template-columns: 1fr; }
}

/* ===== 产品中心 · 保护膜系列 ===== */
.pd-filmcard { cursor: zoom-in; }
.pd-card .pd-en { font-size: 12px; color: var(--text3); margin-top: 2px; letter-spacing: .2px; }

/* ===== 形态卡片真图缩略：近方图不切主体（contain + 4:3 容器 + 中性底色），装饰系列 .pd-thumb 保持 cover 不受影响 ===== */
.pd-formthumb { height: auto; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.pd-formthumb img { object-fit: contain; background: var(--panel2); }

/* ===== 2026-08-27 用户中心二期：顶栏头像下拉菜单（auth-topbar.js / app.js 登录态注入） ===== */
/* 👤圆(名字首字符,蓝底白字) + 名字 + 等级徽章 + ▾；下拉复用 .dropdown right 现有样式 */
.ub-btn {
  background: none; border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--tbf-text); padding: 5px 8px; border-radius: 8px; white-space: nowrap;
}
.ub-btn:hover, .nav-item:hover > .ub-btn { background: var(--tbf-hover); }
.uavatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.ub-name { font-size: 14px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ub-lv { font-size: 10.5px; font-weight: 700; color: var(--accent); background: rgba(47, 140, 255, .18); border-radius: 999px; padding: 1px 7px; }
.ub-btn i { font-style: normal; font-size: 10px; color: var(--tbf-text3); }
/* 移动端账号入口：注入汉堡菜单顶部，桌面隐藏 */
.mob-acct { display: none; }
@media (max-width: 768px) {
  .mob-acct { display: block; border-bottom: 1px solid var(--tbf-hover); margin-bottom: 4px; padding-bottom: 4px; }
  .mob-acct .nav-btn { width: 100%; text-align: left; }
  .mob-acct-links { display: flex; flex-direction: column; padding: 2px 0 4px 14px; }
  .mob-acct-links a { color: var(--tbf-text2); font-size: 13.5px; padding: 7px 10px; border-radius: 6px; }
  .mob-acct-links a:hover { background: var(--tbf-hover); color: var(--tbf-text); }
  /* 手机端用户入口收进汉堡菜单，顶栏不再放头像 */
  #userBox { display: none !important; }
}
