/* ==========================================================================
   TGVane · Telegram 风向标
   令牌 → 基础 → 布局 → 组件 → 页面 → 响应式
   ========================================================================== */

/* ---------- 1. 令牌 ---------- */
/* 基准值 = 浅色。不支持 light-dark() 的浏览器直接落在这里，不会出现黑字压深底。 */
:root {
  color-scheme: light;

  --a-1:  oklch(0.975 0.012 205);
  --a-2:  oklch(0.955 0.024 205);
  --a-3:  oklch(0.925 0.042 205);
  --a-6:  oklch(0.82 0.075 205);
  --a-8:  oklch(0.64 0.1 205);
  --a-9:  oklch(0.55 0.105 205);
  --a-10: oklch(0.5 0.11 205);
  --a-11: oklch(0.46 0.095 205);

  --n-1:  oklch(0.986 0.003 220);
  --n-2:  oklch(0.972 0.004 220);
  --n-3:  oklch(0.952 0.005 220);
  --n-4:  oklch(0.932 0.006 220);
  --n-6:  oklch(0.845 0.009 220);
  --n-7:  oklch(0.84 0.008 220);
  --n-11: oklch(0.49 0.012 220);
  --n-12: oklch(0.21 0.014 220);

  --bg: var(--n-1);
  --card: oklch(1 0 0);
  --card-2: var(--n-2);
  --line: var(--n-6);
  --line-soft: oklch(0.94 0.006 220);
  --on-accent: #fff;
  --text: var(--n-12);
  --muted: var(--n-11);
  --accent: var(--a-9);
  --accent-ink: var(--a-11);
  --accent-soft: var(--a-3);
  --accent-line: var(--a-6);
  --danger: oklch(0.55 0.19 27);
  --ok: oklch(0.52 0.12 160);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --pad: 20px;
  --header-h: 62px;
  --shadow-1: 0 1px 2px oklch(0.2 0.02 220 / 0.05);
  --shadow-2: 0 2px 4px oklch(0.2 0.02 220 / 0.05), 0 12px 28px -14px oklch(0.2 0.03 220 / 0.22);
  --focus: 0 0 0 3px color-mix(in oklab, var(--a-8) 45%, transparent);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

@supports (color: light-dark(#000, #fff)) {
  :root {
    color-scheme: light dark;
    --a-1:light-dark(oklch(0.975 0.012 205), oklch(0.205 0.028 205));
    --a-2:light-dark(oklch(0.955 0.024 205), oklch(0.245 0.038 205));
    --a-3:light-dark(oklch(0.925 0.042 205), oklch(0.285 0.05 205));
    --a-6:light-dark(oklch(0.82 0.075 205), oklch(0.42 0.07 205));
    --a-8:light-dark(oklch(0.64 0.1 205), oklch(0.6 0.095 202));
    --a-9:light-dark(oklch(0.55 0.105 205), oklch(0.74 0.095 200));
    --a-10:light-dark(oklch(0.5 0.11 205), oklch(0.79 0.09 200));
    --a-11:light-dark(oklch(0.46 0.095 205), oklch(0.82 0.075 200));
    --n-1:light-dark(oklch(0.986 0.003 220), oklch(0.158 0.008 220));
    --n-2:light-dark(oklch(0.972 0.004 220), oklch(0.188 0.009 220));
    --n-3:light-dark(oklch(0.952 0.005 220), oklch(0.222 0.01 220));
    --n-4:light-dark(oklch(0.932 0.006 220), oklch(0.256 0.011 220));
    --n-6:light-dark(oklch(0.845 0.009 220), oklch(0.35 0.013 220));
    --n-7:light-dark(oklch(0.84 0.008 220), oklch(0.36 0.013 220));
    --n-11:light-dark(oklch(0.49 0.012 220), oklch(0.735 0.012 220));
    --n-12:light-dark(oklch(0.21 0.014 220), oklch(0.955 0.006 220));
    --card:light-dark(oklch(1 0 0), oklch(0.196 0.009 220));
    --on-accent: light-dark(#fff, oklch(0.16 0.01 220));
    --line-soft:light-dark(oklch(0.94 0.006 220), oklch(0.245 0.01 220));
    --danger:light-dark(oklch(0.55 0.19 27), oklch(0.68 0.17 25));
    --ok:light-dark(oklch(0.52 0.12 160), oklch(0.72 0.12 160));
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 15px/1.62 var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  pointer-events: none;
  background: radial-gradient(120% 100% at 18% -30%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 62%);
  z-index: 0;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -0.022em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; }
kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 11px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in oklab, var(--accent) 26%, transparent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
[hidden] { display: none !important; }

/* 行动条 */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 28px;
  border: 1px solid var(--line-soft); border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--accent-soft), var(--card) 64%);
}
.cta h2 { font-size: 19px; letter-spacing: -0.025em; }
.cta p { margin-block-start: 6px; font-size: 13px; color: var(--muted); max-width: 52ch; }
@media (max-width: 620px) {
  .cta { flex-direction: column; align-items: flex-start; padding: 20px; }
}

/* ---------- 3. 布局 ---------- */
.wrap {
  width: 100%;
  max-width: clamp(1180px, 88vw, 1720px);
  margin-inline: auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 1;
}
.page { padding-block: 40px 72px; }
.page--tight { padding-block: 28px 64px; }
.section { margin-block-start: 56px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-block-end: 18px;
}
.section-head h2 { font-size: 19px; letter-spacing: -0.024em; }
.section-head p { color: var(--muted); font-size: 13px; }
.section-head .more { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-head .more:hover { color: var(--accent-ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: currentColor; opacity: 0.6; }
.hairline { height: 1px; background: var(--line-soft); border: 0; margin-block: 0; }

/* ---------- 4. 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-block-end: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, backdrop-filter 0.2s;
}
.site-header.is-stuck {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-block-end-color: var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font-size: 16px; font-weight: 700; letter-spacing: -0.03em; }
.brand-text span { font-size: 10px; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 8px; }
.main-nav a {
  padding: 7px 11px; border-radius: 8px;
  font-size: 14px; color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--card-2); }
.main-nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--card-2); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); color: var(--muted);
  font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.search-trigger:hover { border-color: var(--line); color: var(--text); }
.search-trigger svg { width: 15px; height: 15px; flex: none; }
.search-trigger .kbd-hint { margin-inline-start: 10px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); color: var(--muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn--plain { border-color: transparent; background: none; }

/* ---------- 5. 按钮 / 徽标 / 头像 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
}
.btn:hover { background: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn--soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn--soft:hover { background: color-mix(in oklab, var(--accent) 22%, var(--card)); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--card-2); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px;
  border-radius: 99px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  color: oklch(0.42 0.09 var(--bh, 205));
  background: oklch(0.955 0.032 var(--bh, 205));
  white-space: nowrap;
}
:root[data-theme="dark"] .badge { color: oklch(0.85 0.075 var(--bh, 205)); background: oklch(0.28 0.045 var(--bh, 205)); }
.badge[data-type="channel"] { --bh: 205; }
.badge[data-type="group"] { --bh: 158; }
.badge[data-type="bot"] { --bh: 272; }
.badge--quiet { --bh: 220; font-weight: 500; }
.badge--18 { --bh: 25; font-weight: 700; letter-spacing: 0.02em; }
.adult-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-block-start: 14px; padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12px; line-height: 1.65;
  color: oklch(0.45 0.13 25);
  background: oklch(0.965 0.028 25);
  border: 1px solid oklch(0.9 0.05 25);
}
:root[data-theme="dark"] .adult-note {
  color: oklch(0.84 0.085 25);
  background: oklch(0.255 0.038 25);
  border-color: oklch(0.36 0.06 25);
}
.adult-note svg { flex: none; margin-block-start: 1px; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--quiet::before { display: none; }

.avatar {
  --h: 205;
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  color: oklch(0.4 0.09 var(--h));
  background: oklch(0.94 0.035 var(--h));
  box-shadow: inset 0 0 0 1px oklch(0.88 0.045 var(--h));
  overflow: hidden;
}
:root[data-theme="dark"] .avatar {
  color: oklch(0.88 0.07 var(--h));
  background: oklch(0.3 0.04 var(--h));
  box-shadow: inset 0 0 0 1px oklch(0.36 0.045 var(--h));
}
.avatar--sm { width: 34px; height: 34px; border-radius: 10px; font-size: 12.5px; }
.avatar--lg { width: 68px; height: 68px; border-radius: 19px; font-size: 23px; }
.avatar > img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-ini { position: relative; z-index: 0; }

/* ---------- 6. 搜索 ---------- */
.searchbox {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchbox:focus-within { border-color: var(--accent-line); box-shadow: var(--focus); }
.searchbox svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.searchbox input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none;
  font: inherit; font-size: 15px; color: var(--text);
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox .btn { flex: none; }

.quick-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-block-start: 12px; }
.quick-tags a {
  padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--line-soft); background: var(--card);
  font-size: 12.5px; color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.quick-tags a:hover { color: var(--accent-ink); border-color: var(--accent-line); }

/* ---------- 7. 首页 Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: clamp(40px, 4vw, 72px); align-items: center; padding-block: 44px 12px; }
.hero h1 {
  margin-block: 12px 28px;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .searchbox { margin-block-start: 0; max-width: 680px; }
.hero-stats { display: flex; gap: 22px; margin-block-start: 22px; }
.hero-stats div { display: grid; gap: 1px; }
.hero-stats b { font: 600 17px/1.2 var(--font-mono); letter-spacing: -0.03em; }
.hero-stats span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }

/* 推荐卡片 */
.promo-stack { display: grid; gap: 10px; align-content: center; }
.promo {
  display: grid; gap: 6px;
  padding: 15px 17px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-1);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.promo:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.promo-head { display: flex; align-items: baseline; gap: 8px; }
.promo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.promo-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.promo-score { margin-inline-start: auto; font: 600 15px var(--font-mono); letter-spacing: -0.02em; color: var(--text); }
.promo-score small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.promo h3 { font-size: 15.5px; line-height: 1.4; letter-spacing: -0.015em; }
.promo-lead { font-size: 12.8px; line-height: 1.55; font-weight: 500; color: var(--text); }
.promo-desc { font-size: 12px; line-height: 1.6; color: var(--muted); }
.promo-more { margin-block-start: 3px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.promo:hover .promo-more { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 8. 分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
/* 数量不定的分类入口用 flex 铺满，末行自动拉伸，不留空格 */
.cat-grid--flex { display: flex; flex-wrap: wrap; }
.cat-grid--flex .cat { flex: 1 1 210px; min-width: 0; }
/* 正好 9 个分类时，五列布局最后一块占两格，避免行尾空一格 */
.cat-grid > :nth-child(9):last-child { grid-column: span 2; }
.cat {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--card);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.cat:hover { border-color: var(--accent-line); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.cat-ico {
  display: grid; place-items: center; flex: none;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent);
  width: 34px; height: 34px; border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.cat-ico svg { width: 23px; height: 23px; }
.cat-text { min-width: 0; }
.cat-text b { display: block; font-size: 14px; font-weight: 600; }
.cat-meta { display: block; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 9. 条目卡 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 318px), 1fr)); gap: 12px; }
.entry-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--card);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.entry:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.entry-body { min-width: 0; display: grid; gap: 5px; }
.entry-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.entry-title .badge { flex: none; }
.entry-title .badge { flex: none; }
.entry-title b {
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.012em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entry-desc {
  font-size: 12.8px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
}
.entry-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); }
.entry-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.entry-meta .subs { color: var(--text); font-weight: 500; }
.entry--row { grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; padding: 12px 14px; }
.entry--row .entry-desc { display: none; }
.entry--row .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
.entry--row .chev { color: var(--line); }

/* ---------- 10. 列表页 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-block-end: 18px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.03em; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-block-start: 6px; }
.page-head .count { font: 500 12px var(--font-mono); color: var(--muted); white-space: nowrap; }

.toolbar {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding-block: 12px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--line-soft);
}
.seg {
  position: relative; display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-2);
}
.seg a, .seg button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 12px;
  border: 0; border-radius: 7px; background: none;
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap;
  transition: color 0.15s;
}
.seg a[aria-current="page"], .seg button[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.seg-ind {
  position: absolute; top: 3px; bottom: 3px; left: 0;
  border-radius: 7px; background: var(--card);
  box-shadow: 0 1px 2px oklch(0.2 0.02 220 / 0.1), 0 0 0 1px var(--line-soft);
  transition: transform 0.28s var(--ease), width 0.28s var(--ease);
  pointer-events: none;
}
.toolbar .grow { flex: 1; }
.select {
  height: 34px; padding: 0 28px 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23888' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center / 12px;
  font: inherit; font-size: 13px; color: var(--text);
  appearance: none; cursor: pointer;
}
.select:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--accent-line); }
.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 12px 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line-soft); border-radius: 99px;
  background: var(--card); color: var(--muted);
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--line); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); font-weight: 600; }
.chip em { font-style: normal; opacity: 0.6; margin-inline-start: 4px; font-family: var(--font-mono); font-size: 11px; }
.results-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px 12px; font-size: 12.5px; color: var(--muted); }
.results-meta b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.load-more { display: grid; place-items: center; margin-block-start: 24px; }
.empty { padding: 64px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-block-end: 4px; }

/* ---------- 11. 详情页 ---------- */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding-block: 18px; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: 0.5; }
.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start;
  max-width: 1200px; margin-inline: auto;
}
.detail--form { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.detail-card {
  padding: 22px;
  border: 1px solid var(--line-soft); border-radius: var(--r-xl);
  background: var(--card);
}
.detail-top { display: flex; gap: 16px; align-items: flex-start; }
.detail-top h1 { font-size: clamp(21px, 2.6vw, 27px); line-height: 1.25; letter-spacing: -0.03em; }
.detail-handle { font: 400 13px var(--font-mono); color: var(--muted); margin-block-start: 5px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-block-start: 20px; background: var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.stats div { padding: 12px 14px; background: var(--card); display: grid; gap: 2px; }
.stats small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats b { font: 600 15px var(--font-mono); letter-spacing: -0.02em; white-space: nowrap; }
.detail-section { margin-block-start: 26px; }
.detail-section h2 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; margin-block-end: 10px; }
.prose { font-size: 14px; line-height: 1.78; color: var(--text); white-space: pre-wrap; word-break: break-word; max-width: 66ch; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: currentColor; }
.aside-card { padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--card); }
.aside-card h2 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-block-end: 10px; }
.rel { display: grid; gap: 2px; }
.rel a { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 9px; }
.rel a:hover { background: var(--card-2); }
.rel b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel small { display: block; font-size: 11px; color: var(--muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-list { display: grid; gap: 8px; font-size: 12.5px; max-width: 560px; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-family: var(--font-mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sticky-cta { display: none; }

/* ---------- 12. 榜单 ---------- */
.rank-list { display: grid; gap: 0; border-block-start: 1px solid var(--line-soft); }
.rank-row {
  display: grid; grid-template-columns: 38px 34px minmax(0, 1fr) 132px;
  align-items: center; gap: 12px;
  padding: 13px 4px;
  border-block-end: 1px solid var(--line-soft);
  transition: background 0.15s;
}
.rank-row:hover { background: color-mix(in oklab, var(--card) 60%, transparent); }
.rank-no { font: 500 13px var(--font-mono); color: var(--muted); text-align: center; }
.rank-no.top { color: var(--accent-ink); font-weight: 700; }
.rank-main { min-width: 0; }
.rank-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rank-title .badge { flex: none; }
.rank-main b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-main small { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { width: 132px; display: grid; gap: 4px; justify-items: end; }
.rank-bar span { font: 500 11px var(--font-mono); color: var(--muted); }
.rank-bar i { display: block; width: 100%; height: 4px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.rank-bar i::after { content: ""; display: block; height: 100%; width: var(--w, 40%); border-radius: 99px; background: var(--accent); opacity: 0.85; }

/* ---------- 13. 输入与投稿 ---------- */
.form-card { max-width: 660px; padding: 26px 24px; border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: var(--card); }
.input {
  width: 100%; padding: 10px 12px; height: 42px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--focus); }

.submit-status {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 20px; padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.6;
  color: var(--accent-ink); background: var(--accent-soft);
}
.submit-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.submit-h2 { font-size: 16px; letter-spacing: -0.01em; margin-block-end: 8px; }
.submit-p { font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.submit-p a { color: var(--accent-ink); }
.submit-p--dim { margin-block-start: 18px; font-size: 12px; line-height: 1.7; }
.submit-list { display: grid; gap: 9px; margin: 14px 0 22px; padding: 0; list-style: none; }
.submit-list li { position: relative; padding-inline-start: 14px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.submit-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.submit-list b { color: var(--text); font-weight: 600; }

/* ---------- 14. 关于 / 页脚 ---------- */
.prose-block { max-width: 720px; display: grid; gap: 16px; font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.prose-block h2 { font-size: 16px; color: var(--text); margin-block-start: 12px; }
.prose-block strong { color: var(--text); font-weight: 600; }
.prose-block ul { display: grid; gap: 6px; padding-inline-start: 18px; list-style: disc; }
.prose-block a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.site-footer { margin-block-start: 72px; border-block-start: 1px solid var(--line-soft); padding-block: 32px 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: grid; gap: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12.5px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-cats {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin-block-start: 22px; padding-block-start: 16px;
  border-block-start: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.footer-cats span { font: 500 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.footer-cats a { color: var(--muted); }
.footer-cats a:hover { color: var(--accent-ink); }
.footer-legal { margin-block-start: 26px; padding-block-start: 18px; border-block-start: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- 15. 底部标签栏（移动端） ---------- */
.tabbar {
  position: fixed; z-index: 50;
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(520px, calc(100% - 20px));
  display: none;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in oklab, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 30px -12px oklch(0.2 0.03 220 / 0.35);
}
.tabbar-inner { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); }
.tab-ind {
  position: absolute; top: 0; bottom: 0; left: 0; width: 20%;
  border-radius: 17px;
  background: var(--accent-soft);
  transition: transform 0.34s var(--ease), width 0.34s var(--ease);
  pointer-events: none;
}
.tab {
  position: relative; z-index: 1;
  display: grid; place-items: center; gap: 3px;
  padding: 7px 0 6px;
  border: 0; background: none; cursor: pointer;
  color: var(--muted);
  transition: color 0.18s, transform 0.12s;
}
.tab svg { width: 20px; height: 20px; }
.tab span { font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; }
.tab[aria-current="page"] { color: var(--accent-ink); }
.tab[aria-current="page"] svg { stroke-width: 2.1; }
.tab:active { transform: scale(0.94); }

/* ---------- 16. 搜索弹层 ---------- */
.search-dialog {
  width: min(640px, calc(100vw - 24px));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: 0 24px 60px -20px oklch(0.15 0.02 220 / 0.45);
  color: var(--text);
}
.search-dialog::backdrop { background: oklch(0.15 0.02 220 / 0.42); backdrop-filter: blur(3px); }
.search-dialog[open] { animation: pop 0.18s var(--ease); }
.sd-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-block-end: 1px solid var(--line-soft); }
.sd-head svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.sd-head input { flex: 1; min-width: 0; height: 30px; border: 0; outline: none; background: none; font: inherit; font-size: 15px; color: var(--text); }
.sd-head input::placeholder { color: var(--muted); }
.sd-body { max-height: min(56vh, 440px); overflow-y: auto; padding: 8px; }
.sd-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; }
.sd-item:hover, .sd-item[aria-selected="true"] { background: var(--accent-soft); }
.sd-item b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-item small { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.sd-foot { display: flex; gap: 14px; padding: 9px 14px; border-block-start: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); }
.sd-foot kbd { font-size: 10px; }

/* ---------- 17. 动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.reveal { animation: rise 0.5s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: 0.03s; }
.reveal:nth-child(3) { animation-delay: 0.06s; }
.reveal:nth-child(4) { animation-delay: 0.09s; }
.reveal:nth-child(5) { animation-delay: 0.12s; }
.reveal:nth-child(6) { animation-delay: 0.15s; }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid > :nth-child(9):last-child { grid-column: auto; }
  .hero { gap: 36px; }
  .detail { grid-template-columns: minmax(0, 1fr) 340px; }
}

@media (max-width: 900px) {
  :root { --header-h: 56px; }
  body { padding-block-end: 92px; }
  body.has-sticky-cta { padding-block-end: 150px; }
  .site-footer { display: none; }
  .tabbar { display: block; }
  .main-nav { display: none; }
  .header-inner { gap: 12px; }
  .brand-text span { display: none; }
  .search-trigger { width: 34px; padding: 0; justify-content: center; border-radius: 99px; }
  .search-trigger .label, .search-trigger .kbd-hint { display: none; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 26px 8px; }
  .hero h1 { font-size: clamp(29px, 7.4vw, 38px); }
  .promo-stack { order: 2; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid > :nth-child(9):last-child { grid-column: span 2; }
  .detail, .detail--form { grid-template-columns: 1fr; gap: 22px; }
  .sticky-cta {
    position: fixed; z-index: 45;
    left: 12px; right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    display: flex; gap: 8px;
  }
  .sticky-cta .btn { flex: 1; height: 44px; box-shadow: var(--shadow-2); }
  .detail-actions { display: none; }
  .rank-bar { width: 86px; }
  .toolbar { top: var(--header-h); flex-wrap: wrap; }
  .toolbar .grow { display: none; }
}

@media (max-width: 620px) {
  :root { --pad: 16px; }
  .entry-grid, .entry-grid--2 { grid-template-columns: 1fr; }
  .page { padding-block: 26px 48px; }
  .section { margin-block-start: 40px; }
  .section-head h2 { font-size: 17px; }
  .hero-stats { gap: 16px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .rank-row { grid-template-columns: 30px 40px minmax(0, 1fr); gap: 10px; }
  .rank-bar { display: none; }
  .rank-row .badge { display: none; }
  .search-dialog { margin-block-start: 6vh; }
  .detail-card { padding: 16px; }
  .stats b { font-size: 12.5px; }
  .stats div { padding: 10px 10px; }
  .detail-top { gap: 12px; }
  .avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; }
  .form-card { padding: 18px; }
  .footer-inner { gap: 20px; }
}

/* ---------- 19. 宽屏 ---------- */
@media (min-width: 1440px) {
  .rank-row { grid-template-columns: 38px 34px minmax(0, 1fr) 176px; }
  .rank-bar { width: 176px; }
  .search-dialog { width: min(720px, calc(100vw - 24px)); }
}

@media (min-width: 1500px) {
  .entry-grid--2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1700px) {
  .cat-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .cat-grid > :last-child { grid-column: auto; }
}

@media (min-width: 1700px) {
  .hero h1 { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
