/* ==========================================================================
   知栈 · 视觉增强层 theme.css
   --------------------------------------------------------------------------
   加载顺序：style.css → theme.css（本文件在后，同名选择器由本文件覆盖）
   设计目标：暖调纸感底色 + 极光渐变氛围 + 分层卡片阴影 + 精致中文排版
   成本约束：无图片、无字体文件、无 JS、无构建步骤；纯 CSS，约 20 KB
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  /* 主色：沿用品牌橙，补充渐变伙伴色与深压色 */
  --accent: #ec633e;
  --accent-dark: #c94a28;
  --accent-light: #f7915f;
  --accent-wash: #fff3ec;

  /* 辅助色：青绿（冷调平衡），用于链接悬停、次级高亮 */
  --accent-2: #10807a;
  --accent-2-wash: #e6f5f3;

  /* 墨色层级 */
  --ink: #1f2328;
  --ink-2: #454b54;
  --ink-3: #6b7280;
  --muted: #8b9199;

  /* 线条与纸张 */
  --line: #ebe7e2;
  --line-2: #ddd8d2;
  --canvas: #faf8f5;
  --paper: #ffffff;
  --soft: #fff3ec;

  /* 圆角梯度 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 分层阴影：带暖色调，避免死黑 */
  --shadow-xs: 0 1px 2px rgba(31, 35, 40, .04);
  --shadow-sm: 0 1px 2px rgba(31, 35, 40, .04), 0 4px 12px -6px rgba(31, 35, 40, .10);
  --shadow-md: 0 2px 6px rgba(31, 35, 40, .05), 0 16px 32px -18px rgba(31, 35, 40, .20);
  --shadow-lg: 0 4px 12px rgba(31, 35, 40, .06), 0 28px 60px -28px rgba(31, 35, 40, .28);
  --shadow-accent: 0 8px 24px -10px rgba(236, 99, 62, .55);

  /* 字体：优先系统中文字体，零下载成本 */
  --font-sans: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* 动效曲线 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* --------------------------------------------------------------------------
   2. 背景氛围：固定极光层 + 极淡网点
   用伪元素固定定位，避免移动端 background-attachment:fixed 的重绘开销
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--canvas);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(236, 99, 62, .13), transparent 60%),
    radial-gradient(940px 500px at 96% 2%, rgba(16, 128, 122, .11), transparent 58%),
    radial-gradient(900px 640px at 52% 108%, rgba(92, 104, 190, .08), transparent 62%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(31, 35, 40, .045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 42%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 42%);
}

/* 小屏关闭网点，省一次合成开销 */
@media (max-width: 700px) {
  body::after { display: none; }
}

::selection {
  background: rgba(236, 99, 62, .18);
  color: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   3. 排版
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 750;
}

.page-heading h1 {
  font-size: 31px;
  letter-spacing: -.6px;
  font-weight: 800;
  background: linear-gradient(96deg, var(--ink) 28%, #3d444d 62%, var(--accent) 128%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink);
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2.4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 渐变文字会继承 -webkit-text-fill-color，标题内的彩色子元素需显式还原 */
.page-heading h1 span {
  -webkit-text-fill-color: currentColor;
  background: none;
}

.page-heading h1 span.orange { color: var(--accent); }

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.page-heading p {
  color: var(--ink-3);
  font-size: 13.5px;
}

.muted { color: var(--muted); }

/* 数字统一等宽，统计更整齐 */
.stats strong, .metric-value, .manage-stat strong, time, .reading-time, .comment-head time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------------------------
   4. 顶栏
   -------------------------------------------------------------------------- */
.topbar {
  height: 78px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(235, 231, 226, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 6px 24px -20px rgba(31, 35, 40, .5);
}

.brand-mark {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 52%, var(--accent-dark));
  box-shadow: 0 6px 16px -6px rgba(236, 99, 62, .7), 0 0 0 1px rgba(255, 255, 255, .35) inset;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.04);
  box-shadow: 0 10px 22px -8px rgba(236, 99, 62, .8);
}

.brand b { letter-spacing: 1.4px; font-weight: 800; }
.brand b span { color: var(--muted); font-weight: 600; }

.search {
  background: linear-gradient(180deg, #fff, #fbfaf9);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-xs);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.search:focus-within {
  border-color: rgba(236, 99, 62, .55);
  box-shadow: 0 0 0 4px rgba(236, 99, 62, .12), var(--shadow-sm);
  background: #fff;
}

.search button {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 60%);
  font-weight: 600;
  box-shadow: 0 4px 12px -6px rgba(236, 99, 62, .8);
}

.search button:hover {
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
}

/* --------------------------------------------------------------------------
   5. 按钮
   -------------------------------------------------------------------------- */
.button {
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform .18s var(--ease-out), box-shadow .22s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.button.primary {
  background: linear-gradient(140deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-dark) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-accent);
  color: #fff;
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(236, 99, 62, .75);
  color: #fff;
}

.button.primary:active { transform: translateY(0) scale(.985); }

.button.dark {
  background: linear-gradient(140deg, #33383f, #1f2328);
  border-color: transparent;
  box-shadow: 0 8px 20px -12px rgba(31, 35, 40, .8);
}

.button.dark:hover {
  background: linear-gradient(140deg, #414751, #2a2f36);
  transform: translateY(-1px);
  color: #fff;
}

.button:hover:not(.primary):not(.dark) {
  background: #fff;
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.write-button {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 60%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--shadow-accent);
}

.write-button:hover {
  box-shadow: 0 14px 28px -12px rgba(236, 99, 62, .8);
  transform: translateY(-1px);
}

.register-link { font-weight: 600; }
.login-link { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   6. 侧边栏
   -------------------------------------------------------------------------- */
.sidebar { padding-right: 2px; }

.site-welcome {
  position: relative;
  overflow: hidden;
  margin: 0 0 18px !important;
  padding: 19px 16px 20px !important;
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 650;
  line-height: 2 !important;
  letter-spacing: .3px !important;
  text-transform: none !important;
  border-radius: 16px;
  border: 1px solid rgba(236, 99, 62, .2);
  border-left: 3px solid rgba(236, 99, 62, .62);
  background:
    radial-gradient(120% 88% at 0% 0%, rgba(236, 99, 62, .16), transparent 62%),
    radial-gradient(130% 92% at 100% 104%, rgba(16, 128, 122, .13), transparent 64%),
    linear-gradient(160deg, #fffaf6, #fdf7f1 62%, #fbf5ef);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .95) inset,
    0 12px 26px -22px rgba(196, 76, 43, .95);
}
/* 左上角一团暖光，让卡片有呼吸感 */
.site-welcome::before {
  content: "";
  position: absolute;
  left: -20px;
  top: -22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 99, 62, .26), transparent 70%);
  pointer-events: none;
}
/* 右下角一点青色，与站内极光底色呼应 */
.site-welcome::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 128, 122, .18), transparent 70%);
  pointer-events: none;
}
.welcome-emoji {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
  margin: 0 1px;
  vertical-align: -2px;
}

.nav-caption {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.nav-link {
  border-radius: 12px;
  color: var(--ink-2);
  font-weight: 550;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease-out);
}

.nav-link > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 17px !important;
  border-radius: 9px;
  background: rgba(31, 35, 40, .045);
  color: var(--ink-3);
  transition: inherit;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.nav-link:hover > span:first-child {
  background: rgba(236, 99, 62, .12);
  color: var(--accent);
}

.nav-link.active {
  background: linear-gradient(100deg, rgba(236, 99, 62, .14), rgba(236, 99, 62, .05));
  color: var(--accent-dark);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}

.nav-link.active > span:first-child {
  background: linear-gradient(140deg, var(--accent-light), var(--accent));
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(236, 99, 62, .9);
}

.nav-link.active:hover {
  background: linear-gradient(100deg, rgba(236, 99, 62, .18), rgba(236, 99, 62, .07));
}

.topic-nav .nav-link { font-weight: 500; }

.topic-nav .nav-link > span:first-child,
.topic-nav .hash {
  background: transparent !important;
  width: 18px;
  height: auto;
  font-size: 15px !important;
  color: var(--line-2);
}

.topic-nav .nav-link.selected {
  color: var(--accent);
  font-weight: 700;
  background: rgba(236, 99, 62, .07);
}

.topic-nav .nav-link.selected .hash { color: var(--accent); }

.sidebar-rule {
  border-top: 1px solid var(--line);
  opacity: .8;
}

.sidebar-note {
  background: linear-gradient(150deg, #f4f2ef, #eeefF4);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-xs);
}

.sidebar footer { color: var(--muted); }

/* 侧栏上的小卡片（tagline 区）也统一圆角 */
.sidebar .sidebar-note b { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   7. 内容卡片与信息流
   -------------------------------------------------------------------------- */
.feed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.article-card {
  transition: background .22s var(--ease), transform .28s var(--ease-out), box-shadow .28s var(--ease-out);
}

.article-card + .article-card::before {
  border-top: 1px solid var(--line) !important;
  opacity: .75;
}

.article-card:hover {
  background: linear-gradient(100deg, #fff, #fffbf8 60%, #fff);
  box-shadow: inset 3px 0 0 -1px rgba(236, 99, 62, .0);
}

.article-card:hover::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  animation: railIn .32s var(--ease-out) both;
}

@keyframes railIn {
  from { opacity: 0; transform: scaleY(.3); }
  to   { opacity: 1; transform: scaleY(1); }
}

.article-title h2 {
  color: var(--ink);
  font-weight: 750;
  transition: color .2s var(--ease);
}

.article-card:hover .article-title h2 { color: var(--accent-dark); }

.article-copy > p { color: var(--ink-3) !important; }

.author-line { color: var(--muted); }
.author-line b { color: var(--ink-2); }

.article-meta { color: var(--muted); }

.category-pill {
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: .2px;
  padding: 3px 10px !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .6) inset;
}

.demo {
  border-radius: var(--radius-pill);
  border-color: var(--line-2);
  color: var(--muted);
  padding: 1px 7px !important;
}

.avatar {
  background: linear-gradient(140deg, #f7ece4, #f1e2d7);
  border-color: #f3e3d8;
  box-shadow: 0 2px 6px -3px rgba(153, 114, 94, .5);
}

.user-avatar {
  box-shadow: 0 0 0 1px rgba(31, 35, 40, .06), 0 4px 10px -6px rgba(31, 35, 40, .5);
  background: #fff;
}

/* 阅读进度式的卡片封面：加内发光与更柔和的圆角 */
.article-cover {
  border-radius: 14px;
  box-shadow: 0 10px 24px -16px rgba(31, 35, 40, .8), 0 0 0 1px rgba(31, 35, 40, .05) inset;
  transition: transform .3s var(--ease-out);
}

.article-card:hover .article-cover { transform: translateY(-2px) scale(1.012); }

.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), transparent 45%);
  pointer-events: none;
}

/* 工具栏与标签页 */
.feed-toolbar b span {
  background: var(--accent-wash);
  color: var(--accent-dark);
  border-radius: var(--radius-pill);
  font-weight: 700;
  padding: 1px 7px !important;
}

.tabs {
  border-bottom: 1px solid var(--line);
  gap: 7px;
}

.tabs a {
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-weight: 550;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.tabs a.current {
  background: linear-gradient(140deg, #343a42, #1f2328);
  box-shadow: 0 6px 16px -10px rgba(31, 35, 40, .9);
  color: #fff;
}

.tabs a:hover:not(.current) {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.pagination {
  align-items: center;
  font-weight: 600;
}

.pagination a, .pagination span {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

.pagination a:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.feed-end {
  color: var(--muted);
  letter-spacing: 2px;
  position: relative;
}

.feed-end::before,
.feed-end::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 34px;
  height: 1px;
  margin: 0 12px;
  background: linear-gradient(90deg, transparent, var(--line-2));
}

.feed-end::after { background: linear-gradient(90deg, var(--line-2), transparent); }

.empty > span { color: rgba(236, 99, 62, .35); }
.empty h2 { font-weight: 700; }
.empty p { color: var(--muted); }

/* --------------------------------------------------------------------------
   8. 右栏
   -------------------------------------------------------------------------- */
.welcome-card {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(320px 200px at 88% 8%, rgba(255, 255, 255, .8), transparent 60%),
    linear-gradient(150deg, #fff4ec, #ffece1 55%, #ffe6f0);
  border: 1px solid rgba(236, 99, 62, .18);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -56px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, rgba(236, 99, 62, .22), transparent 68%);
  pointer-events: none;
}

.welcome-card .eyebrow { color: var(--accent-dark); }
.welcome-card .eyebrow::before { display: none; }
.welcome-card h2 { font-weight: 800; letter-spacing: -.4px; }
.welcome-card p { color: #9c8175; }

.side-section {
  border-bottom: 1px solid var(--line);
}

.section-title h3 {
  position: relative;
  padding-left: 12px;
  font-weight: 750;
}

.section-title h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
}

.section-title > span { color: var(--muted); }

.stats > div + div { border-left: 1px solid var(--line); }
.stats strong { font-weight: 750; color: var(--ink); }
.stats span { color: var(--muted); }

/* 排行榜条目骨架（序号与名次样式见文件末尾「排行榜名次体系」一节） */
.popular {
  border-radius: 14px;
  padding: 10px;
  margin: 6px -10px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background .2s var(--ease), transform .22s var(--ease-out), box-shadow .22s var(--ease);
}

.popular:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.popular small { color: var(--muted); }

.chat-teaser {
  border-radius: var(--radius);
  background: linear-gradient(140deg, #fff, #fbf7ff);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease);
}

.chat-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chat-teaser button { color: var(--accent); font-size: 16px; }

.community-rule {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  border: 1px dashed var(--line-2);
  color: var(--muted);
}

/* CSDN / 人民网资讯卡：统一圆角与阴影 */
.csdn-news, .people-news, .news-card, .side-news {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   9. 表单
   -------------------------------------------------------------------------- */
input, textarea, select {
  border-radius: 12px;
  border-color: var(--line-2);
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

input:hover, textarea:hover, select:hover { border-color: #cfc8c1; }

input:focus, textarea:focus, select:focus {
  border-color: rgba(236, 99, 62, .6);
  box-shadow: 0 0 0 4px rgba(236, 99, 62, .12);
  outline: none;
}

.field input:focus, .field textarea:focus, .field select:focus {
  box-shadow: 0 0 0 4px rgba(236, 99, 62, .12);
}

input[type="file"] {
  padding: 9px 12px;
  background: #fbfaf9;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-dark);
  background: var(--accent-wash);
  border: 1px solid rgba(236, 99, 62, .25);
  border-radius: 8px;
  padding: 6px 12px;
  margin-right: 12px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}

input[type="file"]::file-selector-button:hover {
  background: rgba(236, 99, 62, .18);
  color: var(--accent-dark);
}

.errorlist {
  border-radius: 10px;
  border-left: 3px solid #d9553a;
  background: #fff2ee;
  color: #b8442a;
}

.notice {
  border-radius: 12px;
  border-left: 3px solid #3f8f6d;
  box-shadow: var(--shadow-xs);
}

.notice.error { border-left-color: #d9553a; }

/* --------------------------------------------------------------------------
   10. 登录 / 注册 / 编辑器
   -------------------------------------------------------------------------- */
.auth-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
  background:
    radial-gradient(300px 180px at 100% 0%, rgba(236, 99, 62, .06), transparent 60%),
    var(--paper);
}

.auth-card > .brand-mark {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 55%, var(--accent-dark));
  box-shadow: 0 10px 24px -12px rgba(236, 99, 62, .9);
}

.auth-card h1 { font-weight: 800; letter-spacing: -.4px; }

.editor, .article-detail, .comments, .chat-page, .profile-card, .record-row {
  border-radius: var(--radius-lg);
}

.editor {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.editor textarea[name=body] {
  font-family: var(--font-mono);
  line-height: 1.95;
  background: #fdfcfb;
}

.editor-actions { padding-top: 4px; }

/* --------------------------------------------------------------------------
   11. 文章详情与 Markdown 正文
   -------------------------------------------------------------------------- */
.article-detail {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.article-detail > h1 {
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.45;
}

.article-summary {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent-light), var(--accent)) 1;
  background: linear-gradient(100deg, #fff7f2, #fffaf7);
  border-radius: 0 14px 14px 0;
  color: var(--ink-2);
  font-size: 14.5px;
  box-shadow: var(--shadow-xs);
}

.prose {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 2.05;
}

.prose h2 {
  font-size: 23px;
  font-weight: 750;
  position: relative;
  padding-left: 16px;
  margin: 34px 0 16px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  bottom: .34em;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
}

.prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.prose a {
  color: var(--accent-dark);
  text-decoration-color: rgba(236, 99, 62, .35);
  text-underline-offset: 3px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}

.prose a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.prose pre {
  background: linear-gradient(160deg, #2a3542, #1e2731);
  border-radius: 14px;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  padding: 20px 22px;
  font-family: var(--font-mono);
  position: relative;
}

.prose pre::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 12px;
  width: 34px;
  height: 8px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 4px 4px, #ff5f57 3.4px, transparent 3.6px),
    radial-gradient(circle at 17px 4px, #febc2e 3.4px, transparent 3.6px),
    radial-gradient(circle at 30px 4px, #28c840 3.4px, transparent 3.6px);
  opacity: .85;
}

.prose pre code { padding-top: 12px; display: block; }

.prose p code, .prose li code {
  background: var(--accent-wash);
  color: var(--accent-dark);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: .88em;
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .12) inset;
}

.prose blockquote {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent-light), var(--accent-2)) 1;
  background: linear-gradient(100deg, #fbf9f7, #fdfcfb);
  border-radius: 0 12px 12px 0;
  padding: 14px 20px;
  color: var(--ink-3);
  font-style: normal;
}

.prose img {
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.prose table {
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 0 0 1px var(--line);
}

.prose th {
  background: #fbf9f7;
  font-weight: 700;
}

.detail-actions {
  border-top: 1px solid var(--line);
  color: var(--ink-3);
}

.liked {
  background: var(--accent-wash);
  color: var(--accent-dark) !important;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .2) inset;
}

.danger { color: #c04a34; }

/* --------------------------------------------------------------------------
   12. 评论
   -------------------------------------------------------------------------- */
.comments {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.comments h2 { font-weight: 750; }
.comments h2 > span { color: var(--muted); }

.rating { color: #c98a3c; font-weight: 600; }

.comment-form textarea {
  background: #fdfcfb;
  border-radius: 14px;
}

.comment {
  border-top: 1px solid var(--line);
}

.comment > .avatar {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line), 0 6px 14px -10px rgba(31, 35, 40, .6);
}

.comment-content p { color: var(--ink-2); }

.signin-prompt {
  background: linear-gradient(100deg, #fbf9f7, #fdfcfb);
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--ink-3);
}

.comment-replies:not(:empty) {
  background: #fbf9f7;
  border-radius: 14px;
}

/* --------------------------------------------------------------------------
   13. 聊天室与浮窗
   -------------------------------------------------------------------------- */
.chat-fab {
  background: linear-gradient(140deg, #343a42, #1f2328);
  box-shadow: 0 12px 30px -12px rgba(31, 35, 40, .85), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease), background .25s var(--ease);
}

.chat-fab:hover {
  background: linear-gradient(140deg, var(--accent-light), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -14px rgba(236, 99, 62, .85);
}

dialog {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}

dialog::backdrop {
  background: rgba(24, 27, 31, .32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.chat-dialog-head {
  background: linear-gradient(140deg, #fff, #fdfaf8);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-messages { background: linear-gradient(180deg, #fcfbfa, #fbfaf9); }

.chat-message p {
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line) inset;
  color: var(--ink-2);
}

.chat-message.mine p {
  background: linear-gradient(140deg, var(--accent-light), var(--accent));
  color: #fff;
  border-radius: 14px 4px 14px 14px;
  box-shadow: 0 8px 18px -12px rgba(236, 99, 62, .9);
  float: right;
}

.chat-message-head { color: var(--muted); }

.chat-status {
  background: #fbfaf9;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.chat-form textarea {
  background: #fbfaf9;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.chat-login {
  background: linear-gradient(140deg, #fdfbf9, #fbf8f6);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --------------------------------------------------------------------------
   14. 管理后台（保持深色体系，仅精修层次与控件）
   -------------------------------------------------------------------------- */
.manage-panel, .manage-card, .manage-stat {
  border-radius: var(--radius) !important;
}

/* --------------------------------------------------------------------------
   15. 移动端专项
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .topbar {
    height: 62px;
    padding: 0 14px;
    gap: 10px;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
  }

  .brand-mark { width: 32px; height: 32px; font-size: 20px; border-radius: 9px; }
  .brand b { font-size: 19px; letter-spacing: .6px; }
  .brand b span { font-size: 6.5px; letter-spacing: 2px; margin-top: 2px; }

  /* 搜索框下移，避免与顶栏挤压 */
  .search {
    top: 70px;
    left: 12px;
    right: 12px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: #fff;
    box-shadow: var(--shadow-sm);
  }

  .shell {
    padding: 74px 14px 96px;
  }

  /* 主站内导航：横向滚动 + 两端渐隐提示 + 更大的点击区
     注意：必须显式 position:static，否则桌面端的 top:108px 会在
     relative 定位下变成真实位移，把导航压到标题上方 */
  .sidebar {
    margin-bottom: 16px;
    position: static;
    top: auto;
  }

  .sidebar > nav:first-of-type {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 6px;
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
  }

  .sidebar > nav:first-of-type::-webkit-scrollbar { display: none; }

  .sidebar > nav:first-of-type .nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px !important;
    border-radius: var(--radius-pill);
    background: #fff;
    box-shadow: var(--shadow-xs);
    font-size: 13px !important;
    gap: 8px;
  }

  .sidebar > nav:first-of-type .nav-link > span:first-child {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    font-size: 16px !important;
  }

  .sidebar > nav:first-of-type .nav-link.active {
    background: linear-gradient(140deg, var(--accent-light), var(--accent));
    color: #fff;
    box-shadow: var(--shadow-accent);
  }

  .sidebar > nav:first-of-type .nav-link.active > span:first-child {
    background: transparent;
    color: #fff;
  }

  .live-dot { box-shadow: 0 0 0 3px rgba(69, 166, 133, .18); }
  .nav-link .live-dot { margin-left: 2px; }

  .page-heading h1 { font-size: 25px; letter-spacing: -.3px; }
  .page-heading .eyebrow { font-size: 9px; }
  .eyebrow::before { width: 12px; }

  .feed { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
  .article-card { padding: 18px 15px !important; gap: 12px; }
  .article-card:hover::after { display: none; }
  .article-cover { width: 86px !important; height: 96px !important; border-radius: 12px; }
  .article-title h2 { font-size: 16px !important; line-height: 1.6; }
  .article-copy > p { font-size: 12.5px !important; -webkit-line-clamp: 2 !important; }
  .article-meta { font-size: 10.5px !important; gap: 10px !important; margin-top: 11px; }
  .category-pill { font-size: 10px !important; padding: 3px 9px !important; }

  /* 触摸目标不小于 44px */
  .tabs a, .feed-toolbar a, .pagination a { min-height: 40px; display: inline-flex; align-items: center; }

  .auth-card {
    padding: 26px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .editor, .article-detail, .comments, .chat-page { border-radius: var(--radius); }
  .article-detail { padding: 22px 17px; }
  .article-detail > h1 { font-size: 23px; line-height: 1.5; }
  .prose { font-size: 16px; line-height: 2; }
  .prose h2 { font-size: 20px; padding-left: 13px; }
  .prose pre { padding: 18px 16px; border-radius: 12px; }
  .prose pre::before { left: 16px; }
  .article-summary { font-size: 14px; padding: 13px 15px; }

  /* 聊天浮窗上移，避开底部导航栏 */
  .chat-fab {
    bottom: 78px;
    right: 14px;
    padding: 11px 16px;
    font-size: 15px;
    box-shadow: 0 14px 30px -12px rgba(31, 35, 40, .8);
  }

  .chat-fab span { font-size: 11.5px; }

  dialog {
    margin: auto auto 78px;
    max-height: 82dvh;
    border-radius: var(--radius-lg);
  }

  .chat-page .chat-messages { height: 60dvh; }
}

/* 底部标签栏：仅移动端显示 */
.mobile-tabbar { display: none; }

@media (max-width: 700px) {
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .93);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -18px rgba(31, 35, 40, .6);
  }

  .mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    transition: color .2s var(--ease), background .2s var(--ease);
  }

  .mobile-tabbar a i {
    font-style: normal;
    font-size: 19px;
    line-height: 1;
  }

  .mobile-tabbar a.active {
    color: var(--accent);
    background: linear-gradient(140deg, rgba(236, 99, 62, .13), rgba(236, 99, 62, .05));
  }

  .mobile-tabbar a:active { transform: scale(.96); }

  .mobile-tabbar a { position: relative; }

  .mobile-tabbar .tab-dot {
    position: absolute;
    top: 6px;
    right: 50%;
    margin-right: -18px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--accent-light), var(--accent));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .95);
  }
}

/* --------------------------------------------------------------------------
   16. 动效与无障碍
   -------------------------------------------------------------------------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feed .article-card {
  animation: riseIn .42s var(--ease-out) both;
}

.feed .article-card:nth-child(2) { animation-delay: .03s; }
.feed .article-card:nth-child(3) { animation-delay: .06s; }
.feed .article-card:nth-child(4) { animation-delay: .09s; }
.feed .article-card:nth-child(5) { animation-delay: .12s; }
.feed .article-card:nth-child(n+6) { animation-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
  .feed .article-card { animation: none !important; }
  .article-card:hover::after { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* 高对比度/浅色偏好下减弱装饰 */
@media (prefers-contrast: more) {
  body::after { display: none; }
  .article-copy > p { color: var(--ink-2) !important; }
}

::focus-visible {
  outline-color: rgba(236, 99, 62, .55);
}


/* ==========================================================================
   17. 移动端修复：点赞数不可见
   原样式在 ≤700px 用 .article-meta>span:nth-child(3){display:none} 把点赞数藏了，
   这里恢复显示并做紧凑排版。
   ========================================================================== */
@media (max-width: 700px) {
  .article-meta > span:nth-child(3) {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    color: #e0555f;
    font-weight: 600;
  }
  .article-meta > span:nth-child(3) .solid-heart { color: #e0555f; }
  .article-meta > span:nth-child(2) { color: var(--muted); }
}

/* ==========================================================================
   18. 背景色彩增强：五簇色晕 + 缓慢漂移（仅桌面端，移动端静态以省电）
   ========================================================================== */
body::before {
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(236, 99, 62, .17), transparent 60%),
    radial-gradient(900px 480px at 96% 2%, rgba(16, 128, 122, .15), transparent 58%),
    radial-gradient(760px 520px at 74% 20%, rgba(255, 184, 92, .13), transparent 62%),
    radial-gradient(900px 640px at 52% 108%, rgba(92, 104, 190, .13), transparent 62%),
    radial-gradient(680px 460px at 16% 76%, rgba(226, 120, 180, .10), transparent 60%);
}

@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  body::before {
    animation: auroraDrift 52s ease-in-out infinite alternate;
    will-change: transform;
  }
  @keyframes auroraDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-1.5%, 1.1%, 0) scale(1.045); }
  }
}

/* 标题区的柔光，让首屏更有层次 */
.page-heading { position: relative; }
.page-heading::after {
  content: "";
  position: absolute;
  left: -6%;
  top: -46px;
  width: min(58%, 520px);
  height: 190px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(236, 99, 62, .10), transparent 72%);
}

/* ==========================================================================
   19. 文章封面：补齐缺失底色 + 六套随机样式
   ========================================================================== */

/* 读研日常原先没有封面底色（纯白），补上分类同色系 */
.article-cover.cover-grad {
  background: linear-gradient(150deg, #e8f5f8, #d7ecf1);
  color: #126879;
}

/* 深色封面用浅色纹理，浅色封面用深色纹理 */
.cover-python, .cover-frontend, .cover-linux {
  --cover-hi: rgba(255, 255, 255, .18);
  --cover-lo: rgba(0, 0, 0, .18);
}
.cover-ai, .cover-design, .cover-life, .cover-grad {
  --cover-hi: rgba(0, 0, 0, .055);
  --cover-lo: rgba(0, 0, 0, .075);
}

.article-cover.shape-1 { background-image: linear-gradient(150deg, var(--cover-hi), transparent 64%); }
.article-cover.shape-2 { background-image: repeating-linear-gradient(135deg, var(--cover-hi) 0 7px, transparent 7px 15px); }
.article-cover.shape-3 {
  background-image:
    radial-gradient(circle at 76% 18%, var(--cover-hi), transparent 52%),
    radial-gradient(circle at 16% 88%, var(--cover-lo), transparent 56%);
}
.article-cover.shape-4 {
  background-image:
    repeating-linear-gradient(0deg, var(--cover-hi) 0 1px, transparent 1px 13px),
    linear-gradient(180deg, transparent 52%, var(--cover-lo));
}
.article-cover.shape-5 {
  background-image:
    conic-gradient(from 200deg at 84% 10%, var(--cover-hi), transparent 44%),
    linear-gradient(155deg, var(--cover-hi), transparent 60%);
}
.article-cover.shape-6 {
  background-image:
    radial-gradient(closest-side, var(--cover-hi), transparent),
    radial-gradient(closest-side, var(--cover-lo), transparent);
  background-size: 62% 62%, 44% 44%;
  background-position: 22% 26%, 84% 80%;
  background-repeat: no-repeat;
}

/* ==========================================================================
   20. 顶栏右侧操作区：每个按钮各自独立、整体仍成体系
   ========================================================================== */
.top-actions > * { flex-shrink: 0; }

/* 登录：白底描边胶囊 */
.top-actions .nav-signin {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.top-actions .nav-signin:hover {
  border-color: rgba(236, 99, 62, .5);
  color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 注册：暖橙浅底 */
.top-actions .register-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #fff2ea, #ffe6da);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .18) inset;
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), background .2s var(--ease);
}
.top-actions .register-link:hover {
  transform: translateY(-1px);
  background: linear-gradient(140deg, #ffe9dd, #ffdccb);
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .3) inset, var(--shadow-sm);
}

/* 管理后台：深色芯片 + 在线绿点 */
.top-actions .nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #343a43, #1f2328);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  box-shadow: 0 8px 18px -12px rgba(31, 35, 40, .95);
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease);
}
.top-actions .nav-admin::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #45d18a;
  box-shadow: 0 0 0 3px rgba(69, 209, 138, .18);
}
.top-actions .nav-admin:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(31, 35, 40, .95);
}

/* 消息：淡蓝底 + 未读角标 */
.top-actions .message-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #eff3ff, #e5ecff);
  color: #3c4b7d;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(80, 100, 180, .16) inset;
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease);
}
.top-actions .message-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(80, 100, 180, .26) inset, var(--shadow-sm);
}

/* 个人资料：白底胶囊包住头像 */
.top-actions .profile {
  height: 38px;
  padding: 0 12px 0 4px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.top-actions .profile:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

/* 登出：极简文字，仅悬浮时浮现底色 */
.top-actions .text-button {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-weight: 600;
  font-size: 13px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.top-actions .text-button:hover {
  background: rgba(31, 35, 40, .06);
  color: var(--ink);
}

/* 写文章：主按钮，保持最醒目 */
.write-button { height: 38px; padding: 0 18px; }

@media (max-width: 700px) {
  .top-actions .nav-signin,
  .top-actions .register-link,
  .top-actions .message-nav,
  .top-actions .nav-admin {
    height: 30px;
    padding: 0 11px;
    font-size: 11.5px;
  }
  .top-actions .nav-admin::before { width: 5px; height: 5px; }
  .write-button { height: 32px; padding: 0 12px; }
  .top-actions .profile { height: 32px; padding: 0 8px 0 2px; }
}

/* ==========================================================================
   21. 分类切换的滑动过渡
   跨文档 View Transitions（Chrome/Edge 126+、Safari 18.2+）：
   标签栏与"当前胶囊"跨页面形变，形成滑动而不是生硬刷新。
   不支持的浏览器自动退化为普通跳转，无副作用。
   ========================================================================== */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vtOut .22s var(--ease) both;
}
::view-transition-new(root) {
  animation: vtIn .32s var(--ease-out) both;
}
@keyframes vtOut {
  to { opacity: 0; transform: translateY(-6px) scale(.996); }
}
@keyframes vtIn {
  from { opacity: 0; transform: translateY(8px) scale(.996); }
}

.tabs { view-transition-name: tabs-bar; }
.tabs a.current { view-transition-name: tabs-pill; }
.sidebar > nav:first-of-type { view-transition-name: sidebar-nav; }
.feed { view-transition-name: feed-body; }

::view-transition-group(tabs-pill) {
  animation-duration: .34s;
  animation-timing-function: cubic-bezier(.22, 1, .28, 1);
}
::view-transition-group(tabs-bar) { animation-duration: .3s; }
::view-transition-group(feed-body) { animation-duration: .34s; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}

/* ==========================================================================
   22. 个人中心（个人信息 / 浏览记录 / 我的主页）统一重做
   ========================================================================== */

/* 22.1 顶部标签栏：替代原先三个无状态的 .button 链接 */
.center-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px;
  margin: 0 0 22px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  view-transition-name: center-tabs;
}

.center-tabs::-webkit-scrollbar { display: none; }

.center-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .18s var(--ease-out);
}

.center-tabs a i { font-style: normal; font-size: 15px; opacity: .7; }
.center-tabs a:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

.center-tabs a.active {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 60%, var(--accent-dark));
  color: #fff;
  box-shadow: var(--shadow-accent);
  view-transition-name: center-pill;
}

.center-tabs a.active i { opacity: 1; }

/* 22.2 个人资料头卡：大头像 + 身份 + 统计 */
.center-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 22px;
  margin-bottom: 20px;
  background:
    radial-gradient(420px 220px at 88% -12%, rgba(236, 99, 62, .15), transparent 62%),
    radial-gradient(340px 200px at 4% 122%, rgba(16, 128, 122, .12), transparent 60%),
    #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.center-hero-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-avatar { display: inline-flex; flex: 0 0 auto; }

/* avatar.html 内部尺寸带 !important，这里必须同级覆盖 */
.center-hero .identity-avatar,
.center-hero .identity-avatar img {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px;
  max-width: 76px !important;
  flex: 0 0 76px !important;
}
.center-hero .identity-avatar img {
  border-width: 3px;
  box-shadow: 0 0 0 3px #fff, 0 12px 28px -16px rgba(31, 35, 40, .75);
}
.center-hero .identity-avatar.is-vip.vip-1 img { border-color: #e6c470; }
.center-hero .identity-avatar.is-vip.vip-2 img { border-color: #c3d1de; }
.center-hero .identity-avatar.is-vip.vip-3 img {
  border-color: #b294ff;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(150, 110, 255, .38), 0 12px 28px -16px rgba(120, 80, 255, .8);
}
.center-hero .vip-crown {
  width: 26px !important;
  height: 26px !important;
  font-size: 23px !important;
  line-height: 24px !important;
  top: -8px !important;
  right: -6px !important;
}

.hero-id { flex: 1; min-width: 0; }
.hero-id h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 7px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.4;
}
.hero-id h1 .identity-name { font-size: 24px; }
.hero-handle {
  margin: 0 0 7px;
  font: 600 12.5px/1.5 var(--font-mono);
  color: var(--muted);
  letter-spacing: .2px;
}
.hero-bio { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.85; }
.hero-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 22.3 统计条 */
.center-stats {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.center-stats > * {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 11px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.center-stats > *:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-2);
}
.center-stats strong {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.center-stats span { font-size: 11px; color: var(--muted); }

/* 独立使用的统计条（浏览记录页） */
.center-stats.wide { margin: 0 0 20px; padding: 0; border: 0; gap: 12px; }
.center-stats.wide > * {
  background: #fff;
  box-shadow: var(--shadow-xs);
  padding: 15px 10px;
}

/* 22.4 表单面板 */
.center-panel {
  padding: 26px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.panel-head { margin-bottom: 20px; }
.panel-head h2 { margin: 0 0 5px; font-size: 17px; font-weight: 750; }
.panel-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.center-panel .stack-form .field:first-of-type { margin-top: 0; }
.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* 22.5 浏览记录列表 */
.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .2s var(--ease);
}
.history-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(236, 99, 62, .3);
}

.history-index {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 12px/1 var(--font-mono);
  color: var(--accent-dark);
  background: linear-gradient(140deg, #fff3ec, #ffe3d5);
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .16) inset;
  font-variant-numeric: tabular-nums;
}

.history-body { flex: 1; min-width: 0; }
.history-body b { display: block; font-size: 14.5px; font-weight: 650; line-height: 1.65; color: var(--ink); }
.history-body b a:hover { color: var(--accent-dark); }
.history-body b em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: #f2f3f5;
}
.history-body small {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.history-duration {
  flex: 0 0 auto;
  font: 650 12px/1 var(--font-mono);
  color: var(--ink-2);
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  background: #f8f9fb;
  border: 1px solid var(--line);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .center-tabs { margin-bottom: 16px; padding: 5px; }
  .center-tabs a { padding: 8px 13px; font-size: 12.5px; }
  .center-hero { padding: 20px 18px 16px; }
  .center-hero .identity-avatar,
  .center-hero .identity-avatar img {
    width: 62px !important;
    height: 62px !important;
    min-width: 62px;
    max-width: 62px !important;
    flex: 0 0 62px !important;
  }
  .center-hero .vip-crown { width: 22px !important; height: 22px !important; font-size: 19px !important; }
  .hero-id h1, .hero-id h1 .identity-name { font-size: 20px; }
  .hero-actions { margin-left: 0; width: 100%; }
  .center-stats strong { font-size: 18px; }
  .center-panel { padding: 20px 17px; }
  .history-item { gap: 12px; padding: 14px; }
  .history-index { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; font-size: 11px; }
  .history-body b { font-size: 13.5px; }
  .history-duration { font-size: 11px; padding: 6px 10px; }
}

/* ==========================================================================
   23. 排行榜名次体系（在线时长榜 / 值得一读 共用）
   两处统一使用两位序号 01–10；第 1–10 名各自拥有专属配色与字体层级：
   前三名用衬线体（系统自带 Georgia / 宋体，零下载成本），字重与字号逐级递减，
   第 1 名另有金色徽章、皇冠与整行金色底纹。
   ========================================================================== */

.side-section .popular .rank-no {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font: 800 11.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
  background: var(--rk-bg, #f1f3f6);
  color: var(--rk-fg, #8b9199);
  box-shadow: var(--rk-ring, 0 0 0 1px rgba(31, 35, 40, .06) inset);
}

.side-section .popular b {
  display: block;
  font-size: var(--rk-size, 12.5px);
  font-weight: var(--rk-w, 600);
  color: var(--rk-name, var(--ink-2));
  line-height: 1.72;
  transition: color .2s var(--ease);
}
.side-section .popular:hover b { color: var(--rk-hover, var(--accent-dark)); }
.side-section .popular small { display: block; margin-top: 4px; font-size: 10.5px; }

/* 前三名：衬线体，第一名再加重字距 */
.side-section .popular.rank-01 b,
.side-section .popular.rank-02 b,
.side-section .popular.rank-03 b {
  font-family: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  letter-spacing: .3px;
}
.side-section .popular.rank-01 b { letter-spacing: .5px; }

/* 第 1 名 */
.rank-01 {
  --rk-bg: linear-gradient(140deg, #ffe79b, #f4b23a 58%, #d98c14);
  --rk-fg: #5a3a00;
  --rk-ring: 0 7px 16px -8px rgba(214, 150, 20, .95), 0 0 0 1px rgba(255, 255, 255, .55) inset;
  --rk-name: #8a5a08;
  --rk-hover: #6d4405;
  --rk-w: 800;
  --rk-size: 14px;
  background: linear-gradient(100deg, rgba(255, 214, 110, .18), rgba(255, 214, 110, .04));
}
.side-section .popular.rank-01:hover { background: linear-gradient(100deg, rgba(255, 214, 110, .26), rgba(255, 214, 110, .08)); }
.rank-01 .rank-no::after {
  content: "♛";
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 11px;
  line-height: 1;
  color: #c9860f;
  text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255, 214, 110, .9);
}

/* 第 2 名 */
.rank-02 {
  --rk-bg: linear-gradient(140deg, #f4f8fb, #c9d6e2);
  --rk-fg: #3f4d5c;
  --rk-ring: 0 6px 14px -9px rgba(120, 140, 160, .95), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  --rk-name: #55636f;
  --rk-hover: #3c4a56;
  --rk-w: 760;
  --rk-size: 13.4px;
  background: linear-gradient(100deg, rgba(180, 200, 220, .16), transparent);
}
.side-section .popular.rank-02:hover { background: linear-gradient(100deg, rgba(180, 200, 220, .26), rgba(180, 200, 220, .04)); }

/* 第 3 名 */
.rank-03 {
  --rk-bg: linear-gradient(140deg, #f8d8b8, #dd9a5c);
  --rk-fg: #6b3a12;
  --rk-ring: 0 6px 14px -9px rgba(190, 120, 60, .95), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  --rk-name: #95561f;
  --rk-hover: #7a4415;
  --rk-w: 750;
  --rk-size: 13.1px;
  background: linear-gradient(100deg, rgba(221, 154, 92, .15), transparent);
}
.side-section .popular.rank-03:hover { background: linear-gradient(100deg, rgba(221, 154, 92, .24), rgba(221, 154, 92, .04)); }

/* 第 4–10 名：无衬线，冷色到中性色，字重字号逐级淡化 */
.rank-04 { --rk-bg: linear-gradient(140deg, #eef2ff, #dbe3ff); --rk-fg: #3b4b8f; --rk-ring: 0 0 0 1px rgba(80, 100, 180, .18) inset; --rk-name: #44548f; --rk-w: 700; --rk-size: 12.9px; }
.rank-05 { --rk-bg: linear-gradient(140deg, #e8f6f4, #d2ebe7); --rk-fg: #0f6f6a; --rk-ring: 0 0 0 1px rgba(16, 128, 122, .2) inset; --rk-name: #17635e; --rk-w: 680; --rk-size: 12.7px; }
.rank-06 { --rk-bg: linear-gradient(140deg, #f2ecff, #e4d9ff); --rk-fg: #5d43ad; --rk-ring: 0 0 0 1px rgba(110, 80, 190, .18) inset; --rk-name: #5b46a3; --rk-w: 660; --rk-size: 12.5px; }
.rank-07 { --rk-bg: linear-gradient(140deg, #fdeaf3, #f8d9e7); --rk-fg: #a8436f; --rk-ring: 0 0 0 1px rgba(180, 70, 120, .16) inset; --rk-name: #8f4a6b; --rk-w: 640; --rk-size: 12.4px; }
.rank-08 { --rk-bg: linear-gradient(140deg, #fff1e7, #ffe3d0); --rk-fg: #ad5a2a; --rk-ring: 0 0 0 1px rgba(190, 110, 60, .16) inset; --rk-name: #8a5a41; --rk-w: 620; --rk-size: 12.3px; }
.rank-09 { --rk-bg: linear-gradient(140deg, #eff2f5, #e2e7ec); --rk-fg: #5c6773; --rk-ring: 0 0 0 1px rgba(31, 35, 40, .07) inset; --rk-name: #6b7280; --rk-w: 600; --rk-size: 12.2px; }
.rank-10 { --rk-bg: linear-gradient(140deg, #f4f5f7, #e9ebee); --rk-fg: #8b9199; --rk-ring: 0 0 0 1px rgba(31, 35, 40, .05) inset; --rk-name: #7b828c; --rk-w: 560; --rk-size: 12.1px; }

/* 第 4 名起在徽章数字前加一个淡分隔点，强化"靠后"的层级感 */
.rank-04 .rank-no, .rank-05 .rank-no, .rank-06 .rank-no { border-radius: 10px; }
.rank-07 .rank-no, .rank-08 .rank-no, .rank-09 .rank-no, .rank-10 .rank-no {
  border-radius: 50%;
  font-size: 11px;
  opacity: .92;
}

@media (max-width: 700px) {
  .side-section .popular .rank-no { flex: 0 0 26px; width: 26px; height: 26px; font-size: 10.5px; border-radius: 9px; }
  .side-section .popular.rank-07 .rank-no,
  .side-section .popular.rank-08 .rank-no,
  .side-section .popular.rank-09 .rank-no,
  .side-section .popular.rank-10 .rank-no { border-radius: 50%; }
  .side-section .popular b { font-size: calc(var(--rk-size, 12.5px) - .4px); }
}

/* ==========================================================================
   24. 哔哩哔哩热门视频卡
   复用 .csdn-news 轮播骨架（同一套 .news-slides/.news-slide 结构与 data-news-* 控件），
   因此自动获得与 CSDN / 人民网一致的丝滑轮播与视觉语言，未新增任何 JS。
   ========================================================================== */
.bilibili-news .news-art { background: linear-gradient(130deg, #1f2a3d, #7b5ea7); }
.bilibili-news .news-art img { border-radius: 9px; }

/* 名次：左上角 */
.bilibili-news .news-art .bv-rank {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 11px/1 var(--font-mono);
  letter-spacing: 0;
  color: #5a3a00;
  background: linear-gradient(140deg, #ffe79b, #f4b23a 62%);
  border-radius: 7px;
  box-shadow: 0 4px 10px -5px rgba(214, 150, 20, .95), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.bilibili-news .news-slide:not(:first-child) .bv-rank,
.bilibili-news .news-slide .bv-rank { color: #5a3a00; }

/* 时长：右下角 */
.bilibili-news .news-art .bv-duration {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  padding: 3px 7px;
  font: 650 10.5px/1 var(--font-mono);
  letter-spacing: 0;
  color: #fff;
  background: rgba(20, 22, 28, .74);
  border-radius: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 播放按钮：悬浮浮现 */
.bilibili-news .news-art .bv-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  letter-spacing: 0;
  color: #fff;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .42));
  text-shadow: 0 4px 14px rgba(0, 0, 0, .55);
  transition: opacity .28s var(--ease);
  pointer-events: none;
}
.bilibili-news .news-slide:hover .bv-play,
.bilibili-news .news-slide:focus-visible .bv-play { opacity: 1; }

/* UP 主与播放量一行，避免过长换行 */
.bilibili-news .news-slide small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 视频标题保持三行高度，与资讯卡对齐 */
.bilibili-news .news-slide b { height: 67px; }

@media (max-width: 700px) {
  .bilibili-news .news-art .bv-rank { top: 7px; left: 7px; min-width: 23px; height: 18px; font-size: 10px; }
  .bilibili-news .news-art .bv-duration { right: 7px; bottom: 7px; font-size: 10px; }
  .bilibili-news .news-slide b { height: 62px; font-size: 13px; }
}

/* 管理端 B 站内容管理：封面缩略图 */
.bv-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f1f3f6;
  display: block;
}
.bv-title-cell { display: flex; gap: 12px; align-items: center; min-width: 0; }
.bv-title-cell b { font-weight: 600; font-size: 13px; line-height: 1.6; }
.bv-title-cell small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.bv-hidden { opacity: .45; }

/* ==========================================================================
   25. 顶栏个人胶囊：长名字不再挤掉会员标签，并善用右侧空间
   ========================================================================== */
.top-actions .profile { max-width: 340px; }
.top-actions .profile > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 300px;
  overflow: visible;
  text-overflow: clip;
}
.top-actions .profile .identity-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 名字可以省略，但等级/管理标签永远完整显示 */
.top-actions .profile .vip-badge,
.top-actions .profile .official-badge { flex: 0 0 auto; }

@media (max-width: 1100px) {
  .top-actions .profile .identity-name { display: none; }
  .top-actions .profile > span:last-child { max-width: 150px; }
}

/* ==========================================================================
   26. 哔哩哔哩卡片移到 CSDN 右侧（宽屏双列，窄屏仍纵向堆叠）
   默认 .news-row 是普通块级容器，两张卡照旧上下排列，行为完全不变。
   ========================================================================== */
.news-row { display: block; }

@media (min-width: 1680px) {
  /* 主内容列不小于 520px，右栏拓宽后给两张资讯卡各留约 290px */
  .shell {
    grid-template-columns: 188px minmax(520px, 1fr) 600px;
    max-width: 2000px;
  }
  .news-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .news-row > .csdn-news { margin: 22px 0; }
}

/* ==========================================================================
   27. 排行榜：统一字体（去掉衬线混排），改用同族字重 + 渐变鎏金，清晰且有质感
   ========================================================================== */
.side-section .popular.rank-01 b,
.side-section .popular.rank-02 b,
.side-section .popular.rank-03 b {
  font-family: inherit;
  letter-spacing: .2px;
}
.side-section .popular b {
  letter-spacing: .2px;
  text-rendering: optimizeLegibility;
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .side-section .popular.rank-01 b {
    background: linear-gradient(100deg, #a8720c, #e6ac22 52%, #8a5a08);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .side-section .popular.rank-02 b {
    background: linear-gradient(100deg, #5f7181, #9db0c0 52%, #4b5b69);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .side-section .popular.rank-03 b {
    background: linear-gradient(100deg, #95561f, #cd8f4d 52%, #7a4415);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
}
/* 名次字号整体上抬一档，更清晰 */
.rank-01 { --rk-size: 14.5px; }
.rank-02 { --rk-size: 14px; }
.rank-03 { --rk-size: 13.6px; }
.rank-04 { --rk-size: 13.2px; }
.rank-05 { --rk-size: 13px; }
.rank-06 { --rk-size: 12.8px; }
.rank-07 { --rk-size: 12.6px; }
.rank-08 { --rk-size: 12.4px; }
.rank-09 { --rk-size: 12.2px; }
.rank-10 { --rk-size: 12px; }

/* ==========================================================================
   28. 粉丝 / 关注 名单页
   ========================================================================== */
.relation-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.relation-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.relation-tabs a b {
  font: 700 11px/1 var(--font-mono);
  background: #f1f3f6;
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  padding: 3px 7px;
}
.relation-tabs a:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--ink); }
.relation-tabs a.active {
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 60%, var(--accent-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.relation-tabs a.active b { background: rgba(255, 255, 255, .26); color: #fff; }

.people-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.people-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .2s var(--ease);
}
.people-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(236, 99, 62, .26);
}
.people-id { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.people-name { min-width: 0; }
.people-name b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.people-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-action { flex: 0 0 auto; }

@media (max-width: 700px) {
  .people-list { grid-template-columns: 1fr; }
  .relation-tabs a { padding: 8px 13px; font-size: 12.5px; }
}

/* ==========================================================================
   29. 私信会话页：头像与字体重新排版
   ========================================================================== */
.dm-head { align-items: center; }
.dm-head .author-line { gap: 13px; align-items: center; }
/* avatar.html 内部尺寸带 !important，这里同级覆盖放大头像 */
.dm-head .identity-avatar,
.dm-head .identity-avatar img {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px;
  max-width: 46px !important;
  flex: 0 0 46px !important;
}
.dm-head .identity-avatar img {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(31, 35, 40, .08), 0 8px 20px -12px rgba(31, 35, 40, .8);
}
.dm-head .vip-crown { width: 20px !important; height: 20px !important; font-size: 17px !important; top: -7px !important; right: -5px !important; }
.dm-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.2px;
  line-height: 1.4;
}
.dm-head h2 .identity-name { font-size: 18px; }
.dm-head small { color: var(--muted); font-size: 11.5px; }
.dm-head > a { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.dm-head > a:hover { color: var(--accent-dark); }

@media (max-width: 700px) {
  .dm-head .identity-avatar,
  .dm-head .identity-avatar img {
    width: 38px !important; height: 38px !important; min-width: 38px; max-width: 38px !important; flex: 0 0 38px !important;
  }
  .dm-head h2, .dm-head h2 .identity-name { font-size: 16px; }
}

/* ==========================================================================
   30. 修复：搜索框出现内外两层框
   上一批给全局 input 加了圆角/边框/背景与聚焦光圈，误伤了顶栏搜索框
   （它本该是无边框、融进胶囊里的），于是聚焦时出现「外圈橙色 + 内圈灰框」两层。
   ========================================================================== */
.topbar .search input,
.topbar .search input:hover,
.topbar .search input:focus,
.topbar .search input:focus-visible {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
}
.topbar .search { padding-left: 14px; }
.topbar .search > span { font-size: 19px; color: #a2a8b2; }

/* ==========================================================================
   31. 文章封面重新设计：用分类主色做底，配色鲜明、字号放大、一眼分辨分类
   底色来自后台可维护的分类配色（--cv-ink），因此分类改名改色后封面自动跟随。
   ========================================================================== */
.article-cover {
  background-color: var(--cv-ink, #2f4257);
  background-image: linear-gradient(150deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 46%);
  color: #fff;
  box-shadow: 0 12px 26px -18px rgba(20, 26, 35, .95), 0 0 0 1px rgba(255, 255, 255, .10) inset;
  --cover-hi: rgba(255, 255, 255, .17);
  --cover-lo: rgba(0, 0, 0, .18);
}

.article-cover .cover-label {
  font-size: 11px;
  letter-spacing: 1.1px;
  opacity: .95;
  color: rgba(255, 255, 255, .92);
  font-weight: 600;
}

.article-cover strong {
  font-size: 46px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}
.article-cover strong span {
  font-size: 24px;
  margin-left: 6px;
  color: rgba(255, 255, 255, .82);
  text-shadow: none;
}
.cover-ai strong, .cover-design strong { font-size: 46px; letter-spacing: -2px; }
.cover-life strong { font-size: 27px; }

.article-cover small {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .8);
  opacity: .9;
}

.article-cover code {
  font: 11px/1.75 var(--font-mono);
  color: rgba(255, 255, 255, .95);
}
.article-cover code span { color: #ffe08a; }
.article-cover em { color: #ffd48a; }
.article-cover i { color: #a9e8cd; }

/* 六种底纹在深色底上统一用白色叠加 */
.article-cover.shape-1 { background-image: linear-gradient(150deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 46%); }
.article-cover.shape-2 { background-image: linear-gradient(150deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 50%), repeating-linear-gradient(135deg, var(--cover-hi) 0 7px, transparent 7px 15px); }
.article-cover.shape-3 {
  background-image:
    radial-gradient(circle at 76% 18%, var(--cover-hi), transparent 54%),
    radial-gradient(circle at 16% 88%, var(--cover-lo), transparent 58%),
    linear-gradient(150deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 46%);
}
.article-cover.shape-4 {
  background-image:
    repeating-linear-gradient(0deg, var(--cover-hi) 0 1px, transparent 1px 13px),
    linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 52%);
}
.article-cover.shape-5 {
  background-image:
    conic-gradient(from 200deg at 84% 10%, var(--cover-hi), transparent 46%),
    linear-gradient(155deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 56%);
}
.article-cover.shape-6 {
  background-image:
    radial-gradient(closest-side, var(--cover-hi), transparent),
    radial-gradient(closest-side, var(--cover-lo), transparent),
    linear-gradient(150deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 50%);
  background-size: 62% 62%, 44% 44%, auto;
  background-position: 22% 26%, 84% 80%, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

@media (max-width: 700px) {
  .article-cover .cover-label { font-size: 10px; letter-spacing: .8px; }
  .article-cover strong { font-size: 34px; }
  .article-cover strong span { font-size: 17px; margin-left: 4px; }
  .article-cover small { font-size: 7px; letter-spacing: .5px; }
  .article-cover code { font-size: 8.5px; }
  .cover-life strong { font-size: 20px; }
}

/* ==========================================================================
   32. 主页文章卡片：字号与配色调整到更舒服的阅读尺寸
   ========================================================================== */
.article-title h2 {
  font-size: 19.5px;
  line-height: 1.55;
  letter-spacing: -.2px;
}
.article-copy > p {
  font-size: 14px;
  color: #5f6773 !important;
  line-height: 1.85;
}
.author-line { font-size: 11.5px; }
.article-meta { font-size: 11.5px; }
.article-meta > span, .article-meta > a { font-size: 11.5px; }

@media (max-width: 1200px) {
  .article-title h2 { font-size: 18.5px; }
  .article-copy > p { font-size: 13.5px; }
}
@media (max-width: 700px) {
  .article-title h2 { font-size: 17px !important; line-height: 1.55; }
  .article-copy > p { font-size: 13.2px !important; -webkit-line-clamp: 2 !important; color: #6b7280 !important; }
  .author-line { font-size: 10.5px; }
  .article-meta, .article-meta > span, .article-meta > a { font-size: 11px !important; }
}

/* ==========================================================================
   33. 右栏四张资讯卡：宽屏 2×2 对齐，四框等高
   ========================================================================== */
.ithome-news .news-art { background: linear-gradient(130deg, #2b3a4a, #4f7fa8); }

/* IT之家名次角标：冷蓝调，与 B 站的金色区分 */
.ithome-news .news-art .ih-rank {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 11px/1 var(--font-mono);
  letter-spacing: 0;
  color: #fff;
  background: linear-gradient(140deg, rgba(28, 42, 58, .9), rgba(28, 42, 58, .62));
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 7px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ithome-news .news-slide small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1680px) {
  .news-row {
    grid-auto-rows: 1fr;      /* 四张卡等高 */
    margin: 22px 0;
  }
  .news-row > .csdn-news { margin: 0; }
}

/* ==========================================================================
   34. 「联系我们」弹窗
   ========================================================================== */
.top-actions .nav-contact {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #f3f6ff, #e9eefc);
  color: #3f4f7d;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid rgba(90, 110, 180, .18);
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), background .2s var(--ease);
}
.top-actions .nav-contact:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(140deg, #eaefff, #dfe7fb);
}

.contact-dialog {
  width: 420px;
  max-width: calc(100vw - 28px);
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: #fff;
  color: var(--ink);
}
.contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  background: linear-gradient(140deg, #fff, #fbf9f7);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.contact-head b { font-size: 16px; font-weight: 750; }
.contact-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.contact-head button { font-size: 26px; line-height: 1; color: #9aa1ac; }
.contact-head button:hover { color: var(--accent); }

.contact-body { padding: 18px 22px 22px; }
.contact-grid { display: grid; gap: 10px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fbfaf9, #fff);
  border: 1px solid var(--line);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.contact-item:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 99, 62, .28);
  box-shadow: var(--shadow-sm);
}
.contact-glyph {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 60%, var(--accent-dark));
  box-shadow: 0 6px 14px -8px rgba(236, 99, 62, .9);
}
.contact-text { min-width: 0; }
.contact-text small { display: block; color: var(--muted); font-size: 11.5px; }
.contact-text b {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
  letter-spacing: .3px;
}
.contact-text em { display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: var(--muted); }

.contact-empty { text-align: center; padding: 26px 10px 20px; }
.contact-empty span { display: block; font-size: 34px; color: rgba(236, 99, 62, .35); margin-bottom: 10px; }
.contact-empty p { margin: 0; color: var(--ink-3); font-size: 14px; }

@media (max-width: 700px) {
  .top-actions .nav-contact { height: 30px; padding: 0 11px; font-size: 11.5px; }
  .contact-dialog { border-radius: var(--radius); }
  .contact-head { padding: 16px 18px 13px; }
  .contact-body { padding: 14px 18px 18px; }
  .contact-glyph { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .contact-text b { font-size: 14px; }
}

/* 修正：.cover-grad 等分类类名权重高于 .article-cover，
   早先写的 background 简写会把 background-color 重置成透明，
   导致「读研日常」封面没有底色（看起来最单调）。这里按类名逐一补回。 */
.article-cover.cover-grad,
.article-cover.cover-python,
.article-cover.cover-ai,
.article-cover.cover-frontend,
.article-cover.cover-linux,
.article-cover.cover-design,
.article-cover.cover-life {
  background-color: var(--cv-ink, #2f4257);
}

/* ==========================================================================
   35. 消息通知列表（关注 / 点赞 / 取消点赞 / 评论 / 取关 / 关注作者发文）
   ========================================================================== */
.notice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.notice-actions .muted { font-size: 12.5px; }

.notice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.notice-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(236, 99, 62, .26);
}
.notice-item.is-unread {
  border-left-color: var(--accent);
  background: linear-gradient(100deg, #fffaf7, #fff);
}

/* 头像为主、动作类型为角标：既能看清是谁，也能一眼分辨发生了什么 */
.notice-avatar {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* avatar.html 内部尺寸带 !important，这里同级覆盖放大 */
.notice-avatar .identity-avatar,
.notice-avatar .identity-avatar img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  max-width: 44px !important;
  flex: 0 0 44px !important;
}
.notice-avatar .identity-avatar img {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(31, 35, 40, .08), 0 6px 16px -10px rgba(31, 35, 40, .7);
}
.notice-avatar .vip-crown {
  width: 18px !important;
  height: 18px !important;
  font-size: 15px !important;
  line-height: 16px !important;
  top: -6px !important;
  right: -4px !important;
}
.notice-avatar .avatar-fallback {
  width: 44px;
  height: 44px;
  font-size: 17px;
  border-radius: 50%;
}

.notice-kind {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(140deg, #9aa3b0, #6b7280);
  box-shadow: 0 0 0 2px #fff, 0 3px 8px -4px rgba(31, 35, 40, .55);
}
.notice-item.kind-like .notice-kind { background: linear-gradient(140deg, #ff8a9b, #e04a63); }
.notice-item.kind-unlike .notice-kind { background: linear-gradient(140deg, #f4c6cd, #cf95a0); }
.notice-item.kind-comment .notice-kind { background: linear-gradient(140deg, #7fb6f5, #3d7fd6); }
.notice-item.kind-follow .notice-kind { background: linear-gradient(140deg, #6fd6a5, #2f9e6b); }
.notice-item.kind-unfollow .notice-kind { background: linear-gradient(140deg, #cbd2da, #98a1ad); }
.notice-item.kind-article .notice-kind { background: linear-gradient(140deg, var(--accent-light), var(--accent)); }
.notice-item.kind-mention .notice-kind { background: linear-gradient(140deg, #b98cf0, #7a4fd0); }
.notice-item.kind-reply .notice-kind { background: linear-gradient(140deg, #7fb6f5, #3d7fd6); }
.notice-body { flex: 1; min-width: 0; }
.notice-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.6;
}
.notice-text { color: var(--ink-2); }
.notice-quote {
  margin: 7px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fbf9f7;
  border-left: 2px solid var(--line-2);
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.7;
}
.notice-time { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.notice-arrow { color: #c8cdd5; font-size: 18px; flex: 0 0 auto; }

@media (max-width: 700px) {
  .notice-item { padding: 12px 13px; gap: 11px; }
  .notice-line { font-size: 13px; }
  .notice-quote { font-size: 12px; }
}

/* ==========================================================================
   36. 聊天室 @ 提及：选择面板 + 悬浮按钮未读角标
   ========================================================================== */
.chat-form { position: relative; }

.mention-panel {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: calc(100% - 4px);
  z-index: 6;
  max-height: 224px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  -webkit-overflow-scrolling: touch;
}
.mention-panel[hidden] { display: none; }

.mention-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.mention-item:hover,
.mention-item.active { background: var(--accent-wash); color: var(--accent-dark); }
.mention-item b { font-weight: 650; }
.mention-item small { margin-left: auto; color: var(--muted); font-size: 11px; }
.mention-glyph {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--accent-light), var(--accent));
}

/* 悬浮聊天按钮上的 @ 未读角标 */
.chat-fab .fab-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #ff7d6c, #dd2f26);
  color: #fff;
  font: 800 11px/1 var(--font-mono);
  font-style: normal;
  letter-spacing: -.3px;
  box-shadow: 0 0 0 2px #fff, 0 5px 12px -5px rgba(221, 47, 38, .95);
  animation: fabPulse 2.6s ease-in-out infinite;
}
.chat-fab .fab-badge[hidden] { display: none; }
@keyframes fabPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab .fab-badge { animation: none; }
}

@media (max-width: 700px) {
  .mention-panel { left: 12px; right: 12px; max-height: 40dvh; border-radius: 12px; }
  .mention-item { padding: 10px; font-size: 13.5px; }
  .chat-fab .fab-badge { top: -5px; right: -5px; min-width: 19px; height: 19px; font-size: 10px; }
}
@media (max-width: 700px) {
  .notice-avatar,
  .notice-avatar .identity-avatar,
  .notice-avatar .identity-avatar img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    max-width: 38px !important;
    flex: 0 0 38px !important;
  }
  .notice-avatar .vip-crown { width: 16px !important; height: 16px !important; font-size: 13px !important; }
  .notice-kind { width: 19px; height: 19px; font-size: 10px; right: -3px; bottom: -3px; }
}

/* ==========================================================================
   37. 聊天室：发图片、图片查看、右键提及菜单、浮窗进入整页
   ========================================================================== */

/* 图片按钮与表单底栏 */
.chat-form-bar { display: flex; align-items: center; gap: 10px; }
.chat-form-bar small { margin-right: auto; }
.chat-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .2s var(--ease);
}
.chat-tool:hover { background: var(--accent-wash); border-color: rgba(236, 99, 62, .35); color: var(--accent-dark); box-shadow: var(--shadow-xs); }

/* 待发送图片预览 */
.chat-preview { position: relative; display: inline-block; margin: 0 0 8px; }
.chat-preview[hidden] { display: none; }
.chat-preview img {
  display: block;
  max-width: 148px;
  max-height: 148px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
.chat-preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(140deg, #3a414b, #22262c);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.chat-preview-remove:hover { background: linear-gradient(140deg, #ff7d6c, #dd2f26); }

/* 消息里的图片 */
.chat-image {
  display: block;
  margin-top: 7px;
  width: fit-content;
  max-width: min(260px, 78%);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line) inset;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease);
}
.chat-message.mine .chat-image { margin-left: auto; }
.chat-image img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.chat-image:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 图片放大查看 */
.chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(16, 18, 22, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightboxIn .22s var(--ease-out) both;
}
.chat-lightbox[hidden] { display: none; }
.chat-lightbox img {
  max-width: min(100%, 1100px);
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
.chat-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease-out);
}
.chat-lightbox-close:hover { background: rgba(255, 255, 255, .3); transform: rotate(90deg); }
@keyframes lightboxIn { from { opacity: 0; } to { opacity: 1; } }

/* 右键 / 长按头像弹出的菜单 */
.chat-menu {
  position: fixed;
  z-index: 210;
  min-width: 158px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  animation: menuIn .16s var(--ease-out) both;
}
.chat-menu[hidden] { display: none; }
.chat-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.chat-menu button b { color: var(--accent); font-size: 13px; }
.chat-menu button:hover { background: var(--accent-wash); color: var(--accent-dark); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-5px) scale(.97); } to { opacity: 1; transform: none; } }

/* 浮窗标题栏的「全屏」入口 */
.chat-dialog-tools { display: flex; align-items: center; gap: 8px; }
.chat-expand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #fff2ea, #ffe6da);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(236, 99, 62, .18) inset;
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease), background .2s var(--ease);
}
.chat-expand i { font-style: normal; font-size: 13px; }
.chat-expand:hover { transform: translateY(-1px); background: linear-gradient(140deg, #ffe9dd, #ffdccb); box-shadow: 0 0 0 1px rgba(236, 99, 62, .3) inset, var(--shadow-sm); }

/* 顶栏在每次换页时保持纹丝不动：
   默认情况下整个文档会做交叉淡入淡出，顶栏这种"每页都一样"的元素反而会被
   新旧两份同时渲染，出现重影与闪烁。给它单独命名并停掉动画即可稳定。 */
.topbar { view-transition-name: topbar; }
::view-transition-old(topbar) { display: none; }
::view-transition-new(topbar) { animation: none; }

/* 浮窗 ↔ 整页聊天室的形变过渡（同一 view-transition-name 才能自然衔接） */
#chat-dialog { view-transition-name: chat-panel; }
.chat-page { view-transition-name: none; }
body:has(.chat-page) #chat-dialog { view-transition-name: none; }
body:has(.chat-page) .chat-page { view-transition-name: chat-panel; }
::view-transition-group(chat-panel) {
  animation-duration: .42s;
  animation-timing-function: cubic-bezier(.22, 1, .28, 1);
}

/* ==========================================================================
   38. 消息分类标签上的未读角标（私信 / 关注动态）
   ========================================================================== */
.tab-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #ff7d6c, #dd2f26);
  color: #fff;
  font: 800 10.5px/1 var(--font-mono);
  font-style: normal;
  letter-spacing: -.3px;
  box-shadow: 0 0 0 2px #fff, 0 3px 8px -4px rgba(221, 47, 38, .9);
  transition: opacity .26s var(--ease), transform .26s var(--ease-out);
}
.tab-dot-badge[hidden] { display: none; }
.tab-dot-badge.is-appearing { animation: badgeIn .32s var(--ease-out) both; }
.tab-dot-badge.is-clearing { opacity: 0; transform: scale(.4); }
@keyframes badgeIn {
  from { opacity: 0; transform: scale(.3); }
  60%  { transform: scale(1.18); }
  to   { opacity: 1; transform: scale(1); }
}
/* 深色选中态下让白圈更自然 */
.message-tabs a.selected .tab-dot-badge { box-shadow: 0 0 0 2px rgba(122, 92, 200, .9), 0 3px 8px -4px rgba(221, 47, 38, .9); }

@media (max-width: 700px) {
  .chat-form-bar { flex-wrap: wrap; gap: 8px; }
  .chat-form-bar small { order: 3; width: 100%; margin-right: 0; }
  .chat-image { max-width: 74%; }
  .chat-lightbox { padding: 14px; }
  .chat-lightbox img { border-radius: 12px; }
  .chat-expand span { display: none; }
  .chat-expand { padding: 6px 9px; }
}

/* ==========================================================================
   39. 顶栏右上角的收起 / 展开
   ========================================================================== */
.top-fold {
  display: grid;
  overflow-x: clip;
  grid-template-columns: 1fr;
  transition:
    grid-template-columns .46s cubic-bezier(.22, 1, .28, 1),
    opacity .3s var(--ease),
    transform .46s cubic-bezier(.22, 1, .28, 1),
    margin .46s cubic-bezier(.22, 1, .28, 1),
    visibility 0s;
}
.top-fold-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  /* 只裁横向（收起动画需要），纵向放行——否则消息红点会被切掉一半 */
  overflow-x: clip;
  overflow-y: visible;
}
.top-fold-inner > * { flex: 0 0 auto; }

html.topbar-collapsed .top-fold {
  grid-template-columns: 0fr;
  opacity: 0;
  transform: translateX(10px) scale(.97);
  visibility: hidden;
  transition:
    grid-template-columns .46s cubic-bezier(.22, 1, .28, 1),
    opacity .22s var(--ease),
    transform .46s cubic-bezier(.22, 1, .28, 1),
    margin .46s cubic-bezier(.22, 1, .28, 1),
    visibility 0s .46s;
}
/* 收起时把原本占据的间距一并收掉，剩下的头像与徽章不会飘在空档里 */
html.topbar-collapsed .top-fold-left { margin-right: -12px; }
html.topbar-collapsed .top-fold-right { margin-left: -12px; }

.top-fold-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.top-fold-toggle i {
  display: block;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform .46s cubic-bezier(.22, 1, .28, 1);
}
.top-fold-toggle:hover {
  background: var(--accent-wash);
  border-color: rgba(236, 99, 62, .35);
  color: var(--accent-dark);
  box-shadow: var(--shadow-sm);
}
html.topbar-collapsed .top-fold-toggle i { transform: rotate(180deg) translateY(1px); }

/* ==========================================================================
   40. 撤回：消息占位样式 + 轻提示
   ========================================================================== */
.chat-message.is-recalled,
.dm-row.is-recalled { opacity: .74; }
.chat-recalled,
.dm-recalled {
  margin: 2px 0 0;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(31, 35, 40, .055);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.dm-bubble.is-recalled {
  background: transparent !important;
  border: 1px dashed var(--line-2) !important;
  box-shadow: none !important;
  padding: 2px !important;
}

.zz-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 220;
  max-width: min(86vw, 420px);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #2d323a, #1c2026);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px) scale(.96);
  pointer-events: none;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .78);
  transition: opacity .26s var(--ease), transform .34s cubic-bezier(.22, 1, .28, 1);
}
.zz-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.zz-toast.is-error { background: linear-gradient(140deg, #e5544a, #c02a20); }

@media (max-width: 700px) {
  .top-fold-toggle { width: 30px; height: 30px; }
  .zz-toast { bottom: 86px; font-size: 12.5px; padding: 10px 16px; }
  .chat-recalled, .dm-recalled { font-size: 11px; }
}

/* ==========================================================================
   41. 聊天室多图：预览托盘 + 消息内图片网格
   ========================================================================== */
.chat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 9px;
  padding: 0;
}
.chat-preview[hidden] { display: none; }
.chat-preview-cell {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 12px;
  overflow: visible;
  animation: cellIn .26s var(--ease-out) both;
}
.chat-preview-cell img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  display: block;
}
.chat-preview-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(140deg, #454c57, #23272d);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
  transition: background .18s var(--ease), transform .18s var(--ease-out);
}
.chat-preview-remove:hover { background: linear-gradient(140deg, #ff7d6c, #dd2f26); transform: scale(1.1); }
@keyframes cellIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }

.chat-tool.is-full { opacity: .55; }

/* 消息内的图片：1 张铺满、多张并排网格 */
.chat-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; max-width: min(300px, 80%); }
.chat-images.multi { max-width: min(360px, 86%); }
.chat-message.mine .chat-images { margin-left: auto; justify-content: flex-end; }
.chat-images .chat-image { margin-top: 0; max-width: none; }
.chat-images.multi .chat-image { width: calc(50% - 3px); }
.chat-images.multi .chat-image img { height: 108px; object-fit: cover; }
.chat-images:not(.multi) .chat-image { width: 100%; }
.chat-images:not(.multi) .chat-image img { max-height: 240px; }

/* ==========================================================================
   42. 顶栏收起按钮（重做：CSS 绘制的箭头 + 磨砂圆钮）
   ========================================================================== */
.top-fold-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #ffffff, #f4f1ee 60%, #ebe6e1);
  border: 1px solid rgba(255, 255, 255, .9);
  color: #6d7480;
  box-shadow:
    0 0 0 1px rgba(31, 35, 40, .07),
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 4px 12px -6px rgba(31, 35, 40, .5);
  transition: color .22s var(--ease), box-shadow .26s var(--ease), transform .26s var(--ease-out), background .26s var(--ease);
}
.top-fold-arrow {
  display: block;
  transition: transform .46s cubic-bezier(.22, 1, .28, 1);
}
.top-fold-toggle:hover {
  color: var(--accent);
  background: linear-gradient(150deg, #fffaf7, #ffefe6 60%, #ffe4d6);
  box-shadow:
    0 0 0 1px rgba(236, 99, 62, .28),
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 6px 16px -7px rgba(236, 99, 62, .85);
  transform: translateY(-1px);
}
.top-fold-toggle:active { transform: translateY(0) scale(.94); }
html.topbar-collapsed .top-fold-arrow { transform: rotate(180deg); }

/* ==========================================================================
   43. 聊天区域加高（浮窗与整页）
   ========================================================================== */
.chat-page .chat-messages { height: clamp(380px, 58vh, 620px); }
.chat-page .chat-form textarea { min-height: 76px; }
#chat-dialog .chat-messages { height: clamp(280px, 46vh, 420px); }
#chat-dialog .chat-form textarea { min-height: 68px; }

@media (max-width: 700px) {
  .chat-page .chat-messages { height: 62dvh; }
  #chat-dialog .chat-messages { height: 42dvh; }
  .chat-preview-cell, .chat-preview-cell img { width: 62px; height: 62px; }
  .chat-images, .chat-images.multi { max-width: 88%; }
  .chat-images.multi .chat-image img { height: 88px; }
  .top-fold-toggle { width: 32px; height: 32px; }
}

/* ==========================================================================
   44. 个人中心三个统计：亮色三彩数据卡
   每格一个主色（珊瑚橙 / 青蓝 / 紫罗兰），底色走亮色，
   数字用深墨色保证对比度，主色用在描边、扫光、标签与光晕上。
   ========================================================================== */
.center-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.center-stats > a {
  --stat: 240, 96, 52;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 21px 14px 18px;
  border-radius: 18px;
  background:
    radial-gradient(130% 96% at 50% 0%, rgba(var(--stat), .2), transparent 66%),
    linear-gradient(165deg, #ffffff, #fdfbf9 62%, #fbf8f5);
  border: 1px solid rgba(var(--stat), .34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 2px 5px -2px rgba(31, 35, 40, .08),
    0 16px 30px -24px rgba(var(--stat), .95);
  transition: transform .32s cubic-bezier(.22, 1, .28, 1), box-shadow .32s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.center-stats > a:nth-child(2) { --stat: 22, 150, 168; }
.center-stats > a:nth-child(3) { --stat: 122, 80, 214; }

/* 顶部一道主色扫光 */
.center-stats > a::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, rgba(var(--stat), 1), transparent);
  box-shadow: 0 2px 12px 1px rgba(var(--stat), .55);
}
/* 极淡的网格底纹，只在上半部显现 */
.center-stats > a::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(var(--stat), .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--stat), .09) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(140% 100% at 50% -8%, #000 22%, transparent 82%);
  mask-image: radial-gradient(140% 100% at 50% -8%, #000 22%, transparent 82%);
}
.center-stats > a:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--stat), .62);
  background:
    radial-gradient(130% 96% at 50% 0%, rgba(var(--stat), .3), transparent 68%),
    linear-gradient(165deg, #ffffff, #fefcfb 62%, #fcf9f6);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 3px 8px -3px rgba(31, 35, 40, .1),
    0 24px 44px -24px rgba(var(--stat), 1);
}
.center-stats strong {
  position: relative;
  z-index: 1;
  font: 800 32px/1 var(--font-mono);
  letter-spacing: -1.4px;
  color: #1f2328;
  text-shadow: 0 3px 14px rgba(var(--stat), .38);
}
.center-stats span {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: rgb(var(--stat));
  transition: color .3s var(--ease);
}
.center-stats > a:hover span { color: rgb(var(--stat)); }
edia (max-width: 700px) {
  .center-stats { gap: 9px; }
  .center-stats > a { padding: 15px 8px 13px; border-radius: 13px; gap: 5px; }
  .center-stats strong { font-size: 23px; }
  .center-stats span { font-size: 10px; letter-spacing: 1.4px; }
}

/* 顶栏药丸里不再叠会员徽记：
   紧挨着已经有「星钻用户 / 超级管理员」文字标识，徽记属重复信息，
   而且 28px 的头像上无论怎么摆都会压住头像本身。其他地方（文章、评论、聊天室）保留。 */
.topbar .profile .identity-avatar .vip-crown { display: none !important; }

/* 侧栏是固定高度的 flex 列，默认会把过高的子项压扁。
   这两张卡片必须保持自身高度，超出部分交给侧栏自己滚动。 */
.sidebar > .site-welcome,
.sidebar > .sidebar-note { flex: 0 0 auto; }

/* 顶部欢迎卡放大后，把底部那张提示卡收紧，让整列仍然一屏放得下 */
.sidebar > .sidebar-note {
  margin: 22px 0 18px !important;
  padding: 15px 15px 16px !important;
  border-radius: 14px;
}
.sidebar-note .mini-spark {
  font-size: 21px;
  margin-bottom: 5px;
}
.sidebar-note b {
  font-size: 13px !important;
  line-height: 1.75 !important;
}
.sidebar-note a {
  margin-top: 10px !important;
  font-size: 11.5px !important;
}

/* 欢迎卡放大占用的高度，通过略微收紧导航项间距补回来，
   整体高度与改动前持平（侧栏原本就略高于一屏，这里不再加剧）。 */
.sidebar .nav-link {
  padding: 9px 14px;
  margin: 3px 0;
}
.sidebar .topic-nav .nav-link {
  padding: 7px 14px;
}
.sidebar .sidebar-rule { margin: 16px 12px; }

/* ==========================================================================
   45. 移动端顶栏精简：只留 Logo、头像与「更多」菜单
   桌面端的折叠按钮与五个入口（管理后台/消息/登出/联系我们/写文章）在手机上
   会把整行撑到 557px、进而把整页顶宽到 666px（手机只有 390px）。
   其中「消息」「我的」底部标签栏已经有了，其余收进「更多」菜单。
   ========================================================================== */
.mobile-more { display: none; }

@media (max-width: 700px) {
  /* 隐藏桌面端的折叠区与折叠按钮 */
  .top-actions .top-fold,
  .top-actions .top-fold-toggle { display: none !important; }

  /* 顶栏只保留：Logo、头像、「更多」 */
  .top-actions { gap: 8px; flex-wrap: nowrap; min-width: 0; }
  .top-actions .profile {
    display: inline-flex !important;
    height: 34px;
    padding: 0 8px 0 3px;
    max-width: none;
  }
  .top-actions .profile > span:last-child { max-width: 42vw; }
  .top-actions .profile .identity-name { display: none; }

  /* 「更多」按钮与面板 */
  .mobile-more { display: inline-flex; position: relative; }
  .mobile-more > summary {
    list-style: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-2);
    background: #fff;
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  }
  .mobile-more > summary::-webkit-details-marker { display: none; }
  .mobile-more[open] > summary {
    background: var(--accent-wash);
    border-color: rgba(236, 99, 62, .4);
    color: var(--accent-dark);
  }
  .mobile-more-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 60;
    min-width: 186px;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    animation: menuIn .18s var(--ease-out) both;
  }
  .mobile-more-panel a,
  .mobile-more-panel button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
  }
  .mobile-more-panel a:active,
  .mobile-more-panel button:active { background: var(--accent-wash); color: var(--accent-dark); }
  .mobile-more-panel form { margin: 0; }
  .mobile-more-out { color: #b9523f !important; }
}

/* ==========================================================================
   46. 移动端可读性与可点性整体提升
   审计（390px 视口）暴露的问题：正文字号偏小、点击区域不足、悬浮聊天按钮
   被底部标签栏完全盖住。下面按类统一修正。
   ========================================================================== */
@media (max-width: 700px) {

  /* ---- 6.1 悬浮聊天按钮：手机上会与底部标签栏重叠，改为隐藏 ---- */
  .chat-fab { display: none !important; }
  /* 「聊天」标签承接 @ 提醒 */
  .mobile-tabbar a .tab-dot-badge {
    position: absolute;
    top: 5px;
    right: 50%;
    margin-right: -20px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 3px 8px -4px rgba(221, 47, 38, .9);
  }
  /* 底部标签栏给页面留出足够空间 */
  .shell { padding-bottom: 84px; }

  /* ---- 6.2 正文字号：把 9px 一档统一提到 11px 以上 ---- */
  .article-meta { font-size: 11px; gap: 10px; margin-top: 12px; }
  .author-line { font-size: 11px; gap: 6px; }
  .article-meta time, .author-line time, .comment-head time, time { font-size: 10.5px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.8px; }
  .vip-badge, .official-badge { font-size: 10px !important; }
  .category-pill { font-size: 10.5px; padding: 3px 8px; }
  .demo { font-size: 9.5px !important; }
  .article-cover small { font-size: 8px; }
  .brand b span { font-size: 8px !important; letter-spacing: 2px !important; }
  .reading-time { font-size: 10px; }

  /* ---- 6.3 摘要给到两行，别只露一行 ---- */
  .article-copy > p { font-size: 12px; -webkit-line-clamp: 2; line-height: 1.85; }
  .article-title h2 { font-size: 16px; line-height: 1.6; }
  .article-card { padding: 18px 15px; gap: 12px; }
  .article-cover { width: 84px; height: 94px; padding: 9px; }
  .avatar { width: 23px; height: 23px; font-size: 10px; }

  /* ---- 6.4 点击区域：一律不低于 32px ---- */
  .back,
  .text-button,
  .link-button,
  .comment-head button,
  .comment-content button,
  .detail-actions a,
  .detail-actions button,
  .history-list a,
  .record-row a,
  .social-small {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
  .category-pill { min-height: 26px; display: inline-flex; align-items: center; }

  /* ---- 6.5 评论与表单：按钮更好点 ---- */
  .comment-form > div { flex-wrap: wrap; gap: 7px; }
  .comment-form select { min-height: 34px; }
  .comment-form .button, .detail-actions .button { min-height: 36px; padding: 0 14px; }
  .comment { padding: 18px 0; gap: 10px; }
  .comment > .avatar { width: 30px; height: 30px; font-size: 12px; }

  /* ---- 6.6 搜索框：与顶栏贴合，触控更高 ---- */
  .search { height: 44px; border-radius: 22px; }
  .search button { height: 36px; padding: 0 18px; }
  .search > span { font-size: 22px; }

  /* ---- 6.7 分类标签条：滚动更顺滑、留出边缘留白 ---- */
  .tabs { scroll-snap-type: x proximity; padding-bottom: 12px; }
  .tabs a { scroll-snap-align: start; }
  .center-tabs { padding-bottom: 4px; }
}

/* 更窄的机型（≤360px）再收一档，避免挤压 */
@media (max-width: 360px) {
  .article-cover { width: 74px; height: 86px; padding: 8px; }
  .article-title h2 { font-size: 15px; }
  .top-actions .profile > span:last-child { max-width: 34vw; }
}

/* ==========================================================================
   47. 移动端小字号补漏（审计第二轮结果）
   ========================================================================== */
@media (max-width: 700px) {
  /* 页头小标题：原规则 .page-heading .eyebrow 优先级更高，这里显式压住 */
  .page-heading .eyebrow,
  .eyebrow { font-size: 10px !important; letter-spacing: 1.6px !important; }
  .eyebrow::before { width: 14px; }

  /* 聊天室消息时间戳 */
  .chat-message-head small,
  .chat-message-head b,
  .chat-message-head { font-size: 11px !important; }
  .chat-status { font-size: 10.5px; }
  .chat-form small { font-size: 10px !important; }

  /* 封面内的装饰小字：略微放大但保持装饰感 */
  .article-cover small { font-size: 9px !important; }
  .brand b span { font-size: 9px !important; letter-spacing: 1.8px !important; }
  .demo { font-size: 10px !important; }

  /* Markdown 工具按钮：撑到 32px 仍保持一行 */
  .md-bar { gap: 3px; padding: 6px 7px; }
  .md-tool { min-width: 32px; height: 32px; font-size: 12px; }

  /* 遗漏的点击区域 */
  .dm-head > a,
  .dm-bubble + * ,
  .manage-page button,
  .link-button,
  .manage-nav a { min-height: 32px; }

  /* 通知与列表里的次要文字 */
  .notice-time, .notice-quote { font-size: 11.5px; }
  .history-index, .history-duration { font-size: 11.5px; }
  .vip-badge, .official-badge { font-size: 10.5px !important; }

  /* 文章详情：正文与标题再放宽一点 */
  .article-detail { padding: 20px 16px; }
  .article-detail > h1 { font-size: 22px; line-height: 1.5; }
  .prose { font-size: 15.5px; line-height: 1.95; }
  .prose h2 { font-size: 20px; margin: 26px 0 12px; }
  .prose h3 { font-size: 17px; }
  .prose pre { padding: 16px; font-size: 12.5px; border-radius: 12px; }
  .article-summary { font-size: 13.5px; padding: 12px 14px; margin: 20px 0; }
}

/* ==========================================================================
   48. 评论区重做
   原来：点赞/删除是裸文字按钮、回复用三角符号、回复块是一整片扁平浅色，
        层级、留白、交互反馈都不到位。
   现在：动作按钮化、回复区带线程连接线、点赞有填充态与心跳动画、
        回复框平滑展开。
   ========================================================================== */

/* 外层卡片 */
.comments {
  padding: 28px 30px 22px;
  background: linear-gradient(180deg, #ffffff, #fffdfc);
}
.comments h2 { display: flex; align-items: baseline; gap: 10px; }
.comments h2 > span {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-3);
}
.comments > .muted { margin-top: 5px; }

/* 发表点评的输入区 */
.comment-form { margin: 20px 0 8px; }
.comment-form textarea {
  background: #fdfcfa;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 17px;
  min-height: 108px;
  line-height: 1.9;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
}
.comment-form textarea:focus {
  background: #fff;
  border-color: rgba(236, 99, 62, .45);
  box-shadow: 0 0 0 4px rgba(236, 99, 62, .1);
}
.comment-form > div {
  margin-top: 11px;
  padding: 9px 13px;
  border-radius: 13px;
  background: #faf8f6;
  border: 1px solid var(--line);
}
.comment-form label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.comment-form select {
  padding: 6px 10px;
  border-radius: 9px;
  border-color: var(--line-2);
  background: #fff;
  font-weight: 600;
  color: var(--ink-2);
}
.comment-form .button.primary {
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 18px -10px rgba(236, 99, 62, .95);
}
.comment-form .button.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(236, 99, 62, 1); }

/* 单条点评 */
.comment {
  display: flex;
  gap: 13px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  transition: background .24s var(--ease);
}
.comment > .avatar {
  width: 38px;
  height: 38px;
  font-size: 15px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line), 0 8px 18px -12px rgba(31, 35, 40, .8);
}
.comment-content { flex: 1; min-width: 0; }

/* 头部：昵称 · 时间 · 评分 */
.comment-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 24px;
}
.comment-head b { font-size: 14px; font-weight: 700; }
.comment-head time {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.rating-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(140deg, #fffaef, #ffefd9);
  color: #ac7d24;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -.2px;
  box-shadow: 0 0 0 1px rgba(198, 146, 44, .2) inset;
}

/* 正文 */
.comment-body { margin: 9px 0 0; }
.comment-body p {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* 动作区 */
.comment-foot {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.comment-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.comment-actions form { margin: 0; }

.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease-out), box-shadow .2s var(--ease);
}
.act-btn:hover { background: rgba(31, 35, 40, .055); color: var(--ink); }
.act-btn:active { transform: scale(.95); }
.act-icon { font-size: 14px; line-height: 1; }
.act-count { font-family: var(--font-mono); font-size: 11.5px; color: inherit; opacity: .7; }

/* 点赞态：填充暖色 + 心跳 */
.like-btn.is-liked {
  color: var(--accent-dark);
  background: linear-gradient(140deg, rgba(236, 99, 62, .14), rgba(236, 99, 62, .07));
  border-color: rgba(236, 99, 62, .22);
  box-shadow: 0 4px 12px -8px rgba(236, 99, 62, .95);
}
.like-btn.is-liked:hover { background: linear-gradient(140deg, rgba(236, 99, 62, .2), rgba(236, 99, 62, .1)); }
.like-btn.is-liked .act-icon { animation: heartPop .46s cubic-bezier(.22, 1, .28, 1); }
@keyframes heartPop {
  0% { transform: scale(1); }
  38% { transform: scale(1.42); }
  68% { transform: scale(.9); }
  100% { transform: scale(1); }
}

/* 删除：低调，悬停才变红 */
.del-btn { color: #a9aeb6; }
.del-btn:hover { color: #bf4a33; background: rgba(191, 74, 51, .09); }

/* 回复按钮与被折叠的回复框 */
.reply-btn { cursor: pointer; }
.reply-box { flex: 0 0 auto; }
.reply-box.is-open { flex: 1 1 100%; }
.reply-box.is-open > .reply-btn {
  color: var(--accent-dark);
  background: rgba(236, 99, 62, .1);
  border-color: rgba(236, 99, 62, .2);
}
/* 用 grid-template-rows 做真实高度过渡，开合都跟手 */
.reply-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .34s cubic-bezier(.22, 1, .28, 1), margin-top .34s cubic-bezier(.22, 1, .28, 1);
}
.reply-box.is-open .reply-body { grid-template-rows: 1fr; margin-top: 10px; }
.reply-body > form, .reply-body > p { overflow: hidden; min-height: 0; }
/* 收起时连宽度一起收掉：否则里面的输入框仍按最大宽度把这个按钮撑宽，
   三个动作按钮就挤不到一行里去了 */
.reply-box:not(.is-open) .reply-body { width: 0; }
.reply-body textarea {
  width: 100%;
  background: #fdfcfa;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.85;
  min-height: 70px;
}
.reply-body textarea:focus { background: #fff; border-color: rgba(236, 99, 62, .42); box-shadow: 0 0 0 3px rgba(236, 99, 62, .09); }
.reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.reply-actions small { font-size: 11.5px; }
.reply-actions .button.primary { height: 34px; padding: 0 16px; border-radius: var(--radius-pill); font-size: 13px; }

/* 回复区：带线程连接线 */
.comment-replies { position: relative; margin-top: 14px; }
.comment-replies:not(:empty) { background: none; padding: 0; }
.comment-replies::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--line-2), rgba(236, 99, 62, .22) 45%, transparent);
}
.comment.reply {
  position: relative;
  margin-left: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(160deg, #fdfcfb, #fbf9f7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset;
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease), transform .24s var(--ease-out);
}
.comment.reply::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 22px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--line-2), rgba(236, 99, 62, .28));
}
.comment.reply:hover {
  border-color: rgba(236, 99, 62, .22);
  box-shadow: 0 10px 24px -20px rgba(31, 35, 40, .9);
}
.comment.reply + .comment.reply { margin-top: 10px; }
.comment.reply > .avatar { width: 32px; height: 32px; font-size: 13px; }
.comment.reply .comment-body p { font-size: 14px; }
.comment.reply .rating-pill { display: none; }

/* 新点评浮现 */
.comment, .comment.reply { animation: commentIn .34s cubic-bezier(.22, 1, .28, 1) both; }
@keyframes commentIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .comment, .comment.reply, .like-btn.is-liked .act-icon { animation: none; }
}

/* 移动端 */
@media (max-width: 700px) {
  .comments { padding: 20px 15px 16px; }
  .comments h2 { font-size: 19px; }
  .comment { gap: 10px; padding: 16px 0; }
  .comment > .avatar { width: 34px; height: 34px; font-size: 14px; }
  .comment-body p { font-size: 14px; line-height: 1.9; }
  .comment-head b { font-size: 13.5px; }
  .act-btn { height: 34px; padding: 0 13px; font-size: 13px; }
  .comment-foot { gap: 6px; margin-top: 10px; }
  .rating-pill { height: 22px; font-size: 11px; }
  .comment.reply { margin-left: 16px; padding: 12px 13px; }
  .comment-replies::before { left: 5px; }
  .comment.reply::before { left: -13px; width: 11px; }
  .comment-form > div { padding: 8px 11px; }
  .comment-form .button.primary { height: 36px; }
}


/* ==========================================================================
   49. 心形图标统一为 SVG
   原来用文字 ♥ / ♡（U+2665 / U+2661）：14px + 字重 650 下笔画是亚像素的，
   同一个字符落在不同像素位置，粗细看起来就不一样（评论区与回复区因此不一致）。
   换成矢量图标后，任何位置、任何缩放都完全一致。
   ========================================================================== */
.heart-icon {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transition: transform .3s cubic-bezier(.22, 1, .28, 1);
}
.act-icon { display: inline-flex; align-items: center; justify-content: center; }
.act-icon .heart-icon { width: 15px; height: 15px; }
.like-btn.is-liked .heart-icon { animation: heartPop .46s cubic-bezier(.22, 1, .28, 1); }

/* 文章底部的点赞按钮：与点评里的心形保持同一尺寸，避免两处看起来不一样 */
.heart-icon-wrap { display: inline-flex; align-items: center; }
.button .heart-icon { width: 15px; height: 15px; }
.button.liked .heart-icon { animation: heartPop .46s cubic-bezier(.22, 1, .28, 1); }

@media (max-width: 700px) {
  .heart-icon, .act-icon .heart-icon { width: 16px; height: 16px; }
  .button .heart-icon { width: 16px; height: 16px; }
}
/* 榜单与卡片里的小号心形：跟随文字基线，不破坏行内排版 */
.heart-icon.is-small {
  display: inline-block;
  width: 12px;
  height: 12px;
  vertical-align: -1.5px;
  margin-right: 3px;
}
.article-meta .solid-heart .heart-icon.is-small { color: #df404f; }
.side-heart { color: var(--accent); }
@media (max-width: 700px) {
  .heart-icon.is-small { width: 13px; height: 13px; vertical-align: -2px; }
}