/* ============================================================ 主题变量 */
:root {
  --page: #eceef2;
  --page-glow: radial-gradient(1200px 700px at 50% -240px, #f7f8fc 0%, rgba(247, 248, 252, 0) 70%);
  --card: #ffffff;
  --card-2: #f7f7f8;
  --text: #191919;
  --text-2: #3b3b3d;
  --text-3: #8a8a8f;
  --text-4: #b0b0b5;
  --nick: #576b95;
  --nick-hover: #3e5683;
  --line: rgba(0, 0, 0, .07);
  --line-2: rgba(0, 0, 0, .12);
  --soft: #f3f3f5;
  --soft-2: #e9e9ed;
  --hover: rgba(0, 0, 0, .035);
  --accent: #07c160;
  --accent-soft: rgba(7, 193, 96, .12);
  --warn: #f5a524;
  --danger: #fa5151;
  --menu: #4c4c4c;
  --mark: rgba(255, 196, 0, .35);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 28px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .18);
  --radius: 16px;
  --topbar-h: 52px;
  --tabs-h: 50px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --page: #0b0b0d;
  --page-glow: radial-gradient(1200px 700px at 50% -240px, #17181d 0%, rgba(23, 24, 29, 0) 70%);
  --card: #161618;
  --card-2: #1c1c1f;
  --text: #e8e8eb;
  --text-2: #c2c2c7;
  --text-3: #85858c;
  --text-4: #5d5d64;
  --nick: #8fa5cc;
  --nick-hover: #b0c3e6;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --soft: #202023;
  --soft-2: #2a2a2e;
  --hover: rgba(255, 255, 255, .04);
  --accent-soft: rgba(7, 193, 96, .16);
  --menu: #2c2c2f;
  --mark: rgba(255, 196, 0, .28);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ============================================================ 基础 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + var(--tabs-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-glow), var(--page);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html.lb-lock, html.sheet-lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--nick); outline-offset: 2px; border-radius: 6px; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }

/* ============================================================ 布局 */
.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 640px) 300px;
  gap: 22px;
  justify-content: center;
  align-items: start;
  padding: 22px 20px 40px;
}
.side { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 44px); }
.side-left { min-height: 0; }
.side-right { overflow: auto; scrollbar-width: none; }
.side-right::-webkit-scrollbar { display: none; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}
.panel-sources { display: flex; flex-direction: column; min-height: 0; flex: 1; padding-bottom: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 6px; letter-spacing: .02em; }
.panel-head h2 svg.i { width: 16px; height: 16px; color: var(--text-3); }
.panel-meta { font-size: 12px; color: var(--text-3); }
.side-note { margin: 2px 6px 0; font-size: 12px; color: var(--text-4); line-height: 1.5; }

/* ============================================================ 朋友圈主列 */
.moments {
  position: relative;
  min-width: 0;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-height: 100vh;
}

/* ---------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  margin-bottom: calc(-1 * var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 18px;
  color: #fff;
  border-radius: 18px 18px 0 0;
  transition: background-color .25s, color .25s, box-shadow .25s, border-radius .25s;
}
.topbar-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 16px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.topbar-actions { display: flex; gap: 2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  transition: background-color .15s, transform .15s;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg.i { width: 20px; height: 20px; }
.icon-btn.spinning svg { animation: spin .9s linear infinite; }
.topbar.solid {
  color: var(--text);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
  border-radius: 0;
}
.topbar.solid .topbar-title { opacity: 1; transform: none; }
.topbar.solid .icon-btn { filter: none; }
.topbar.solid .icon-btn:hover { background: var(--hover); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(7, 193, 96, .6); animation: pulse 2s infinite; }

/* ---------- 封面 */
.cover {
  position: relative;
  height: 310px;
  border-radius: 18px 18px 0 0;
  background: #070b1c;
  color: #fff;
  isolation: isolate;
}
.cover-aurora, .cover-grid, .cover-net { position: absolute; inset: 0; border-radius: inherit; }
.cover-aurora { overflow: hidden; z-index: -2; }
.cover-aurora::before {
  content: "";
  position: absolute;
  inset: -45%;
  background:
    radial-gradient(38% 46% at 22% 32%, rgba(124, 58, 237, .85), transparent 62%),
    radial-gradient(34% 42% at 78% 22%, rgba(6, 182, 212, .75), transparent 62%),
    radial-gradient(40% 50% at 62% 78%, rgba(16, 185, 129, .55), transparent 62%),
    radial-gradient(30% 38% at 32% 86%, rgba(236, 72, 153, .5), transparent 62%);
  filter: blur(28px) saturate(130%);
  animation: aurora 22s ease-in-out infinite alternate;
}
.cover-aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 20, .25) 0%, rgba(4, 7, 20, 0) 35%, rgba(4, 7, 20, .55) 100%);
}
.cover-grid {
  z-index: -1;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
}
.cover-net { width: 100%; height: 100%; z-index: -1; opacity: .9; }
.cover-copy { position: absolute; left: 24px; bottom: 54px; right: 200px; }
.cover-live {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12px; letter-spacing: .04em;
}
.cover-live i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; animation: pulse 2s infinite; }
.cover-live.busy i { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.cover-copy h1 {
  margin: 12px 0 4px;
  font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(100deg, #fff 30%, #c7d2fe 70%, #a5f3fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 30px rgba(99, 102, 241, .35);
}
.cover-copy p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .72); }
.cover-profile { position: absolute; right: 18px; bottom: -30px; display: flex; align-items: flex-end; gap: 14px; }
.cover-name { margin-bottom: 40px; font-size: 18px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.cover-avatar {
  width: 78px; height: 78px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #2563eb 55%, #06b6d4);
  border: 3px solid var(--card);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
}
.cover-avatar svg.i { width: 38px; height: 38px; stroke-width: 1.6; color: #fff; }

/* 朋友圈经典的彩色刷新圈 */
.ring {
  position: absolute; left: 22px; top: 70px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e);
  -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px);
  mask: radial-gradient(circle, transparent 5.5px, #000 6px);
  opacity: 0; transform: scale(.5);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.ring.show { opacity: 1; transform: none; }
.ring.spin { opacity: 1; transform: none; animation: spin .7s linear infinite; }

.signature { margin: 38px 18px 6px; text-align: right; font-size: 13px; color: var(--text-3); min-height: 20px; }
.signature b { color: var(--text-2); font-weight: 600; }

/* ---------- 频道标签 */
.tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  display: flex; gap: 6px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  display: inline-flex; align-items: baseline; gap: 4px;
  height: 32px; padding: 5px 13px; border-radius: 999px;
  font-size: 14px; color: var(--text-2);
  transition: background-color .15s, color .15s;
}
.tab:hover { background: var(--hover); }
.tab sup { font-size: 11px; color: var(--text-4); top: 0; }
.tab.on { background: var(--text); color: var(--card); font-weight: 600; }
.tab.on sup { color: color-mix(in srgb, var(--card) 65%, transparent); }

/* ---------- 搜索 / 信息源横幅 */
.banner { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.banner-search { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.banner-search b { color: var(--text); }
.banner-clear { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--text-2); font-size: 13px; }
.banner-clear:hover { background: var(--soft-2); }
.hero { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; }
.hero .avatar { width: 58px; height: 58px; border-radius: 12px; font-size: 18px; }
.hero-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hero-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.hero-stats b { color: var(--text-2); font-weight: 600; }
.hero-actions { display: flex; flex-direction: column; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--soft); color: var(--text-2); font-size: 13px; white-space: nowrap;
  transition: background-color .15s;
}
.btn:hover { background: var(--soft-2); }
.btn svg.i { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #06ad56; }

/* ---------- 新动态提示（朋友圈“新消息”气泡） */
.newpill-wrap { position: sticky; top: calc(var(--topbar-h) + var(--tabs-h) + 10px); z-index: 25; height: 0; display: flex; justify-content: center; }
.newpill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px 0 6px; border-radius: 999px;
  background: rgba(32, 33, 36, .92); color: #fff; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: dropIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
.newpill:hover { background: rgba(20, 20, 22, .96); }
.newpill .stack { display: flex; }
.newpill .stack .avatar { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; border: 2px solid rgba(32, 33, 36, 1); }
.newpill .stack .avatar + .avatar { margin-left: -9px; }
.newpill svg.i { width: 15px; height: 15px; }

/* ============================================================ 动态卡片 */
.feed { min-height: 60vh; }
.post {
  position: relative;
  display: flex; gap: 12px;
  padding: 18px 18px 16px;
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
  transition: background-color .3s;
}
.post + .post::before, .seen-divider + .post::before { content: ""; position: absolute; top: 0; left: 74px; right: 0; height: 1px; background: var(--line); }
.post.kb { background: var(--hover); }
.post.kb::after { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--nick); }
.post.fresh { animation: fresh 2.4s ease-out; }

.avatar {
  position: relative; flex: none;
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--c, #8a8a8f); color: var(--fg, #fff);
  font-size: 15px; font-weight: 700; letter-spacing: -.02em;
  user-select: none;
}
.avatar > span { line-height: 1; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; opacity: 0; transition: opacity .25s; }
.avatar.ok img { opacity: 1; }
.avatar.small img { object-fit: contain; padding: 18%; }
.avatar.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }

.p-main { flex: 1; min-width: 0; }
.p-head { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.nick { color: var(--nick); font-weight: 600; font-size: 15.5px; line-height: 1.4; white-space: nowrap; }
.nick:hover { color: var(--nick-hover); }
.badge { flex: none; font-size: 11px; line-height: 17px; padding: 0 6px; border-radius: 5px; background: var(--soft); color: var(--text-3); font-weight: 500; }
.b-official { color: #0a8f52; background: rgba(7, 193, 96, .1); }
.b-media { color: #2563eb; background: rgba(37, 99, 235, .09); }
.b-kol { color: #9333ea; background: rgba(147, 51, 234, .09); }
.b-community { color: #ea580c; background: rgba(234, 88, 12, .09); }
.b-paper { color: #b45309; background: rgba(217, 119, 6, .11); }
.b-video { color: #dc2626; background: rgba(220, 38, 38, .09); }
[data-theme="dark"] .b-official { color: #4ade80; }
[data-theme="dark"] .b-media { color: #93c5fd; }
[data-theme="dark"] .b-kol { color: #d8b4fe; }
[data-theme="dark"] .b-community { color: #fdba74; }
[data-theme="dark"] .b-paper { color: #fcd34d; }
[data-theme="dark"] .b-video { color: #fca5a5; }
.p-sub { min-width: 0; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-title { display: block; margin-top: 3px; font-size: 16px; line-height: 1.55; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.p-title:hover { color: var(--nick-hover); }
.post.read .p-title { color: var(--text-3); }
.p-text { margin-top: 4px; font-size: 15px; line-height: 1.7; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.p-text.main { margin-top: 3px; font-size: 15.5px; color: var(--text); }
.p-text.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--clamp, 3); overflow: hidden; }
.p-text a { color: var(--nick); }
.p-text a:hover { text-decoration: underline; }
.p-more { margin-top: 2px; color: var(--nick); font-size: 15px; }
.p-more:hover { color: var(--nick-hover); }

/* ---------- 媒体 */
.media { margin-top: 10px; }
.single {
  position: relative; display: block; overflow: hidden; cursor: zoom-in;
  width: 100%; aspect-ratio: var(--ar, 16 / 9); max-height: 360px;
  border-radius: 10px; background: var(--soft);
}
.single.portrait { width: 44%; max-height: 340px; }
.single.square { width: 58%; }
.single img, .cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.single:hover img, .cell:hover img { transform: scale(1.025); }
.pic { opacity: 0; }
.pic.loaded { opacity: 1; }
.grid { display: grid; gap: 4px; }
.grid.g2 { grid-template-columns: repeat(2, 1fr); max-width: 276px; }
.grid.g3 { grid-template-columns: repeat(3, 1fr); max-width: 414px; }
.cell { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--soft); cursor: zoom-in; }
.broken { display: grid; place-items: center; color: var(--text-4); cursor: default; }
.broken::after { content: "图片加载失败"; font-size: 12px; }
.broken img { display: none; }

.video {
  position: relative; overflow: hidden; cursor: pointer;
  width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #000;
}
.video.vertical { width: 46%; max-width: 270px; aspect-ratio: 9 / 16; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.video:hover img { transform: scale(1.03); }
.video::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.video.playing::after { display: none; }
.play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.play i {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .38); border: 1.5px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .2s, background-color .2s;
}
.play svg.i { width: 24px; height: 24px; margin-left: 3px; color: #fff; }
.video:hover .play i { transform: scale(1.08); background: rgba(0, 0, 0, .5); }
.v-badge { position: absolute; left: 10px; bottom: 9px; z-index: 1; font-size: 12px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.v-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff3b30; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.v-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: #fff; font-size: 14px; background: rgba(0, 0, 0, .78); }
.v-fallback svg.i { width: 26px; height: 26px; opacity: .8; }
.v-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.v-actions .btn { background: rgba(255, 255, 255, .16); color: #fff; }
.v-actions .btn:hover { background: rgba(255, 255, 255, .28); }

.card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 6px; background: var(--soft);
  transition: background-color .15s;
}
.card:hover { background: var(--soft-2); }
.card img, .card-ico { width: 52px; height: 52px; flex: none; border-radius: 4px; object-fit: cover; background: var(--soft-2); display: grid; place-items: center; color: var(--text-3); }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title { font-size: 14px; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-host { font-size: 12px; color: var(--text-3); }
.quote { display: block; padding: 8px 12px; border-radius: 6px; background: var(--soft); border-left: 3px solid var(--line-2); font-size: 14px; color: var(--text-2); }
.quote b { display: block; color: var(--nick); font-weight: 600; margin-bottom: 2px; }

.p-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--soft); color: var(--nick); font-size: 12.5px;
  transition: background-color .15s;
}
.chip:hover { background: var(--soft-2); }
.chip svg.i { width: 13px; height: 13px; }
.chip.tag { color: var(--text-3); }

/* ---------- 底部：时间 + 操作 */
.p-foot { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 24px; font-size: 13px; color: var(--text-4); }
.p-foot time { white-space: nowrap; }
.p-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); }
.p-host:hover { color: var(--nick); }
.p-count { white-space: nowrap; color: var(--text-3); }
.p-fav { color: #f5a524; display: inline-flex; }
.p-fav svg.i { width: 14px; height: 14px; }
.dots {
  margin-left: auto; flex: none;
  width: 34px; height: 22px; border-radius: 5px;
  display: grid; place-items: center;
  background: var(--soft); color: var(--nick);
  transition: background-color .15s;
}
.dots:hover { background: var(--soft-2); }
.dots i { display: flex; gap: 4px; }
.dots i::before, .dots i::after { content: ""; width: 4.5px; height: 4.5px; border-radius: 50%; background: currentColor; }

.menu {
  position: absolute; right: 42px; top: 50%; z-index: 5;
  display: flex; align-items: stretch; height: 38px;
  border-radius: 6px; overflow: hidden;
  background: var(--menu); color: #fff;
  transform: translateY(-50%);
  transform-origin: right center;
  animation: menuIn .22s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.menu > * { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 13.5px; white-space: nowrap; transition: background-color .12s; }
.menu > *:hover { background: rgba(255, 255, 255, .1); }
.menu svg.i { width: 16px; height: 16px; }
.menu i.sep { width: 1px; padding: 0; margin: 10px 0; background: rgba(255, 255, 255, .14); }
.menu .on { color: #fcd34d; }

/* ---------- 点赞与“评论”（相关报道） */
.social { position: relative; margin-top: 9px; padding: 5px 10px; border-radius: 6px; background: var(--soft); font-size: 14px; line-height: 1.6; }
.social::before { content: ""; position: absolute; top: -6px; left: 13px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--soft); }
.likes { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 2px 0; color: var(--nick); }
.lk { display: inline-flex; align-items: center; gap: 4px; }
.lk svg.i { width: 14px; height: 14px; }
.lk b { font-weight: 600; }
.lk em { font-style: normal; color: var(--accent); font-size: 12.5px; }
.lk a:hover { text-decoration: underline; }
.likes + .replies, .likes + .also, .replies + .also { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.reply { display: block; padding: 2px 4px; margin: 0 -4px; border-radius: 4px; color: var(--text-2); overflow-wrap: anywhere; transition: background-color .12s; }
.reply:hover { background: var(--hover); }
.reply .nick { font-size: 14px; }
.reply .r-metric { color: var(--text-3); font-size: 12.5px; margin-left: 4px; white-space: nowrap; }
.r-more { display: block; padding: 2px 0; color: var(--nick); font-size: 13.5px; }
.also { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; font-size: 13px; color: var(--text-3); }
.also svg.i { width: 14px; height: 14px; flex: none; transform: translateY(2px); }
.also a { color: var(--nick); }
.also a:hover { text-decoration: underline; }

/* ---------- 分隔与状态 */
.seen-divider { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--text-3); font-size: 12.5px; }
.seen-divider::before, .seen-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.feed-foot { display: flex; justify-content: center; padding: 6px 0 30px; color: var(--text-4); font-size: 13px; }
.feed-end { display: flex; align-items: center; gap: 12px; padding: 18px 0 8px; }
.feed-end::before, .feed-end::after { content: ""; width: 56px; height: 1px; background: var(--line-2); }
.feed-end i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); }
.sentinel { height: 1px; }

.skeleton { display: flex; gap: 12px; padding: 18px; }
.skeleton .sk { border-radius: 6px; background: linear-gradient(90deg, var(--soft) 25%, var(--soft-2) 37%, var(--soft) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton .sk-av { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.skeleton .sk-body { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.skeleton .sk-line { height: 13px; }
.skeleton .sk-img { height: 180px; border-radius: 10px; margin-top: 4px; }

.empty { padding: 70px 24px; text-align: center; color: var(--text-3); }
.empty svg.i { width: 44px; height: 44px; stroke-width: 1.4; color: var(--text-4); margin-bottom: 10px; }
.empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--text-2); font-weight: 600; }
.empty p { margin: 0 0 16px; font-size: 13.5px; }
.progress { width: 220px; height: 4px; margin: 14px auto 0; border-radius: 4px; background: var(--soft-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #06b6d4); transition: width .4s; }

/* ============================================================ 侧栏组件 */
.filters { display: flex; flex-direction: column; gap: 10px; }
.f-row { display: flex; align-items: center; gap: 10px; }
.f-row > label { flex: none; width: 30px; font-size: 12.5px; color: var(--text-3); }
.seg { flex: 1; display: flex; padding: 2px; border-radius: 9px; background: var(--soft); }
.seg button { flex: 1; height: 28px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
[data-theme="dark"] .seg button.on { background: var(--soft-2); }

.src-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-bottom: 8px; border-radius: 9px; background: var(--soft); color: var(--text-3); }
.src-search svg.i { width: 15px; height: 15px; }
.src-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--text); }
.src-list { overflow: auto; margin: 0 -8px; padding: 0 8px 6px; scrollbar-width: thin; }
.src-group + .src-group { margin-top: 8px; }
.src-group-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 4px; font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; }
.src-group-h button { font-size: 11.5px; color: var(--nick); font-weight: 500; letter-spacing: 0; }
.src-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; transition: background-color .12s; }
.src-row:hover { background: var(--hover); }
.src-row.on { background: var(--accent-soft); }
.src-row.muted { opacity: .45; }
.src-name { flex: 1; min-width: 0; text-align: left; font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 16px; text-align: right; }
.health { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); }
.h-ok { background: var(--accent); }
.h-err { background: var(--danger); }
.h-stale { background: var(--warn); }
.h-run { background: #3b82f6; animation: pulse 1.2s infinite; }
.src-eye { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--text-3); opacity: 0; transition: opacity .12s, background-color .12s; }
.src-row:hover .src-eye, .src-row.muted .src-eye, .src-eye:focus-visible { opacity: 1; }
.src-eye:hover { background: var(--soft-2); color: var(--text); }
@media (hover: none) { .src-eye { opacity: 1; } }
.src-eye svg.i { width: 15px; height: 15px; }

.trends { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trends li button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; text-align: left; transition: background-color .12s; }
.trends li button:hover { background: var(--hover); }
.rank { width: 18px; flex: none; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-4); font-variant-numeric: tabular-nums; font-style: italic; }
.r1 { color: #f43f5e; } .r2 { color: #f97316; } .r3 { color: #f59e0b; }
.term { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-badge { flex: none; font-size: 10.5px; font-style: normal; line-height: 16px; padding: 0 4px; border-radius: 4px; color: #fff; }
.t-new { background: #f43f5e; }
.t-hot { background: #f97316; }
.t-count { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.trends .empty-row { padding: 8px 6px; font-size: 13px; color: var(--text-3); }

.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 10px 8px; border-radius: 10px; background: var(--soft); text-align: center; }
.stat b { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--text-3); }
.spark { margin: 12px 0 4px; }
.spark-h { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 44px; }
.spark-bars i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #34d399, #06b6d4); opacity: .85; transition: height .4s; }
.spark-bars i:last-child { opacity: 1; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.status-line .btn { height: 28px; }
.conn { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.conn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); }
.conn.on::before { background: var(--accent); }

.keys { margin: 0; display: grid; gap: 6px; }
.keys div { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; }
kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; background: var(--soft); border: 1px solid var(--line-2); border-bottom-width: 2px; font: 600 11px/1 var(--font); color: var(--text-2); }

/* ============================================================ 搜索 */
.search { position: fixed; inset: 0 0 auto; z-index: 70; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.search-bar, .search-suggest { pointer-events: auto; width: min(640px, 100%); }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line), var(--shadow);
  border-radius: 0 0 16px 16px;
  transform: translateY(-110%); transition: transform .28s cubic-bezier(.2, .9, .3, 1);
}
.search.open .search-bar { transform: none; }
.search-field { flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--soft); color: var(--text-3); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-cancel { color: var(--nick); font-size: 15px; padding: 0 4px; }
.search-suggest { margin-top: 8px; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
.search.open .search-suggest { opacity: 1; transform: none; }
.search-suggest:empty { display: none; }
.sg-title { font-size: 12px; color: var(--text-3); margin: 0 0 8px; display: flex; justify-content: space-between; }
.sg-title button { color: var(--nick); font-size: 12px; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-chips + .sg-title { margin-top: 14px; }
.sg-chips .chip { height: 30px; padding: 0 12px; font-size: 13.5px; color: var(--text-2); }
.sg-chips .chip em { font-style: normal; color: var(--text-4); font-size: 12px; }

/* ============================================================ 底部弹层 */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .25s; }
.sheet.open .sheet-mask { opacity: 1; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 18px 18px 0 0;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
}
.sheet.open .sheet-panel { transform: none; }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--soft-2); margin: 4px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 16px; }
.sheet-head button { color: var(--accent); font-weight: 600; }
.sheet-body { overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet-body .src-list { overflow: visible; margin: 0; padding: 0; }

/* ============================================================ 图片查看器 */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0); transition: background-color .28s; touch-action: none; user-select: none; overflow: hidden; }
.lightbox.open { background: rgba(0, 0, 0, .975); }
.lb-track { position: absolute; inset: 0; display: flex; transition: transform .32s cubic-bezier(.2, .9, .3, 1); will-change: transform; }
.lb-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; padding: 56px 0; }
.lb-slide img { width: 100%; height: 100%; object-fit: contain; transform-origin: center; will-change: transform; -webkit-user-drag: none; }
.lb-slide.failed::after { content: "图片加载失败"; color: rgba(255, 255, 255, .6); font-size: 14px; position: absolute; }
.lb-top, .lb-caption, .lb-nav { opacity: 0; transition: opacity .25s; }
.lightbox.open .lb-top, .lightbox.open .lb-caption, .lightbox.open .lb-nav { opacity: 1; }
.lb-top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: #fff; background: linear-gradient(rgba(0, 0, 0, .5), transparent); }
.lb-count { font-size: 14px; font-variant-numeric: tabular-nums; padding-left: 6px; }
.lb-actions { display: flex; gap: 6px; }
.lb-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); transition: background-color .15s; }
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); transition: background-color .15s, opacity .25s; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-nav svg.i { width: 24px; height: 24px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-caption { position: absolute; inset: auto 0 0; padding: 30px 20px calc(18px + env(safe-area-inset-bottom)); color: rgba(255, 255, 255, .85); font-size: 13.5px; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-caption b { color: #fff; margin-right: 6px; }

/* ============================================================ 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: calc(36px + env(safe-area-inset-bottom)); z-index: 120;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(30, 30, 32, .92); color: #fff; font-size: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .25);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================ 紧凑模式 */
[data-density="compact"] .post { padding-top: 14px; padding-bottom: 12px; }
[data-density="compact"] .single { width: 240px; max-width: 100%; }
[data-density="compact"] .single.portrait { width: 150px; }
[data-density="compact"] .single.square { width: 180px; }
[data-density="compact"] .video { width: 320px; max-width: 100%; }
[data-density="compact"] .video.vertical { width: 150px; }
[data-density="compact"] .grid.g3 { max-width: 300px; }
[data-density="compact"] .grid.g2 { max-width: 200px; }

/* ============================================================ 动画 */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes aurora { 0% { transform: translate3d(-6%, -4%, 0) rotate(0deg) scale(1); } 50% { transform: translate3d(4%, 3%, 0) rotate(8deg) scale(1.08); } 100% { transform: translate3d(7%, -2%, 0) rotate(16deg) scale(1.12); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-50%) scaleX(.3); } to { opacity: 1; transform: translateY(-50%) scaleX(1); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fresh { 0%, 30% { background: color-mix(in srgb, var(--accent) 9%, transparent); } 100% { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================ 响应式 */
.only-narrow { display: none; }

@media (max-width: 1260px) {
  .layout { grid-template-columns: minmax(0, 640px) 300px; }
  .side-left { display: none; }
  .only-narrow { display: grid; }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 680px); padding: 0; }
  .side-right { display: none; }
  .moments { border-radius: 0; box-shadow: none; }
  .topbar, .cover { border-radius: 0; }
  body { background: var(--card); }
}

@media (max-width: 560px) {
  :root { --topbar-h: 48px; }
  body { font-size: 15px; }
  .cover { height: 270px; }
  .cover-copy { left: 18px; right: 18px; bottom: 76px; }
  .cover-copy h1 { font-size: 32px; }
  .cover-copy p { font-size: 13px; }
  .cover-profile { right: 14px; }
  .cover-avatar { width: 68px; height: 68px; }
  .cover-name { margin-bottom: 36px; font-size: 17px; }
  .post { padding: 16px 14px 14px; gap: 10px; }
  .post + .post::before, .seen-divider + .post::before { left: 66px; }
  .avatar { width: 42px; height: 42px; }
  .grid.g3 { max-width: 100%; }
  .single.portrait { width: 64%; }
  .video.vertical { width: 56%; }
  .hero { grid-template-columns: 50px 1fr; }
  .hero .avatar { width: 50px; height: 50px; }
  .hero-actions { grid-column: 1 / -1; flex-direction: row; }
  .lb-nav { display: none; }
  .search-bar { border-radius: 0; }
  .search-suggest { width: calc(100% - 20px); }
}
