/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  /* default: Stone Light(shadcn 风格护眼配色)
     - bg 不是纯白,off-white 减少 OLED 屏对比度撕裂
     - ink 偏暖的接近黑,长时间阅读不累
     - highlight 红色降一档饱和度,不"喊" */
  --bg:           #fafaf9;
  --surface:      #ffffff;
  --surface-2:    #f5f5f4;
  --ink:          #1c1917;
  --ink-soft:     #292524;
  --muted:        #78716c;
  --muted-soft:   #a8a29e;
  --line:         #e7e5e4;
  --line-soft:    #f0efee;
  --accent:       #1c1917;
  --accent-inv:   #ffffff;
  --highlight:    #b91c1c;       /* 单点红,用于"新"/动作 */
  --shadow-soft:  0 1px 0 rgba(28,25,23,.04);
  --shadow-hover: 0 8px 30px -12px rgba(28,25,23,.18);

  --font-display: "LXGW WenKai", "LXGW WenKai Screen", "Noto Serif SC", "PingFang SC", "Hiragino Sans GB", serif;
  --font-body:    "LXGW WenKai Screen", "LXGW WenKai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-ui:      -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;

  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    14px;

  --gap-card:     22px;
  --col-min:      230px;

  --header-h:     64px;
  --max-w:        1440px;
  --content-w:    1280px;
  --pad-x:        clamp(20px, 4vw, 56px);
}

/* Themes */
[data-theme="paper"] {
  --bg:        #f6f3ec;
  --surface:   #fbf8f1;
  --surface-2: #efeadf;
  --ink:       #1d1a14;
  --ink-soft:  #2b2620;
  --muted:     #7a7466;
  --muted-soft:#9a948a;
  --line:      #e3dcca;
  --line-soft: #eee8d8;
  --accent:    #1d1a14;
  --highlight: #b8410e;
}
[data-theme="ink"] {
  --bg:        #0a0a0b;
  --surface:   #131316;
  --surface-2: #1c1c20;
  --ink:       #f4f4f5;
  --ink-soft:  #d4d4d8;
  --muted:     #8b8b94;
  --muted-soft:#5e5e66;
  --line:      #27272a;
  --line-soft: #1e1e22;
  --accent:    #f4f4f5;
  --accent-inv:#0a0a0a;
  --highlight: #f87171;
  --shadow-soft: 0 1px 0 rgba(255,255,255,.03);
  --shadow-hover: 0 8px 30px -12px rgba(0,0,0,.8);
}
[data-theme="zinc"] {
  --bg:        #ededf0;
  --surface:   #fafafa;
  --surface-2: #e4e4e7;
  --ink:       #18181b;
  --muted:     #52525b;
  --line:      #d4d4d8;
  --line-soft: #dcdce0;
  --accent:    #18181b;
}

/* density */
[data-density="cozy"]      { --gap-card: 28px; --col-min: 260px; }
[data-density="comfortable"]{ --gap-card: 22px; --col-min: 230px; }
[data-density="compact"]   { --gap-card: 14px; --col-min: 190px; }

/* font family override */
[data-font="wenkai"] body  { font-family: var(--font-body); }
[data-font="serif"] body   { font-family: "Noto Serif SC", "Source Han Serif SC", serif; }
[data-font="serif"]        { --font-display: "Noto Serif SC", "Source Han Serif SC", serif; }
[data-font="sans"] body    { font-family: var(--font-ui); }
[data-font="sans"]         { --font-display: var(--font-ui); }

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--accent-inv); }

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hd-row {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--header-h);
  display: flex; align-items: center; gap: 36px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; font-family: var(--font-display);
  white-space: nowrap;
  text-decoration: none;
}
/* 图片 LOGO: 自适应高度 32px,等比缩放;任何上传尺寸都不会撑破 header */
.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
/* 双模式 LOGO: light 在浅色主题显示,dark 在深色主题显示 */
.brand-logo-light { display: block; }
.brand-logo-dark  { display: none; }
[data-theme="ink"] .brand-logo-light { display: none; }
[data-theme="ink"] .brand-logo-dark  { display: block; }
/* 若 dark 版本加载失败 → 退到 light 版本 */
.brand-logo-light.brand-logo-fallback-all { display: block !important; }
.brand-mark {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-sub { white-space: nowrap; }
.brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--highlight);
  display: inline-block; transform: translateY(-2px);
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: .72rem; color: var(--muted);
  letter-spacing: .04em;
}

.cat-rail {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  flex: 1;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-link {
  padding: 7px 12px;
  font-size: .92rem;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 999px;
  transition: color .15s, background .15s;
  position: relative;
  flex-shrink: 0;
}
.cat-link:hover { color: var(--ink); }
.cat-link.active {
  color: var(--accent-inv);
  background: var(--accent);
}

.hd-actions {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; stroke-width: 1.6; }

/* Sub nav */
.sub-rail-wrap {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.sub-rail {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex; gap: 24px;
  overflow-x: auto; scrollbar-width: none;
  height: 44px; align-items: center;
}
.sub-rail::-webkit-scrollbar { display: none; }
.sub-link {
  font-size: .85rem; color: var(--muted);
  white-space: nowrap;
  padding: 12px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
.sub-link:hover { color: var(--ink); }
.sub-link.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ─── Layout shell ────────────────────────────────────────── */
.shell {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--pad-x);
}
.shell-narrow {
  max-width: 820px; margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ─── Page header ─────────────────────────────────────────── */
.page-head {
  padding: 40px 0 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.page-head-l { display: flex; flex-direction: column; gap: 10px; }
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700; letter-spacing: -.02em;
  line-height: 1.1;
}
.page-desc {
  font-size: .95rem; color: var(--muted);
  max-width: 56ch;
}
.page-head-r {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono);
  font-size: .78rem; color: var(--muted);
}
.page-head-r b { color: var(--ink); font-weight: 500; }

/* ─── Tag filter ──────────────────────────────────────────── */
.tag-bar {
  display: flex; align-items: center; gap: 10px;
  margin: -10px 0 20px;
  font-family: var(--font-mono);
  font-size: .78rem; color: var(--muted);
}
.tag-bar .active-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--ink); color: var(--accent-inv);
  border-radius: 999px;
}
.tag-bar .clear-tag {
  color: var(--muted);
  transition: color .15s;
}
.tag-bar .clear-tag:hover { color: var(--ink); }

/* ─── 标签云 (tag_cloud_bar) ─────────────────────────────── */
.tag-cloud {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px;
  margin: -4px 0 24px;
  padding: 12px 14px;
  background: var(--surface-2, #f7f5ef);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tag-cloud-h {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-right: 4px;
}
.tag-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 10px;
  font-size: .82rem;
  color: var(--ink);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.tag-chip:hover {
  background: var(--ink);
  color: var(--accent-inv, #fff);
  border-color: var(--ink);
}
.tag-chip .tc-count {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tag-chip:hover .tc-count { color: color-mix(in oklab, var(--accent-inv) 80%, transparent); }
.tag-chip-active {
  background: var(--ink);
  color: var(--accent-inv, #fff);
  border-color: var(--ink);
}
.tag-chip-active .tc-count { color: color-mix(in oklab, var(--accent-inv) 80%, transparent); }
.tag-chip-clear {
  border-style: dashed;
  color: var(--muted);
}
.tag-chip-clear:hover { color: var(--accent-inv, #fff); }

/* ─── Masonry ─────────────────────────────────────────────── */
.masonry {
  column-count: 5;
  column-gap: var(--gap-card);
  padding-bottom: 80px;
}
@media (max-width: 1400px) { .masonry { column-count: 4; } }
@media (max-width: 1100px) { .masonry { column-count: 3; } }
@media (max-width: 720px)  { .masonry { column-count: 2; column-gap: 10px; } }
@media (max-width: 420px)  { .masonry { column-count: 2; column-gap: 8px; } }

.masonry > * {
  break-inside: avoid;
  margin-bottom: var(--gap-card);
}

/* Card variants */
.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

[data-card="bare"] .card { background: transparent; }
[data-card="bare"] .card .card-body { padding: 10px 2px 0; }
[data-card="bordered"] .card { border: 1px solid var(--line); background: var(--surface); }
[data-card="polaroid"] .card { background: var(--surface); padding: 8px 8px 0; border: 1px solid var(--line); }
[data-card="polaroid"] .card .card-thumb { border-radius: 6px; }
[data-card="polaroid"] .card .card-body { padding: 12px 6px 14px; }

.card-thumb {
  position: relative;
  width: 100%;
  background: var(--surface-2);
  overflow: hidden;
}
/* 图片/视频按原始比例铺;最大限制防止极端竖屏把卡撑过头 */
.card-thumb img,
.card-thumb video {
  display: block;
  width: 100%; height: auto;
  max-height: 640px;
  object-fit: cover;          /* 当被 max-height 截断时居中裁切 */
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.card-thumb .ph {
  width: 100%;
  aspect-ratio: 4/3;          /* 纯占位仍维持比例,免得空卡塌陷 */
  display: flex; align-items: center; justify-content: center;
}
.card:hover .card-thumb img,
.card:hover .card-thumb video,
.card:hover .card-thumb .ph { transform: scale(1.03); }

/* Placeholder (striped + tag) */
.ph {
  display: flex; align-items: flex-end;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.85);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,.06) 0 14px,
      rgba(255,255,255,0) 14px 28px);
}
.ph-label { mix-blend-mode: normal; }

.media-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(6px);
  color: #fafafa;
  font-family: var(--font-mono);
  font-size: .68rem;
  padding: 3px 8px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 5px;
}
.video-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.video-icon .play {
  width: 46px; height: 46px;
  background: rgba(255,255,255,.92);
  color: #0a0a0a;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; padding-left: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.card-text {
  font-family: var(--font-display);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
}
.card-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted-soft);
}

/* Text-only card */
.card-text-only .card-thumb { display: none; }
.card-text-only {
  padding: 22px 22px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.card-text-only .quote {
  font-family: var(--font-display);
  font-size: 1.05rem; line-height: 1.7;
  color: var(--ink-soft);
  position: relative;
}
.card-text-only .quote::before {
  content: "“";
  font-size: 2.2rem;
  line-height: 0;
  position: relative; top: 0.4em; margin-right: 4px;
  color: var(--muted-soft);
}
[data-card="bare"] .card-text-only { border: none; padding: 14px 4px; }

/* ─── Homepage hero ───────────────────────────────────────── */
.hero {
  padding: 20px 0 28px;
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 20px; padding: 12px 0 20px; } }

.hero-l { display: flex; flex-direction: column; gap: 16px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--highlight) 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: .4; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  color: var(--ink);
}
.hero-title em {
  font-style: normal;
  color: var(--muted-soft);
}
.hero-sub {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 56ch;
}
.hero-stats {
  display: flex; gap: 28px; margin-top: 4px;
  font-family: var(--font-mono);
}
.hero-stat .v {
  font-size: 1.5rem; font-weight: 500;
  color: var(--ink); letter-spacing: -.01em;
  font-feature-settings: "tnum";
}
.hero-stat .l {
  font-size: .7rem; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase;
}

.hero-r { position: relative; }
.hero-feature-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.hero-feature-thumb {
  aspect-ratio: 4/3;
  background: var(--surface-2);
}
.hero-feature-body {
  padding: 20px;
}
.hero-feature-cat {
  font-family: var(--font-mono);
  font-size: .7rem; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Section block on homepage */
.section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head-l {
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap; row-gap: 6px;
  min-width: 0;
}
.section-num {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .08em;
  white-space: nowrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.section-desc {
  font-size: .82rem; color: var(--muted);
  font-family: var(--font-mono);
}
.section-more {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: gap .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.section-more:hover { gap: 10px; }

/* Strip layout — 4-col scroll row */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card);
}
@media (max-width: 1100px) { .strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .strip { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.strip .card-thumb { aspect-ratio: 1/1; }

/* Editorial 2-col block */
.edit-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) { .edit-row { grid-template-columns: 1fr; gap: 28px; } }

.edit-list { display: flex; flex-direction: column; }
.edit-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.edit-item:last-child { border-bottom: none; }
.edit-num {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .08em;
}
.edit-h {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}
.edit-excerpt {
  font-size: .85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.edit-date {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Board list ──────────────────────────────────────────── */
.list-narrow {
  display: flex; flex-direction: column;
  padding-bottom: 80px;
}
.list-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.list-item:hover { background: var(--surface-2); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.list-item-h {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.4;
  margin-bottom: 6px;
}
.list-item-excerpt {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-item-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.list-item-meta > * { white-space: nowrap; }
.list-item-meta .pill {
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.list-item-arrow {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  transition: transform .15s, color .15s;
}
.list-item:hover .list-item-arrow { color: var(--ink); transform: translateX(4px); }

/* ─── Detail ──────────────────────────────────────────────── */
.detail-shell {
  padding: 28px 0 80px;
  max-width: 760px;
  margin: 0 auto;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  margin-bottom: 32px;
}
.crumbs a { transition: color .15s; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--muted-soft); }

.detail-eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.detail-meta .channel { color: var(--ink); }

.detail-media {
  display: grid; gap: 6px;
  margin-bottom: 32px;
}
.detail-media.g-1 { grid-template-columns: 1fr; }
.detail-media.g-2 { grid-template-columns: 1fr 1fr; }
.detail-media.g-3 { grid-template-columns: 1fr 1fr 1fr; }
.detail-media.g-4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.detail-media .m {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1/1;
}
.detail-media.g-1 .m { aspect-ratio: auto; max-height: 78vh; }
.detail-media .m img, .detail-media .m .ph {
  width: 100%; height: 100%; object-fit: cover;
}

.detail-prose,
.post-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--ink-soft);
  /* pre-wrap 让 \n 自然换行,无需依赖 <br>(避免对原文做 | safe 输出引入 XSS) */
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-prose p + p { margin-top: 1.2em; }

.detail-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px;
}
.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.tag-pill:hover { color: var(--ink); border-color: var(--ink); }
.tag-pill::before { content: "#"; margin-right: 2px; opacity: .5; }

.detail-pager {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.pager-link {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  max-width: 45%;
}
.pager-link span:first-child { letter-spacing: .1em; text-transform: uppercase; }
.pager-link span:last-child {
  font-family: var(--font-display);
  color: var(--ink); font-size: .95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pager-link.next { text-align: right; align-items: flex-end; }

/* Board CTAs */
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 32px;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: var(--ink); color: var(--accent-inv);
  font-family: var(--font-display);
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.cta-btn:hover { opacity: .85; transform: translateY(-2px); }
.cta-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.cta-btn.ghost:hover { border-color: var(--ink); background: transparent; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,11,.84);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; }

.modal-shell {
  display: flex; align-items: center; gap: 18px;
  width: 100%; max-width: 1120px;
}
.modal-feed-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  font-size: 1.1rem;
}
.modal-feed-btn:hover { background: rgba(255,255,255,.18); transform: scale(1.05); }
.modal-feed-btn:disabled { opacity: .2; }

.modal-card {
  flex: 1; min-width: 0;
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  /* 媒体列加宽:横屏视频/大图更舒展;info 列给 minmax 下限保证评论区不被挤窄 */
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .82fr);
  max-height: 88vh;
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.modal-media {
  background: #000;
  display: flex; align-items: center; justify-content: center;
  min-height: 360px;
  max-height: 88vh;
  position: relative;
  overflow: hidden;
}
/* 视频/图片按比例铺,不强行撑到 100%(避免 controls 浮在容器底部远离视频本体) */
.modal-media img,
.modal-media video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}
.modal-media .ph {
  width: 100%; height: 100%; min-height: inherit;
  display: flex; align-items: center; justify-content: center;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  z-index: 12;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(10,10,10,.6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(10,10,10,.85); }

.modal-info {
  display: flex; flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.modal-info-head {
  padding: 22px 26px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.modal-channel {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink);
}
.channel-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink); color: var(--accent-inv);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: .85rem; font-weight: 600;
  overflow: hidden;  /* logo 图填满圆框时,边角不溢出 */
}
.modal-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.modal-channel .ts {
  font-size: .72rem;
  color: var(--muted);
}
.modal-info-body {
  flex: 1; overflow-y: auto;
  padding: 18px 26px 22px;
}
.modal-text {
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.85;
  color: var(--ink-soft);
  white-space: pre-wrap;
  margin-bottom: 18px;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── 互动: 点赞 + 评论 ─────────────────────────────── */
.modal-actions {
  display: flex; gap: 12px; align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.modal-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--ink);
  font-size: .9rem;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
}
.modal-action:hover { background: var(--surface-2, #f6f5ef); }
.modal-action:disabled { opacity: .5; cursor: wait; }
.modal-action .ic { font-size: 1.05rem; line-height: 1; }
.modal-action .cnt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.modal-action.like-btn.active {
  background: #e03131; color: #fff; border-color: #e03131;
}
.modal-action.like-btn.active:hover { background: #c92a2a; }
.modal-action.like-btn.active:active { transform: scale(.95); }

.modal-comments {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.modal-comments .cmt-head {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.modal-comments .cmt-head .cnt {
  color: var(--ink);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.modal-comments .cmt-list {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 14px;
  font-size: .92rem;
  line-height: 1.6;
}
.modal-comments .cmt-empty {
  color: var(--muted); font-style: italic; padding: 8px 0;
}
.modal-comments .cmt-item {
  padding: 8px 10px;
  background: var(--surface-2, #f6f5ef);
  border-radius: 8px;
}
.modal-comments .cmt-item-new { animation: cmtFadeIn .3s ease; }
@keyframes cmtFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.modal-comments .cmt-meta {
  font-size: .8rem; color: var(--muted); margin-bottom: 2px;
}
.modal-comments .cmt-meta b { color: var(--ink); font-weight: 600; }
.modal-comments .cmt-body-text { white-space: pre-wrap; word-break: break-word; }

.modal-comments .cmt-form {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 8px;
  align-items: start;
}
.modal-comments .cmt-form .cmt-nick,
.modal-comments .cmt-form .cmt-body {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: .9rem;
  background: var(--surface, #fff);
  color: var(--ink);
}
.modal-comments .cmt-form .cmt-body { resize: vertical; min-height: 38px; }
.modal-comments .cmt-form .cmt-submit {
  padding: 8px 18px;
  background: var(--ink); color: var(--accent-inv, #fff);
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  align-self: stretch;
}
.modal-comments .cmt-form .cmt-submit:hover { background: var(--highlight, #2a2a2a); }
.modal-comments .cmt-form .cmt-submit:disabled { opacity: .5; cursor: wait; }
.modal-comments .cmt-error { grid-column: 1 / -1; }
.modal-info-foot {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: flex; gap: 8px;
}
.modal-nav-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink);
  transition: background .15s;
}
.modal-nav-btn:hover { background: var(--ink); color: var(--accent-inv); }
.modal-nav-btn:disabled { opacity: .35; background: var(--surface-2); color: var(--muted); }

/* Image dots */
.modal-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.modal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .15s;
}
.modal-dot.active { background: #fff; }

.modal-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  z-index: 8;
}
.modal-carousel-btn:hover { background: rgba(255,255,255,.32); }
.modal-carousel-btn.l { left: 14px; }
.modal-carousel-btn.r { right: 14px; }

/* Modal 内当前媒体右上角下载按钮 — 始终可见,不靠 hover */
.modal-dl-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,.62);
  border: 2px solid rgba(255,255,255,.88);
  color: #fff;
  font-size: 20px; line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  opacity: .95;
  transition: background .15s, transform .12s, opacity .15s;
  z-index: 9;
}
.modal-dl-btn:hover {
  background: var(--highlight, #b91c1c);
  opacity: 1;
  transform: scale(1.06);
}

/* Modal 内一键下载全部 — 醒目红色按钮,文字栏下方 */
.modal-dl-all-wrap {
  display: flex; justify-content: center;
  margin: 18px 0 6px;
}
.modal-dl-all-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px;
  background: var(--highlight, #b91c1c);
  color: #fff;
  font-size: 1rem; font-weight: 700; letter-spacing: .5px;
  text-decoration: none;
  border-radius: var(--radius, 8px);
  border: 2px solid var(--highlight, #b91c1c);
  box-shadow: 0 4px 14px rgba(185,28,28,.28);
  transition: background .15s, transform .12s, box-shadow .15s;
}
.modal-dl-all-btn:hover {
  background: #991b1b; border-color: #991b1b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(185,28,28,.38);
}
.modal-dl-all-btn .cnt { font-size: .9rem; font-weight: 500; opacity: .9; }

@media (max-width: 880px) {
  .modal-feed-btn { display: none; }
  /* 手机:近全屏沉浸式(参考 IG/微博详情),媒体按自然比例展示,info 在下方滚动 */
  .modal-backdrop { padding: 0; }
  .modal-shell { max-width: 100%; height: 100svh; }
  .modal-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: 100svh;
    height: 100svh;
    border-radius: 0;
  }
  /* 关键修复:去掉强制 aspect-ratio: 4/3(会把竖屏视频压成大黑边)。
     改为按媒体自身比例显示,上限 62svh;竖屏视频→高窄居中,横屏→满宽,只在必要处留黑边 */
  .modal-media {
    min-height: 0;
    aspect-ratio: auto;
    max-height: 62svh;
  }
  .modal-media img,
  .modal-media video {
    max-height: 62svh;
  }
  .modal-info-head { padding: 14px 18px 10px; }
  .modal-info-body { padding: 14px 18px 20px; }
  .modal-comments .cmt-list { max-height: none; }
  .modal-comments .cmt-form { grid-template-columns: 1fr; }
}

/* 超窄屏(≤420px):导航按钮文案缩短、内边距再收 */
@media (max-width: 420px) {
  .modal-media { max-height: 56svh; }
  .modal-media img, .modal-media video { max-height: 56svh; }
  .modal-nav-btn { padding: 9px 10px; font-size: .72rem; }
}

/* ─── Footer ──────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 50px var(--pad-x) 60px;
  background: var(--bg);
}
.foot-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .foot-inner { grid-template-columns: 1fr 1fr; } }

.foot-h {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.foot-brand .brand-mark { font-size: 1.6rem; }
.foot-tagline {
  margin-top: 10px;
  font-size: .9rem; color: var(--muted);
  max-width: 32ch;
}
.foot-list { display: flex; flex-direction: column; gap: 6px; }
.foot-list a {
  font-size: .9rem;
  color: var(--ink-soft);
  transition: color .15s;
}
.foot-list a:hover { color: var(--highlight); }
.foot-bottom {
  max-width: var(--max-w); margin: 30px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}

/* ─── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 36px 0;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.pg-btn {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}
.pg-btn:hover { background: var(--ink); color: var(--accent-inv); border-color: var(--ink); }
.pg-btn.disabled { opacity: .35; pointer-events: none; }
.pg-info { color: var(--muted); }

/* ─── 加载更多 ─────────────────────────────────────────────── */
.load-more-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 0 8px;
}
.load-more-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
  box-shadow: var(--shadow-soft);
}
.load-more-btn:hover:not(:disabled) {
  background: var(--ink); color: var(--accent-inv);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.load-more-btn:active:not(:disabled) { transform: translateY(0); }
.load-more-btn:disabled { opacity: .6; cursor: wait; }
.load-more-btn .lm-meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.load-more-btn:hover:not(:disabled) .lm-meta { color: rgba(255,255,255,.7); }
.load-more-end {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .08em;
}

/* ─── Empty ───────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 100px 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .9rem;
}

/* ─── Mobile ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hd-row { gap: 18px; }
  .cat-link { font-size: .85rem; padding: 6px 10px; }
  .page-head { padding: 26px 0 20px; margin-bottom: 18px; }
  .hero-stats { gap: 18px; }
  .brand-sub { display: none; }
}
@media (max-width: 1000px) {
  .brand-sub { display: none; }
}

/* ════════════════════════════════════════════════════════════
   MATERIAL — 大组图卡（主图 + 缩略图条）
   ════════════════════════════════════════════════════════════ */
.m-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 80px;
}
.m-grid-home { padding-bottom: 0; }
@media (max-width: 1200px) { .m-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 720px)  { .m-grid { grid-template-columns: 1fr; gap: 20px; } }

.m-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
  border: 1px solid var(--line);
}
.m-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
[data-card="bare"] .m-card { border: none; background: transparent; }
[data-card="bare"] .m-card:hover { box-shadow: none; }
[data-card="bare"] .m-card .m-card-body { padding: 14px 4px 4px; }
[data-card="bare"] .m-card .m-card-main { border-radius: var(--radius-lg); overflow: hidden; }
[data-card="bare"] .m-card .m-card-strip { padding: 6px 0 0; }

.m-card-main {
  position: relative;
  background: var(--surface-2);
  overflow: hidden;
}
.m-card-main img,
.m-card-main video {
  display: block;
  width: 100%; height: auto;
  max-height: 640px;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.m-card-main .ph {
  width: 100%; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.m-card:hover .m-card-main img,
.m-card:hover .m-card-main video,
.m-card:hover .m-card-main .ph { transform: scale(1.04); }

.m-count-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(10,10,11,.6);
  backdrop-filter: blur(8px);
  color: #fafafa;
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.m-card-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--surface);
}
.m-thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--surface-2);
  overflow: hidden;
  border-radius: 4px;
}
.m-thumb .ph { width: 100%; height: 100%; }
.m-more-overlay {
  position: absolute; inset: 0;
  background: rgba(10,10,11,.55);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}

.m-card-body {
  padding: 14px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.m-card-text {
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.6;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-card-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.m-card-meta .m-channel { color: var(--ink-soft); font-weight: 500; }

/* ════════════════════════════════════════════════════════════
   NEIHAN — 沉浸式 feed
   ════════════════════════════════════════════════════════════ */
.n-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding-bottom: 80px;
  align-items: start;
}
@media (max-width: 1100px) {
  .n-layout { grid-template-columns: 1fr; }
  .n-side { display: none; }
}

.n-main {
  display: flex; flex-direction: column;
  gap: 28px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 1100px) { .n-main { max-width: 680px; } }

.n-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: box-shadow .25s;
}
.n-item:hover { box-shadow: var(--shadow-hover); }
[data-card="bare"] .n-item { border: none; background: transparent; }

.n-media {
  position: relative;
  width: 100%;
  background: var(--surface-2);
  overflow: hidden;
  max-height: 78vh;
}
.n-media img,
.n-media video {
  display: block;
  width: 100%; height: auto;
  max-height: 78vh;
  object-fit: cover;
}
.n-media .ph { width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }

.n-body { padding: 18px 22px 18px; }
.n-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 18px;
}
.n-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.n-channel {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.n-channel-info { display: flex; flex-direction: column; gap: 2px; }
.n-channel-info span:first-child { color: var(--ink); }
.n-channel-info .ts { color: var(--muted); font-size: .72rem; }

.n-actions { display: flex; gap: 4px; }
.n-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.n-action:hover { background: var(--surface-2); color: var(--ink); }
.n-action-i {
  display: inline-flex; align-items: center;
  width: 16px; height: 16px;
}
.n-action-i svg { width: 16px; height: 16px; }

/* ─── 内涵段子 APP 风格 (kind=feed) ─────────────────────── */
.neihan-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 8px;
  display: flex; flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow .15s, transform .12s;
}
.neihan-item:hover { box-shadow: var(--shadow-hover, 0 8px 24px -8px rgba(0,0,0,.15)); }

.neihan-head {
  display: flex; align-items: center; gap: 10px;
}
.neihan-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.neihan-head-meta {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.neihan-name {
  font-size: .92rem; font-weight: 600;
  color: var(--ink);
}
.neihan-time {
  font-size: .72rem; color: var(--muted);
  font-family: var(--font-mono);
}
.neihan-pin {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.neihan-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.neihan-video {
  margin: 0 -18px;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.neihan-video video {
  display: block;
  max-width: 100%;
  max-height: 560px;
  width: auto; height: auto;
}

/* 九宫格图 */
.neihan-grid {
  display: grid; gap: 3px;
  margin: 2px 0 0;
}
.neihan-grid-1 { grid-template-columns: 1fr; }
.neihan-grid-2 { grid-template-columns: repeat(2, 1fr); }
.neihan-grid-3 { grid-template-columns: repeat(3, 1fr); }
.neihan-grid-4 { grid-template-columns: repeat(2, 1fr); }
.neihan-grid-5, .neihan-grid-6 { grid-template-columns: repeat(3, 1fr); }
.neihan-grid-7, .neihan-grid-8, .neihan-grid-9 { grid-template-columns: repeat(3, 1fr); }
.neihan-cell {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 4px;
}
/* 单图特殊:不裁切,按比例铺 */
.neihan-grid-1 .neihan-cell {
  aspect-ratio: auto;
  max-height: 560px;
  display: flex;
}
.neihan-cell img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.neihan-grid-1 .neihan-cell img {
  width: 100%; height: auto;
  max-height: 560px;
  object-fit: contain;
}
/* 多图自动轮播(内涵段子 feed) */
.neihan-carousel {
  position: relative;
  margin: 4px 0 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.nh-car-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.nh-car-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.nh-car-slide.active { opacity: 1; pointer-events: auto; }
.nh-car-slide img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.nh-car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.4); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; line-height: 1;
  opacity: 0; transition: opacity .18s, background .18s;
  z-index: 3;
  backdrop-filter: blur(3px);
}
.neihan-carousel:hover .nh-car-btn { opacity: 1; }
.nh-car-btn:hover { background: rgba(0,0,0,.65); }
.nh-car-btn.prev { left: 8px; }
.nh-car-btn.next { right: 8px; }
.nh-car-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 3;
}
.nh-car-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: background .15s, transform .15s;
  cursor: pointer;
}
.nh-car-dot.active { background: #fff; transform: scale(1.25); }
.nh-car-counter {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.5); color: #fff;
  font-family: var(--font-mono); font-size: .72rem;
  z-index: 3;
}
.nh-car-counter b { font-weight: 600; }
@media (hover: none) { .neihan-carousel .nh-car-btn { opacity: .85; } }

.neihan-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 600;
  font-family: var(--font-mono);
}

.neihan-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 6px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  font-size: .82rem;
  color: var(--muted);
}
.neihan-action {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.neihan-action svg { color: var(--muted); }
.neihan-action-spacer { flex: 1; }
.neihan-action-more { color: var(--accent, var(--ink)); font-weight: 500; }

@media (max-width: 720px) {
  .neihan-item { padding: 14px 14px 6px; }
  .neihan-video { margin: 0 -14px; }
}

.n-interrupter {
  padding: 18px 0 8px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.n-interrupter-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.n-interrupter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .n-interrupter-row { grid-template-columns: 1fr; } }

/* Mini cards (used in interrupters & sidebar) */
.mini-card {
  display: flex; flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.mini-card:hover {
  border-color: var(--ink-soft);
  transform: translateY(-2px);
}
.mini-thumb {
  aspect-ratio: 4/3;
  background: var(--surface-2);
}
.mini-thumb .ph { width: 100%; height: 100%; }
.mini-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.mini-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.mini-text {
  font-family: var(--font-display);
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-channel {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
}

/* Sidebar */
.n-side {
  position: sticky; top: 116px;
  display: flex; flex-direction: column;
  gap: 28px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: none;
}
.n-side::-webkit-scrollbar { display: none; }

.n-side-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
[data-card="bare"] .n-side-block { border: none; background: transparent; padding: 0; }

.n-side-h {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.n-side-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 12px;
}
.n-side-list li {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
  transition: color .15s;
}
.n-side-list li:hover { color: var(--ink); }
.n-side-num {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--highlight);
  flex-shrink: 0;
  width: 22px;
}
.n-side-text {
  font-family: var(--font-display);
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.n-side-picks { padding-top: 0; }
.n-side-picks .n-side-h { margin-bottom: 14px; }
.n-side-pick-list {
  display: flex; flex-direction: column;
  gap: 12px;
}

/* neihan mini cards on home */
.n-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 880px) { .n-mini-grid { grid-template-columns: 1fr; } }

.n-mini-card {
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
}
.n-mini-thumb {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.n-mini-text {
  font-family: var(--font-display);
  font-size: .92rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.n-mini-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.n-mini-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted-soft);
}

/* ════════════════════════════════════════════════════════════
   TALK — 长话术 / 对话气泡 / 配图
   ════════════════════════════════════════════════════════════ */
.t-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  padding-bottom: 80px;
}
.t-grid-home { padding-bottom: 0; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .t-grid { grid-template-columns: 1fr; gap: 22px; } .t-grid-home { grid-template-columns: 1fr; } }

.t-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 28px 22px;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .25s;
  position: relative;
}
.t-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-hover);
}
[data-card="bare"] .t-card { border: none; padding: 4px 4px 22px; border-radius: 0; border-bottom: 1px solid var(--line); }
[data-card="bare"] .t-card:hover { box-shadow: none; }

.t-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.t-card-cat { color: var(--highlight); }

.t-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--ink);
}

.t-card-excerpt {
  font-family: var(--font-display);
  font-size: .95rem;
  line-height: 1.75;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}

.t-card-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.t-card-para {
  font-family: var(--font-display);
  font-size: .92rem;
  line-height: 1.85;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dialog bubbles */
.t-dialog {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin: 4px 0 14px;
}
[data-card="bare"] .t-dialog { background: var(--surface-2); }
.t-bubble {
  display: flex; flex-direction: column;
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: .88rem;
  line-height: 1.6;
}
.t-bubble.theirs {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--line);
}
.t-bubble.mine {
  align-self: flex-end;
  background: var(--ink);
  color: var(--accent-inv);
  border-bottom-right-radius: 4px;
}
.t-bubble-role {
  font-family: var(--font-mono);
  font-size: .68rem;
  opacity: .55;
  margin-bottom: 4px;
  letter-spacing: .04em;
}
.t-bubble-text { display: block; }
.t-bubble-more {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.t-card-img {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 14px;
}

.t-card-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.t-card-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }
.t-card-foot .t-channel { color: var(--ink-soft); }
.t-tags { display: flex; gap: 6px; margin-left: auto; }
.t-tag { color: var(--muted); }
.t-readmore {
  position: absolute;
  bottom: 22px; right: 26px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--ink);
  opacity: 0;
  transition: opacity .15s, transform .15s;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  pointer-events: none;
}
.t-card:hover .t-readmore { opacity: 1; transform: translateX(2px); }

/* Talk modal styles */
.modal-card-talk { grid-template-columns: 1fr !important; max-width: 760px !important; }
.modal-card-talk .modal-info { max-height: 86vh; }
.modal-tcat {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--highlight);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--ink);
}
.modal-excerpt {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.modal-para {
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-bottom: 14px;
  white-space: pre-wrap;
}

/* ════════════════════════════════════════════════════════════
   NEWS — Magazine 风博文流 (tech / crypto)
   ════════════════════════════════════════════════════════════ */
.news-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
  cursor: pointer;
  align-items: stretch;
}
@media (max-width: 880px) { .news-hero { grid-template-columns: 1fr; gap: 22px; } }

.news-hero-cover {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.news-hero-cover .ph {
  width: 100%; height: 100%;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.news-hero:hover .news-hero-cover .ph { transform: scale(1.03); }

.news-hero-pin {
  position: absolute;
  top: 16px; left: 16px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--accent-inv);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  border-radius: 999px;
  z-index: 4;
}

.news-hero-body {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.news-hero-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
}
.news-cat { color: var(--highlight); }

.news-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.18;
  color: var(--ink);
  text-wrap: pretty;
}
.news-hero:hover .news-hero-title { color: var(--highlight); }

.news-hero-lead {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-hero-foot {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  margin-top: 6px;
  flex-wrap: wrap;
}
.news-hero-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }
.news-hero-cta {
  margin-left: auto;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: gap .15s;
}
.news-hero:hover .news-hero-cta { color: var(--highlight); border-bottom-color: var(--highlight); }

/* Article list */
.news-list {
  display: flex; flex-direction: column;
  padding-bottom: 24px;
}
.news-list-home { padding-bottom: 0; }

.news-art {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  align-items: start;
  transition: transform .2s;
}
.news-art:first-child { padding-top: 0; }
.news-art:last-child { border-bottom: none; }
.news-art:hover { transform: translateX(2px); }
@media (max-width: 720px) {
  .news-art { grid-template-columns: 1fr; gap: 14px; padding: 20px 0; }
}

.news-art-cover {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.news-art-cover .ph {
  width: 100%; height: 100%;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.news-art:hover .news-art-cover .ph { transform: scale(1.05); }

.news-hot-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--highlight);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.news-art-body {
  display: flex; flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  min-width: 0;
}
.news-art-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.news-art-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }

.news-art-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}
.news-art:hover .news-art-title { color: var(--highlight); }

.news-art-lead {
  font-family: var(--font-display);
  font-size: .94rem;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-art-foot {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  margin-top: 4px;
  flex-wrap: wrap;
}
.news-art-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }
.news-art-channel { color: var(--ink-soft); }
.news-art-tags { display: flex; gap: 6px; margin-left: auto; }
.news-art-tag { color: var(--muted); }

/* Flash 快讯 */
.flash-section {
  margin: 56px 0 32px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.flash-section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.flash-section-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--highlight) 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.flash-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.flash-section-sub {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
}
.flash-section-more {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.flash-section-more:hover { color: var(--highlight); border-bottom-color: var(--highlight); }

.flash-list {
  display: flex; flex-direction: column;
}
.flash-row {
  display: grid;
  grid-template-columns: 58px 12px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: padding .15s, background .15s;
}
.flash-row:hover {
  background: var(--surface-2);
  padding-left: 12px; padding-right: 12px;
  margin: 0 -12px;
  border-radius: 6px;
  border-bottom-color: transparent;
}
.flash-row:last-child { border-bottom: none; }

.flash-time {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.flash-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted-soft);
  justify-self: center;
}
.flash-row:hover .flash-dot { background: var(--highlight); }

.flash-title {
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flash-ch {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .flash-row { grid-template-columns: 50px 8px 1fr; }
  .flash-row .flash-ch { display: none; }
}

/* News modal — left cover + right long body */
.modal-card-news {
  grid-template-columns: 1fr 1.05fr !important;
}
.modal-card-news .modal-media { min-height: 100%; }
@media (max-width: 880px) {
  .modal-card-news {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════
   SEARCH PANEL — Cmd+K 风格浮层
   ════════════════════════════════════════════════════════════ */
.icon-btn-search {
  width: auto !important;
  padding: 0 10px 0 12px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
}
.hd-kbd {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  margin-left: 2px;
  font-weight: 500;
}
@media (max-width: 880px) {
  .icon-btn-search { padding: 0; width: 36px !important; gap: 0; }
  .icon-btn-search .hd-kbd { display: none; }
}

.sp-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,10,11,.6);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 40px;
  animation: sp-fade .2s ease;
}
@keyframes sp-fade { from { opacity: 0; } to { opacity: 1; } }

.sp-panel {
  width: 100%; max-width: 720px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  animation: sp-pop .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes sp-pop {
  from { transform: translateY(-8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.sp-input-row {
  display: flex; align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.sp-input-icon {
  font-size: 1.1rem;
  color: var(--muted);
}
.sp-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}
.sp-input::placeholder { color: var(--muted); }
.sp-kbd {
  font-family: var(--font-mono);
  font-size: .68rem;
  background: var(--surface-2);
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.sp-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sp-section {
  padding: 8px 18px 12px;
}
.sp-section-h {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.sp-section-count {
  background: var(--surface-2);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .68rem;
}

.sp-recent {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.sp-recent-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-soft);
  transition: background .15s, border-color .15s;
}
.sp-recent-chip:hover {
  background: var(--ink); color: var(--accent-inv);
  border-color: var(--ink);
}
.sp-recent-kind {
  font-size: .66rem;
  opacity: .55;
  letter-spacing: .04em;
}

.sp-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.sp-quick-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-align: left;
  transition: background .15s;
}
.sp-quick-item:hover { background: var(--surface-2); }
.sp-quick-name {
  font-family: var(--font-display);
  font-size: .92rem;
  color: var(--ink);
}
.sp-quick-slug {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}

.sp-results {
  display: flex; flex-direction: column;
  gap: 2px;
}
.sp-result {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  text-align: left;
  align-items: center;
  transition: background .15s;
}
.sp-result:hover { background: var(--surface-2); }
.sp-result-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex; align-items: flex-end;
  padding: 4px;
  flex-shrink: 0;
}
.sp-result-label {
  font-family: var(--font-mono);
  font-size: .58rem;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
}
.sp-result-body {
  display: flex; flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sp-result-title {
  font-family: var(--font-display);
  font-size: .92rem;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-result-snippet {
  font-family: var(--font-display);
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-result-channel {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
  white-space: nowrap;
}
.sp-mark {
  background: var(--highlight);
  color: #fff;
  padding: 0 2px;
  border-radius: 3px;
}

.sp-empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .9rem;
}

.sp-foot {
  display: flex; gap: 16px;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.sp-foot-end { margin-left: auto; }
.sp-kbd-small {
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .68rem;
  margin-right: 3px;
}

/* ════════════════════════════════════════════════════════════
   BLOG DETAIL — 长文阅读
   ════════════════════════════════════════════════════════════ */
.bd-shell {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
}

.bd-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--line);
  z-index: 90;
}
.bd-progress-bar {
  height: 100%;
  background: var(--highlight);
  width: var(--p, 0%);
  transition: width .1s linear;
}

.bd-close {
  position: fixed;
  top: 24px; left: 24px;
  z-index: 80;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.1rem;
  font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  box-shadow: var(--shadow-soft);
}
.bd-close:hover { background: var(--ink); color: var(--accent-inv); transform: translateX(-2px); }

.bd-article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px var(--pad-x) 100px;
}

.bd-head {
  max-width: 740px;
  margin: 0 auto 36px;
  text-align: center;
}
.bd-eyebrow {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 22px;
}
.bd-eyebrow-link {
  color: var(--ink-soft);
  transition: color .15s;
}
.bd-eyebrow-link:hover { color: var(--highlight); }
.bd-sep { color: var(--muted-soft); }

.bd-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: 22px;
  color: var(--ink);
  text-wrap: balance;
}
.bd-lead {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 28px;
  text-wrap: pretty;
}

.bd-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bd-author { display: flex; align-items: center; gap: 12px; }
.bd-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}
.bd-author-info { display: flex; flex-direction: column; text-align: left; }
.bd-author-name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
}
.bd-author-meta {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.bd-actions { display: flex; gap: 4px; }
.bd-action {
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: background .15s;
}
.bd-action:hover { background: var(--surface-2); }

.bd-cover {
  aspect-ratio: 21/9;
  margin: 36px 0 56px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}
.bd-cover .ph-label {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
}

.bd-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 1000px) {
  .bd-layout { grid-template-columns: 1fr; gap: 30px; }
  .bd-toc { display: none; }
}

.bd-toc {
  position: sticky; top: 100px;
  font-family: var(--font-mono);
}
.bd-toc-h {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.bd-toc-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.bd-toc-item a {
  display: block;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 4px 0;
  transition: color .15s, padding-left .15s;
  font-family: var(--font-display);
}
.bd-toc-item a:hover { color: var(--ink); }
.bd-toc-item.active a {
  color: var(--ink);
  font-weight: 500;
  padding-left: 6px;
  border-left: 2px solid var(--highlight);
  margin-left: -16px;
  padding-left: 14px;
}

.bd-toc-progress {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bd-toc-progress-bar {
  height: 100%;
  background: var(--ink);
  transition: width .2s ease;
}
.bd-toc-progress-pct {
  font-size: .72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bd-prose {
  max-width: 720px;
  font-family: var(--font-display);
}

/* ─── 博文正文(Quill body_html)排版接管 ────────────────── */
.bd-prose .ql-editor {
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--ink-soft);
}
.bd-prose .ql-editor > * + * { margin-top: .9em; }
.bd-prose .ql-editor p {
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin: 0 0 1.2em;
  text-wrap: pretty;
}
.bd-prose .ql-editor p:last-child { margin-bottom: 0; }
.bd-prose .ql-editor h1,
.bd-prose .ql-editor h2,
.bd-prose .ql-editor h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
  scroll-margin-top: 100px;
}
.bd-prose .ql-editor h1 { font-size: 1.85rem; margin: 1.8em 0 .6em; line-height: 1.2; }
.bd-prose .ql-editor h2 { font-size: 1.55rem; margin: 1.6em 0 .55em; line-height: 1.3; }
.bd-prose .ql-editor h2::before {
  content: "§"; color: var(--muted-soft);
  margin-right: 10px; font-weight: 400;
}
.bd-prose .ql-editor h3 { font-size: 1.25rem; margin: 1.4em 0 .5em; line-height: 1.35; }
.bd-prose .ql-editor strong { color: var(--ink); font-weight: 600; }
.bd-prose .ql-editor em     { font-style: italic; color: var(--ink); }
.bd-prose .ql-editor a {
  color: var(--highlight, var(--ink));
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.bd-prose .ql-editor a:hover { text-decoration-thickness: 2px; }
.bd-prose .ql-editor code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--ink);
}
.bd-prose .ql-editor pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1.4em 0;
}
.bd-prose .ql-editor blockquote {
  border-left: 3px solid var(--ink);
  padding: 4px 0 4px 18px;
  margin: 1.4em 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.02rem;
}
.bd-prose .ql-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.bd-prose .ql-editor ul,
.bd-prose .ql-editor ol {
  padding-left: 1.4em;
  margin: 1em 0;
}
.bd-prose .ql-editor li { margin: .3em 0; line-height: 1.85; }
.bd-prose .ql-editor hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.2em auto;
  width: 60%;
}

/* 旧的 .bd-p 兼容 — 如有手写模板用此 class 仍生效 */
.bd-prose .bd-p {
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-bottom: 1.4em;
  text-wrap: pretty;
}
.bd-prose .bd-p strong {
  color: var(--ink);
  font-weight: 600;
}
.bd-prose .bd-p code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .9em;
}
.bd-h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 2.2em 0 .8em;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.bd-h2::before {
  content: "§";
  color: var(--muted-soft);
  margin-right: 12px;
  font-weight: 400;
}

.bd-code {
  background: var(--ink-soft);
  color: var(--accent-inv);
  padding: 22px 26px;
  border-radius: var(--radius);
  margin: 1.8em 0;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}
[data-theme="ink"] .bd-code { background: #0a0a0b; color: #d4d4d8; border: 1px solid var(--line); }

.bd-quote {
  border-left: 3px solid var(--ink);
  padding: 6px 0 6px 24px;
  margin: 1.8em 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -.005em;
}
.bd-quote::before {
  content: "“";
  display: block;
  font-size: 2rem;
  line-height: 0;
  color: var(--muted-soft);
  margin-bottom: 12px;
}

.bd-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 32px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.bd-end {
  text-align: center;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--muted);
  margin: 48px 0;
  letter-spacing: .08em;
}

.bd-related {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.bd-related-h {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.bd-related-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) { .bd-related-list { grid-template-columns: 1fr; } }

.bd-related-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.bd-related-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.bd-related-thumb {
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
}
.bd-related-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bd-related-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bd-related-meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   BOARD FORM — 发布表单
   ════════════════════════════════════════════════════════════ */
.bf-backdrop {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(10,10,11,.65);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: sp-fade .2s ease;
}
.bf-card {
  width: 100%; max-width: 580px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  animation: sp-pop .25s cubic-bezier(.2,.8,.2,1);
}

.bf-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.bf-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.bf-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.bf-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: background .15s, color .15s;
}
.bf-close:hover { background: var(--ink); color: var(--accent-inv); }

.bf-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex; flex-direction: column;
  gap: 22px;
}

.bf-field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.bf-label {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--ink-soft);
  letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px;
}
.bf-required { color: var(--highlight); }
.bf-hint {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  font-weight: normal;
  letter-spacing: 0;
}
.bf-input,
.bf-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.bf-input:focus,
.bf-textarea:focus {
  border-color: var(--ink);
  background: var(--surface);
}
.bf-input::placeholder,
.bf-textarea::placeholder { color: var(--muted-soft); }
.bf-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.bf-counter {
  position: absolute;
  bottom: 6px; right: 10px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  pointer-events: none;
}

.bf-pills {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 44px;
  align-items: center;
}
.bf-pills:focus-within { border-color: var(--ink); background: var(--surface); }
.bf-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--accent-inv);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .76rem;
}
.bf-pill-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  font-size: .68rem;
  color: rgba(255,255,255,.7);
  border-radius: 50%;
  margin-left: 2px;
}
.bf-pill-x:hover { color: #fff; background: rgba(255,255,255,.15); }
.bf-pill-input {
  flex: 1;
  min-width: 80px;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-display);
  font-size: .88rem;
  color: var(--ink);
  padding: 4px 8px;
}

.bf-buttons { display: flex; flex-direction: column; gap: 8px; }
.bf-btn-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 6px;
}
.bf-btn-label, .bf-btn-url { padding: 8px 12px; font-size: .88rem; }
.bf-btn-remove {
  width: 36px;
  background: var(--surface-2);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 1rem;
  transition: background .15s, color .15s;
}
.bf-btn-remove:hover { background: var(--highlight); color: #fff; }
.bf-btn-add {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-soft);
  background: var(--surface-2);
  transition: background .15s, color .15s;
}
.bf-btn-add:hover { background: var(--ink); color: var(--accent-inv); }

.bf-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  gap: 16px;
}
.bf-tip {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
}
.bf-actions { display: flex; gap: 8px; }
.bf-cancel,
.bf-submit {
  padding: 9px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9rem;
  transition: opacity .15s, background .15s, color .15s;
}
.bf-cancel {
  color: var(--muted);
  background: transparent;
}
.bf-cancel:hover { color: var(--ink); }
.bf-submit {
  background: var(--ink);
  color: var(--accent-inv);
}
.bf-submit:hover:not(:disabled) { opacity: .85; }
.bf-submit:disabled { opacity: .35; cursor: default; }

.bf-success {
  padding: 60px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.bf-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent-inv);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.bf-success-h {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.bf-success-sub {
  font-family: var(--font-display);
  font-size: .92rem;
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   HERO VARIANTS
   ════════════════════════════════════════════════════════════ */
/* Fullbleed */
.hero-fb {
  position: relative;
  border-radius: var(--radius-lg);
  margin: 36px 0 30px;
  overflow: hidden;
  cursor: pointer;
  min-height: 480px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fafafa;
}
.hero-fb-bg {
  position: absolute; inset: 0;
  background-size: cover;
}
.hero-fb-stripes {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,.7) 0%, rgba(10,10,11,.05) 60%, rgba(10,10,11,0) 100%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 18px, rgba(255,255,255,0) 18px 36px);
}
.hero-fb-content {
  position: relative;
  padding: 60px;
  z-index: 2;
  max-width: 760px;
}
@media (max-width: 720px) {
  .hero-fb-content { padding: 32px 24px; }
  .hero-fb { min-height: 380px; }
}
.hero-fb-pin {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  margin-bottom: 22px;
}
.hero-fb-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-wrap: pretty;
  margin-bottom: 18px;
  color: #ffffff;
}
.hero-fb-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 22px;
}
.hero-fb-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: #fff;
  color: #0a0a0b;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .92rem;
  transition: transform .15s, background .15s;
}
.hero-fb-cta:hover { transform: translateX(4px); background: var(--highlight); color: #fff; }

.hero-fb-counter {
  position: absolute;
  top: 32px; right: 32px;
  display: flex; flex-direction: column; gap: 4px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: rgba(255,255,255,.8);
  z-index: 3;
}
.hero-fb-counter-row b {
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .hero-fb-counter { top: 16px; right: 16px; font-size: .7rem; }
}

/* Editorial */
.hero-ed {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.hero-ed-stamp {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.hero-ed-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-wrap: balance;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero-ed-headline em {
  font-style: normal;
  color: var(--muted-soft);
}

.hero-ed-rule {
  height: 1px; background: var(--ink);
  margin: 36px 0 30px;
  width: 80px;
}

.hero-ed-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 880px) {
  .hero-ed-grid { grid-template-columns: 1fr; gap: 28px; }
}

.hero-ed-col-h {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.hero-ed-feature {
  display: block;
  cursor: pointer;
}
.hero-ed-thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  margin-bottom: 14px;
  background-size: cover;
}
.hero-ed-feature-meta {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero-ed-feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.hero-ed-stats {
  width: 100%;
  font-family: var(--font-mono);
  font-size: .85rem;
  border-collapse: collapse;
}
.hero-ed-stats td {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.hero-ed-stats td:first-child { color: var(--muted); }
.hero-ed-stats td:last-child { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.hero-ed-toc {
  list-style: none;
  counter-reset: edtoc;
  display: flex; flex-direction: column;
  gap: 0;
}
.hero-ed-toc li { counter-increment: edtoc; }
.hero-ed-toc a {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  transition: color .15s;
}
.hero-ed-toc a:hover { color: var(--highlight); }
.hero-ed-toc a::before {
  content: counter(edtoc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  margin-right: 12px;
}
.hero-ed-toc a span {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  text-align: right;
}

/* Minimal */
.hero-min {
  padding: 100px 0 60px;
  max-width: 740px;
}
@media (max-width: 720px) { .hero-min { padding: 60px 0 40px; } }
.hero-min-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 32px;
}
.hero-min-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 32px;
  text-wrap: balance;
}
.hero-min-sub {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 28px;
}
.hero-min-row { display: flex; gap: 24px; }
.hero-min-link {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.hero-min-link:hover { color: var(--highlight); border-bottom-color: var(--highlight); }


/* ─── #3 贴文详情:媒体展示 + 下载按钮 ─────────────────────── */

/* 媒体网格容器 — 1/2/3/4 张图自适应布局 */
.media-gallery {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.media-gallery.gallery-1 { grid-template-columns: 1fr; }
.media-gallery.gallery-2 { grid-template-columns: 1fr 1fr; }
.media-gallery.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.media-gallery.gallery-4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) {
  .media-gallery.gallery-2,
  .media-gallery.gallery-3,
  .media-gallery.gallery-4 { grid-template-columns: 1fr; }
}

/* 单张媒体卡 — 必须 position: relative,让下载按钮绝对定位有锚点 */
.media-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
}

/* 单图右上角下载按钮 — 始终可见(opacity .9 → hover 1),桌面 + 触屏统一行为 */
.media-dl-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: .9;
  transition: opacity .18s, background .18s, transform .18s, border-color .18s;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.media-item:hover .media-dl-btn,
.media-dl-btn:focus-visible {
  opacity: 1;
}
.media-dl-btn:hover {
  background: var(--highlight);
  border-color: #fff;
  transform: scale(1.08);
}

/* "一键下载全部" 按钮 — 醒目大按钮,放在文字栏下方,居中红色描边 */
.post-actions {
  display: flex;
  justify-content: center;
  margin: 32px 0 16px;
}
.btn-dl-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--highlight);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--highlight);
  transition: background .15s, color .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(185, 28, 28, .28);
}
.btn-dl-all:hover {
  background: #991b1b;
  border-color: #991b1b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(185, 28, 28, .38);
}
.btn-dl-all:active { transform: translateY(0); }
.btn-dl-all .dl-count {
  font-size: .9rem;
  font-weight: 500;
  opacity: .9;
}

/* footer 收藏本站提示样式 */
.foot-bookmark { gap: 6px; }
.foot-hint {
  display: block;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--muted);
}
.foot-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: .78em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0 1px;
}

/* ─── Blog 卡片(category kind == 'blog' 时,Post 数据走博文视觉) ─────────────────── */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 780px;
  margin: 24px auto 0;
}
.blog-card-post {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.blog-card-post:hover {
  border-color: var(--ink-soft);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.blog-card-cover {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.blog-card-cover img, .blog-card-cover video {
  width: 100%; height: 100%; object-fit: cover;
}
.blog-card-cover .media-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 8px;
  font-size: .75rem;
  background: rgba(0,0,0,.55); color: #fff;
  border-radius: 4px;
}
.blog-card-body {
  display: flex; flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.blog-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .82rem;
}
.blog-card-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted-soft);
}
.blog-card-author {
  color: var(--ink-soft);
  font-weight: 600;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.blog-card-tag {
  font-size: .78rem;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
}
@media (max-width: 720px) {
  .blog-card-post {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .blog-card-cover { aspect-ratio: 16 / 9; }
  .blog-card-title { font-size: 1.15rem; }
}

/* ═══════════════════════════════════════════════════════════
   UX 增强(回到顶部 / 渐显 / 灯箱 / 下载反馈 / 复制 / 阅读进度)
   ═══════════════════════════════════════════════════════════ */

/* 回到顶部 */
.back-to-top {
  position: fixed; right: 22px; bottom: 24px; z-index: 120;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--accent-inv);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; line-height: 1;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .22s, transform .22s, background .15s;
  cursor: pointer;
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--highlight); }
@media (max-width: 640px) { .back-to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; } }

/* 图片加载渐显 */
img { opacity: 1; }
img[data-faded]:not(.img-loaded) { opacity: 0; }
img.img-loaded { opacity: 1; transition: opacity .4s ease; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
  opacity: 0; transition: opacity .2s;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox .lb-img {
  max-width: 96vw; max-height: 92vh;
  object-fit: contain;
  transition: transform .25s ease;
  cursor: zoom-in;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lightbox .lb-img.zoomed { transform: scale(1.8); cursor: zoom-out; }
.lightbox .lb-close {
  position: fixed; top: 18px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; z-index: 401;
}
.lightbox .lb-close:hover { background: rgba(255,255,255,.28); }

/* 下载按钮反馈 */
.dl-loading { opacity: .85; pointer-events: none; }
.dl-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: dl-spin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }

/* 复制文案按钮 */
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: .85rem; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.copy-btn:hover { background: var(--surface-2); border-color: var(--ink-soft); }
.copy-btn.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

/* 阅读进度条 */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--highlight); z-index: 300;
  transition: width .1s linear;
}

/* 视频列表缩略:统一深底,首帧居中(preload=metadata 已拉首帧) */
.thumb-video video, .neihan-video video, .modal-media video { background: #000; }

/* 栏目页「关注 TG 频道」按钮(双向引流) */
.tg-follow-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; margin-right: 14px;
  background: #229ED9; color: #fff;
  border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 2px 10px -2px rgba(34,158,217,.5);
  vertical-align: middle;
}
.tg-follow-btn:hover { background: #1c8ec2; transform: translateY(-1px); box-shadow: 0 4px 14px -2px rgba(34,158,217,.6); }
.tg-follow-btn svg { flex-shrink: 0; }
@media (max-width: 640px) { .tg-follow-btn { padding: 6px 12px; font-size: .82rem; margin-right: 8px; } }

/* Adaptive feed media
   主展示图按真实比例占位,避免横图/截图被放进方形盒子后留下大块空底。 */
.m-grid,
.n-mini-grid {
  align-items: start;
}

.card-thumb,
.m-card-main,
.n-mini-thumb {
  aspect-ratio: auto !important;
  height: auto;
  max-height: min(72vh, 680px);
  background: transparent;
}

.card-thumb img,
.card-thumb video,
.m-card-main img,
.m-card-main video,
.n-mini-thumb img,
.n-mini-thumb video {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: none;
  object-fit: contain;
}

.card-thumb .ph,
.m-card-main .ph,
.n-mini-thumb .ph {
  aspect-ratio: 4 / 3;
}

/* Frontend polish
   让首页/栏目页更像可连续浏览的内容流:导航更稳、卡片反馈更明确、移动端留白更紧凑。 */
.site-header {
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
body.is-scrolled .site-header {
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  box-shadow: 0 8px 28px -24px color-mix(in oklab, var(--ink) 45%, transparent);
}

.cat-rail,
.sub-rail {
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 22px), transparent 100%);
}
.cat-link,
.sub-link {
  scroll-snap-align: start;
}

.card,
.m-card,
.n-mini-card,
.t-card,
.blog-card-post,
.mini-card,
.n-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.card:focus-visible,
.m-card:focus-visible,
.n-mini-card:focus-visible,
.t-card:focus-visible,
.blog-card-post:focus-visible,
.mini-card:focus-visible,
.n-item:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 4px;
}
.card.is-pressing,
.m-card.is-pressing,
.n-mini-card.is-pressing,
.t-card.is-pressing,
.blog-card-post.is-pressing,
.mini-card.is-pressing,
.n-item.is-pressing {
  transform: translateY(1px) scale(.992);
}

.card-body,
.m-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.card-text,
.m-card-text,
.n-mini-text,
.blog-card-excerpt {
  overflow-wrap: anywhere;
}
.card-meta,
.m-card-meta,
.n-mini-meta,
.blog-card-meta {
  opacity: .82;
}

.section {
  scroll-margin-top: calc(var(--header-h) + 28px);
}
.section-head {
  align-items: baseline;
}
.section-title {
  text-wrap: balance;
}
.section-more,
.load-more-btn,
.modal-action,
.modal-nav-btn,
.modal-dl-all-btn,
.back-to-top {
  user-select: none;
}

@media (hover: hover) {
  .card:hover .card-text,
  .m-card:hover .m-card-text,
  .n-mini-card:hover .n-mini-text,
  .blog-card-post:hover .blog-card-title {
    color: var(--ink);
  }
}

@media (max-width: 880px) {
  :root {
    --pad-x: clamp(14px, 4vw, 24px);
    --gap-card: 14px;
    --header-h: 58px;
  }
  .hd-row {
    gap: 12px;
  }
  .brand-logo {
    height: 28px;
    max-width: 132px;
  }
  .cat-rail {
    gap: 2px;
  }
  .cat-link {
    padding: 6px 9px;
  }
  .section {
    padding: 42px 0 34px;
  }
  .section-head {
    gap: 8px 14px;
    margin-bottom: 18px;
  }
  .section-head-l {
    min-width: 0;
  }
  .section-title {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }
  .section-desc {
    display: none;
  }
  .masonry {
    column-gap: 12px;
  }
  .masonry > * {
    margin-bottom: 18px;
  }
  .card-body,
  .m-card-body {
    padding-top: 9px !important;
  }
  .load-more-wrap {
    padding: 28px 0 4px;
  }
  .load-more-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
  }
}

@media (max-width: 520px) {
  .hd-actions {
    gap: 2px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .masonry {
    column-count: 1;
  }
  .n-mini-grid,
  .m-grid,
  .t-grid {
    gap: 18px;
  }
  .card-text,
  .m-card-text,
  .n-mini-text {
    font-size: .95rem;
    line-height: 1.62;
  }
  .modal-info-body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

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