:root {
  --post-heading-icon: "🌸"; /* 使用 emoji 图标 */
}

/* A. 主题生成了 .headerlink 时（优先使用锚点） */
#post h1 > .headerlink::before,
#post h2 > .headerlink::before,
#post h3 > .headerlink::before,
#post h4 > .headerlink::before,
#post h5 > .headerlink::before,
#post h6 > .headerlink::before {
  content: var(--post-heading-icon); /* 使用 emoji 图标 */
  display: inline-block;
  width: auto;
  height: 1.5em;
  margin-right: 1em; /* 增加图标与标题的间距 */
  vertical-align: middle; /* 默认对齐方式 */
  background: none; /* 去掉颜色配置 */
  background-size: contain;
  filter: none; /* 去掉颜色配置 */
  transform: translateY(-0.2em); /* 稍微调整图标位置，使其向上 */
  animation: rotate-icon 10s linear infinite; /* 缓慢旋转动画 */
}

/* B. 没有 .headerlink 时，给标题本身加（仅限带 id 的标题，避免影响侧栏/目录） */
#post h1[id]:not(:has(> .headerlink))::before,
#post h2[id]:not(:has(> .headerlink))::before,
#post h3[id]:not(:has(> .headerlink))::before,
#post h4[id]:not(:has(> .headerlink))::before,
#post h5[id]:not(:has(> .headerlink))::before,
#post h6[id]:not(:has(> .headerlink))::before {
  content: var(--post-heading-icon); /* 使用 emoji 图标 */
  display: inline-block;
  width: auto;
  height: 1.5em;
  margin-right: 1em; /* 增加图标与标题的间距 */
  vertical-align: middle; /* 默认对齐方式 */
  background: none; /* 去掉颜色配置 */
  background-size: contain;
  filter: none; /* 去掉颜色配置 */
  transform: translateY(-0.2em); /* 稍微调整图标位置，使其向上 */
  animation: rotate-icon 10s linear infinite; /* 缓慢旋转动画 */
}

/* 定义旋转动画 */
@keyframes rotate-icon {
  0% {
    transform: translateY(-0.2em) rotate(0deg);
  }
  100% {
    transform: translateY(-0.2em) rotate(360deg);
  }
}