/* 全站公用：HiLo 的颜色变量（日间 / 夜间）+ 导航。
   颜色取自 hilo/app_spa.css 的 :root，看板、我的页和 K 线页用同一套，背景色一致。 */
:root {
  --bg: #ffffff;
  --bg-subtle: #f5f7fa;
  --card: #ffffff;
  --line: #eef1f5;
  --line-strong: #dfe3e8;
  --text: #0f172a;
  --muted: #8a93a3;
  --text-secondary: #334155;
  --surface-raised: #ffffff;
  --surface-soft: #f8fafc;
  --brand: #1e6fff;
  --brand-soft: #eaf1ff;
  --tone-red: #f5384e;
  --tone-green: #16b87a;
  --radius-card: 16px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.05);
  --site-nav-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --bg-subtle: #182233;
  --card: #1b2637;
  --line: #2e3b4e;
  --line-strong: #43536a;
  --text: #f1f5f9;
  --muted: #aab7c8;
  --text-secondary: #d6dfeb;
  --surface-raised: #1b2637;
  --surface-soft: #202d40;
  --brand: #76a7ff;
  --brand-soft: #1d355d;
  --tone-red: #fb7185;
  --tone-green: #4adea4;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.26), 0 8px 22px rgba(0, 0, 0, 0.22);
}

/* ---------- 桌面：顶部导航 ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: var(--site-nav-h);
  display: none; align-items: center; gap: 28px;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  background: var(--card); border-bottom: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.site-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 16px; font-weight: 900; text-decoration: none; letter-spacing: .01em; }
.site-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 900; }
.site-nav-tabs { display: flex; align-items: stretch; height: 100%; gap: 6px; }
.site-nav-tab { position: relative; display: flex; align-items: center; padding: 0 14px; color: var(--muted);
  font-size: 15px; font-weight: 800; text-decoration: none; }
.site-nav-tab:hover { color: var(--text); }
.site-nav-tab[aria-current="page"] { color: var(--text); }
.site-nav-tab[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--brand); }
.site-nav-me { margin-left: auto; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-secondary); font-size: 14px; font-weight: 800; text-decoration: none; }
.site-nav-me:hover, .site-nav-me[aria-current="page"] { border-color: var(--brand); color: var(--brand); }
.site-nav-me svg { width: 20px; height: 20px; }

/* ---------- 手机：底部菜单（HiLo .tabbar 的样子） ---------- */
.site-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: calc(58px + max(8px, env(safe-area-inset-bottom)));
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
  box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.site-tab { min-height: 48px; display: grid; place-items: center; gap: 3px; border-radius: 10px;
  color: #64748b; font-size: 12px; font-weight: 900; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:root[data-theme="dark"] .site-tab { color: var(--muted); }
.site-tab[aria-current="page"], :root[data-theme="dark"] .site-tab[aria-current="page"] { color: var(--brand); }
.site-tab-icon svg, .site-nav-me svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-tab-icon svg { width: 24px; height: 24px; }
body.sheet-open .site-tabbar { opacity: 0; pointer-events: none; }

@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .site-tabbar { display: none; }
}
