@import url('https://static.utterlog.com/fonts/noto-sans-sc/result.css');
@import url('https://static.utterlog.com/fonts/google-sans-display/result.css');
@import url('https://static.utterlog.com/fonts/kuaikanshijieti/result.css');
@import url('https://static.utterlog.com/fonts/AlimamaFangYuanTi/result.css');
@import url('https://static.utterlog.com/fonts/SourceHanSerifCN/result.css');
@import url('https://static.utterlog.com/fonts/tencentsans-w7/result.css');

/* Google Sans Code — 文章页代码块专用字体（仅给了 .woff2，自行声明 @font-face） */
@font-face {
  font-family: 'Google Sans Code';
  src: url('https://static.utterlog.com/fonts/google-sans-code-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ============================================================ */
/* Nebula — 暗色科技风（Code Wiki 风格）                         */
/* 调色板：纯黑底 #000 + 浅蓝副标 #A8C7FA + 蓝边深蓝卡片          */
/* 强调：天蓝 #7FCFFF（CTA） / 鲜蓝 #80CFFF（图标 / 边框光）       */
/* 字体：Google Sans Display（统一替换之前的 Google Sans / Text）     */
/* ============================================================ */

[data-theme="Nebula"] {
  /* Brand */
  --nebula-sky: #7FCFFF;
  --nebula-sky-hover: #A0DDFF;
  --nebula-sky-active: #5BB6FF;
  --nebula-blue-accent: #80CFFF;
  --nebula-blue-vivid: #0842A0;
  --nebula-blue-light: #A8C7FA;
  --nebula-blue-sky: #C2E7FF;
  --nebula-blue-pale: #D3E3FD;
  --nebula-blue-ocean: #004A77;
  --nebula-navy: #0A1525;
  --nebula-navy-deep: #071226;
  --nebula-success: #0F5223;

  /* Neutrals — text 用偏冷调 off-white 而非纯白，与天蓝主题色协调 */
  --nebula-white: #E1E7EE;
  --nebula-gray-light: #E3E3E3;
  --nebula-gray: #818181;
  --nebula-gray-dark: #444746;
  --nebula-charcoal: #303030;
  --nebula-near-black: #0A0A0A;
  --nebula-black: #000000;

  /* Surfaces */
  --nebula-surface-1: #050505;
  --nebula-surface-2: #0A0A0A;
  --nebula-tile: #121212;
  --nebula-tile-elevated: #121212;
  --nebula-card: #121212;
  --nebula-input: #121212;

  /* Borders */
  --nebula-border-subtle: #141414;
  --nebula-border-accent: #192851;
  --nebula-border-blue: rgba(128, 207, 255, 0.45);
  --nebula-border-blue-soft: rgba(128, 207, 255, 0.2);
  --nebula-border-sky: rgba(127, 207, 255, 0.18);
  --nebula-border-white: rgba(255, 255, 255, 0.08);

  /* Glow */
  --nebula-glow-search: 0 0 80px 8px rgba(128, 207, 255, 0.18);
  --nebula-glow-search-focus: 0 0 100px 10px rgba(128, 207, 255, 0.3);
  --nebula-glow-sky: 0px 0px 24px rgba(127, 207, 255, 0.25);

  /* Shadows */
  --nebula-shadow-1: rgba(0, 0, 0, 0.4) 0px 4px 20px 0px;
  --nebula-shadow-tile: rgba(8, 66, 160, 0.28) 0px 30px 80px -28px;
  --nebula-shadow-tile-hover: rgba(8, 66, 160, 0.42) 0px 40px 100px -25px;

  /* Fonts */
  --nebula-font-display: 'Google Sans Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nebula-font-body: 'Google Sans Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nebula-font-mono: 'Courier New', Menlo, Consolas, monospace;
  /* 文章页（PostPage）专用字体：
     - banner-title：快看世界体（中文圆体），仅文章封面 banner 上的大标题
     - title：Noto Sans SC（思源黑体），用于 h1-h6 / AI 摘要
     - article-body：LXGW WenKai 霞鹜文楷（仅 markdown 正文）
     - article-code：Google Sans Code（代码块 + Prism 高亮 token） */
  --nebula-font-banner-title: '快看世界体', 'Noto Sans SC', 'Google Sans Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --nebula-font-logo: 'Alimama FangYuanTi VF', 'Noto Sans SC', 'Google Sans Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --nebula-font-title: 'Noto Sans SC', 'Google Sans Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* 文章正文 h2–h6 专用：思源宋体 VF（衬线 / 中文阅读节奏感强） */
  --nebula-font-prose-heading: 'Source Han Serif CN VF', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', Georgia, ui-serif, serif;
  /* 装饰性大字水印（评论区"讨论区"等）：腾讯体 W7（黑体/重体） */
  --nebula-font-deco: 'TencentSans W7', 'Noto Sans SC', 'Google Sans Display', system-ui, sans-serif;
  --nebula-font-article-body: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, 'Segoe UI', sans-serif;
  --nebula-font-article-code: 'Google Sans Code', 'Courier New', Menlo, Consolas, monospace;

  /* Radius */
  --nebula-radius-sm: 8px;
  --nebula-radius-md: 15px;
  --nebula-radius-lg: 15px;
  --nebula-radius-xl: 15px;
  --nebula-radius-2xl: 24px;
  --nebula-radius-pill: 39px;
  --nebula-radius-pill-lg: 49px;

  /* Map to global tokens */
  --color-primary: var(--nebula-sky);
  --color-primary-hover: var(--nebula-sky-hover);
  --color-primary-active: var(--nebula-sky-active);
  --color-text-main: var(--nebula-white);
  --color-text-sub: var(--nebula-blue-light);
  --color-text-dim: var(--nebula-gray);
  --color-border: var(--nebula-border-subtle);
  --color-divider: rgba(255, 255, 255, 0.06);
  --color-bg-card: var(--nebula-card);
  --color-bg-main: var(--nebula-black);
  --color-bg-soft: var(--nebula-surface-2);
  --color-focus-ring: var(--nebula-blue-accent);
}

/* ============================================================ */
/* 全局基础                                                       */
/* ============================================================ */

[data-theme="Nebula"] body {
  background: var(--nebula-black);
  color: var(--nebula-white);
  font-family: var(--nebula-font-body);
}

[data-theme="Nebula"] ::selection {
  background: rgba(128, 207, 255, 0.4);
  color: var(--nebula-white);
}

[data-theme="Nebula"] .nebula-theme {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  background: var(--nebula-black);
  color: var(--nebula-white);
  font-family: var(--nebula-font-body);
  font-size: 16px;
  line-height: 1.5;
}

[data-theme="Nebula"] .nebula-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  /* main 自身改成 column flex container，让里面的 .nebula-frame 占满
     可用空间、把 <Footer> 顶到底。之前 main 是 block 布局，短内容
     页（tags / categories / search / 空 archive 等）footer 会浮在
     页面中部，下面留一大片黑。 */
  display: flex;
  flex-direction: column;
}

[data-theme="Nebula"] .nebula-frame {
  width: 100%;
  /* 配合 .nebula-main 的 column flex：frame 占满剩余高度，把
     footer 推到视口底部。内容长时不影响（自然撑开） */
  flex: 1 0 auto;
}

[data-theme="Nebula"] .nebula-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

/* ============================================================ */
/* Header                                                         */
/* ============================================================ */

[data-theme="Nebula"] .nebula-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}

[data-theme="Nebula"] .nebula-header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

[data-theme="Nebula"] .nebula-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nebula-white);
  text-decoration: none;
  /* Logo + 文字一起用 Alimama 方圆体（中文圆体），头部品牌专用 */
  font-family: var(--nebula-font-logo);
  font-weight: 500;
  font-size: 16px;
}

/* ─── 全局顶部进度条（路由切换时展示，跟 GitHub / YouTube 同款） ───
   - .nebula-top-progress       —— 容器，全屏顶部 fixed，淡入淡出
   - .nebula-top-progress-bar   —— 实际滚动的蓝条，宽度由 inline width 驱动
   注意：Layout 在 .blog-shell 里，所以容器位置基于视口顶部 = 0 */
[data-theme="Nebula"] .nebula-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
[data-theme="Nebula"] .nebula-top-progress.is-visible {
  opacity: 1;
}
[data-theme="Nebula"] .nebula-top-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(
    90deg,
    var(--nebula-blue-accent) 0%,
    var(--nebula-sky-hover) 50%,
    var(--nebula-blue-accent) 100%
  );
  background-size: 200% 100%;
  box-shadow: 0 0 8px rgba(128, 207, 255, 0.6),
              0 0 2px rgba(128, 207, 255, 0.8);
  transition: width 0.25s ease;
  animation: nebulaProgressShimmer 2s linear infinite;
}
@keyframes nebulaProgressShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

[data-theme="Nebula"] .nebula-brand-title {
  font-family: var(--nebula-font-logo);
  letter-spacing: 0.02em;
  display: inline-block;
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="Nebula"] .nebula-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--nebula-sky), var(--nebula-blue-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--nebula-font-logo);
  font-weight: 700;
  font-size: 14px;
  color: var(--nebula-black);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="Nebula"] .nebula-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Header logo hover：从中心放大 1.15x，弹簧缓动 —— 跟 footer 图标按钮
   的 1.2x hover 风格一致。纯文字模式下（site_brand_mode = 'text'）站名
   也跟着一起放大，保持「整个 brand 区域有反馈」的一致体验 */
[data-theme="Nebula"] .nebula-brand:hover .nebula-brand-logo,
[data-theme="Nebula"] .nebula-brand:hover .nebula-brand-mark,
[data-theme="Nebula"] .nebula-brand:hover .nebula-brand-title {
  transform: scale(1.15);
}

[data-theme="Nebula"] .nebula-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

[data-theme="Nebula"] .nebula-nav-link {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--nebula-font-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

[data-theme="Nebula"] .nebula-nav-link:hover {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="Nebula"] .nebula-nav-link.active {
  color: var(--nebula-blue-light);
}

/* 右上 actions：保留随机文章 / 自定义图标按钮 / 移动菜单 burger，
   搜索触发与搜索弹窗已删除（搜索由 hero 居中输入框接管） */
[data-theme="Nebula"] .nebula-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="Nebula"] .nebula-icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

[data-theme="Nebula"] .nebula-icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nebula-white);
}

[data-theme="Nebula"] .nebula-icon-button.loading {
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .nebula-action-img { width: 16px; height: 16px; border-radius: 4px; }

[data-theme="Nebula"] .nebula-menu-button { display: none; }

[data-theme="Nebula"] .nebula-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 28px;
  background: var(--nebula-black);
  border-top: 1px solid var(--nebula-border-subtle);
}

[data-theme="Nebula"] .nebula-mobile-nav .nebula-nav-link { padding: 12px 16px; }

/* ============================================================ */
/* Hero — Code Wiki style (centered, pure black)                 */
/* ============================================================ */

[data-theme="Nebula"] .nebula-home {
  padding-bottom: 80px;
}

[data-theme="Nebula"] .nebula-hero {
  position: relative;
  background: var(--nebula-black);
  padding: 80px 24px 96px;
  overflow: hidden;
}

[data-theme="Nebula"] .nebula-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-theme="Nebula"] .nebula-hero-glow {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 720px;
  height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(128, 207, 255, 0.32), rgba(128, 207, 255, 0.08) 45%, transparent 75%);
  filter: blur(40px);
}

[data-theme="Nebula"] .nebula-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

[data-theme="Nebula"] .nebula-hero-title {
  margin: 0;
  font-family: var(--nebula-font-display);
  font-size: clamp(56px, 9vw, 128px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--nebula-white);
}

/* 描述：radial-gradient + background-clip: text 形成中心白→边缘冷蓝灰的渐变文字。
   text-wrap: balance 让多行长度更均衡。 */
/* ─── 最新评论者头像墙 ───
   首页分页下方一排圆头像，hover 显示该用户最新评论
   保持 home-body gap (56) 自然间距 → 分页上下空隙对称
   只用负 margin-bottom 吃掉 home padding-bottom 紧贴 footer */
[data-theme="Nebula"] .nebula-commenters {
  margin-top: 0;              /* 自然 56px gap 到分页（= 文章→分页 间距） */
  margin-bottom: -80px;       /* 吃掉 home padding-bottom，紧贴 footer */
  padding-top: 0;
  padding-bottom: 8px;
  border-top: 0;
}

/* 头像横排：覆盖式叠加；最大宽度 960，居中 */
[data-theme="Nebula"] .nebula-commenters-row {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 960px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

[data-theme="Nebula"] .nebula-commenters-item {
  position: relative;
  margin-left: -10px;       /* 头像之间重叠 10px */
}
[data-theme="Nebula"] .nebula-commenters-item:first-child {
  margin-left: 0;
}

[data-theme="Nebula"] .nebula-commenters-avatar {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #000;   /* 黑边突出"叠在彩色头像上" */
  background: var(--nebula-tile-elevated);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
  position: relative;
  z-index: 1;
  text-decoration: none;
}
[data-theme="Nebula"] .nebula-commenters-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hover：放大、提到最前、蓝边、轻微旋转 */
[data-theme="Nebula"] .nebula-commenters-item:hover .nebula-commenters-avatar {
  transform: translateY(-6px) scale(1.18) rotate(-3deg);
  border-color: var(--nebula-blue-accent);
  z-index: 10;
}

/* Hover popup */
[data-theme="Nebula"] .nebula-commenters-pop {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 280px;
  padding: 12px 14px;
  background: rgba(15, 17, 21, 0.96);
  border: 1px solid rgba(128, 207, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
          backdrop-filter: blur(20px) saturate(140%);
  font-family: var(--nebula-font-article-body);
  color: rgba(225, 231, 238, 0.92);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 20;
}
/* popup 小尾巴（指向头像） */
[data-theme="Nebula"] .nebula-commenters-pop::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top-color: rgba(128, 207, 255, 0.25);
}

[data-theme="Nebula"] .nebula-commenters-item:hover .nebula-commenters-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

[data-theme="Nebula"] .nebula-commenters-pop-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(225, 231, 238, 0.55);
}
[data-theme="Nebula"] .nebula-commenters-pop-meta strong {
  color: var(--nebula-white);
  font-weight: 500;
  font-family: var(--nebula-font-display);
  font-size: 12px;
}
[data-theme="Nebula"] .nebula-commenters-pop-meta span {
  color: rgba(255, 255, 255, 0.25);
}

[data-theme="Nebula"] .nebula-commenters-pop-content {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(225, 231, 238, 0.92);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

[data-theme="Nebula"] .nebula-commenters-pop-post {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: var(--nebula-blue-light);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="Nebula"] .nebula-commenters-pop-post i {
  font-size: 10px;
  color: var(--nebula-blue-accent);
  flex-shrink: 0;
}

/* 边缘头像的 popup 防溢出（首尾两个对齐到边） */
[data-theme="Nebula"] .nebula-commenters-item:first-child .nebula-commenters-pop {
  left: 0;
  transform: translateX(0) translateY(6px);
}
[data-theme="Nebula"] .nebula-commenters-item:first-child:hover .nebula-commenters-pop {
  transform: translateX(0) translateY(0);
}
[data-theme="Nebula"] .nebula-commenters-item:first-child .nebula-commenters-pop::after {
  left: 24px;
}
[data-theme="Nebula"] .nebula-commenters-item:last-child .nebula-commenters-pop {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(6px);
}
[data-theme="Nebula"] .nebula-commenters-item:last-child:hover .nebula-commenters-pop {
  transform: translateX(0) translateY(0);
}
[data-theme="Nebula"] .nebula-commenters-item:last-child .nebula-commenters-pop::after {
  left: auto;
  right: 24px;
  transform: translateX(0);
}

/* ─── 最新说说（header 下方）—— 扁平磨砂玻璃胶囊
   黑色系半透 + 高清 backdrop blur + 单层细边，无立体阴影 ─── */
[data-theme="Nebula"] .nebula-moment-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  min-width: 480px;
  max-width: 960px;
  margin: 16px auto;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
          backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--nebula-font-article-body);
  font-size: 13px;
  line-height: 1.4;
  color: rgba(225, 231, 238, 0.9);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

/* 左侧 Twitter 图标 */
[data-theme="Nebula"] .nebula-moment-bubble-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(225, 231, 238, 0.9);
  transition: color 0.2s ease, transform 0.25s ease;
}

/* "§ MOMENT" 蓝色等宽小标签 */
[data-theme="Nebula"] .nebula-moment-bubble-tag {
  flex-shrink: 0;
  font-family: var(--nebula-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--nebula-blue-accent);
  text-transform: uppercase;
}

[data-theme="Nebula"] .nebula-moment-bubble-content {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="Nebula"] .nebula-moment-bubble-imgflag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nebula-blue-accent);
  font-size: 10px;
  font-family: var(--nebula-font-mono);
}

[data-theme="Nebula"] .nebula-moment-bubble-time {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(225, 231, 238, 0.45);
}

[data-theme="Nebula"] .nebula-moment-bubble:hover {
  color: var(--nebula-white);
  background: rgba(128, 207, 255, 0.08);
  border-color: rgba(128, 207, 255, 0.25);
}
[data-theme="Nebula"] .nebula-moment-bubble:hover .nebula-moment-bubble-icon {
  color: var(--nebula-blue-accent);
  transform: scale(1.15);
}
[data-theme="Nebula"] .nebula-moment-bubble:hover .nebula-moment-bubble-time {
  color: var(--nebula-blue-light);
}

@media (max-width: 640px) {
  [data-theme="Nebula"] .nebula-moment-bubble {
    width: auto;            /* 取消 fit-content，让胶囊撑满父级减去边距 */
    min-width: 0;           /* 取消 480px 下限 */
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    font-size: 12px;
    gap: 8px;
  }
  [data-theme="Nebula"] .nebula-moment-bubble-tag {
    display: none;  /* 窄屏隐藏，让内容更多空间 */
  }
}

[data-theme="Nebula"] .nebula-hero-intro {
  margin: 0 auto 30px;
  max-width: 600px;
  font-family: var(--nebula-font-body);
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-weight: 400;
  text-wrap: balance;
  background: radial-gradient(
    circle at center,
    var(--nebula-white),
    color-mix(in srgb, var(--nebula-blue-accent) 35%, var(--nebula-gray))
  );
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

/* 搜索面板：header 下方浮动显示（position absolute，不影响下方内容布局）
   - search 触发按钮使用通用 .nebula-icon-button，active 态淡蓝底 */
[data-theme="Nebula"] .nebula-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--nebula-black);
  border-bottom: 1px solid var(--nebula-border-subtle);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}

[data-theme="Nebula"] .nebula-search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 432px;
  margin: 0 auto;
  padding: 14px 32px;
}

[data-theme="Nebula"] .nebula-search-leading {
  /* 相对 form 定位（form is position: relative），48px = form 左 padding 32 + 16px input 内空隙 */
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nebula-blue-light);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

[data-theme="Nebula"] .nebula-search-form input {
  flex: 1;
  height: 40px;
  padding: 0 16px 0 38px;
  border-radius: 999px;
  background: var(--nebula-tile);
  border: 1px solid rgba(255, 255, 255, 0.06);
  outline: 0;
  color: var(--nebula-white);
  font-family: var(--nebula-font-body);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

[data-theme="Nebula"] .nebula-search-form input:focus {
  border-color: var(--nebula-sky);
}

[data-theme="Nebula"] .nebula-search-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="Nebula"] .nebula-search-submit {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--nebula-sky);
  color: var(--nebula-navy-deep);
  font-family: var(--nebula-font-display);
  font-size: 14px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

[data-theme="Nebula"] .nebula-search-submit:hover {
  background: var(--nebula-sky-hover);
}

/* ─── /search 搜索结果页的搜索表单 —— 跟 header 弹出搜索框保持一致样式 ───
   组件 inline 写死浅色 + 直角，这里用 !important 翻深 + 圆角 999px 胶囊化 */
[data-theme="Nebula"] .search-page-form .search-page-leading {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nebula-blue-light);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}
[data-theme="Nebula"] .search-page-form .search-page-input {
  height: 44px !important;
  padding: 0 18px 0 40px !important;
  border-radius: 999px !important;
  background: var(--nebula-tile) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--nebula-white) !important;
  font-family: var(--nebula-font-body) !important;
  font-size: 14px !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease;
}
[data-theme="Nebula"] .search-page-form .search-page-input:focus {
  border-color: var(--nebula-sky) !important;
}
[data-theme="Nebula"] .search-page-form .search-page-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
[data-theme="Nebula"] .search-page-form .search-page-submit {
  height: 44px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  background: var(--nebula-sky) !important;
  color: var(--nebula-navy-deep) !important;
  font-family: var(--nebula-font-display) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border: 0 !important;
  cursor: pointer !important;
  transition: background 0.2s ease;
}
[data-theme="Nebula"] .search-page-form .search-page-submit:hover {
  background: var(--nebula-sky-hover) !important;
}

[data-theme="Nebula"] .nebula-icon-button.active {
  color: var(--nebula-sky);
  background: rgba(127, 207, 255, 0.1);
}

/* ---- Floating tiles (decorative card showcase) ---- */
[data-theme="Nebula"] .nebula-tile-stage {
  position: relative;
  width: min(640px, 100%);
  height: 240px;
  margin-top: 64px;
  pointer-events: none;       /* stage 自身不响应，子级 .nebula-tile 单独打开 */
}

[data-theme="Nebula"] .nebula-tile {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 15px;
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-blue);
  box-shadow: var(--nebula-shadow-tile);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nebula-blue-accent);
  font-size: 36px;
  transition: transform 0.4s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  pointer-events: auto;       /* 子级单独可交互 */
  overflow: hidden;           /* 上传图片走 object-fit: cover 时跟随 15px 圆角裁切，不溢出 */
}

/* 图片 / 内联 SVG 图标变体（admin 上传图片或填 URL 时使用）。
   .nebula-tile 自身 font-size: 36px 控制 <i> 大小；图片改成 <span>
   + background-image（不是 <img> 元素），目的：
     · 浏览器右键菜单里不会出现「查看图像 / 另存为图像」
     · 也无法拖拽保存
     · 图块本就是纯装饰，无需 <img> 语义
   绝对定位填满宽度 + bottom: 0，配合 tile 的 overflow: hidden 让 15px
   圆角天然裁掉四角；background-size: cover 保证不变形，object-position
   center bottom 让裁切时优先保留底部。SVG span 走原来的居中布局，跟
   FontAwesome icon 视觉一致。 */
[data-theme="Nebula"] .nebula-tile-img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  pointer-events: none;
}
[data-theme="Nebula"] .nebula-tile-svg {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  color: currentColor;
}
[data-theme="Nebula"] .nebula-tile-svg svg {
  width: 100%;
  height: 100%;
}

/* hover 时显示中文 label —— 用 ::after 显示在 tile 下方 */
[data-theme="Nebula"] .nebula-tile::after {
  content: attr(data-label);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--nebula-font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--nebula-white);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
[data-theme="Nebula"] .nebula-tile:hover {
  border-color: var(--nebula-blue-accent);
  box-shadow: 0 18px 50px -16px rgba(128, 207, 255, 0.45);
}
[data-theme="Nebula"] .nebula-tile:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
[data-theme="Nebula"] .nebula-tile:hover i {
  animation: nebulaTileBounce 0.6s ease;
}
@keyframes nebulaTileBounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

[data-theme="Nebula"] .nebula-tile--1 {
  left: 8%;
  top: 30%;
  transform: rotate(-2deg);
}

[data-theme="Nebula"] .nebula-tile--2 {
  left: 30%;
  top: 56%;
  transform: rotate(1deg) scale(1.06);
  z-index: 2;
  border-color: rgba(128, 207, 255, 0.6);
}

[data-theme="Nebula"] .nebula-tile--3 {
  right: 30%;
  top: 12%;
  transform: rotate(2deg);
}

[data-theme="Nebula"] .nebula-tile--4 {
  right: 6%;
  top: 36%;
  transform: rotate(-1deg) scale(1.04);
  z-index: 1;
}

@media (hover: hover) {
  [data-theme="Nebula"] .nebula-hero:hover .nebula-tile--1 { transform: rotate(-2deg) translateY(-4px); }
  [data-theme="Nebula"] .nebula-hero:hover .nebula-tile--2 { transform: rotate(1deg) scale(1.06) translateY(-6px); }
  [data-theme="Nebula"] .nebula-hero:hover .nebula-tile--3 { transform: rotate(2deg) translateY(-4px); }
  [data-theme="Nebula"] .nebula-hero:hover .nebula-tile--4 { transform: rotate(-1deg) scale(1.04) translateY(-5px); }
}

/* ============================================================ */
/* Home body — stats / categories / posts                        */
/* ============================================================ */

[data-theme="Nebula"] .nebula-home-body {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 32px;
}

[data-theme="Nebula"] .nebula-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

[data-theme="Nebula"] .nebula-stat-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--nebula-radius-lg);
  background-color: var(--nebula-tile);
  border: 1px solid var(--nebula-border-blue-soft);
  color: var(--nebula-white);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  min-height: 86px;
}

/* 第一行：序号 + 标签 inline */
[data-theme="Nebula"] .nebula-stat-head {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

[data-theme="Nebula"] .nebula-stat-item:hover {
  transform: translateY(-2px);
  background-color: color-mix(in srgb, var(--nebula-blue-accent) 12%, var(--nebula-tile));
  border-color: var(--nebula-border-blue);
  box-shadow: 0 34px 84px -30px color-mix(in srgb, var(--nebula-blue-accent) 35%, transparent);
}

[data-theme="Nebula"] .nebula-stat-no {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--nebula-blue-accent);
}

[data-theme="Nebula"] .nebula-stat-item strong {
  font-family: var(--nebula-font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .nebula-stat-item em {
  margin-top: auto;
  font-style: normal;
  font-family: var(--nebula-font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--nebula-white);
  line-height: 1.1;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---- Category strip ---- */
[data-theme="Nebula"] .nebula-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-theme="Nebula"] .nebula-category-strip button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--nebula-radius-pill);
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-blue-soft);
  color: rgba(225, 231, 238, 0.85);
  font-family: var(--nebula-font-body);
  font-size: 13px;
  cursor: pointer;
  /* 加 transform 一起过渡，hover 微抬 + active 时弹簧 */
  transition: background 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease,
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="Nebula"] .nebula-category-strip button:hover:not(:disabled) {
  border-color: var(--nebula-border-blue);
  color: var(--nebula-white);
  transform: translateY(-1px);
}
[data-theme="Nebula"] .nebula-category-strip button:active:not(:disabled) {
  transform: scale(0.96);
}
[data-theme="Nebula"] .nebula-category-strip button.active {
  background: rgba(128, 207, 255, 0.12);
  border-color: var(--nebula-border-blue);
  color: var(--nebula-blue-light);
}
[data-theme="Nebula"] .nebula-category-strip button.active i {
  color: var(--nebula-sky);
}
[data-theme="Nebula"] .nebula-category-strip button i {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
[data-theme="Nebula"] .nebula-category-strip button span {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}
[data-theme="Nebula"] .nebula-category-strip button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 加载态 list 透明度 —— 切分类时旧卡片留在原位，整列表淡掉一档
   屏蔽交互；新数据回来 .is-loading 移除 → 平滑回到完全不透明 */
[data-theme="Nebula"] .nebula-post-list {
  transition: opacity 0.2s ease;
}
[data-theme="Nebula"] .nebula-post-list.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

/* ── 切分类时 stagger fade-in：新 post.id 让 React 把卡片 re-mount，
      animation 自动重跑；前 12 张错开 30ms，超出按 12 张循环 ── */
@keyframes nebulaListItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
[data-theme="Nebula"] .nebula-post-list > * {
  animation: nebulaListItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
[data-theme="Nebula"] .nebula-post-list > *:nth-child(1)  { animation-delay: 0ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(2)  { animation-delay: 30ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(3)  { animation-delay: 60ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(4)  { animation-delay: 90ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(5)  { animation-delay: 120ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(6)  { animation-delay: 150ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(7)  { animation-delay: 180ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(8)  { animation-delay: 210ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(9)  { animation-delay: 240ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(10) { animation-delay: 270ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(11) { animation-delay: 300ms; }
[data-theme="Nebula"] .nebula-post-list > *:nth-child(12) { animation-delay: 330ms; }
/* 用户偏好减少动效时，stagger 关掉 —— 直接展示，不闪烁 */
@media (prefers-reduced-motion: reduce) {
  [data-theme="Nebula"] .nebula-post-list > * {
    animation: none !important;
  }
}
[data-theme="Nebula"] .nebula-post-list .nebula-empty i {
  color: var(--nebula-sky);
  margin-right: 8px;
}

/* ---- Section heading ---- */
[data-theme="Nebula"] .nebula-section-heading {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 56px;
  overflow: hidden;
}

[data-theme="Nebula"] .nebula-section-tag {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--nebula-blue-accent);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* § ARTICLES 后的统计行：文章 / 评论 / 字数 拍成一行 */
[data-theme="Nebula"] .nebula-section-stats {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  color: rgba(225, 231, 238, 0.7);
}
[data-theme="Nebula"] .nebula-section-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
[data-theme="Nebula"] .nebula-section-stats i {
  font-size: 11px;
  color: var(--nebula-blue-accent);
}

/* "最新文章" / "分类文章" 标题转成右侧大号腾讯体水印 —— 跟评论区"讨论区"
   水印同款：不可选 / 不响应鼠标 / 半透 + 描边 */
[data-theme="Nebula"] .nebula-section-heading h2 {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  margin: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: var(--nebula-font-deco);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

/* 查看全部 → 推到行尾，z-index 高于水印 */
[data-theme="Nebula"] .nebula-section-more {
  margin-left: auto;
  color: var(--nebula-blue-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

[data-theme="Nebula"] .nebula-section-more:hover { color: var(--nebula-sky-hover); }

/* ============================================================ */
/* Post list / Post card                                          */
/* ============================================================ */

[data-theme="Nebula"] .nebula-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

[data-theme="Nebula"] .nebula-post-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 24px 28px;
  background-color: var(--nebula-card);
  border: 1px solid var(--nebula-border-subtle);
  border-radius: var(--nebula-radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  overflow: hidden;
}

[data-theme="Nebula"] .nebula-post-card:hover {
  transform: translateY(-2px);
  background-color: color-mix(in srgb, var(--nebula-blue-accent) 8%, var(--nebula-card));
  border-color: var(--nebula-border-blue);
  box-shadow: 0 34px 84px -30px color-mix(in srgb, var(--nebula-blue-accent) 35%, transparent);
}

[data-theme="Nebula"] .nebula-card-glow { display: none; }

[data-theme="Nebula"] .nebula-card-index {
  font-family: var(--nebula-font-mono);
  font-size: 12px;        /* 跟 kicker 行字号一致，保证 baseline 对齐 */
  line-height: 1;         /* 跟 kicker 同步行高 */
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--nebula-blue-accent);
  /* align-items: start 已经把 index 顶到 row 顶端，
     再叠 kicker 自身 line-height 的 vertical-align ≈ 同一水平线 */
  padding-top: 0;
}

[data-theme="Nebula"] .nebula-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

[data-theme="Nebula"] .nebula-card-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="Nebula"] .nebula-card-kicker time {
  font-family: var(--nebula-font-mono);
  letter-spacing: 0.04em;
}

[data-theme="Nebula"] .nebula-card-kicker .nebula-card-kicker-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="Nebula"] .nebula-card-kicker .nebula-card-kicker-stat i {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  transition: color 0.18s ease;
}

[data-theme="Nebula"] .nebula-post-card:hover .nebula-card-kicker .nebula-card-kicker-stat i {
  color: var(--nebula-blue-accent);
}

[data-theme="Nebula"] .nebula-card-kicker .nebula-card-category {
  color: var(--nebula-blue-light);
  text-decoration: none;
  font-weight: 500;
}

[data-theme="Nebula"] .nebula-card-kicker .nebula-card-category:hover {
  color: var(--nebula-blue-accent);
}

[data-theme="Nebula"] .nebula-card-title {
  margin: 0;
  font-family: var(--nebula-font-display);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--nebula-white);
}

[data-theme="Nebula"] .nebula-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

[data-theme="Nebula"] .nebula-card-title a:hover { color: var(--nebula-blue-light); }

[data-theme="Nebula"] .nebula-card-excerpt {
  margin: 0;
  font-family: var(--nebula-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

[data-theme="Nebula"] .nebula-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

[data-theme="Nebula"] .nebula-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

[data-theme="Nebula"] .nebula-card-meta i { color: var(--nebula-blue-accent); }

[data-theme="Nebula"] .nebula-card-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--nebula-border-blue-soft);
  color: var(--nebula-blue-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  align-self: center;
  font-size: 13px;
}

[data-theme="Nebula"] .nebula-card-arrow:hover {
  background: var(--nebula-blue-accent);
  border-color: var(--nebula-blue-accent);
  color: var(--nebula-black);
  transform: scale(1.05);
}

/* 卡片内的分类 icon：默认平静，hover 整张卡片时放大 + 旋转 */
[data-theme="Nebula"] .nebula-card-arrow i {
  display: inline-block;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="Nebula"] .nebula-post-card:hover .nebula-card-arrow i {
  transform: scale(1.3) rotate(360deg);
}

[data-theme="Nebula"] .nebula-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--nebula-gray);
  background: var(--nebula-card);
  border-radius: var(--nebula-radius-lg);
  border: 1px solid var(--nebula-border-subtle);
}

/* ============================================================ */
/* Pagination                                                     */
/* ============================================================ */

[data-theme="Nebula"] .nebula-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 24px;
}

/* 上一页 / 下一页 箭头按钮 */
[data-theme="Nebula"] .nebula-pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--nebula-tile);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 11px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-pagination-arrow:hover:not(:disabled) {
  color: var(--nebula-sky);
  border-color: rgba(128, 207, 255, 0.35);
  background: rgba(128, 207, 255, 0.08);
}
[data-theme="Nebula"] .nebula-pagination-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 页码列表 */
[data-theme="Nebula"] .nebula-pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="Nebula"] .nebula-pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-pagination-num:hover:not(:disabled):not(.active) {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="Nebula"] .nebula-pagination-num.active {
  background: var(--nebula-sky);
  color: var(--nebula-navy-deep);
  border-color: var(--nebula-sky);
  font-weight: 600;
}
[data-theme="Nebula"] .nebula-pagination-num:disabled {
  cursor: wait;
}

[data-theme="Nebula"] .nebula-pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--nebula-font-mono);
  font-size: 12px;
}

/* ============================================================ */
/* Article (Post Page)                                           */
/* ============================================================ */

/* Page wrapper — 唯一容器，所有子段都按 960 内宽对齐 */
[data-theme="Nebula"] .nebula-post {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

/* ── Head：面包屑 + 标题 + 摘要 + 一行 byline ── */
[data-theme="Nebula"] .nebula-post-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

[data-theme="Nebula"] .nebula-post-head > * {
  position: relative;
  z-index: 1;
}

[data-theme="Nebula"] .nebula-post-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

[data-theme="Nebula"] .nebula-post-crumb a {
  color: var(--nebula-blue-light);
  text-decoration: none;
}

[data-theme="Nebula"] .nebula-post-crumb a:hover { color: var(--nebula-blue-accent); }

/* 标题：默认（无封面回退）样式 —— banner 大标题专用快看世界体（中文圆体） */
[data-theme="Nebula"] .nebula-post-title {
  margin: 0;
  font-family: var(--nebula-font-banner-title);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--nebula-white);
}

/* 标题叠加在封面图底部 —— 阴影 + 描边保证白字在白底也清晰 */
[data-theme="Nebula"] .nebula-post-title--on-cover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 36px 36px 28px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
  font-weight: 400;
  /* 三层阴影：黑色硬投影 + 黑色软阴影 + 蓝色微光，亮底深底都能区分 */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(0, 0, 0, 0.5);
  /* WebKit 文字描边：白底封面下也能看出黑色描边 */
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.45);
  text-rendering: optimizeLegibility;
}

/* 封面渐变遮罩：底部黑色，由透明渐变到 75% 不透明，专门垫在标题下方 */
[data-theme="Nebula"] .nebula-post-cover-scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 35%,
    rgba(0, 0, 0, 0.55) 70%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

/* 一行 byline：avatar · author · date · views · comments · 阅读时长 */
[data-theme="Nebula"] .nebula-post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="Nebula"] .nebula-post-byline-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

[data-theme="Nebula"] .nebula-post-byline-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nebula-tile-elevated);
  color: var(--nebula-white);
  font-size: 11px;
  font-weight: 600;
}

[data-theme="Nebula"] .nebula-post-byline-author {
  color: var(--nebula-white);
  font-weight: 500;
}

[data-theme="Nebula"] .nebula-post-byline-sep {
  color: rgba(255, 255, 255, 0.25);
}

[data-theme="Nebula"] .nebula-post-byline-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="Nebula"] .nebula-post-byline-stat i {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  transition: color 0.18s ease;
}

[data-theme="Nebula"] .nebula-post-byline-stat:hover i {
  color: var(--nebula-blue-accent);
}

/* 分类背景徽章：head 右上区域显示完整 icon，底部部分超出被 overflow 裁切，
   左右上完全可见、底部隐去一截 */
[data-theme="Nebula"] .nebula-post-head {
  overflow: hidden;
}
[data-theme="Nebula"] .nebula-post-cat-deco {
  position: absolute;
  right: 24px;
  bottom: -28px;          /* 向下溢出 28px，head 容器 overflow:hidden 裁掉这部分 */
  font-size: 110px;
  line-height: 1;
  color: rgba(128, 207, 255, 0.32);
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* ── 足迹国旗：默认 50×50，Nebula 调到 36×36 ──
   用 !important 锁定，避免被全局或 LazyImage 内联样式盖住 */
[data-theme="Nebula"] .post-hero-footprint-flags {
  right: 14px !important;
  bottom: 14px !important;
  gap: 6px !important;
}
[data-theme="Nebula"] .post-hero-footprint-flag {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-width: 1px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="Nebula"] .post-hero-footprint-flag:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="Nebula"] .post-hero-footprint-more {
  min-width: 28px !important;
  height: 22px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  border-radius: 11px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
@media (max-width: 640px) {
  [data-theme="Nebula"] .post-hero-footprint-flag {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }
}

/* ── Cover banner（标题嵌在封面底部时，封面充当 hero） ── */
[data-theme="Nebula"] .nebula-post-cover {
  position: relative;
  margin: 0 0 32px;
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 460px;
  border-radius: var(--nebula-radius-xl);
  overflow: hidden;
  border: 1px solid var(--nebula-border-blue-soft);
  box-shadow: var(--nebula-shadow-tile);
}

/* 嵌入标题模式：封面变高一点给标题腾空间 */
[data-theme="Nebula"] .nebula-post-cover--with-title {
  aspect-ratio: 16 / 8;
  max-height: 520px;
}

/* 直接子级 img 才是封面图；嵌套在 .post-hero-footprint-flags 里的
   国旗 img 不要被这条 width: 100% 撑爆 */
[data-theme="Nebula"] .nebula-post-cover > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ── Body：正文占满 960 内宽（TOC 不占宽度，浮在右侧空白） ──
   阅读区独立卡片：#131314 底色 + 1px 边框，与外层 #121212 站点底色形成层次 */
[data-theme="Nebula"] .nebula-post-body {
  margin-top: 8px;
  background: #131314;
  border: 1px solid var(--nebula-border-subtle);
  border-radius: var(--nebula-radius-lg);
  padding: 32px 36px;
}

@media (max-width: 767px) {
  [data-theme="Nebula"] .nebula-post-body {
    padding: 20px 18px;
    border-radius: var(--nebula-radius-md);
  }
}

/* ── TOC：外层只做定位锚点，不带任何视觉样式 ──
   <TableOfContents> 在 headings.length < 2 时返回 null（aside 内为空）
   或自身 opacity:0（滚动 < 10% 或进入评论区时隐藏）
   背景框做在内层 .blog-toc 上，跟着内容一起显隐
   定位锚点：viewport 中线 + 文章半宽 (480px) + 间距 24px = 504px 偏移
   触发阈值：960 (article) + 24 (gap) + 220 (toc) + 36 (右侧最小间距) = 1240px */
[data-theme="Nebula"] .nebula-post-toc {
  position: fixed;
  top: 96px;
  left: calc(50% + 504px);
  width: 220px;
  max-height: calc(100vh - 120px);
  /* 关键：默认透明、无边框、无 padding —— 没有目录就什么都看不到 */
  background: transparent;
  border: 0;
  padding: 0;
  overflow: visible;
  z-index: 5;
}

/* 内层目录有内容时才渲染背景框 */
[data-theme="Nebula"] .nebula-post-toc .blog-toc {
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-subtle);
  border-radius: var(--nebula-radius-md);
  padding: 16px 18px;
  font-size: 13px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 1239px) {
  [data-theme="Nebula"] .nebula-post-toc { display: none; }
}

/* ============================================================ */
/* Markdown Prose — 文章排版                                       */
/* 结构：.nebula-post-prose（layout 容器） > .blog-prose（PostContent
/*       渲染入口，所有 markdown 元素都在这一层内）                  */
/* 设计原则：                                                      */
/*   1. layout/字体基线放在 .nebula-post-prose                     */
/*   2. 所有 markdown 元素规则统一前缀 .nebula-post-prose .blog-prose
/*      —— 不污染同级的 AISummary / Lightbox 等组件                */
/*   3. 颜色统一用 token：白色字 88% 透明 / 蓝色 accent / 边框 subtle  */
/*   4. 节奏：段落 1.4em 间距、标题 2em 上间距、代码块 1.5em        */
/* ============================================================ */

/* 外层：layout + 字号 / 行高 / 颜色基线（不在这里定字体，避免 AISummary 继承 LXGW） */
[data-theme="Nebula"] .nebula-post-prose {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(225, 231, 238, 0.88);
}

/* AI 摘要用 Noto Sans SC（思源黑体），中性、清晰 */
[data-theme="Nebula"] .nebula-post-prose .blog-ai-summary,
[data-theme="Nebula"] .nebula-post-prose .blog-ai-summary * {
  font-family: var(--nebula-font-title);
}

/* 文章 markdown 正文 —— 仅这一层用 LXGW WenKai */
[data-theme="Nebula"] .nebula-post-prose .blog-prose {
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: var(--nebula-font-article-body);
}

/* ─── 段落 ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose p {
  margin: 0 0 1.4em;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose p:last-child {
  margin-bottom: 0;
}

/* ─── 标题 h1：保留 Noto Sans SC（与 banner / AI 摘要同字体，少见） ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose h1 {
  font-family: var(--nebula-font-title);
  font-weight: 600;
  color: var(--nebula-white);
  letter-spacing: -0.01em;
  scroll-margin-top: 88px;
}

/* ─── 标题 h2–h6：思源宋体 VF（衬线，正文章节标题） ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose h2,
[data-theme="Nebula"] .nebula-post-prose .blog-prose h3,
[data-theme="Nebula"] .nebula-post-prose .blog-prose h4,
[data-theme="Nebula"] .nebula-post-prose .blog-prose h5,
[data-theme="Nebula"] .nebula-post-prose .blog-prose h6 {
  font-family: var(--nebula-font-prose-heading);
  font-weight: 600;
  color: var(--nebula-white);
  letter-spacing: 0;
  scroll-margin-top: 88px; /* TOC 锚点跳转留出 header 空间 */
}

[data-theme="Nebula"] .nebula-post-prose .blog-prose h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 2em 0 0.6em;
}

[data-theme="Nebula"] .nebula-post-prose .blog-prose h2 {
  font-size: 22px;
  line-height: 1.35;
  margin: 2em 0 0.7em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nebula-border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* h2 前置 "H2" 徽章：固定 20×14 蓝胶囊，文字字号 10px 居中可读 */
[data-theme="Nebula"] .nebula-post-prose .blog-prose h2::before {
  content: 'H2';
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 22px;
  padding: 0 5px;
  border-radius: 4px;
  font-family: var(--nebula-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--nebula-black);
  background: var(--nebula-blue-accent);
  /* 上对齐：让徽章顶部和中文标题视觉中心对齐 */
  position: relative;
  top: 1px;
}

[data-theme="Nebula"] .nebula-post-prose .blog-prose h3 {
  font-size: 18px;
  line-height: 1.4;
  margin: 1.8em 0 0.5em;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* h3 前置正方形蓝色块（实心方块，干净简洁） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose h3::before {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--nebula-blue-accent);
  border-radius: 2px;
}

[data-theme="Nebula"] .nebula-post-prose .blog-prose h4 {
  font-size: 16px;
  line-height: 1.4;
  margin: 1.6em 0 0.4em;
  color: var(--nebula-blue-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* h4 前置稍小正方形蓝色块（描边款，与 h3 实心做层级区分） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose h4::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: transparent;
  border: 1.5px solid var(--nebula-blue-accent);
  border-radius: 2px;
}

[data-theme="Nebula"] .nebula-post-prose .blog-prose h5,
[data-theme="Nebula"] .nebula-post-prose .blog-prose h6 {
  font-size: 14px;
  line-height: 1.4;
  margin: 1.4em 0 0.4em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 第一个标题不加额外上间距 */
[data-theme="Nebula"] .nebula-post-prose .blog-prose > h1:first-child,
[data-theme="Nebula"] .nebula-post-prose .blog-prose > h2:first-child,
[data-theme="Nebula"] .nebula-post-prose .blog-prose > h3:first-child {
  margin-top: 0;
}

/* ─── 链接 ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose a {
  color: var(--nebula-blue-light);
  text-decoration: underline;
  text-decoration-color: rgba(128, 207, 255, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose a:hover {
  color: var(--nebula-blue-accent);
  text-decoration-color: var(--nebula-blue-accent);
}

/* ─── 强调 / 删除 / 高亮 / 键盘键 / 缩写 / 上下标 ─── */
/* 加粗 <strong> / <b>：正文 --nebula-white 是冷调 off-white (#E1E7EE)，
   strong 用纯白 + 700 拉开 ~10% 亮度差，PingFang SC / Noto Sans SC
   下加粗才有视觉冲击。同色 700 在中文字体里几乎看不出来。 */
[data-theme="Nebula"] .nebula-post-prose .blog-prose strong,
[data-theme="Nebula"] .nebula-post-prose .blog-prose b {
  color: #FFFFFF;
  font-weight: 700;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose em { font-style: italic; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose del {
  color: rgba(255, 255, 255, 0.45);
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose mark {
  padding: 0 4px;
  background: rgba(255, 220, 110, 0.18);
  color: #ffe7a3;
  border-radius: 3px;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--nebula-font-article-code);
  font-size: 0.85em;
  color: var(--nebula-white);
  background: var(--nebula-tile-elevated);
  border: 1px solid var(--nebula-border-subtle);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--nebula-border-subtle);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose abbr[title] {
  text-decoration: underline dotted;
  text-decoration-color: rgba(128, 207, 255, 0.4);
  cursor: help;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose sup,
[data-theme="Nebula"] .nebula-post-prose .blog-prose sub {
  font-size: 0.75em;
  line-height: 0;
}

/* ─── 行内代码（不在 pre 内）—— Google Sans Code ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose :not(pre) > code {
  font-family: var(--nebula-font-article-code);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(128, 207, 255, 0.08);
  color: var(--nebula-blue-light);
  border: 1px solid rgba(128, 207, 255, 0.12);
}

/* ─── 代码块（pre 由 CodeBlock 组件封装，加 wrapper / copy / collapse）—— Google Sans Code ─── */
/* 代码块底色 #0a0d14 —— 跟文章卡片底色 #131314 拉开层次（之前 #0f1115
   /  --nebula-input #121212 跟 #131314 太接近，几乎看不出代码块边界） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre {
  margin: 1.5em 0;
  background: #0a0d14;
  border: 1px solid var(--nebula-border-subtle);
  border-radius: var(--nebula-radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--nebula-font-article-code);
  font-size: 14px;
  line-height: 1.7;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre,
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre code,
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre code .token,
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre .code-line,
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre .line-number-style {
  font-family: var(--nebula-font-article-code) !important;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  /* 注意：这里不再写 color: var(--nebula-white)。
     之前用了高优先级覆盖会让 prism-tomorrow 的 token 配色全被吞掉
     （token 是 <span class="token x">；color 由 .token.x 显式声明），
     再加上 Nebula 自己的 token 调色板（见文件底部）需要让其颜色
     穿透到 token 上。code 不带 language 时由 prism-tomorrow 的
     `code[class*="language-"]` 兜底为 #ccc，足够亮 */
}

/* ─── 引用 ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--nebula-blue-accent);
  background: rgba(128, 207, 255, 0.06);
  border-radius: 0 var(--nebula-radius-md) var(--nebula-radius-md) 0;
  color: rgba(225, 231, 238, 0.85);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose blockquote p { margin: 0 0 0.8em; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose blockquote p:last-child { margin-bottom: 0; }

/* ─── 列表（含 GFM task list） ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose ul,
[data-theme="Nebula"] .nebula-post-prose .blog-prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.6em;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose ul { list-style: disc; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose ol { list-style: decimal; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose li {
  margin: 0.3em 0;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose li::marker {
  color: var(--nebula-blue-accent);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose li > p { margin: 0 0 0.5em; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose li > p:last-child { margin-bottom: 0; }
/* 嵌套列表上下间距收紧 */
[data-theme="Nebula"] .nebula-post-prose .blog-prose li > ul,
[data-theme="Nebula"] .nebula-post-prose .blog-prose li > ol {
  margin: 0.4em 0;
}
/* GFM 任务列表（ul.contains-task-list / li.task-list-item） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose ul.contains-task-list,
[data-theme="Nebula"] .nebula-post-prose .blog-prose li.task-list-item {
  list-style: none;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose ul.contains-task-list { padding-left: 0.4em; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose input[type="checkbox"] {
  margin: 0 8px 0 0;
  vertical-align: middle;
  accent-color: var(--nebula-blue-accent);
}

/* ─── 表格 ──
   原版用 --nebula-tile-elevated（#121212）做表头底色 + --nebula-border-subtle
   （#141414）做边框，跟卡片底色 #131314 几乎同色 → 行列不分。
   重写：
     · 外框 1px 浅白线 + 圆角 + 微弱白底（撑出"卡片"感）
     · 表头淡蓝底 + 字号收紧 + 大写 letter-spacing（明确区分 header / body）
     · 行间分隔线 6% 白（清晰但不刺眼）
     · 偶数行 2.5% 白底斑马纹（长表格易扫读）
     · 行 hover 蓝色微染（交互反馈）
*/
[data-theme="Nebula"] .nebula-post-prose .blog-prose table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 0;          /* 无外框 */
  border-radius: 0;   /* 直角 */
}
/* 表格内字段换行（避免列内容超长溢出） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose th,
[data-theme="Nebula"] .nebula-post-prose .blog-prose td {
  word-break: break-word;
  overflow-wrap: anywhere;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose thead {
  background: rgba(128, 207, 255, 0.08);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--nebula-font-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nebula-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(225, 231, 238, 0.9);
}
/* 每行最后一列不画右竖线（避免出现外框） */
[data-theme="Nebula"] .nebula-post-prose .blog-prose th:last-child,
[data-theme="Nebula"] .nebula-post-prose .blog-prose td:last-child {
  border-right: 0;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose tbody tr:hover td {
  background: rgba(128, 207, 255, 0.06);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose tbody tr:last-child td {
  border-bottom: 0;
}
/* 表格里的行内代码：缩小 padding 避免行高炸裂 */
[data-theme="Nebula"] .nebula-post-prose .blog-prose td :not(pre) > code,
[data-theme="Nebula"] .nebula-post-prose .blog-prose th :not(pre) > code {
  padding: 1px 5px;
  font-size: 0.85em;
}

/* ─── 图片 / figure / figcaption ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--nebula-radius-md);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose figure {
  margin: 1.5em 0;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-family: var(--nebula-font-article-body);
}

/* ─── 描述列表 dl/dt/dd ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose dl { margin: 1.4em 0; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose dt {
  font-weight: 600;
  color: var(--nebula-white);
  margin-top: 0.6em;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose dd {
  margin: 0 0 0.8em 1.5em;
  color: rgba(225, 231, 238, 0.85);
}

/* ─── 分割线 ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--nebula-border-subtle);
}

/* ─── <details> 折叠（[collapse] shortcode 渲染入口，覆盖 inline style） ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose details {
  margin: 1.5em 0 !important;
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-subtle) !important;
  border-radius: var(--nebula-radius-md);
  padding: 0 !important;
  overflow: hidden;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose summary {
  padding: 12px 16px !important;
  cursor: pointer;
  font-weight: 500 !important;
  color: var(--nebula-white);
  list-style: none;
  user-select: none;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose summary::-webkit-details-marker {
  display: none;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--nebula-blue-accent);
  transition: transform 0.18s ease;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose details[open] > summary::before {
  transform: rotate(90deg);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose details > div {
  padding: 12px 16px !important;
  border-top: 1px solid var(--nebula-border-subtle) !important;
  border-style: solid !important;
}

/* ─── 脚注 ─── */
[data-theme="Nebula"] .nebula-post-prose .blog-prose .footnotes {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--nebula-border-subtle);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose .footnotes ol {
  padding-left: 1.4em;
}
[data-theme="Nebula"] .nebula-post-prose .blog-prose .footnotes li { margin: 0.4em 0; }
[data-theme="Nebula"] .nebula-post-prose .blog-prose .footnotes a {
  color: var(--nebula-blue-light);
}

/* ── Footer：标签 ── */
[data-theme="Nebula"] .nebula-post-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--nebula-border-subtle);
}

/* ── Author 卡片：唯一一处作者展示 ── */
[data-theme="Nebula"] .nebula-post-author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 20px;
  border-radius: var(--nebula-radius-lg);
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-subtle);
}

[data-theme="Nebula"] .nebula-post-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

[data-theme="Nebula"] .nebula-post-author-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nebula-tile-elevated);
  color: var(--nebula-white);
  font-size: 22px;
  font-weight: 600;
}

[data-theme="Nebula"] .nebula-post-author-meta {
  min-width: 0;
}

[data-theme="Nebula"] .nebula-post-author-meta strong {
  display: block;
  font-family: var(--nebula-font-display);
  font-size: 16px;
  color: var(--nebula-white);
  font-weight: 500;
}

[data-theme="Nebula"] .nebula-post-author-meta p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="Nebula"] .nebula-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-theme="Nebula"] .nebula-tags a {
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(128, 207, 255, 0.08);
  border: 1px solid var(--nebula-border-blue-soft);
  color: var(--nebula-blue-light);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

[data-theme="Nebula"] .nebula-tags a:hover {
  background: rgba(128, 207, 255, 0.16);
  border-color: var(--nebula-border-blue);
}

[data-theme="Nebula"] .nebula-related-wrap { margin-top: 48px; }

/* ============================================================ */
/* Post navigation (上一篇 / 下一篇)                              */
/* ============================================================ */

[data-theme="Nebula"] .post-nav-section { margin: 0; }

[data-theme="Nebula"] .post-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 24px;
}

[data-theme="Nebula"] .post-prev-next-link {
  position: relative;
  display: flex;
  align-items: stretch;
  text-decoration: none;
  min-height: 96px;
  border-radius: var(--nebula-radius-lg);
  border: 1px solid var(--nebula-border-blue-soft);
  background-color: var(--nebula-tile);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

[data-theme="Nebula"] .post-prev-next-link:hover {
  transform: translateY(-2px);
  background-color: color-mix(in srgb, var(--nebula-blue-accent) 10%, var(--nebula-tile));
  border-color: var(--nebula-border-blue);
  box-shadow: 0 28px 70px -28px color-mix(in srgb, var(--nebula-blue-accent) 35%, transparent);
}

[data-theme="Nebula"] .post-prev-next-link.next { text-align: right; }

[data-theme="Nebula"] .post-prev-next-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}

[data-theme="Nebula"] .post-prev-next-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-theme="Nebula"] .post-prev-next-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.78));
}

[data-theme="Nebula"] .post-prev-next-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 22px;
  position: relative;
  z-index: 1;
}

[data-theme="Nebula"] .post-prev-next-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .post-prev-next-link.next .post-prev-next-label { justify-content: flex-end; }

[data-theme="Nebula"] .post-prev-next-title {
  font-family: var(--nebula-font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--nebula-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================ */
/* Related posts (相关推荐 tabs + 卡片)                           */
/* 关键修复：.post-related-card-cover 必须有 aspect-ratio，         */
/* 否则其内 <img style="height:100%"> 会用图片原始尺寸撑爆页面     */
/* ============================================================ */

[data-theme="Nebula"] .post-related-section { margin-top: 8px; }

[data-theme="Nebula"] .post-related-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

[data-theme="Nebula"] .post-related-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--nebula-radius-pill);
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--nebula-font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

[data-theme="Nebula"] .post-related-tab:hover:not(:disabled) {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="Nebula"] .post-related-tab:disabled { opacity: 0.4; cursor: default; }

[data-theme="Nebula"] .post-related-tab.active {
  color: var(--nebula-blue-light);
  background: rgba(128, 207, 255, 0.12);
  border-color: var(--nebula-border-blue-soft);
}

[data-theme="Nebula"] .post-related-tab-count {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="Nebula"] .post-related-refresh {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  margin-left: auto;
  transition: color 0.2s ease, background 0.2s ease;
}

[data-theme="Nebula"] .post-related-refresh:hover {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="Nebula"] .post-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* 订阅 / 相关卡：跟 GitHub 风对齐 — 极深蓝黑底 + 极淡白边 */
[data-theme="Nebula"] .post-related-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--nebula-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background-color: var(--nebula-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

[data-theme="Nebula"] .post-related-card:hover {
  transform: translateY(-2px);
  background-color: color-mix(in srgb, var(--nebula-sky) 6%, var(--nebula-card));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 70px -28px color-mix(in srgb, var(--nebula-sky) 30%, transparent);
}

[data-theme="Nebula"] .post-related-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--nebula-surface-2);
}

[data-theme="Nebula"] .post-related-card-cover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

[data-theme="Nebula"] .post-related-card-date {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--nebula-font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--nebula-white);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

[data-theme="Nebula"] .post-related-card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 70px);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  color: var(--nebula-blue-light);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="Nebula"] .post-related-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85));
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

[data-theme="Nebula"] .post-related-card-bottom {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(18px);
  transition: transform 0.3s ease, backdrop-filter 0.3s ease;
  /* 磨砂玻璃层：保证标题在任何亮度封面上可读 ——
     半透明深底 + backdrop-filter 模糊背后封面，毛玻璃质感 */
  background: rgba(10, 12, 16, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="Nebula"] .post-related-card:hover .post-related-card-bottom {
  transform: translateY(0);
}

[data-theme="Nebula"] .post-related-card-title {
  font-family: var(--nebula-font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--nebula-white);
  line-height: 1.3;
  /* 单行 + 末尾省略号 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="Nebula"] .post-related-card-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--nebula-font-mono);
  font-size: 10px;
  color: rgba(225, 231, 238, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
}

[data-theme="Nebula"] .post-related-card:hover .post-related-card-stats {
  opacity: 1;
}

[data-theme="Nebula"] .post-related-empty {
  grid-column: 1 / -1;
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--nebula-gray);
}

[data-theme="Nebula"] .nebula-comments-wrap { margin-top: 48px; }

[data-theme="Nebula"] .nebula-comments-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  min-height: 56px; /* 腾讯体水印需要的视觉高度 */
  overflow: hidden; /* 防水印超出右侧 */
}

[data-theme="Nebula"] .nebula-comments-heading span {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--nebula-blue-accent);
  position: relative;
  z-index: 1;
}

/* "讨论区" 转成右侧大号腾讯体水印 —— 不可选、低对比度，作为背景装饰 */
[data-theme="Nebula"] .nebula-comments-heading strong {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  margin: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  font-family: var(--nebula-font-deco);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  /* 主体半透白 + 轻描边：暗底上既能看清字形又保留水印感 */
  color: rgba(255, 255, 255, 0.18);
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

[data-theme="Nebula"] .nebula-comments {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: var(--nebula-radius-lg);
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-subtle);
}

/* 一个 thread = 一张完整卡片（主评论 + 所有回复都在里面）
   · 主体：中性浅底（rgba 白 3%），跟暗黑底拉开层级，但不抢色
   · 回复气泡：浅蓝底 + 浅蓝细边
   · 全部直角 0 边距，纯方块卡风格 */
[data-theme="Nebula"] .nebula-comments .comment-thread {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  color: rgba(225, 231, 238, 0.92);
}

[data-theme="Nebula"] .nebula-comments .comment-thread .comment-card {
  background: transparent !important;
}

[data-theme="Nebula"] .nebula-comments .comment-thread .comment-card--reply {
  background: rgba(128, 207, 255, 0.07) !important;
  border: 1px solid rgba(128, 207, 255, 0.2) !important;
  border-radius: 0 !important;
}

/* @mention 悬浮卡片：组件默认是浅色 popup（rgba(255,255,255,0.95) 白底
   + 主题变量 var(--color-text-main) 文字色），暗主题下变量解析成 #E1E7EE
   亮色 → 白底亮字 = 完全看不清。强制 override 成深色 popup + 亮字。 */
[data-theme="Nebula"] .nebula-comments .reply-mention-card {
  background: rgba(15, 17, 21, 0.96) !important;
  border: 1px solid rgba(128, 207, 255, 0.25) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  color: rgba(225, 231, 238, 0.88) !important;
  border-radius: 0 !important;
}
[data-theme="Nebula"] .nebula-comments .reply-mention-card span,
[data-theme="Nebula"] .nebula-comments .reply-mention-card div {
  color: var(--nebula-white) !important;
}

/* ─── 评论表单 ───
   组件默认 inline 用 var(--color-border, #eee)，Nebula 解析成 #141414 几乎
   隐形。重构成深底卡片 + 清晰边框 + 内部分隔线，所有 inline border 都强行
   override，textarea 文字与 placeholder 颜色提亮 */

[data-theme="Nebula"] .comment-form {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

/* 任意子级 input / textarea 聚焦 → 整个表单外框变蓝（单一 1px 边） */
[data-theme="Nebula"] .comment-form:focus-within {
  border-color: var(--nebula-blue-accent) !important;
}

/* 表单内部的所有横向 / 纵向分隔线（header bar、info fields） */
[data-theme="Nebula"] .comment-form > div[style*="border-bottom"],
[data-theme="Nebula"] .comment-form > div > div[style*="border-bottom"],
[data-theme="Nebula"] .comment-form > div > div[style*="border-right"] {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* textarea 区：placeholder 提亮，文字提亮 */
[data-theme="Nebula"] .comment-form textarea {
  color: rgba(225, 231, 238, 0.92) !important;
  caret-color: var(--nebula-blue-accent);
}
[data-theme="Nebula"] .comment-form textarea::placeholder {
  color: rgba(225, 231, 238, 0.35);
}

/* textarea / input 聚焦：取消浏览器默认 outline（蓝边由父级 .comment-form
   :focus-within 提供，单一边框，避免内部 outline 与外框重叠错位） */
[data-theme="Nebula"] .comment-form textarea:focus,
[data-theme="Nebula"] .comment-form textarea:focus-visible,
[data-theme="Nebula"] .comment-form input:focus,
[data-theme="Nebula"] .comment-form input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* 信息字段输入框（昵称/邮箱/网站）— placeholder + caret 同上 */
[data-theme="Nebula"] .comment-form input {
  color: rgba(225, 231, 238, 0.92) !important;
  caret-color: var(--nebula-blue-accent);
}
[data-theme="Nebula"] .comment-form input::placeholder {
  color: rgba(225, 231, 238, 0.35);
}

/* "评论"前面 fa-pen-to-square + "昵称/邮箱/网站"前面的小图标
   inline 写死 #bbb 在暗底太亮反而抢注意，调暗 */
[data-theme="Nebula"] .comment-form i[style*="color: rgb(187, 187, 187)"] {
  color: rgba(225, 231, 238, 0.4) !important;
}

/* "发表评论"标题 / "以 xxx 的身份登录" 信息条 — 字体亮一点，分割竖线柔化 */
[data-theme="Nebula"] .comment-form span[style*="color: rgb(221, 221, 221)"] {
  color: rgba(255, 255, 255, 0.15) !important;
}

/* 评论礼仪 hint —— 在暗底比 0.55 opacity 更夯实一点 */
[data-theme="Nebula"] .comment-form .comment-hint {
  color: rgba(225, 231, 238, 0.45) !important;
  opacity: 1 !important;
}

/* 表情面板：暗主题下的浅底 popup 同样要翻深色 */
[data-theme="Nebula"] .comment-form > div > div[style*="background: var(--color-bg-card"],
[data-theme="Nebula"] .comment-form > div > div[style*="grid-template-columns: repeat(10"] {
  background: rgba(15, 17, 21, 0.98) !important;
  border-color: rgba(128, 207, 255, 0.25) !important;
}

/* 提交按钮：去除 inline opacity 在 disabled 下，加 hover 反馈 */
[data-theme="Nebula"] .comment-form + div button[disabled] { opacity: 0.5 !important; }

/* "提交评论" 按钮：底色保留蓝色（var(--color-primary)），文字 inline 写死
   #fff 在浅色品牌色上对比度差，Nebula 把字色翻成黑色 */
[data-theme="Nebula"] .comment-submit-button {
  color: var(--nebula-navy-deep) !important;
}
[data-theme="Nebula"] .comment-submit-button svg {
  fill: var(--nebula-navy-deep) !important;
}

/* ─── 边读边聊（AIReaderChat）暗色主题适配 ───
   组件 inline 写死浅色（白底 / #1a1a1a 字 / #999 灰提示 / #fafafa 提示卡），
   暗主题下用 attribute selector + !important 全部翻深。
   Nebula 还额外做：圆角 12px + 毛玻璃 + 蓝细边，跟左下角迷你播放器视觉一致 */

/* 折叠卡片 + 展开窗口：通用容器 */
[data-theme="Nebula"] .ai-reader-chat {
  background: rgba(15, 17, 21, 0.92) !important;
  border-color: rgba(128, 207, 255, 0.2) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55) !important;
  color: rgba(225, 231, 238, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
}
[data-theme="Nebula"] .ai-reader-chat--collapsed {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease, bottom 0.25s ease !important;
}
[data-theme="Nebula"] .ai-reader-chat--collapsed:hover {
  box-shadow: 0 10px 32px rgba(128, 207, 255, 0.18) !important;
  border-color: rgba(128, 207, 255, 0.32) !important;
  transform: translateY(-1px);
}

/* 折叠卡内右上 × 关闭按钮（inline 写 #bbb / 白底 hover #f0f0f0 → 暗主题翻深） */
[data-theme="Nebula"] .ai-reader-chat-dismiss {
  color: rgba(225, 231, 238, 0.45) !important;
}
[data-theme="Nebula"] .ai-reader-chat-dismiss:hover {
  color: var(--nebula-white) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* 头像外框：从 #e5e5e5 浅灰边换成蓝细边 */
[data-theme="Nebula"] .ai-reader-chat div[style*="border: 2px solid rgb(229, 229, 229)"] {
  border-color: rgba(128, 207, 255, 0.3) !important;
}

/* AI 角标：原 #0052D9 蓝底 → 用主题 sky 蓝 + 深底字（跟"提交评论"
   按钮一致的对比策略） */
[data-theme="Nebula"] .ai-reader-chat span[style*="background: rgb(0, 82, 217)"] {
  background: var(--nebula-blue-accent) !important;
  color: var(--nebula-navy-deep) !important;
}

/* 机器人图标 #0052D9 → sky 蓝 */
[data-theme="Nebula"] .ai-reader-chat i[style*="color: rgb(0, 82, 217)"] {
  color: var(--nebula-blue-light) !important;
}

/* 用户消息气泡 #0052D9 蓝底 + 白字 → sky 蓝 + 深底字 */
[data-theme="Nebula"] .ai-reader-chat div[style*="background: rgb(0, 82, 217)"] {
  background: var(--nebula-blue-accent) !important;
  color: var(--nebula-navy-deep) !important;
}

/* 发送按钮启用态 #0052D9 + 白字 → sky 蓝 + 深底字 */
[data-theme="Nebula"] .ai-reader-chat button[style*="background: rgb(0, 82, 217)"] {
  background: var(--nebula-blue-accent) !important;
  color: var(--nebula-navy-deep) !important;
}

/* "边读边聊" 副标 / 推荐问题副标 / 副信息 #999 → 暗底亮一点 */
[data-theme="Nebula"] .ai-reader-chat div[style*="color: rgb(153, 153, 153)"],
[data-theme="Nebula"] .ai-reader-chat span[style*="color: rgb(153, 153, 153)"],
[data-theme="Nebula"] .ai-reader-chat p[style*="color: rgb(153, 153, 153)"] {
  color: rgba(225, 231, 238, 0.55) !important;
}
[data-theme="Nebula"] .ai-reader-chat span[style*="color: rgb(187, 187, 187)"] {
  color: rgba(225, 231, 238, 0.5) !important;
}

/* 文章标题（卡片内）+ Header 标签 #1a1a1a → 亮白 */
[data-theme="Nebula"] .ai-reader-chat div[style*="color: rgb(26, 26, 26)"],
[data-theme="Nebula"] .ai-reader-chat span[style*="color: rgb(26, 26, 26)"] {
  color: var(--nebula-white) !important;
}

/* 摘要文字 #888 → 半透白 */
[data-theme="Nebula"] .ai-reader-chat div[style*="color: rgb(136, 136, 136)"],
[data-theme="Nebula"] .ai-reader-chat p[style*="color: rgb(136, 136, 136)"] {
  color: rgba(225, 231, 238, 0.65) !important;
}

/* 推荐问题按钮：浅灰底 → 深底 */
[data-theme="Nebula"] .ai-reader-chat button[style*="background: rgb(250, 250, 250)"] {
  background: rgba(128, 207, 255, 0.05) !important;
  border-color: rgba(128, 207, 255, 0.18) !important;
  color: rgba(225, 231, 238, 0.85) !important;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}
[data-theme="Nebula"] .ai-reader-chat button[style*="background: rgb(250, 250, 250)"]:hover {
  background: rgba(128, 207, 255, 0.12) !important;
  border-color: rgba(128, 207, 255, 0.36) !important;
  color: var(--nebula-white) !important;
}

/* Header 区域：#fafafa 浅底 → 深底 */
[data-theme="Nebula"] .ai-reader-chat--open > div[style*="background: rgb(250, 250, 250)"] {
  background: rgba(128, 207, 255, 0.04) !important;
  border-color: rgba(128, 207, 255, 0.15) !important;
}

/* 分割线 border-bottom #e5e5e5 → 半透白 */
[data-theme="Nebula"] .ai-reader-chat *[style*="border-bottom: 1px solid rgb(229, 229, 229)"],
[data-theme="Nebula"] .ai-reader-chat *[style*="border-top: 1px solid rgb(229, 229, 229)"] {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 输入框 + 用户消息气泡：#fff → 深 / #f5f5f5 → 蓝染 */
[data-theme="Nebula"] .ai-reader-chat input[style*="background: rgb(255, 255, 255)"],
[data-theme="Nebula"] .ai-reader-chat textarea[style*="background: rgb(255, 255, 255)"] {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(225, 231, 238, 0.92) !important;
  border-radius: 8px !important;
}
[data-theme="Nebula"] .ai-reader-chat input::placeholder,
[data-theme="Nebula"] .ai-reader-chat textarea::placeholder {
  color: rgba(225, 231, 238, 0.4) !important;
}
[data-theme="Nebula"] .ai-reader-chat input:focus,
[data-theme="Nebula"] .ai-reader-chat textarea:focus {
  outline: none !important;
  border-color: var(--nebula-blue-accent) !important;
}

/* AI 回复气泡 #f5f5f5 浅灰底 → 蓝染深底 */
[data-theme="Nebula"] .ai-reader-chat div[style*="background: rgb(245, 245, 245)"] {
  background: rgba(128, 207, 255, 0.06) !important;
  color: rgba(225, 231, 238, 0.92) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(128, 207, 255, 0.12);
}

/* 用户消息气泡 + 发送按钮：圆角 */
[data-theme="Nebula"] .ai-reader-chat div[style*="background: rgb(0, 82, 217)"] {
  border-radius: 10px !important;
}
[data-theme="Nebula"] .ai-reader-chat button[style*="background: rgb(0, 82, 217)"] {
  border-radius: 8px !important;
}

/* 发送按钮 disabled 状态 #f0f0f0 / #ccc → 暗底 */
[data-theme="Nebula"] .ai-reader-chat button[style*="background: rgb(240, 240, 240)"] {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(225, 231, 238, 0.3) !important;
}

/* 底部 disclaimer #bbb → 暗底亮一档 */
[data-theme="Nebula"] .ai-reader-chat span[style*="color: rgb(187, 187, 187)"] {
  color: rgba(225, 231, 238, 0.45) !important;
}

/* markdown 渲染样式（.ai-reader-md）暗色覆盖 */
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md,
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md * {
  color: rgba(225, 231, 238, 0.92) !important;
}
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md a {
  color: var(--nebula-blue-light) !important;
}
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md code {
  background: rgba(128, 207, 255, 0.1) !important;
  color: var(--nebula-blue-light) !important;
}
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md pre {
  background: rgba(0, 0, 0, 0.4) !important;
}
[data-theme="Nebula"] .ai-reader-chat .ai-reader-md blockquote {
  border-left-color: var(--nebula-blue-accent) !important;
  color: rgba(225, 231, 238, 0.7) !important;
}

/* ─── AI 聊天气泡（首页 / 列表页等非文章页浮动）暗色适配 ───
   AIChatBubble 组件 inline 写死浅色（白底 / #1a1a1a 字 / #f4f6f8 气泡 /
   #888 提示），Nebula 主题用类钩子整体翻深 */

/* 折叠态浮标按钮：底色保留品牌蓝，文字 inline 是 #fff —— 改成深色对比 */
[data-theme="Nebula"] .ai-chat-bubble-fab {
  color: var(--nebula-navy-deep) !important;
  background: var(--nebula-blue-accent) !important;
  box-shadow: 0 4px 16px rgba(128, 207, 255, 0.32) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-fab:hover {
  background: var(--nebula-sky-hover) !important;
}

/* 展开面板容器 */
[data-theme="Nebula"] .ai-chat-bubble-panel {
  background: rgba(15, 17, 21, 0.96) !important;
  border-color: rgba(128, 207, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
  color: rgba(225, 231, 238, 0.92);
}

/* Header 分割线 + 文字 */
[data-theme="Nebula"] .ai-chat-bubble-header {
  border-bottom-color: rgba(128, 207, 255, 0.16) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-name {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-status {
  color: rgba(225, 231, 238, 0.55) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-close {
  color: rgba(225, 231, 238, 0.5) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-close:hover {
  color: var(--nebula-white) !important;
}

/* 空状态提示 */
[data-theme="Nebula"] .ai-chat-bubble-empty {
  color: rgba(225, 231, 238, 0.5) !important;
}

/* 消息气泡：assistant 翻深，user 保留品牌蓝但文字翻黑 */
[data-theme="Nebula"] .ai-chat-bubble-msg--assistant {
  background: rgba(128, 207, 255, 0.08) !important;
  color: rgba(225, 231, 238, 0.92) !important;
  border: 1px solid rgba(128, 207, 255, 0.14);
}
[data-theme="Nebula"] .ai-chat-bubble-msg--user {
  color: var(--nebula-navy-deep) !important;
  background: var(--nebula-blue-accent) !important;
}

/* AI"打字中"动画 3 圆点 —— SVG 用 currentColor，跟随父气泡的 color。
   Nebula 暗底气泡上把点改成 sky 亮蓝（默认 hsl(228 97 42) 太深，跟
   半透蓝底融在一起看不清） */
[data-theme="Nebula"] .ai-chat-bubble-typing {
  color: var(--nebula-blue-accent) !important;
}

/* 输入区分割线 + 输入框 */
[data-theme="Nebula"] .ai-chat-bubble-input-bar {
  border-top-color: rgba(128, 207, 255, 0.16) !important;
  background: rgba(0, 0, 0, 0.25);
}
[data-theme="Nebula"] .ai-chat-bubble-input {
  background: rgba(15, 17, 21, 0.6) !important;
  color: rgba(225, 231, 238, 0.92) !important;
  border-color: rgba(128, 207, 255, 0.18) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-input::placeholder {
  color: rgba(225, 231, 238, 0.4);
}
[data-theme="Nebula"] .ai-chat-bubble-input:focus {
  border-color: rgba(128, 207, 255, 0.4) !important;
}

/* 发送按钮：底色保留品牌蓝，inline #fff 文字翻黑 */
[data-theme="Nebula"] .ai-chat-bubble-send {
  color: var(--nebula-navy-deep) !important;
  background: var(--nebula-blue-accent) !important;
}
[data-theme="Nebula"] .ai-chat-bubble-send:hover:not(:disabled) {
  background: var(--nebula-sky-hover) !important;
}

/* 时间 / 中点分隔符 / 楼层号 在暗底上提亮 */
[data-theme="Nebula"] .nebula-comments .comment-thread span[style*="color: rgb(170, 170, 170)"],
[data-theme="Nebula"] .nebula-comments .comment-thread span[style*="color: rgb(187, 187, 187)"] {
  color: rgba(225, 231, 238, 0.55) !important;
}
[data-theme="Nebula"] .nebula-comments .comment-thread span[style*="color: rgb(221, 221, 221)"] {
  color: rgba(225, 231, 238, 0.7) !important;
}

[data-theme="Nebula"] .nebula-reader-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--nebula-blue-accent);
  color: var(--nebula-black);
  border: 0;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--nebula-shadow-tile);
  z-index: 30;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="Nebula"] .nebula-reader-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--nebula-shadow-tile-hover);
}

/* ============================================================ */
/* Footer                                                         */
/* ============================================================ */

/* ── 单行 footer：版权 / stats / 链接 横排，左右两端 ── */
[data-theme="Nebula"] .nebula-footer {
  border-top: 1px solid var(--nebula-border-subtle);
  background: var(--nebula-black);
  position: relative; /* 给 .nebula-back-to-top 做绝对定位的参照 */
  /* 默认情况（无备案号 / 单行内容）footer 高度跟 header 完全对齐：
     header 的 .nebula-header-inner 是 height: 64px，footer 用
     min-height: 64px + flex 垂直居中匹配。
     有备案号 / 多行内容时，内容自然撑开超过 64px（min-height 不限制
     上界），不影响。 */
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[data-theme="Nebula"] .nebula-footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  /* min-height: 64 + flex 居中已经撑起整体高度；padding 留一点点
     安全余量给极少数横排被字体撑高的场景（10px 上下足够） */
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 12px;
  font-family: var(--nebula-font-mono);
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="Nebula"] .nebula-footer-copy {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}
[data-theme="Nebula"] .nebula-footer-copy strong {
  margin-left: 4px;
  font-family: var(--nebula-font-display);
  font-weight: 500;
  color: var(--nebula-white);
}

[data-theme="Nebula"] .nebula-footer-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="Nebula"] .nebula-footer-stat strong {
  font-family: var(--nebula-font-display);
  font-weight: 600;
  color: var(--nebula-white);
}
[data-theme="Nebula"] .nebula-footer-stat i {
  font-size: 11px;
  color: var(--nebula-sky);
}
[data-theme="Nebula"] .nebula-footer-stat:not(:last-child)::after {
  content: '';
  position: relative;
  margin-left: 14px;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
}

/* "在线" 绿色脉动小点 */
[data-theme="Nebula"] .nebula-footer-pulse {
  font-size: 8px !important;
  color: #39d353 !important;
  filter: drop-shadow(0 0 4px #39d353);
  animation: nebula-footer-pulse 1.6s ease-in-out infinite;
}
@keyframes nebula-footer-pulse {
  0%, 100% { opacity: 0.7; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}

[data-theme="Nebula"] .nebula-footer-flag {
  width: 14px;
  height: 14px;
  object-fit: cover;
  vertical-align: -3px;
  border-radius: 0;
  /* 国旗保持原色，不灰化；1x1 正方形小角标 */
}

[data-theme="Nebula"] .nebula-footer-stat-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

/* ── 备案行（第二行，居中、间距收紧） ── */
[data-theme="Nebula"] .nebula-footer-beian-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 0;
  padding-bottom: 10px;
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  flex-wrap: wrap;
}

[data-theme="Nebula"] .nebula-footer-beian {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-beian:hover {
  color: var(--nebula-sky);
  background: rgba(128, 207, 255, 0.06);
}

/* 公安网备警徽：默认灰 + 半透；hover 还原原色 */
[data-theme="Nebula"] .nebula-footer-gh-icon {
  width: 12px;
  height: 12px;
  filter: grayscale(1) brightness(0.85);
  opacity: 0.6;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
[data-theme="Nebula"] .nebula-footer-beian:hover .nebula-footer-gh-icon {
  filter: none;
  opacity: 1;
}

/* ICP 备案盾形 icon：SVG 内 fill 写死 #0649D0（品牌蓝）。
   默认翻成灰色（跟旁边其它备案文字/链接同色调），hover 才恢复成
   Nebula 天蓝。之前默认就是蓝色，跟"备案号默认灰、hover 高亮"的
   一致体验对不上 */
[data-theme="Nebula"] .nebula-footer-icp-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
[data-theme="Nebula"] .nebula-footer-icp-icon path {
  fill: rgba(225, 231, 238, 0.5) !important;
  transition: fill 0.2s ease;
}
[data-theme="Nebula"] .nebula-footer-beian:hover .nebula-footer-icp-icon path {
  fill: var(--nebula-blue-accent) !important;
}

/* 链接组（右） */
[data-theme="Nebula"] .nebula-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
[data-theme="Nebula"] .nebula-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-links a:hover {
  color: var(--nebula-sky);
  background: rgba(128, 207, 255, 0.08);
}
[data-theme="Nebula"] .nebula-footer-links a i {
  font-size: 10px;
}

/* 音乐 / RSS / Utterlog logo / 登录按钮 —— 统一 24×24 外框 + 22%
   squircle 圆角（小米 / iOS logo 风格） + 半透明深底 + 蓝细边，整体呈
   "图标在中心 + 外边框"的 logo 形状。hover 1.2x 弹簧放大 */
[data-theme="Nebula"] .nebula-footer-music-btn,
[data-theme="Nebula"] .nebula-footer-links a[title="音乐"],
[data-theme="Nebula"] .nebula-footer-rss-btn,
[data-theme="Nebula"] .nebula-footer-tag,
[data-theme="Nebula"] .nebula-footer-auth-btn {
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 22% !important;       /* 小米 / iOS 风 squircle */
  background: rgba(15, 17, 21, 0.6) !important;
  border: 1px solid rgba(128, 207, 255, 0.2) !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.15s ease,
              background 0.15s ease !important;
}
[data-theme="Nebula"] .nebula-footer-music-btn:hover,
[data-theme="Nebula"] .nebula-footer-links a[title="音乐"]:hover,
[data-theme="Nebula"] .nebula-footer-rss-btn:hover,
[data-theme="Nebula"] .nebula-footer-tag:hover,
[data-theme="Nebula"] .nebula-footer-auth-btn:hover {
  transform: scale(1.2) !important;
  border-color: rgba(128, 207, 255, 0.4) !important;
  background: rgba(20, 24, 30, 0.85) !important;
}
[data-theme="Nebula"] .nebula-footer-music-btn,
[data-theme="Nebula"] .nebula-footer-rss-btn {
  cursor: pointer;
}
/* RSS 复制成功 1.8s 内：图标变绿对号 */
[data-theme="Nebula"] .nebula-footer-rss-btn.is-copied i {
  color: #4ade80 !important; /* tailwind green-400，跟 toast 成功色一致 */
}
[data-theme="Nebula"] .nebula-footer-rss-btn.is-copied {
  cursor: default;
}
/* mini-player 打开时音乐按钮：visibility:hidden 占位但不可见，
   保证后排 RSS / Logo / 头像 三个按钮位置不跟着前移 */
[data-theme="Nebula"] .nebula-footer-music-btn.is-hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ─── 回到顶部按钮（footer 右侧、container 之外，垂直居中） ───
   独立浮在 footer 右内边距 20px，36×36 squircle，毛玻璃 + 蓝细边 */
[data-theme="Nebula"] .nebula-back-to-top {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 21, 0.92);
  border: 1px solid rgba(128, 207, 255, 0.2);
  border-radius: 22%;
  color: rgba(225, 231, 238, 0.7);
  font-size: 14px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease,
              color 0.15s ease,
              background 0.15s ease,
              border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-back-to-top:hover {
  transform: translateY(-50%) scale(1.12);
  color: var(--nebula-white);
  border-color: rgba(128, 207, 255, 0.4);
  background: rgba(20, 24, 30, 0.96);
}
[data-theme="Nebula"] .nebula-back-to-top i {
  font-size: 14px;
  line-height: 1;
}
/* 滚动 ≤ 400px：占位但不可见 + 不可点 */
[data-theme="Nebula"] .nebula-back-to-top.is-hidden {
  visibility: hidden !important;
  opacity: 0;
  pointer-events: none !important;
}
@media (max-width: 640px) {
  [data-theme="Nebula"] .nebula-back-to-top {
    right: 12px;
    width: 32px;
    height: 32px;
  }
}

/* ─── 迷你音乐播放器（左下角浮动） ─── */
[data-theme="Nebula"] .nebula-mini-music {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 320px;
  padding: 10px 12px;
  background: rgba(15, 17, 21, 0.92);
  border: 1px solid rgba(128, 207, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  color: var(--nebula-white);
  animation: nebulaMiniMusicIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* lift 滚动避让 footer 时平滑过渡 */
  transition: transform 0.2s ease-out;
}
@keyframes nebulaMiniMusicIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 封面 */
[data-theme="Nebula"] .nebula-mini-music-cover {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(128, 207, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nebula-blue-light);
  text-decoration: none;
  transition: transform 0.25s ease;
}
[data-theme="Nebula"] .nebula-mini-music-cover:hover {
  transform: scale(1.05);
}
[data-theme="Nebula"] .nebula-mini-music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 标题 + 艺人 */
[data-theme="Nebula"] .nebula-mini-music-info {
  flex: 1;
  min-width: 0;
}
[data-theme="Nebula"] .nebula-mini-music-title {
  font-family: var(--nebula-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--nebula-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="Nebula"] .nebula-mini-music-artist {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: rgba(225, 231, 238, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 控制按钮 */
[data-theme="Nebula"] .nebula-mini-music-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
[data-theme="Nebula"] .nebula-mini-music-ctrl button {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: rgba(225, 231, 238, 0.7);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
[data-theme="Nebula"] .nebula-mini-music-ctrl button:hover {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="Nebula"] .nebula-mini-music-play {
  width: 30px !important;
  height: 30px !important;
  background: var(--nebula-blue-accent) !important;
  color: var(--nebula-navy-deep) !important;
  font-size: 12px !important;
}
[data-theme="Nebula"] .nebula-mini-music-play:hover {
  background: var(--nebula-sky-hover) !important;
  color: var(--nebula-navy-deep) !important;
}

/* 关闭 × */
[data-theme="Nebula"] .nebula-mini-music-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: rgba(225, 231, 238, 0.5);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  margin-left: 4px;
}
[data-theme="Nebula"] .nebula-mini-music-close:hover {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  [data-theme="Nebula"] .nebula-mini-music {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

/* 三种内部元素都强制 16×16 + 统一 60% 白图标色 */
[data-theme="Nebula"] .nebula-footer-music-btn i,
[data-theme="Nebula"] .nebula-footer-links a[title="音乐"] i,
[data-theme="Nebula"] .nebula-footer-rss-btn i {
  font-size: 16px !important;
  line-height: 1 !important;
  width: 16px !important;
  height: 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="Nebula"] .nebula-footer-music-btn:hover i,
[data-theme="Nebula"] .nebula-footer-links a[title="音乐"]:hover i,
[data-theme="Nebula"] .nebula-footer-rss-btn:hover i,
[data-theme="Nebula"] .nebula-footer-auth-btn:hover i {
  color: var(--nebula-sky) !important;
}
[data-theme="Nebula"] .nebula-footer-tag .nebula-footer-utterlog-logo {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}
[data-theme="Nebula"] .nebula-footer-auth-btn i {
  font-size: 16px !important;
  line-height: 1 !important;
}
[data-theme="Nebula"] .nebula-footer-auth-avatar {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  object-fit: cover;
  border-radius: 22%; /* 跟外层 22% squircle 一致，避免 gravatar 白底突兀 */
  background: rgba(255, 255, 255, 0.06); /* 透明头像下兜底色，不再是纯白 */
}
/* 未登录占位 fa-user 图标颜色统一 */
[data-theme="Nebula"] .nebula-footer-auth-btn i {
  color: rgba(255, 255, 255, 0.6) !important;
}
/* Utterlog logo 链接：默认与音乐/RSS 一样的 60% 白（之前 35% 太暗），
   hover sky 蓝，跟其他三个按钮视觉重量对齐 */
[data-theme="Nebula"] .nebula-footer-tag {
  color: rgba(255, 255, 255, 0.6) !important;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="Nebula"] .nebula-footer-tag:hover {
  color: var(--nebula-sky) !important;
}
/* logo 内部 cutout 用透明而不是纯黑，避免 footer 黑底上看不到内圈线条
   currentColor 控制外圆，inner 透明让背景透出做出"双色"效果 */
[data-theme="Nebula"] .nebula-footer-tag .nebula-footer-utterlog-logo path:nth-child(2) {
  fill: var(--nebula-black) !important;
}

/* ── 登录按钮 + 弹窗 ── */
[data-theme="Nebula"] .nebula-footer-auth {
  position: relative;
  display: inline-flex;
}

/* 登录按钮的 box / 边框 / 圆角 / hover 全部由上面"音乐/RSS/Logo/登录"
   统一规则负责（24×24 + 22% squircle + 蓝细边 + 半透深底）。这里
   只剩下文字色钩子（避免重复声明背景色把上面的覆盖掉） */
[data-theme="Nebula"] .nebula-footer-auth-btn {
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
[data-theme="Nebula"] .nebula-footer-auth-btn:hover {
  color: var(--nebula-sky);
}

/* 弹窗：从按钮上方弹出 */
[data-theme="Nebula"] .nebula-footer-login {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 100;
  width: 280px;
  padding: 18px;
  background: var(--nebula-tile);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  font-family: var(--nebula-font-body);
}

[data-theme="Nebula"] .nebula-footer-login-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nebula-white);
  display: flex;
  align-items: center;
  gap: 6px;
}
[data-theme="Nebula"] .nebula-footer-login-title i {
  font-size: 12px;
  color: var(--nebula-sky);
}

[data-theme="Nebula"] .nebula-footer-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-theme="Nebula"] .nebula-footer-login-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="Nebula"] .nebula-footer-login-form input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--nebula-white);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-login-form input:focus {
  border-color: var(--nebula-sky);
}

[data-theme="Nebula"] .nebula-footer-totp-input {
  font-family: var(--nebula-font-mono) !important;
  font-size: 16px !important;
  letter-spacing: 6px;
  text-align: center;
}

[data-theme="Nebula"] .nebula-footer-login-error {
  margin: 0;
  font-size: 11px;
  color: #f2b8b5;
}

[data-theme="Nebula"] .nebula-footer-login-submit {
  width: 100%;
  padding: 9px;
  background: var(--nebula-sky);
  color: var(--nebula-navy-deep);
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-login-submit:hover {
  background: var(--nebula-sky-hover);
}
[data-theme="Nebula"] .nebula-footer-login-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

[data-theme="Nebula"] .nebula-footer-login-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
[data-theme="Nebula"] .nebula-footer-login-divider::before,
[data-theme="Nebula"] .nebula-footer-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="Nebula"] .nebula-footer-login-divider span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

[data-theme="Nebula"] .nebula-footer-login-passkey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  background: transparent;
  color: var(--nebula-sky);
  border: 1px solid rgba(128, 207, 255, 0.35);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-login-passkey:hover {
  background: rgba(128, 207, 255, 0.08);
  border-color: var(--nebula-sky);
}

[data-theme="Nebula"] .nebula-footer-login-actions {
  display: flex;
  gap: 8px;
}
[data-theme="Nebula"] .nebula-footer-login-back {
  flex: 1;
  padding: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
[data-theme="Nebula"] .nebula-footer-login-back:hover {
  color: var(--nebula-white);
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="Nebula"] .nebula-footer-login-actions .nebula-footer-login-submit {
  flex: 2;
}

/* 已登录菜单 —— 注意 menu 本身在 .nebula-footer-links 里面，会被
   `.nebula-footer-links a { padding/gap/font-size }` (specificity 0,2,1)
   打中。<Link> 渲染成 <a>、<button> 不会，导致两行 padding/gap 对不上。
   全部用 !important 盖死，跟 a/button 谁渲染都一致 */
[data-theme="Nebula"] .nebula-footer-login-menu {
  width: 160px;
  padding: 6px 0;
}
[data-theme="Nebula"] .nebula-footer-login-menu .nebula-footer-login-menu-item,
[data-theme="Nebula"] .nebula-footer-login-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 8px 16px !important;
  /* button 元素默认不继承 font-family/size，需要显式重设保证 <Link>(a)
     和 <button> 两种 tag 的视觉一致 */
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-align: left !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  transition: color 0.15s ease, background 0.15s ease;
}
/* icon 也强制同样字号 + 固定列宽，确保两个图标对齐到同一基线 */
[data-theme="Nebula"] .nebula-footer-login-menu .nebula-footer-login-menu-item i,
[data-theme="Nebula"] .nebula-footer-login-menu-item i {
  font-size: 13px !important;
  width: 16px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  color: var(--nebula-sky) !important;
  line-height: 1 !important;
}
[data-theme="Nebula"] .nebula-footer-login-menu .nebula-footer-login-menu-item:hover,
[data-theme="Nebula"] .nebula-footer-login-menu-item:hover {
  color: var(--nebula-white) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
[data-theme="Nebula"] .nebula-footer-login-logout:hover {
  color: var(--nebula-sky) !important;
}

/* ============================================================ */
/* Generic page skins (archives / categories / tags / search …)  */
/* 默认页通过 PageTitle + 行内样式渲染，token 已映射到深色，         */
/* 这里再补上"卡片化的标题条 + 容器收口"。                         */
/* ============================================================ */

[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post):not(.moments-page) {
  /* Nebula 全站统一 960px：跟首页 / 文章页 / coding 等页面的内容栏宽度
     对齐，视觉一致。v2.3.6 临时拉到 1200 是为了 tags / categories chip
     多列时少换行，但破坏了全站宽度统一感，本次回到 960。 */
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  width: 100%;
}

[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post) > div[style*="padding: 0 32px"],
[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post) > div[style*="padding: 0 24px"],
[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post) > div[style*="padding: 0 16px"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

/* 友链 / 订阅等页面 inline `padding: '32px'`（四边）—— 跟外层 .nebula-frame
   > div 的 24/32 padding 双重叠加导致内容缩进过深。这里清掉 inline 的
   左右 padding，只保留垂直方向，让卡片网格对齐 PageTitle 的左右沿 */
[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post) > div[style*="padding: 32px"],
[data-theme="Nebula"] .nebula-frame > div:not(.nebula-home):not(.nebula-article):not(.nebula-post) > div[style*="padding:32px"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 裸展示：icon + 标题 + 右侧信息直接落在页面背景上，
   不要 card 外壳（无背景 / 无边框 / 无阴影 / 无圆角 / 无下边框）。 */
[data-theme="Nebula"] .blog-page-title {
  margin: 0 0 24px;
  padding: 8px 0 16px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-theme="Nebula"] .blog-page-title-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--nebula-blue-accent);
  font-size: 22px;
}

[data-theme="Nebula"] .blog-page-title-text {
  /* 标题字体从 Google Sans Display（英文为主）改成 PingFang SC 栈：
     tags / categories / archive / search 这些页的标题都是中文，
     用 PingFang SC 比 Google Sans 的中文回退更清爽、字形更规整，
     跟 macOS / iOS 系统字体一致的视觉。Windows / Android 走
     Microsoft YaHei / Noto Sans SC 兜底；coding 页另有自己的
     .coding-page-title 覆盖，不受影响。 */
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont,
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui,
    'Segoe UI', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nebula-white);
}

[data-theme="Nebula"] .blog-page-title-subtitle {
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .blog-page-title-meta {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .blog-page-title-meta strong {
  color: var(--nebula-white);
  font-family: var(--nebula-font-display);
  font-weight: 500;
}

/* coding-page-title 走横向分隔线，把分隔线改为蓝边 */
[data-theme="Nebula"] .coding-page-title .blog-page-title-text {
  font-family: var(--nebula-font-display);
}
[data-theme="Nebula"] .coding-title-stat {
  border-right-color: var(--nebula-border-blue-soft);
  color: var(--nebula-blue-light);
}
[data-theme="Nebula"] .coding-title-stat strong {
  color: var(--nebula-white);
  font-family: var(--nebula-font-display);
}

/* DefaultArchivePage 等默认页里 React 渲染的 inline-style 卡片，
   都按 "border:1px solid var(--color-border)" 命中：热力图框、年份分组框、
   分类卡（已有自身规则也叠加 OK）。一律 15px 圆角；overflow:hidden
   inline 已带，能把内部 sub-header 切干净。*/
[data-theme="Nebula"] .nebula-frame [style*="border:1px solid var(--color-border)"] {
  border-radius: 15px !important;
}

/* tag/keyword 小 chip：border:1px solid var(--color-divider) → 胶囊 */
[data-theme="Nebula"] .nebula-frame [style*="border:1px solid var(--color-divider)"] {
  border-radius: 999px !important;
}

/* 年份块顶部 header 自身只有 border-bottom，但视觉上要跟父框圆角衔接：
   因为父框 overflow:hidden + 父加了 15px，header 的左右上角自然被 clip */

/* archive-cat-card / 标签/月份分组等行内样式块在深色下补点细节 */
[data-theme="Nebula"] .archive-cat-card {
  border-radius: var(--nebula-radius-lg) !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
[data-theme="Nebula"] .archive-cat-card:hover {
  transform: translateY(-2px);
  background-color: color-mix(in srgb, var(--nebula-blue-accent) 10%, var(--nebula-card)) !important;
  border-color: var(--nebula-border-blue) !important;
  box-shadow: 0 34px 84px -30px color-mix(in srgb, var(--nebula-blue-accent) 35%, transparent);
}

/* ============================================================ */
/* Forms (dark inputs)                                            */
/* 评论框 / 友链表单 / 搜索表单等通用控件补深色基线               */
/* ============================================================ */

[data-theme="Nebula"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="Nebula"] textarea,
[data-theme="Nebula"] select {
  background: var(--nebula-input);
  border: 1px solid var(--nebula-border-subtle);
  color: var(--nebula-white);
  border-radius: var(--nebula-radius-sm);
  font-family: var(--nebula-font-body);
}
[data-theme="Nebula"] input:focus,
[data-theme="Nebula"] textarea:focus,
[data-theme="Nebula"] select:focus {
  outline: none;
  border-color: var(--nebula-blue-accent);
  box-shadow: 0 0 0 3px rgba(128, 207, 255, 0.18);
}
[data-theme="Nebula"] input::placeholder,
[data-theme="Nebula"] textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* CommentList 空态图标硬编码 #ddd，深色下太亮 */
[data-theme="Nebula"] .blog-empty-comments i,
[data-theme="Nebula"] .nebula-comments .fa-couch {
  color: rgba(255, 255, 255, 0.18) !important;
}

/* ============================================================ */
/* Misc polish                                                    */
/* ============================================================ */

/* Brand mark 字母对比度 */
[data-theme="Nebula"] .nebula-brand-mark {
  color: var(--nebula-navy-deep);
}

/* ─── 段落点评弹窗（BlockAnnotation）—— 默认 var(--color-bg-card) 在
   Nebula 下被映射到 #121212，跟文章正文/底色完全一样，弹窗"消失"在
   背景里。这里用一个略浮起的深底 + 蓝细边 + 加重阴影区分层次 */
[data-theme="Nebula"] .block-annotation-panel {
  background: #1a1d22 !important;
  border-color: rgba(128, 207, 255, 0.22) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(128, 207, 255, 0.06) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
}
/* 内部分割线 / Header / 输入框分割线 都映射成 --color-border / --color-divider
   全局已经有覆盖，但弹窗顶上 / 底上的 border 默认是 var(--color-border)，
   在 Nebula 下是低对比 —— 给一个更醒目的蓝调分割 */
[data-theme="Nebula"] .block-annotation-panel > div[style*="border-bottom"] {
  border-bottom-color: rgba(128, 207, 255, 0.14) !important;
}
[data-theme="Nebula"] .block-annotation-panel > div[style*="border-top"] {
  border-top-color: rgba(128, 207, 255, 0.14) !important;
}
/* 输入框背景：弹窗已是 #1a1d22，输入框继续用 --color-bg-card 的话会
   再次跟弹窗底色撞色（还是 #121212）。输入框单独翻成更深一档，加蓝边 */
[data-theme="Nebula"] .block-annotation-input {
  background: rgba(0, 0, 0, 0.35) !important;
  border-color: rgba(128, 207, 255, 0.18) !important;
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .block-annotation-input::placeholder {
  color: rgba(225, 231, 238, 0.42);
}
[data-theme="Nebula"] .block-annotation-input:focus {
  border-color: var(--nebula-blue-accent) !important;
}

/* PostNavigation / Related posts 在 Nebula 容器里时给点上下间距 */
[data-theme="Nebula"] .nebula-related-wrap > * { margin: 0; }

/* ============================================================ */
/* Moments 页 —— 默认状态把 footer 推出可视区，滚动才出现         */
/* ============================================================ */

/* 隐藏 PageTitle（"hero"）—— 说说页只剩内容 + 浮动工具栏 */
[data-theme="Nebula"] .moments-page > .blog-page-title {
  display: none !important;
}

/* moments-page 单一权威规则：
   - 居中 960 max-width 跟全站对齐（JS 锁 cols=3，containerW 870 < 960）
   - min-height 100dvh + 内部 padding-bottom 120px 双重保险：
       · 100dvh 让 moments-page 总高至少占满视口，footer 起点 100dvh+64 永远在视口外
       · padding-bottom: 120px 在 moments-page 内部留出工具栏占据的 86px + 余量，
         避免内容（最底一行说说卡）被浮动工具栏遮挡
   - 不依赖 flex / :has，避免浏览器实现差异
   - 不要被通用 .nebula-frame > div 规则的 padding 污染（已用 :not 排除） */
[data-theme="Nebula"] .moments-page {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 120px !important;
  min-height: 100dvh !important;
}

/* moments 底部浮动工具栏：默认 inline 是白底 + 黑字 + 米色分隔线，
   Nebula 全部覆盖到深色 + sky 蓝 accent */
[data-theme="Nebula"] .moments-toolbar {
  background: rgba(18, 18, 18, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55) !important;
}
/* "说说" 标题专用类钩子 —— inline-style 选择器在客户端路由切换后
   不可靠：React 在客户端 DOM 上设置 element.style 时浏览器会把
   #1a1a1a 规范化成 rgb(26, 26, 26)，原 [style*="#1a1a1a"] 选择器
   匹配不上 → 标题保持深灰跟暗背景撞色看不见，强制刷新（拿到 SSR
   原始 HTML 字符串 #1a1a1a）才白。改用类钩子后跟 React 序列化形
   态完全解耦。 */
[data-theme="Nebula"] .moments-toolbar-title {
  color: var(--nebula-white) !important;
}
/* 兜底：保留 inline-style 属性匹配（覆盖 SSR 原始 HTML 形态 + 极
   端情况下没带 class 的旧缓存） */
[data-theme="Nebula"] .moments-toolbar [style*="color:#1a1a1a" i],
[data-theme="Nebula"] .moments-toolbar [style*="color: #1a1a1a" i],
[data-theme="Nebula"] .moments-toolbar [style*="rgb(26, 26, 26)" i],
[data-theme="Nebula"] .moments-toolbar [style*="rgb(26,26,26)" i] {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .moments-toolbar [style*="background:#4a9e8e"] {
  background: var(--nebula-sky) !important;
}
[data-theme="Nebula"] .moments-toolbar [style*="background:#e2dfd8"] {
  background: rgba(255, 255, 255, 0.08) !important;
}
/* 工具栏 inline 颜色（带空格 / 不带空格 都覆盖） —— React 实际序列化
   是 "color: #7a7670"（带空格），之前只写了不带空格的版本所以图标
   一直保持原色 #7a7670（灰）没翻成白。用 i 标志做大小写无关匹配。 */
[data-theme="Nebula"] .moments-toolbar [style*="color: #7a7670" i],
[data-theme="Nebula"] .moments-toolbar [style*="color:#7a7670" i] {
  color: rgba(225, 231, 238, 0.7) !important;
}
[data-theme="Nebula"] .moments-toolbar [style*="color: #999" i],
[data-theme="Nebula"] .moments-toolbar [style*="color:#999" i] {
  color: rgba(225, 231, 238, 0.5) !important;
}
[data-theme="Nebula"] .moments-toolbar [style*="rgba(0, 82, 217, 0.08)" i],
[data-theme="Nebula"] .moments-toolbar [style*="rgba(0,82,217,0.08)" i] {
  background: rgba(128, 207, 255, 0.14) !important;
}
[data-theme="Nebula"] .moments-toolbar [style*="rgba(0, 0, 0, 0.05)" i],
[data-theme="Nebula"] .moments-toolbar [style*="rgba(0,0,0,0.05)" i] {
  background: rgba(255, 255, 255, 0.06) !important;
}
/* 弹出的日历 / 标签 popover ── 用 class 强覆盖（属性选择器在某些 React
   序列化形态下匹配不稳定） */
[data-theme="Nebula"] .moments-popover {
  background: var(--nebula-tile) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55) !important;
}
/* popover 内部：所有 button / span / p 文字默认半透白 */
[data-theme="Nebula"] .moments-popover button,
[data-theme="Nebula"] .moments-popover span,
[data-theme="Nebula"] .moments-popover p {
  color: rgba(255, 255, 255, 0.7) !important;
}
/* popover 中"年份"大字（默认 #1a1a1a） → 白 */
[data-theme="Nebula"] .moments-popover button[style*="font-weight:600"],
[data-theme="Nebula"] .moments-popover button[style*="font-weight: 600"] {
  color: var(--nebula-white) !important;
}
/* 月份小 chip：light bg → 半透白底 */
[data-theme="Nebula"] .moments-popover button[style*="font-size:11px"] {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.65) !important;
}
/* 标签 chip / 月份 chip / 年份按钮 —— 用类钩子（之前用 inline-style
   属性匹配 [style*="font-size:12px"] 不可靠：React 序列化是带空格的
   "font-size: 12px"，原选择器没空格匹配不上） */
[data-theme="Nebula"] .moments-tag-chip {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(225, 231, 238, 0.75) !important;
}
[data-theme="Nebula"] .moments-tag-chip.is-active {
  /* 激活态用 inline 颜色（每个 tag 不同），CSS 不强占；只调对比度 */
  color: var(--nebula-navy-deep) !important;
}
[data-theme="Nebula"] .moments-month-chip {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(225, 231, 238, 0.65) !important;
}
[data-theme="Nebula"] .moments-month-chip.is-active {
  background: var(--nebula-blue-accent) !important;
  border-color: var(--nebula-blue-accent) !important;
  color: var(--nebula-navy-deep) !important;
}
[data-theme="Nebula"] .moments-year-btn {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .moments-year-btn.is-active {
  color: var(--nebula-blue-accent) !important;
}
/* 兼容旧的 inline-style 匹配（带空格） */
[data-theme="Nebula"] .moments-popover button[style*="font-size: 12px"],
[data-theme="Nebula"] .moments-popover button[style*="font-size:12px"] {
  /* 兜底：万一上面的 class 没生效（哪个 SSR 缓存的 HTML 还没带 class），
     这条仍然把它翻深 */
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(225, 231, 238, 0.7) !important;
}
/* 分隔线 #f0f0f0 */
[data-theme="Nebula"] .moments-popover button[style*="border-bottom"] {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* ========== 发布弹窗 .moments-composer ========== */
/* 模态框 backdrop：浅黑 → 深 + 模糊更明显 */
[data-theme="Nebula"] [style*="zIndex:2000"][style*="background:rgba(0,0,0,0.15)"] {
  background: rgba(0, 0, 0, 0.6) !important;
}
/* 弹窗主体：白底 → 深底 */
[data-theme="Nebula"] .moments-composer {
  background: var(--nebula-tile) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6) !important;
}
/* badge / 发布按钮默认色（绿色 #4a9e8e）→ sky 蓝；mood 选中时保留 tag 色 */
[data-theme="Nebula"] .moments-composer-badge.is-default,
[data-theme="Nebula"] .moments-composer-submit.is-default {
  background: var(--nebula-sky) !important;
  color: var(--nebula-navy-deep) !important;
  box-shadow: 0 2px 8px rgba(128, 207, 255, 0.25) !important;
}
/* "写点什么？" 提示语 #9e9a93 暖灰 → 半透白 */
[data-theme="Nebula"] .moments-composer [style*="color:#9e9a93"] {
  color: rgba(255, 255, 255, 0.5) !important;
}
/* 标签 chip 默认色 (#7a7670 暖灰文字 / #e2dfd8 暖边) */
[data-theme="Nebula"] .moments-composer [style*="color:#7a7670"] {
  color: rgba(255, 255, 255, 0.7) !important;
}
/* 关键词 / 添加图片 / 位置按钮 默认 #e2dfd8 暖灰边 → Nebula sky 蓝边
   双保险匹配：
     · 大小写都覆盖（CSS 默认大小写敏感，加 `i` flag）
     · 兜底规则：composer 里所有非 submit 的有边框 button 统一处理 */
[data-theme="Nebula"] .moments-composer [style*="#e2dfd8" i],
[data-theme="Nebula"] .moments-composer button[style*="1px solid"]:not(.moments-composer-submit) {
  border-color: rgba(128, 207, 255, 0.28) !important;
  background: rgba(128, 207, 255, 0.04) !important;
}
[data-theme="Nebula"] .moments-composer [style*="#e2dfd8" i]:hover,
[data-theme="Nebula"] .moments-composer button[style*="1px solid"]:not(.moments-composer-submit):hover {
  border-color: rgba(128, 207, 255, 0.5) !important;
  background: rgba(128, 207, 255, 0.1) !important;
  color: var(--nebula-white) !important;
}
/* 位置已选中（绿色系）→ 蓝色系，与 Nebula 主题统一 */
[data-theme="Nebula"] .moments-composer [style*="rgba(74,158,142,0.08)"],
[data-theme="Nebula"] .moments-composer [style*="rgba(74, 158, 142, 0.08)"] {
  background: rgba(128, 207, 255, 0.1) !important;
  color: var(--nebula-blue-accent) !important;
}
[data-theme="Nebula"] .moments-composer [style*="rgba(74,158,142,0.2)"],
[data-theme="Nebula"] .moments-composer [style*="rgba(74, 158, 142, 0.2)"] {
  border-color: rgba(128, 207, 255, 0.4) !important;
}
/* textarea 文字 #2b2a28 暖黑 → 冷白
   多重匹配 + 直接 textarea 兜底，确保不论 React 怎么序列化都能命中 */
[data-theme="Nebula"] .moments-composer [style*="color:#2b2a28" i],
[data-theme="Nebula"] .moments-composer [style*="color: #2b2a28" i],
[data-theme="Nebula"] .moments-composer textarea {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .moments-composer textarea::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}
/* textarea 始终有 1px 灰边（不聚焦也有），完全去掉浏览器默认 outline */
[data-theme="Nebula"] .moments-composer textarea {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
}
[data-theme="Nebula"] .moments-composer textarea:focus,
[data-theme="Nebula"] .moments-composer textarea:focus-visible {
  outline: none !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}
/* 图片上传 / 取消按钮 #b8b4ad 暖灰 → 半透白 */
[data-theme="Nebula"] .moments-composer [style*="color:#b8b4ad"] {
  color: rgba(255, 255, 255, 0.5) !important;
}
/* 上传 loading 占位 #f5f4f1 米色 → 深底 */
[data-theme="Nebula"] .moments-composer [style*="background:#f5f4f1"] {
  background: rgba(255, 255, 255, 0.04) !important;
}
/* footer 顶分隔线 —— React 序列化 hex 时不一定保留，多重选择器兜底：
     · attribute matcher 大小写不敏感
     · 结构匹配：composer 内 wrapper 的最后一个直接子 div 永远是按钮行 */
[data-theme="Nebula"] .moments-composer [style*="border-top:1px solid #f0ede8" i],
[data-theme="Nebula"] .moments-composer [style*="border-top: 1px solid #f0ede8" i],
[data-theme="Nebula"] .moments-composer [style*="#f0ede8" i],
[data-theme="Nebula"] .moments-composer > div > div:last-child {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
/* 定位按钮激活态：青绿色 #4a9e8e → sky 蓝 */
[data-theme="Nebula"] .moments-composer [style*="color:#4a9e8e"] {
  color: var(--nebula-sky) !important;
}
[data-theme="Nebula"] .moments-composer [style*="rgba(74,158,142,0.08)"] {
  background: rgba(128, 207, 255, 0.1) !important;
}
[data-theme="Nebula"] .moments-composer [style*="rgba(74,158,142,0.2)"] {
  border-color: rgba(128, 207, 255, 0.25) !important;
}

/* moment-card 跟 GitHub 风卡片对齐：极深蓝黑底 + 极淡白边，
   bg 换 var(--nebula-card) #0B1220（比 tile 更深、更纯，避开"灰蓝"），
   边 6% 白半透（比蓝边更通用、更克制）。其他主题保持原 polaroid 暖纸风。 */
[data-theme="Nebula"] .moment-card {
  background: var(--nebula-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}
[data-theme="Nebula"] .moment-card img {
  border-radius: 0 !important;
}

/* 文字层级：正文亮白，日期 / meta / source 用半透白拉开层次 */
[data-theme="Nebula"] .moment-card,
[data-theme="Nebula"] .moment-card * {
  color: var(--nebula-white) !important;
}
/* 顶部日期（首行 span） */
[data-theme="Nebula"] .moment-card > div > div:first-child > span {
  color: rgba(255, 255, 255, 0.45) !important;
}
/* 底部 meta 行（时间 / source） */
[data-theme="Nebula"] .moment-card > div > div:last-child,
[data-theme="Nebula"] .moment-card > div > div:last-child * {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* ============================================================ */
/* Archive page —— Nebula 专属归档页布局                          */
/* 入口：themes/Nebula/ArchivePage.tsx                            */
/* ============================================================ */

[data-theme="Nebula"] .nebula-archive {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

[data-theme="Nebula"] .nebula-archive-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="Nebula"] .nebula-archive-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

[data-theme="Nebula"] .nebula-archive-section-head h2 {
  margin: 0;
  font-family: var(--nebula-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--nebula-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="Nebula"] .nebula-archive-section-head h2 i {
  color: var(--nebula-sky);
  font-size: 14px;
}

[data-theme="Nebula"] .nebula-archive-section-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="Nebula"] .nebula-archive-card {
  background: var(--nebula-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  padding: 20px 22px;
}

/* ── Heatmap ── */
[data-theme="Nebula"] .nebula-heatmap { width: 100%; }
[data-theme="Nebula"] .nebula-heatmap-months {
  display: flex; gap: 2px; margin-bottom: 4px;
}
[data-theme="Nebula"] .nebula-heatmap-months > div {
  flex: 1 0 0; font-size: 10px; color: rgba(255, 255, 255, 0.4); text-align: left; min-width: 0;
}
[data-theme="Nebula"] .nebula-heatmap-grid { display: flex; gap: 2px; }
[data-theme="Nebula"] .nebula-heatmap-week {
  flex: 1 0 0; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
[data-theme="Nebula"] .nebula-heatmap-week > div {
  width: 100%; aspect-ratio: 1; border-radius: 2px;
}
[data-theme="Nebula"] .nebula-heatmap-legend {
  display: flex; align-items: center; gap: 4px; margin-top: 12px;
  font-size: 11px; color: rgba(255, 255, 255, 0.45);
}
[data-theme="Nebula"] .nebula-heatmap-legend i {
  width: 11px; height: 11px; border-radius: 2px; display: inline-block;
}

/* ── Categories grid ── */
[data-theme="Nebula"] .nebula-archive-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

[data-theme="Nebula"] .nebula-archive-cat-card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 20px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="Nebula"] .nebula-archive-cat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 70px -28px color-mix(in srgb, var(--nebula-sky) 30%, transparent);
}

[data-theme="Nebula"] .nebula-archive-cat-watermark {
  position: absolute;
  right: -12px; top: 50%; transform: translateY(-50%);
  font-size: 96px; opacity: 0.05; color: var(--nebula-white);
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
[data-theme="Nebula"] .nebula-archive-cat-card:hover .nebula-archive-cat-watermark {
  transform: translateY(-50%) scale(1.15);
  opacity: 0.1;
}

[data-theme="Nebula"] .nebula-archive-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; position: relative; z-index: 1;
}
[data-theme="Nebula"] .nebula-archive-cat-name {
  display: flex; align-items: center; gap: 8px;
  color: var(--nebula-white);
  font-family: var(--nebula-font-display);
  font-size: 15px; font-weight: 600;
  text-decoration: none;
}
[data-theme="Nebula"] .nebula-archive-cat-name i { color: var(--nebula-sky); font-size: 16px; }
[data-theme="Nebula"] .nebula-archive-cat-name:hover { color: var(--nebula-sky); }
[data-theme="Nebula"] .nebula-archive-cat-count {
  font-family: var(--nebula-font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.45);
}

[data-theme="Nebula"] .nebula-archive-cat-tags {
  display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 1;
}
[data-theme="Nebula"] .nebula-archive-cat-tag {
  font-size: 10px; padding: 2px 8px;
  border-radius: 999px;
  background: rgba(128, 207, 255, 0.08);
  border: 1px solid rgba(128, 207, 255, 0.18);
  color: var(--nebula-blue-light);
}

[data-theme="Nebula"] .nebula-archive-cat-desc {
  margin: 0; font-size: 12px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  position: relative; z-index: 1;
}

[data-theme="Nebula"] .nebula-archive-cat-latest {
  display: flex; align-items: center; gap: 6px;
  padding-top: 10px; margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px; color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  position: relative; z-index: 1;
  transition: color 0.2s ease;
}
[data-theme="Nebula"] .nebula-archive-cat-latest:hover { color: var(--nebula-white); }
[data-theme="Nebula"] .nebula-archive-cat-latest > i {
  font-size: 10px; color: var(--nebula-sky); flex-shrink: 0;
}
[data-theme="Nebula"] .nebula-archive-cat-latest > span {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-theme="Nebula"] .nebula-archive-cat-latest > em {
  font-style: normal; font-family: var(--nebula-font-mono);
  font-size: 10px; color: rgba(255, 255, 255, 0.4); flex-shrink: 0;
}

/* ── Tag cloud ── */
[data-theme="Nebula"] .nebula-archive-tag-cloud {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 16px 18px;
  background: var(--nebula-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
}
[data-theme="Nebula"] .nebula-archive-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--nebula-blue-light);
  font-size: 12px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
[data-theme="Nebula"] .nebula-archive-tag:hover {
  border-color: var(--nebula-sky);
  background: rgba(128, 207, 255, 0.08);
  color: var(--nebula-sky);
}
[data-theme="Nebula"] .nebula-archive-tag em {
  font-style: normal; font-family: var(--nebula-font-mono);
  font-size: 10px; color: rgba(255, 255, 255, 0.4);
}

/* ── Timeline ── */
[data-theme="Nebula"] .nebula-archive-timeline {
  display: flex; flex-direction: column; gap: 16px;
}
[data-theme="Nebula"] .nebula-archive-year {
  background: var(--nebula-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  overflow: hidden;
}
[data-theme="Nebula"] .nebula-archive-year-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
[data-theme="Nebula"] .nebula-archive-year-head a {
  font-family: var(--nebula-font-display);
  font-size: 22px; font-weight: 700;
  color: var(--nebula-white);
  text-decoration: none;
  letter-spacing: -0.01em;
}
[data-theme="Nebula"] .nebula-archive-year-head a:hover { color: var(--nebula-sky); }
[data-theme="Nebula"] .nebula-archive-year-head span {
  font-family: var(--nebula-font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.45);
}

[data-theme="Nebula"] .nebula-archive-month-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: background 0.15s ease;
}
[data-theme="Nebula"] .nebula-archive-month-head:hover {
  background: rgba(128, 207, 255, 0.04);
}
[data-theme="Nebula"] .nebula-archive-month-head span {
  font-family: var(--nebula-font-display);
  font-size: 13px; font-weight: 600;
  color: var(--nebula-blue-light);
}
[data-theme="Nebula"] .nebula-archive-month-head em {
  font-style: normal; font-family: var(--nebula-font-mono);
  font-size: 10px; color: rgba(255, 255, 255, 0.4);
}

[data-theme="Nebula"] .nebula-archive-post {
  display: grid;
  grid-template-columns: 60px 22px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: background 0.15s ease;
}
[data-theme="Nebula"] .nebula-archive-post:last-child { border-bottom: 0; }
[data-theme="Nebula"] .nebula-archive-post:hover {
  background: rgba(128, 207, 255, 0.04);
}
[data-theme="Nebula"] .nebula-archive-post-date {
  font-family: var(--nebula-font-mono); font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}
[data-theme="Nebula"] .nebula-archive-post-icon {
  font-size: 12px; color: var(--nebula-sky);
}
[data-theme="Nebula"] .nebula-archive-post-title {
  font-size: 13px; color: var(--nebula-white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-theme="Nebula"] .nebula-archive-post:hover .nebula-archive-post-title {
  color: var(--nebula-sky);
}
[data-theme="Nebula"] .nebula-archive-post-meta {
  display: flex; gap: 12px;
  font-family: var(--nebula-font-mono);
  font-size: 10px; color: rgba(255, 255, 255, 0.35);
}
[data-theme="Nebula"] .nebula-archive-post-meta em {
  display: inline-flex; align-items: center; gap: 3px; font-style: normal;
}

@media (max-width: 767px) {
  [data-theme="Nebula"] .nebula-archive-cat-grid { grid-template-columns: 1fr; }
  [data-theme="Nebula"] .nebula-archive-post {
    grid-template-columns: 50px 18px minmax(0, 1fr); gap: 10px;
  }
  [data-theme="Nebula"] .nebula-archive-post-meta { display: none; }
}

/* ============================================================ */
/* Globals.css 拦截层：把 unscoped 全局类的浅色 / 浅蓝 / 红色硬编码  */
/* 全部按 Nebula 调色板覆盖，确保独立主题不受其他主题/全局污染。     */
/* ============================================================ */

/* ---- danger 系（删除按钮等）---- */
/* 原色：#dc2626 / #fef2f2 / #b91c1c — 全是浅色 UI 红，深色下闪眼  */
[data-theme="Nebula"] .action-btn.danger {
  color: #ff8b8b !important;
}
[data-theme="Nebula"] .action-btn.danger:hover {
  background: rgba(178, 38, 30, 0.18) !important;
}
[data-theme="Nebula"] .btn-danger {
  background-color: #b3261e;
  color: var(--nebula-white);
}
[data-theme="Nebula"] .btn-danger:hover {
  background-color: #d44438;
}

/* ---- 通用按钮 ---- */
/* btn-primary 在 sky 蓝底上写 #fff 对比度差，改 navy-deep */
[data-theme="Nebula"] .btn-primary {
  color: var(--nebula-navy-deep);
}
[data-theme="Nebula"] .action-btn,
[data-theme="Nebula"] .btn-secondary {
  border-radius: 8px;
}
[data-theme="Nebula"] .btn,
[data-theme="Nebula"] .btn-primary,
[data-theme="Nebula"] .btn-secondary,
[data-theme="Nebula"] .btn-danger,
[data-theme="Nebula"] .btn-ghost {
  border-radius: 8px;
}

/* ---- /coding 页（globals.css 给的是浅色稿纸视觉）----
   宽度收到 960，跟 Nebula 其他页面（friend links / archives / search 等）
   保持一致；section / grid 通过覆盖 CSS 变量 --coding-content-width 拉齐 */
[data-theme="Nebula"] .coding-page {
  --coding-content-width: min(960px, calc(100% - 48px));
  background: #121212 !important;
  color: var(--nebula-white);
}
[data-theme="Nebula"] .coding-hero {
  max-width: 960px;
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
  background-color: #121212 !important;
  background-image:
    linear-gradient(rgba(168, 199, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 199, 250, 0.04) 1px, transparent 1px);
  border-bottom-color: var(--nebula-border-subtle);
}
[data-theme="Nebula"] .coding-eyebrow {
  background: rgba(128, 207, 255, 0.08);
  color: var(--nebula-blue-light);
  border-color: var(--nebula-border-blue-soft);
}
[data-theme="Nebula"] .coding-hero-title em,
[data-theme="Nebula"] .coding-section-head h3 em {
  color: var(--nebula-sky); /* 原 #8f2f24 burgundy → 天蓝 */
}
/* "代码持续生长" 中文主标 字号 -5px */
[data-theme="Nebula"] .coding-hero-title span {
  font-size: 67px !important;
}
/* "Code keeps moving, one commit at a time." 单行显示不换行 */
[data-theme="Nebula"] .coding-hero-title em {
  font-size: 34px !important;
  white-space: nowrap !important;
}
/* 副标双语：中文 21px / 英文 15px（两个 span 分开控制） */
[data-theme="Nebula"] .coding-hero-copy {
  font-size: 21px !important;
}
[data-theme="Nebula"] .coding-hero-copy span:last-child {
  font-size: 15px !important;
}
[data-theme="Nebula"] .coding-notice {
  background: var(--nebula-tile);
  border-color: var(--nebula-border-blue-soft);
  color: var(--nebula-blue-light);
  border-radius: 15px;
}

/* coding 热力图尺寸交给 globals.css（flex / gap 2px / flex: 1 0 0），
   跟 /archives 页 nebula-heatmap 完全一致；Nebula 这里只覆写颜色阶梯。 */

/* coding 热力图：GitHub 绿色阶梯（4 级 + 空白）
   颜色取自 GitHub dark contribution graph：
   blank #161b22 / l1 #0e4429 / l2 #006d32 / l3 #26a641 / l4 #39d353 */
[data-theme="Nebula"] .coding-heatmap-cell {
  background: #161b22 !important; /* 兜底：所有 cell 默认深底（globals 默认 #e9edf3 浅） */
}
[data-theme="Nebula"] .coding-heatmap-cell.level-blank {
  background: #161b22 !important;
}
[data-theme="Nebula"] .coding-heatmap-cell.level-1,
[data-theme="Nebula"] .coding-heatmap-legend i.level-1 {
  background: #0e4429 !important;
}
[data-theme="Nebula"] .coding-heatmap-cell.level-2,
[data-theme="Nebula"] .coding-heatmap-legend i.level-2 {
  background: #006d32 !important;
}
[data-theme="Nebula"] .coding-heatmap-cell.level-3,
[data-theme="Nebula"] .coding-heatmap-legend i.level-3 {
  background: #26a641 !important;
}
[data-theme="Nebula"] .coding-heatmap-cell.level-4,
[data-theme="Nebula"] .coding-heatmap-legend i.level-4 {
  background: #39d353 !important;
}
/* 图例默认（无 level 类）方块也用深底 */
[data-theme="Nebula"] .coding-heatmap-legend i {
  background: #161b22 !important;
}
/* 图例文字 #555 灰 → 半透白 */
[data-theme="Nebula"] .coding-heatmap-legend {
  color: rgba(225, 231, 238, 0.55) !important;
}
/* 头像边框 #d4d4d4 → 蓝细边 */
[data-theme="Nebula"] .coding-heatmap-avatar {
  border-color: rgba(128, 207, 255, 0.18) !important;
}

/* ---- highlight.js 配色（globals.css 内 .hljs-* 是 Gruvbox light）---- */
[data-theme="Nebula"] .hljs {
  color: var(--nebula-white);
  background: var(--nebula-input);
}
[data-theme="Nebula"] .hljs-comment,
[data-theme="Nebula"] .hljs-quote {
  color: rgba(225, 231, 238, 0.42);
  font-style: italic;
}
[data-theme="Nebula"] .hljs-keyword,
[data-theme="Nebula"] .hljs-selector-tag,
[data-theme="Nebula"] .hljs-addition {
  color: var(--nebula-sky);
}
[data-theme="Nebula"] .hljs-number,
[data-theme="Nebula"] .hljs-string,
[data-theme="Nebula"] .hljs-meta .hljs-meta-string,
[data-theme="Nebula"] .hljs-literal,
[data-theme="Nebula"] .hljs-doctag,
[data-theme="Nebula"] .hljs-regexp {
  color: #A0DDFF;
}
[data-theme="Nebula"] .hljs-title,
[data-theme="Nebula"] .hljs-section,
[data-theme="Nebula"] .hljs-name,
[data-theme="Nebula"] .hljs-selector-id,
[data-theme="Nebula"] .hljs-selector-class {
  color: var(--nebula-blue-light);
}
[data-theme="Nebula"] .hljs-attribute,
[data-theme="Nebula"] .hljs-tag .hljs-attr,
[data-theme="Nebula"] .hljs-variable,
[data-theme="Nebula"] .hljs-template-variable,
[data-theme="Nebula"] .hljs-class .hljs-title,
[data-theme="Nebula"] .hljs-type {
  color: #6dd58c;
}
[data-theme="Nebula"] .hljs-symbol,
[data-theme="Nebula"] .hljs-bullet,
[data-theme="Nebula"] .hljs-subst,
[data-theme="Nebula"] .hljs-meta,
[data-theme="Nebula"] .hljs-meta .hljs-keyword,
[data-theme="Nebula"] .hljs-selector-attr,
[data-theme="Nebula"] .hljs-selector-pseudo,
[data-theme="Nebula"] .hljs-link {
  color: #ffb683;
}
[data-theme="Nebula"] .hljs-built_in,
[data-theme="Nebula"] .hljs-deletion {
  color: #f2b8b5;
}
[data-theme="Nebula"] .hljs-formula {
  background: var(--nebula-tile);
}

/* ---- code-block-wrapper（PostContent 渲染的代码块外层）---- */
/* globals: border-radius:0; collapsed::after 用 #1d1f21 渐变兜底
   底色统一 #0a0d14（跟上面 .blog-prose pre 一致）—— 跟文章卡片
   #131314 拉开 9 个亮度档，代码块边界肉眼可见 */
[data-theme="Nebula"] .code-block-wrapper {
  border-radius: 15px;
  border: 1px solid var(--nebula-border-subtle);
}
[data-theme="Nebula"] .code-block-wrapper pre {
  background: #0a0d14 !important;
}
[data-theme="Nebula"] .code-block-wrapper.collapsed::after {
  background: linear-gradient(transparent, #0a0d14);
}
[data-theme="Nebula"] .code-expand-btn {
  background: #0a0d14;
  color: var(--nebula-blue-light);
  border-top-color: var(--nebula-border-subtle);
}
[data-theme="Nebula"] .code-expand-btn:hover {
  color: var(--nebula-white);
}
[data-theme="Nebula"] .code-copy-btn {
  background: rgba(225, 231, 238, 0.08);
  color: var(--nebula-blue-light);
}
[data-theme="Nebula"] .code-copy-btn:hover {
  background: rgba(225, 231, 238, 0.16);
  color: var(--nebula-white);
}

/* ─── Prism token 配色（参考 Azure 用 prism-tomorrow，但调成 Nebula
       蓝调暖色平衡；优先级用 [data-theme] + .blog-prose pre 顶到 (0,4,2)
       以上，确保 prism-tomorrow 默认色被取代，且不被任何兜底 color 吃掉） ─── */
[data-theme="Nebula"] .blog-prose pre .token.comment,
[data-theme="Nebula"] .blog-prose pre .token.block-comment,
[data-theme="Nebula"] .blog-prose pre .token.prolog,
[data-theme="Nebula"] .blog-prose pre .token.doctype,
[data-theme="Nebula"] .blog-prose pre .token.cdata {
  color: rgba(225, 231, 238, 0.42);
  font-style: italic;
}
[data-theme="Nebula"] .blog-prose pre .token.punctuation {
  color: rgba(225, 231, 238, 0.62);
}
[data-theme="Nebula"] .blog-prose pre .token.tag,
[data-theme="Nebula"] .blog-prose pre .token.attr-name,
[data-theme="Nebula"] .blog-prose pre .token.namespace,
[data-theme="Nebula"] .blog-prose pre .token.deleted {
  color: #FF9694;
}
[data-theme="Nebula"] .blog-prose pre .token.function-name {
  color: #A0DDFF;
}
[data-theme="Nebula"] .blog-prose pre .token.boolean,
[data-theme="Nebula"] .blog-prose pre .token.number,
[data-theme="Nebula"] .blog-prose pre .token.function {
  color: #FFB36B;
}
[data-theme="Nebula"] .blog-prose pre .token.property,
[data-theme="Nebula"] .blog-prose pre .token.class-name,
[data-theme="Nebula"] .blog-prose pre .token.constant,
[data-theme="Nebula"] .blog-prose pre .token.symbol {
  color: #FFD56B;
}
[data-theme="Nebula"] .blog-prose pre .token.selector,
[data-theme="Nebula"] .blog-prose pre .token.important,
[data-theme="Nebula"] .blog-prose pre .token.atrule,
[data-theme="Nebula"] .blog-prose pre .token.keyword,
[data-theme="Nebula"] .blog-prose pre .token.builtin {
  color: var(--nebula-blue-accent);
}
[data-theme="Nebula"] .blog-prose pre .token.string,
[data-theme="Nebula"] .blog-prose pre .token.char,
[data-theme="Nebula"] .blog-prose pre .token.attr-value,
[data-theme="Nebula"] .blog-prose pre .token.regex,
[data-theme="Nebula"] .blog-prose pre .token.variable {
  color: #B5E48C;
}
[data-theme="Nebula"] .blog-prose pre .token.operator,
[data-theme="Nebula"] .blog-prose pre .token.entity,
[data-theme="Nebula"] .blog-prose pre .token.url {
  color: #67CDCC;
}
[data-theme="Nebula"] .blog-prose pre .token.important,
[data-theme="Nebula"] .blog-prose pre .token.bold {
  font-weight: 600;
}
[data-theme="Nebula"] .blog-prose pre .token.italic {
  font-style: italic;
}
[data-theme="Nebula"] .blog-prose pre .token.inserted {
  color: #4ade80;
}

/* 代码块内默认行文本 / 行号 */
[data-theme="Nebula"] .blog-prose pre code[class*="language-"],
[data-theme="Nebula"] .blog-prose pre[class*="language-"] {
  color: rgba(225, 231, 238, 0.92);
  background: transparent;
  text-shadow: none;
}
[data-theme="Nebula"] .blog-prose pre .line-number-style {
  color: rgba(225, 231, 238, 0.32) !important;
  border-right: 1px solid rgba(128, 207, 255, 0.12);
  padding-right: 0.8em;
  margin-right: 0.8em;
}
/* 高亮整行 */
[data-theme="Nebula"] .blog-prose pre .code-line.highlight-line {
  background: rgba(128, 207, 255, 0.08);
  border-left: 3px solid var(--nebula-blue-accent);
  margin-left: -20px;
  padding-left: 17px;
}

/* ---- md-download-card：tokens 化已支持，对齐到 Nebula ---- */
[data-theme="Nebula"] .md-download-card {
  --md-download-bg: var(--nebula-tile);
  --md-download-accent: var(--nebula-sky);
  --md-download-text: var(--nebula-white);
  border-radius: 15px;
  border: 1px solid var(--nebula-border-blue-soft);
}

/* ---- footprint 卡片：globals 用浅底 #fff，需要深色 + 圆角 ---- */
[data-theme="Nebula"] .footprint-card {
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-blue-soft);
  border-radius: 15px;
  overflow: hidden;
}
[data-theme="Nebula"] .footprint-card:hover {
  border-color: var(--nebula-border-blue);
  box-shadow: 0 28px 70px -28px color-mix(in srgb, var(--nebula-sky) 35%, transparent);
}
[data-theme="Nebula"] .footprint-card.is-active {
  box-shadow: 0 28px 70px -28px color-mix(in srgb, var(--nebula-sky) 50%, transparent);
}
[data-theme="Nebula"] .footprint-card-cover {
  background: var(--nebula-near-black);
}
[data-theme="Nebula"] .footprint-search {
  background: var(--nebula-tile);
  border: 1px solid var(--nebula-border-blue-soft);
  border-radius: 15px;
}

/* ---- footprint mapbox 暗色适配 ----
   FootprintMap.tsx 在 Nebula 下走 dark-v11 底图（深底）。底图换了，
   但 popup tip（小三角箭头）默认由 mapbox-gl CSS 写死白色，浮在暗色
   底图上很突兀；popup 内容已经走 var(--color-bg-card)（解析成 Nebula
   深卡片）OK，三角和外边框这里补一下。 */
[data-theme="Nebula"] .footprint-map {
  border-color: var(--nebula-border-blue-soft);
}
/* tip 是三角形：4 个 border 中只有 1 个非透明（决定指向）。给 8 个
   anchor 方向各自的"实色 border"翻成 Nebula 卡片色，其余 transparent
   不动。 */
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
  border-top-color: var(--nebula-card) !important;
}
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
  border-bottom-color: var(--nebula-card) !important;
}
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: var(--nebula-card) !important;
}
[data-theme="Nebula"] .footprint-mapbox-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: var(--nebula-card) !important;
}
/* popup 内容外层加 Nebula 蓝细边 + 阴影更深 */
[data-theme="Nebula"] .footprint-mapbox-popup .mapboxgl-popup-content {
  border-color: var(--nebula-border-blue-soft) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55) !important;
}
/* 卡片之间的分隔线翻深 */
[data-theme="Nebula"] .footprint-map-popup-card {
  border-top-color: var(--nebula-border-subtle) !important;
}
[data-theme="Nebula"] .footprint-map-popup-card:hover {
  background: rgba(128, 207, 255, 0.06) !important;
}

/* ---- archive-cat-card hover ::after 默认是白雾 backdrop-filter，
        深色下不需要 ---- */
[data-theme="Nebula"] .archive-cat-card::after {
  display: none;
}

/* ---- /links 友链页：toolbar + 卡片 / 紧凑两套视图 ---- */

[data-theme="Nebula"] .links-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
[data-theme="Nebula"] .links-group-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
[data-theme="Nebula"] .links-group-tab {
  padding: 6px 14px;
  font-size: 12px; font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
[data-theme="Nebula"] .links-group-tab:hover {
  color: var(--nebula-white);
  border-color: rgba(255, 255, 255, 0.18);
}
[data-theme="Nebula"] .links-group-tab.active {
  background: var(--nebula-sky);
  color: var(--nebula-navy-deep);
  border-color: var(--nebula-sky);
}

[data-theme="Nebula"] .links-view-toggle {
  display: inline-flex;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
[data-theme="Nebula"] .links-view-btn {
  width: 36px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer; font-size: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}
/* 4 个按钮之间加 1px 竖线分隔（最后一个不加） */
[data-theme="Nebula"] .links-view-btn:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="Nebula"] .links-view-btn:hover {
  color: var(--nebula-white); background: rgba(255, 255, 255, 0.04);
}
[data-theme="Nebula"] .links-view-btn.active {
  color: var(--nebula-sky); background: rgba(128, 207, 255, 0.1);
}

/* ── card 视图 ── 大卡片，name + description + 右侧外链箭头 */
[data-theme="Nebula"] .friend-link-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 12px !important;
}
[data-theme="Nebula"] .friend-link-card-item {
  background: #121212 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 4px !important;
  padding: 16px 18px !important;
  color: var(--nebula-white);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}
[data-theme="Nebula"] .friend-link-card-item:hover {
  background: #161616 !important;
  border-color: rgba(128, 207, 255, 0.35) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--nebula-sky) 30%, transparent) !important;
}
[data-theme="Nebula"] .friend-link-card-item .friend-link-logo {
  width: 40px; height: 40px;
}

/* 分组标题（"默认 / 学习 / 朋友 ..."）—— inline 写死 #1a1a1a 暗色 + #999
   计数灰，在 Nebula 黑底上几乎看不见。同时用 className 钩子（更稳）+
   inline style attr matcher（兜底）双重命中 */
[data-theme="Nebula"] .friend-link-group-title,
[data-theme="Nebula"] [style*="color:#1a1a1a" i],
[data-theme="Nebula"] [style*="color: #1a1a1a" i] {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .friend-link-group-count,
[data-theme="Nebula"] [style*="color:#999" i],
[data-theme="Nebula"] [style*="color: #999" i] {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ─── 随机友链骰子弹窗（极简风）───
   全屏磨砂遮罩 + 居中大骰子 + 结果卡 + 倒计时按钮
   状态：idle (隐藏) / rolling (摇 1.2s) / result (5s 倒计时) */
[data-theme="Nebula"] .dice-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: nebulaDiceFadeIn 0.2s ease-out;
}

@keyframes nebulaDiceFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

[data-theme="Nebula"] .dice-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 420px;
  width: 100%;
  padding: 32px;
}

[data-theme="Nebula"] .dice-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.15s ease, background 0.15s ease;
}
[data-theme="Nebula"] .dice-modal-close:hover {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

/* 大骰子图标 */
[data-theme="Nebula"] .dice-icon {
  font-size: 160px;
  line-height: 1;
  color: var(--nebula-white);
  filter: drop-shadow(0 0 40px rgba(128, 207, 255, 0.45));
}
[data-theme="Nebula"] .dice-icon--rolling {
  animation: nebulaDiceRoll 0.5s linear infinite;
}
[data-theme="Nebula"] .dice-icon--result {
  font-size: 96px;
  transition: font-size 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.35s ease;
  filter: drop-shadow(0 0 24px rgba(128, 207, 255, 0.35));
}

@keyframes nebulaDiceRoll {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

[data-theme="Nebula"] .dice-hint {
  margin: 0;
  font-family: var(--nebula-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

/* 结果卡片（玻璃磨砂） */
[data-theme="Nebula"] .dice-result-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  animation: nebulaDiceCardIn 0.3s ease-out;
}

@keyframes nebulaDiceCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-theme="Nebula"] .dice-result-card .friend-link-logo {
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0;
}
[data-theme="Nebula"] .dice-result-info {
  flex: 1;
  min-width: 0;
}
[data-theme="Nebula"] .dice-result-info h3 {
  margin: 0 0 4px;
  font-family: var(--nebula-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--nebula-white);
}
[data-theme="Nebula"] .dice-result-info p {
  margin: 0 0 6px;
  font-size: 12px;
  color: rgba(225, 231, 238, 0.7);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
[data-theme="Nebula"] .dice-result-url {
  font-family: var(--nebula-font-mono);
  font-size: 11px;
  color: var(--nebula-blue-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 操作按钮区 */
[data-theme="Nebula"] .dice-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
[data-theme="Nebula"] .dice-actions button {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--nebula-font-display);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
[data-theme="Nebula"] .dice-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(225, 231, 238, 0.85);
}
[data-theme="Nebula"] .dice-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--nebula-white);
}
[data-theme="Nebula"] .dice-btn-primary {
  background: var(--nebula-blue-accent);
  border: 1px solid var(--nebula-blue-accent);
  color: var(--nebula-navy-deep);
  font-weight: 600;
}
[data-theme="Nebula"] .dice-btn-primary:hover {
  background: var(--nebula-sky-hover);
  border-color: var(--nebula-sky-hover);
}

@media (max-width: 640px) {
  [data-theme="Nebula"] .dice-icon { font-size: 120px; }
  [data-theme="Nebula"] .dice-icon--result { font-size: 72px; }
  [data-theme="Nebula"] .dice-modal-content { padding: 20px; gap: 18px; }
}

/* 友链页右上角"骰子 / +" 方形按钮 —— 跟 Header dice 视觉一致 */
[data-theme="Nebula"] .links-action-btn {
  border: 1px solid rgba(128, 207, 255, 0.25) !important;
  background: rgba(128, 207, 255, 0.04) !important;
  color: rgba(225, 231, 238, 0.75) !important;
}
[data-theme="Nebula"] .links-action-btn:hover {
  border-color: var(--nebula-blue-accent) !important;
  background: rgba(128, 207, 255, 0.12) !important;
  color: var(--nebula-blue-accent) !important;
}

/* ── 申请友链弹窗暗色适配 —— 用结构选择器代替 inline-style 字符串匹配
   ── inline JS handlers (onFocus/onBlur/onMouseEnter) 设的颜色浏览器
      可能序列化成 rgb()，hex matcher 不可靠；用元素结构 + 通配规则
      硬覆盖所有内部样式 ── */

[data-theme="Nebula"] .links-apply-backdrop {
  background: rgba(0, 0, 0, 0.6) !important;
  -webkit-backdrop-filter: blur(8px) !important;
          backdrop-filter: blur(8px) !important;
}
[data-theme="Nebula"] .links-apply-modal {
  background: var(--nebula-tile) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6) !important;
  color: var(--nebula-white) !important;
}

/* 弹窗内所有 div / p / h1-h6 / span / label —— 强制继承父级文字色 */
[data-theme="Nebula"] .links-apply-modal h1,
[data-theme="Nebula"] .links-apply-modal h2,
[data-theme="Nebula"] .links-apply-modal h3 {
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .links-apply-modal label {
  color: rgba(225, 231, 238, 0.7) !important;
}
[data-theme="Nebula"] .links-apply-modal p {
  color: rgba(225, 231, 238, 0.6) !important;
}

/* 弹窗内所有分隔线 —— header / footer 是 .links-apply-modal 的直接子 div，
   不是孙子层。同时覆盖底部边、顶部边两个方向 */
[data-theme="Nebula"] .links-apply-modal > div {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="Nebula"] .links-apply-modal > div[style*="border-bottom"],
[data-theme="Nebula"] .links-apply-modal > div[style*="border-top"] {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* footer bar 浅底 #fafafa —— 同时兜底 rgb 序列化 */
[data-theme="Nebula"] .links-apply-modal [style*="#fafafa" i],
[data-theme="Nebula"] .links-apply-modal [style*="rgb(250, 250, 250)" i],
[data-theme="Nebula"] .links-apply-modal [style*="rgb(250,250,250)" i] {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* 关闭按钮 hover 浅底 #f5f5f5（JS 动态设置，可能 rgb 化） */
[data-theme="Nebula"] .links-apply-modal [style*="#f5f5f5" i],
[data-theme="Nebula"] .links-apply-modal [style*="rgb(245, 245, 245)" i],
[data-theme="Nebula"] .links-apply-modal [style*="rgb(245,245,245)" i] {
  background: rgba(128, 207, 255, 0.1) !important;
}

/* 输入框：用元素选择器整体覆盖 background / border / text / placeholder */
[data-theme="Nebula"] .links-apply-modal input,
[data-theme="Nebula"] .links-apply-modal textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--nebula-white) !important;
}
[data-theme="Nebula"] .links-apply-modal input::placeholder,
[data-theme="Nebula"] .links-apply-modal textarea::placeholder {
  color: rgba(225, 231, 238, 0.35) !important;
}
/* focus 态 —— 覆盖 onFocus 设的 var(--color-primary)（Nebula 解析成 sky） */
[data-theme="Nebula"] .links-apply-modal input:focus,
[data-theme="Nebula"] .links-apply-modal textarea:focus {
  border-color: var(--nebula-blue-accent) !important;
  outline: none !important;
  box-shadow: none !important;
}
/* JS 在 onBlur 把 borderColor 重设为 #d9d9d9，覆盖一次 */
[data-theme="Nebula"] .links-apply-modal input:not(:focus),
[data-theme="Nebula"] .links-apply-modal textarea:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* 关闭按钮（header 右上 ✕）—— transparent / 灰字 / hover 灰字 */
[data-theme="Nebula"] .links-apply-modal > div:first-child button {
  color: rgba(225, 231, 238, 0.5) !important;
}
[data-theme="Nebula"] .links-apply-modal > div:first-child button:hover {
  color: var(--nebula-white) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* footer 取消按钮（白底 + 灰边 + 灰字）—— 第一个 footer button */
[data-theme="Nebula"] .links-apply-modal > div:last-child button:first-child {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: rgba(225, 231, 238, 0.85) !important;
}
[data-theme="Nebula"] .links-apply-modal > div:last-child button:first-child:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* footer 提交申请按钮（var(--color-primary) 蓝胶囊）—— 字色加深、加粗 */
[data-theme="Nebula"] .links-apply-modal > div:last-child button:last-child {
  background: var(--nebula-blue-accent) !important;
  border: none !important;
  color: var(--nebula-navy-deep) !important;
  font-weight: 600 !important;
}
[data-theme="Nebula"] .links-apply-modal > div:last-child button:last-child:hover {
  background: var(--nebula-sky-hover) !important;
}

/* 头像兜底白底已下移到 .friend-link-logo 公共规则里（line ~4592），
   避免两条规则相互覆盖。这里保留注释做指引。 */

/* ── compact 视图 ── 紧凑小条，仅 logo + name */
[data-theme="Nebula"] .friend-link-compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  gap: 6px !important;
}
[data-theme="Nebula"] .friend-link-compact-item {
  background: #121212 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 4px !important;
  padding: 8px 10px !important;
  color: var(--nebula-white);
  transition: border-color 0.15s ease, background 0.15s ease !important;
}
[data-theme="Nebula"] .friend-link-compact-item:hover {
  background: #161616 !important;
  border-color: rgba(128, 207, 255, 0.35) !important;
  box-shadow: none !important;
}
[data-theme="Nebula"] .friend-link-compact-item .friend-link-logo {
  width: 24px; height: 24px;
}

/* ---- /feeds 订阅页：grid（3 列固定）/ list（1 行横向）双视图 ---- */

/* toolbar：视图切换按钮组 */
[data-theme="Nebula"] .feeds-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 16px;
}
[data-theme="Nebula"] .feeds-view-toggle {
  display: inline-flex;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
[data-theme="Nebula"] .feeds-view-btn {
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}
[data-theme="Nebula"] .feeds-view-btn:hover:not(:disabled) {
  color: var(--nebula-white);
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="Nebula"] .feeds-view-btn.active {
  color: var(--nebula-sky);
  background: rgba(128, 207, 255, 0.1);
}
[data-theme="Nebula"] .feeds-view-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* feeds-body 容器 */
[data-theme="Nebula"] .feeds-body {
  padding-bottom: 80px;
}
[data-theme="Nebula"] .feeds-empty {
  text-align: center;
  padding: 80px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}
[data-theme="Nebula"] .feeds-empty p {
  margin: 0 0 6px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="Nebula"] .feeds-empty small {
  font-size: 12px;
}

/* ── feed-card 共用基线 ── */
[data-theme="Nebula"] .feed-card {
  position: relative;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}
[data-theme="Nebula"] .feed-card:hover {
  border-color: rgba(128, 207, 255, 0.35);
  background: #161616;
}
[data-theme="Nebula"] .feed-card-avatar {
  position: relative;
  background: var(--nebula-near-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
[data-theme="Nebula"] .feed-card-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-theme="Nebula"] .feed-card-source {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="Nebula"] .feed-card-date {
  font-family: var(--nebula-font-mono);
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
[data-theme="Nebula"] .feed-card-title {
  margin: 0;
  font-family: var(--nebula-font-display);
  color: var(--nebula-white);
}
[data-theme="Nebula"] .feed-card-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  font-size: 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}
[data-theme="Nebula"] .feed-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nebula-sky);
  font-size: 11px;
}

/* meta 公共：source + 分割方块 + date 横排 */
[data-theme="Nebula"] .feed-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
[data-theme="Nebula"] .feed-card-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

/* ── Grid 模式（3 列固定尺寸卡片）── */
[data-theme="Nebula"] .feeds-list.is-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card {
  height: 280px;
  padding: 18px 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "avatar meta"
    "title  title"
    "desc   desc";
  gap: 6px 8px;
  align-items: center;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-avatar {
  grid-area: avatar;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-meta {
  grid-area: meta;
  font-size: 11px;
  width: 100%;
  justify-content: space-between;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-source {
  font-size: 12px;
  flex: 1;
  min-width: 0;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-date {
  font-size: 10px;
}
/* grid 模式不要分割块（source 占左 / date 占右用 space-between 拉开） */
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-sep {
  display: none;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-title {
  grid-area: title;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-desc {
  grid-area: desc;
  -webkit-line-clamp: 5;
  align-self: start;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(128, 207, 255, 0.1);
  border: 1px solid rgba(128, 207, 255, 0.18);
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
[data-theme="Nebula"] .feeds-list.is-grid .feed-card:hover .feed-card-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ── List 模式（一行一个）──
   左：方头像（48×48 + 4px 圆角）
   右：第 1 行 title (左) + meta (右: source · date)；第 2-3 行 description */
[data-theme="Nebula"] .feeds-list.is-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "avatar title meta"
    "avatar desc  desc";
  column-gap: 14px;
  row-gap: 4px;
  align-items: start;
  padding: 14px 18px;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-avatar {
  grid-area: avatar;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  font-size: 16px;
  align-self: center;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-title {
  grid-area: title;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-meta {
  grid-area: meta;
  font-size: 11px;
  align-self: center;
  color: rgba(255, 255, 255, 0.5);
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-source {
  font-size: 11px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-date {
  font-size: 11px;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-desc {
  grid-area: desc;
  -webkit-line-clamp: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.6;
}
[data-theme="Nebula"] .feeds-list.is-list .feed-card-arrow {
  display: none;
}

/* ── 加载更多 ── */
[data-theme="Nebula"] .feeds-loadmore {
  padding: 32px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}
[data-theme="Nebula"] .feeds-loadmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--nebula-sky);
  border: 1px solid rgba(128, 207, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
[data-theme="Nebula"] .feeds-loadmore-btn:hover {
  background: rgba(128, 207, 255, 0.08);
  border-color: var(--nebula-sky);
}

/* loading 状态 —— 三点 bounce + 文字 */
[data-theme="Nebula"] .feeds-loadmore-loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(128, 207, 255, 0.06);
  border: 1px solid rgba(128, 207, 255, 0.18);
  border-radius: 999px;
  color: var(--nebula-sky);
  font-size: 12px;
}
[data-theme="Nebula"] .feeds-loadmore-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nebula-sky);
  animation: feeds-loader-bounce 1.2s infinite ease-in-out both;
}
[data-theme="Nebula"] .feeds-loadmore-dot:nth-child(1) { animation-delay: -0.32s; }
[data-theme="Nebula"] .feeds-loadmore-dot:nth-child(2) { animation-delay: -0.16s; }
[data-theme="Nebula"] .feeds-loadmore-dot:nth-child(3) { animation-delay: 0s; }
[data-theme="Nebula"] .feeds-loadmore-text {
  letter-spacing: 0.04em;
}

@keyframes feeds-loader-bounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── 移动端：grid 强制收到 1 列（FeedsClient 也强制 effectiveMode='list'）── */
@media (max-width: 767px) {
  [data-theme="Nebula"] .feeds-list.is-grid {
    grid-template-columns: 1fr;
  }
  [data-theme="Nebula"] .feeds-list.is-grid .feed-card {
    height: auto;
    min-height: 200px;
  }
}
/* logo 公共：squircle / 小米 logo 弧度（30% 圆角 + SVG mask 真 squircle）
   border-radius 是圆弧，跟小米/iOS 真 squircle 数学曲线不一样；
   用 SVG mask 实现真 squircle（superellipse 形状，曲率连续渐变） */
[data-theme="Nebula"] .friend-link-logo {
  background: #fff !important;
  border-radius: 30% !important;
  flex-shrink: 0;
  object-fit: cover;
  /* 真 squircle mask：M..C..Z 路径用 cubic Bézier 逼近超椭圆 n=4，
     比 border-radius 的圆弧更接近小米/iOS app icon 的曲率 */
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0,50 C0,8.5 8.5,0 50,0 C91.5,0 100,8.5 100,50 C100,91.5 91.5,100 50,100 C8.5,100 0,91.5 0,50 Z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0,50 C0,8.5 8.5,0 50,0 C91.5,0 100,8.5 100,50 C100,91.5 91.5,100 50,100 C8.5,100 0,91.5 0,50 Z'/></svg>") no-repeat center / contain;
}
[data-theme="Nebula"] .friend-link-name {
  color: var(--nebula-white) !important;
  font-family: var(--nebula-font-display);
  font-weight: 500;
  font-size: 13px;
}
[data-theme="Nebula"] .friend-link-description {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 12px;
  margin-top: 4px;
}
[data-theme="Nebula"] .friend-link-external {
  color: rgba(255, 255, 255, 0.25) !important;
  transition: color 0.2s ease, transform 0.2s ease;
}
[data-theme="Nebula"] .friend-link-card-item:hover .friend-link-external {
  color: var(--nebula-sky) !important;
  transform: translateX(2px);
}

/* ---- moment embed (.utter-moment-embed) 默认是浅蓝白渐变，深色下显米黄 ---- */
[data-theme="Nebula"] .utter-moment-embed,
[data-theme="Nebula"] .blog-prose .utter-moment-embed {
  background: var(--nebula-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-left: 4px solid var(--nebula-sky) !important;
  border-radius: 15px;
  color: var(--nebula-white);
}

/* ---- 通用 .card / .card-hover ---- */
[data-theme="Nebula"] .card {
  background: var(--nebula-card);
  border: 1px solid var(--nebula-border-subtle);
  border-radius: 15px;
  color: var(--nebula-white);
}
[data-theme="Nebula"] .card-hover:hover {
  border-color: var(--nebula-border-blue);
}

/* ---- badge：globals 默认浅色 ---- */
[data-theme="Nebula"] .badge {
  background: rgba(128, 207, 255, 0.12);
  color: var(--nebula-blue-light);
  border-radius: 999px;
}

/* ============================================================ */
/* Responsive                                                     */
/* ============================================================ */

@media (max-width: 1199px) {
  [data-theme="Nebula"] .nebula-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  [data-theme="Nebula"] .nebula-header-inner {
    padding: 0 20px;
    gap: 12px;
  }

  [data-theme="Nebula"] .nebula-nav { display: none; }

  [data-theme="Nebula"] .nebula-menu-button { display: inline-flex; }

  [data-theme="Nebula"] .nebula-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* TOC 在窄屏由独立媒体查询控制（display:none），这里无需再处理 */

  [data-theme="Nebula"] .nebula-footer-row {
    gap: 4px 10px;
    font-size: 11px;
  }
  [data-theme="Nebula"] .nebula-footer-copy,
  [data-theme="Nebula"] .nebula-footer-links {
    margin-left: 0;
    margin-right: 0;
  }
  [data-theme="Nebula"] .nebula-footer-stat:not(:last-child)::after {
    display: none;
  }

  [data-theme="Nebula"] .post-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  [data-theme="Nebula"] .post-prev-next { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  [data-theme="Nebula"] .nebula-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  [data-theme="Nebula"] .nebula-post {
    padding-left: 16px;
    padding-right: 16px;
  }

  [data-theme="Nebula"] .nebula-post-title {
    font-size: clamp(20px, 5.5vw, 26px);
  }

  [data-theme="Nebula"] .nebula-post-title--on-cover {
    padding: 20px 18px 16px;
    font-size: clamp(18px, 4.8vw, 22px);
  }

  [data-theme="Nebula"] .nebula-post-cover {
    aspect-ratio: 16 / 9;
    border-radius: var(--nebula-radius-lg);
  }

  [data-theme="Nebula"] .nebula-post-cover--with-title {
    aspect-ratio: 4 / 3;
  }

  [data-theme="Nebula"] .nebula-post-author {
    padding: 16px;
  }

  [data-theme="Nebula"] .nebula-post-author-avatar {
    width: 44px;
    height: 44px;
  }

  [data-theme="Nebula"] .nebula-hero {
    padding: 56px 16px 64px;
  }

  [data-theme="Nebula"] .nebula-tile-stage {
    height: 200px;
    margin-top: 48px;
  }

  [data-theme="Nebula"] .nebula-tile {
    width: 92px;
    height: 92px;
    font-size: 26px;
  }

  [data-theme="Nebula"] .nebula-stat-strip {
    grid-template-columns: 1fr;
  }

  [data-theme="Nebula"] .nebula-post-card {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }

  [data-theme="Nebula"] .nebula-card-arrow {
    align-self: flex-start;
  }

  [data-theme="Nebula"] .nebula-card-title {
    font-size: 20px;
  }

  [data-theme="Nebula"] .nebula-section-heading h2 {
    font-size: 38px; /* 移动端水印小一档但仍可识别 */
  }

  [data-theme="Nebula"] .post-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
